Last active
March 1, 2022 01:08
-
-
Save Angulo66/db7f0aca74acea18c5d566a792e7b132 to your computer and use it in GitHub Desktop.
[3. Create a simple transaction] #cardano #stakepooloperations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cardano-cli query protocol-parameters \ | |
--mainnet \ | |
--out-file protocol.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cardano-cli query utxo \ | |
--address $(cat payment.addr) \ | |
--mainnet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cardano-cli transaction build-raw \ | |
--tx-in 4e3a6e7fdcb0d0efa17bf79c13aed2b4cb9baf37fb1aa2e39553d5bd720c5c99#4 \ | |
--tx-out $(cat payment2.addr)+0 \ | |
--tx-out $(cat payment.addr)+0 \ | |
--invalid-hereafter 0 \ | |
--fee 0 \ | |
--out-file tx.draft |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cardano-cli transaction calculate-min-fee \ | |
--tx-body-file tx.draft \ | |
--tx-in-count 1 \ | |
--tx-out-count 2 \ | |
--witness-count 1 \ | |
--byron-witness-count 0 \ | |
--mainnet \ | |
--protocol-params-file protocol.json | |
# ex fee. 167965 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# expr <UTXO BALANCE> - <AMOUNT TO SEND> - <TRANSACTION FEE> | |
expr 20000000 - 10000000 - 167965 | |
# ex change. 9832035 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cardano-cli query tip --mainnet | |
#### | |
{ | |
"blockNo": 16829, | |
"headerHash": "3e6f59b10d605e7f59ba8383cb0ddcd42480ddcc0a85d41bad1e4648eb5465ad", | |
"slotNo": 369200 | |
} | |
#### | |
# Calculate your TTL, for example: 369215 + 200 slots = 369400 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cardano-cli transaction build-raw \ | |
--tx-in 4e3a6e7fdcb0d0efa17bf79c13aed2b4cb9baf37fb1aa2e39553d5bd720c5c99#4 \ | |
--tx-out $(cat payment2.addr)+10000000 \ | |
--tx-out $(cat payment.addr)+9832035 \ | |
--invalid-hereafter 369400 \ | |
--fee 167965 \ | |
--out-file tx.raw |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cardano-cli transaction sign \ | |
--tx-body-file tx.raw \ | |
--signing-key-file payment.skey \ | |
--mainnet \ | |
--out-file tx.signed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cardano-cli transaction submit \ | |
--tx-file tx.signed \ | |
--mainnet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cardano-cli query utxo \ | |
--address $(cat payment.addr) \ | |
--mainnet | |
### | |
> TxHash TxIx Lovelace | |
> ---------------------------------------------------------------------------------------- | |
> b64ae44e1195b04663ab863b62337e626c65b0c9855a9fbb9ef4458f81a6f5ee 1 9832035 | |
### | |
cardano-cli query utxo \ | |
--address $(cat payment2.addr) \ | |
--mainnet | |
### | |
> TxHash TxIx Lovelace | |
> ---------------------------------------------------------------------------------------- | |
> b64ae44e1195b04663ab863b62337e626c65b0c9855a9fbb9ef4458f81a6f5ee 0 10000000 | |
### |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment