📓
Stake Pool Scripts by APEX Stake Pool
  • Stake pool registration
    • Directory structure
    • Wallet
    • Metadata
    • Configuration file
    • Stake pool scripts
      • Cold key
      • VRF key
      • KES key
      • Operational certificate
      • Registration certificate
      • Stake key registration
      • Stake key delegation
    • Transaction
      • Using a remote node
      • Transaction scripts
    • Retiring the stake pool
  • Hardware wallet for Pledge
    • Stake key
    • Registration certificate
    • Stake key registration
    • Stake key delegation
    • Transactions
      • Registration certificate
      • Delegation certificate
  • Running a cardano node
    • Starting a relay node
    • Starting a block producing node
Powered by GitBook
On this page
  1. Stake pool registration
  2. Transaction

Transaction scripts

Create the transaction script file (transaction.sh for example) in a new subfolder of the transactions folder, sign it and submit it to the blockchain:

#!/bin/bash


source ../../pool-scripts/env

ADDRESS=$(cat ${NODE_HOME}/keys/payment.addr)
TRANS=$(cardano-cli query utxo ${NET} --address $ADDRESS | tail -n 1)
UTXO=$(echo ${TRANS} | awk '{print $1}')
ID=$(echo ${TRANS} | awk '{print $2}')
TXIN="${UTXO}#${ID}"

cardano-cli transaction build \
${NET} \
--witness-override 3 \
--tx-in ${TXIN} \
--change-address ${ADDRESS} \
--certificate-file ${NODE_HOME}/pool-certificates/pool-registration.cert \
--certificate-file ${NODE_HOME}/pool-certificates/stake-registration.cert \
--certificate-file ${NODE_HOME}/pool-certificates/stake-delegation.cert \
--out-file tx.raw

cardano-cli transaction sign \
--tx-body-file tx.raw \
--signing-key-file ${NODE_HOME}/pool-keys/cold.skey \
--signing-key-file ${NODE_HOME}/keys/stake.skey \
--signing-key-file ${NODE_HOME}/keys/payment.skey \
${NET} \
--out-file tx.signed

cardano-cli transaction submit \
--tx-file tx.signed \
${NET}
PreviousUsing a remote nodeNextRetiring the stake pool

Last updated 1 year ago