Categories
cardano

De-Register stake address Cardano – Testnet

This will reclaim the 2 ADA deposit

cardano-cli query utxo     --address $(cat payment.addr)    --allegra-era --testnet-magic 1097911063
cardano-cli shelley query protocol-parameters \
--testnet-magic 1097911063 \
--allegra-era \
--out-file protocol.json

cardano-cli shelley stake-address deregistration-certificate \
--stake-verification-key-file stake.vkey \
--out-file destake.cert


cardano-cli shelley transaction build-raw \
--tx-in 6ac2a8ea2a8f949e22539ed405961e0bce409e461bcb752b3baaed9b3e06971f#0 \
--tx-out $(cat payment.addr)+0 \
--ttl 0 \
--fee 0 \
--out-file tx.raw \
--certificate-file destake.cert


cardano-cli shelley transaction calculate-min-fee \
--tx-body-file tx.raw \
--tx-in-count 1 \
--tx-out-count 1 \
--witness-count 1 \
--byron-witness-count 0 \
--testnet-magic 1097911063 \
--protocol-params-file protocol.json

fee: 172761

2896701265 - 172761 + 2000000 = 2898528504

currentSlot=$(cardano-cli query tip --testnet-magic 1097911063 | jq -r '.slotNo')
echo Current Slot: $currentSlot

cardano-cli shelley transaction build-raw \
--tx-in 6ac2a8ea2a8f949e22539ed405961e0bce409e461bcb752b3baaed9b3e06971f#0 \
--tx-out $(cat payment.addr)+2898528504 \
--ttl $(($currentSlot+1000)) \
--fee 172761 \
--out-file tx.raw \
--certificate-file destake.cert


cardano-cli shelley transaction sign \
--tx-body-file tx.raw \
--signing-key-file payment.skey \
--signing-key-file stake.skey \
--testnet-magic 1097911063 \
--out-file tx.signed


cardano-cli shelley transaction submit \
--tx-file tx.signed \
--testnet-magic 1097911063

Reclaim :

https://explorer.cardano-testnet.iohkdev.io/en/transaction?id=5f15dcb0d82f0440269cd68fb313dfa6428f544eb5154941967e25436ba8cb3a

White paper: 3.10.2 Deposits

https://hydra.iohk.io/build/3744897/download/1/delegation_design_spec.pdf

Register :

https://docs.cardano.org/projects/cardano-node/en/latest/stake-pool-operations/register_key.html

Categories
cardano

Get all cardano testnet relay node details

 cardano-cli query ledger-state --testnet-magic 1097911063 --allegra-era 

#Get specific stakepool details

 cardano-cli query ledger-state --testnet-magic 1097911063 --allegra-era | grep -C 30 $(cat stakepoolid.txt)