diff --git a/docs/get-started/cardano-cli/get-started/deregister-stake-address.md b/docs/get-started/cardano-cli/get-started/deregister-stake-address.md index f1216867ef..032c87f418 100644 --- a/docs/get-started/cardano-cli/get-started/deregister-stake-address.md +++ b/docs/get-started/cardano-cli/get-started/deregister-stake-address.md @@ -7,10 +7,6 @@ description: How to deregister a stake address. keywords: [cardano-cli, cli, deregistration, deregister, rewards, withdrawal, stake, stake addresses, cardano-node, transactions] --- -:::tip -To integrate the Conway era, which differs significantly from previous eras, `cardano-cli` has introduced `` as a top-level command, replacing the former `` flags. For example, instead of using era-specific flags like `--babbage-era` with commands such as `cardano-cli transaction build --babbage-era`, users must now utilize the syntax `cardano-cli babbage transaction build `. -::: - :::caution The process outlined below involves transferring funds from the payment address associated with the stake address we plan to deregister. This is followed by withdrawing rewards over several consecutive epochs until the rewards are negligible. Only then do we deregister the stake address. This ensures that all earned rewards are collected. ::: @@ -42,7 +38,7 @@ Final step: Here we only show step 7, previous steps can be performed following the corrsponding tutorial for that particular workflow. To generate the **stake address deregistration certificate** we run: ``` -cardano-cli babbage stake-address deregistration-certificate \ +cardano-cli conway stake-address deregistration-certificate \ --stake-verification-key-file stake.vkey \ --out-file dereg.cert ``` @@ -68,18 +64,21 @@ We will submit the deregistration certificate, withdraw the last rewards from th This is required for withdrawing the rewards still available on `stake.addr` ``` -cardano-cli babbage query stake-address-info --address $(< stake.addr) +cardano-cli conway query stake-address-info --address $(< stake.addr) ``` ```json [ { "address": "stake_test1upfpm2244k8jf00l357t3adp2hzfsuqrwqvleheqjj08uhswme5cn", - "delegation": "pool17navl486tuwjg4t95vwtlqslx9225x5lguwuy6ahc58x5dnm9ma", "delegationDeposit": 2000000, - "rewardAccountBalance": 291385529 + "rewardAccountBalance": 291385529, + "stakeDelegation": "pool1l9u9ss9xtww8qkt4zqda84z945f6tgq4753jqhtdr4r8yaw7d6g", + "voteDelegation": "scriptHash-59aa3f091b3bcef254abfb89aea64973a61b78fdb2ac44839c7ccba8" } ] + ``` + and use the syntax `stake_address+balance` with the `--withdrawal` option when building the transaction, for example: `--withdrawal stake_test1upfpm2244k8jf00l357t3adp2hzfsuqrwqvleheqjj08uhswme5cn+291385529` @@ -89,7 +88,7 @@ and use the syntax `stake_address+balance` with the `--withdrawal` option when b Steps 1 and 2 suggest creating a new payment address and transfer funds to it. On the transaction below, we'll use `new_payment.addr` to pay for the transaction fees. ``` -cardano-cli babbage query utxo --address $(< payment.addr) +cardano-cli conway query utxo --address $(< payment.addr) TxHash TxIx Amount -------------------------------------------------------------------------------------- 77b95d3c0031f918d2dcd796352d123dd3fec9f8599377ef96f1ee0e488f5ec1 0 9997495621 lovelace + TxOutDatumNone @@ -97,7 +96,7 @@ cardano-cli babbage query utxo --address $(< payment.addr) #### Get the stake address deposit amount ``` -cardano-cli babbage query protocol-parameters | jq .stakeAddressDeposit +cardano-cli conway query protocol-parameters | jq .stakeAddressDeposit > 2000000 ``` @@ -108,7 +107,7 @@ cardano-cli babbage query protocol-parameters | jq .stakeAddressDeposit Here we use the information from the above queries to build the transaction: ``` -cardano-cli babbage transaction build \ +cardano-cli conway transaction build \ --tx-in 77b95d3c0031f918d2dcd796352d123dd3fec9f8599377ef96f1ee0e488f5ec1#0 \ --change-address addr_test1vp9khgeajxw8snjjvaaule727hpytrvpsnq8z7h9t3zeuegh55grh \ --withdrawal stake_test1upfpm2244k8jf00l357t3adp2hzfsuqrwqvleheqjj08uhswme5cn+291385529 \ @@ -120,10 +119,10 @@ cardano-cli babbage transaction build \ Of course, we could use command substitution and run all the queries within `build`, so this is equivalent: ``` -cardano-cli babbage transaction build \ ---tx-in "$(cardano-cli babbage query utxo --address "$(< new-payment.addr)" --output-json | jq -r 'keys[0]')" \ +cardano-cli conway transaction build \ +--tx-in "$(cardano-cli conway query utxo --address "$(< new-payment.addr)" --output-json | jq -r 'keys[0]')" \ --change-address "$(< new-payment.addr)" \ ---withdrawal "$(< stake.addr)+$(cardano-cli babbage query stake-address-info --address "$(< stake.addr)" | jq -r .[].rewardAccountBalance)" \ +--withdrawal "$(< stake.addr)+$(cardano-cli conway query stake-address-info --address "$(< stake.addr)" | jq -r .[].rewardAccountBalance)" \ --certificate-file dereg.cert \ --witness-override 2 \ --out-file tx.raw @@ -135,7 +134,7 @@ Estimated transaction fee: Coin 180505 Inspect the transaction before signing: ``` -cardano-cli babbage transaction view --tx-file tx.raw +cardano-cli debug transaction view --tx-file tx.raw ``` ```json { @@ -192,13 +191,13 @@ cardano-cli babbage transaction view --tx-file tx.raw Confirm that the keyHash for the stake address deregistration is correct with: ``` -cardano-cli babbage stake-address key-hash --stake-verification-key-file stake.vkey +cardano-cli conway stake-address key-hash --stake-verification-key-file stake.vkey 521da955ad8f24bdff8d3cb8f5a155c49870037019fcdf20949e7e5e ``` All good! Ready to sign the transaction: ``` -cardano-cli babbage transaction sign \ +cardano-cli conway transaction sign \ --tx-file tx.raw \ --signing-key-file new-payment.skey \ --signing-key-file stake.skey \ @@ -208,13 +207,13 @@ cardano-cli babbage transaction sign \ And submit it to the chain: ``` -cardano-cli babbage transaction submit --tx-file tx.signed +cardano-cli conway transaction submit --tx-file tx.signed Transaction successfully submitted. ``` To confirm, we query the balance of `new-payment.addr`, rewards are withdrawn and deposit has been returned: ``` -cardano-cli babbage query utxo --address $(< new-payment.addr) +cardano-cli conway query utxo --address $(< new-payment.addr) TxHash TxIx Amount -------------------------------------------------------------------------------------- c09bf08fdf6ae655d8ba7c5e9f44b5cbe11b6bb9621eabb9b1b08c1b27b987eb 0 10290700645 lovelace + TxOutDatumNone @@ -223,6 +222,6 @@ c09bf08fdf6ae655d8ba7c5e9f44b5cbe11b6bb9621eabb9b1b08c1b27b987eb 0 10 If we query the stake address info, we get `[]`, meaning that the deregistration has been sucessful: ``` -cardano-cli babbage query stake-address-info --address $(< stake.addr) +cardano-cli conway query stake-address-info --address $(< stake.addr) [] ``` \ No newline at end of file diff --git a/docs/get-started/cardano-cli/get-started/simple-transactions.md b/docs/get-started/cardano-cli/get-started/simple-transactions.md index 7a4e9d3f1a..b1706bb61e 100644 --- a/docs/get-started/cardano-cli/get-started/simple-transactions.md +++ b/docs/get-started/cardano-cli/get-started/simple-transactions.md @@ -6,10 +6,6 @@ description: how to create simple transactions with build and build-raw commands keywords: [cardano-cli, cli, keys, addresses, cardano-node, transactions] --- -:::tip -To integrate the Conway era, which differs significantly from previous eras, `cardano-cli` has introduced `` as a top-level command, replacing the former `` flags. For example, instead of using era-specific flags like `--babbage-era` with commands such as `cardano-cli transaction build --babbage-era`, users now use `cardano-cli babbage transaction build`. -::: - ## Simple transactions Cardano transactions involve consuming one or more Unspent Transaction Outputs (UTXOs) and generating one or more new UTXOs. The most basic transaction type involves transferring ada from one address to another. It is essential to ensure that all transactions are 'well-balanced', meaning that the sum of outputs and transaction fees equals the sum of inputs. This balance ensures the integrity and validity of the transaction. Unbalanced transactions are rejected by the local node. @@ -20,24 +16,26 @@ Creating a transaction using the CLI follows a three-step process: - **Sign:** authenticate the transaction with appropriate signatures - **Submit:** send the signed transaction to the network for processing. -You'll find commands for these tasks under `cardano-cli babbage transaction` +You'll find commands for these tasks under `cardano-cli conway transaction` ```bash -cardano-cli babbage transaction -Usage: cardano-cli babbage transaction - ( build-raw - | build - | sign - | witness - | assemble - | submit - | policyid - | calculate-min-fee - | calculate-min-required-utxo - | hash-script-data - | txid - | view - ) +cardano-cli conway transaction +Usage: cardano-cli conway transaction + ( build-raw + | build + | build-estimate + | sign + | witness + | assemble + | submit + | policyid + | calculate-min-fee + | calculate-min-required-utxo + | hash-script-data + | txid + ) + + Transaction commands. ``` `cardano-cli` provides several options for constructing transactions: `transaction build-raw`, `transaction build`, and `build-estimate`. The key difference between these methods lies in their offline and online capabilities, as well as the degree of manual or automatic processing involved. @@ -57,7 +55,7 @@ When building a transaction, it's essential to specify the following elements: To create a transaction using `build-raw`, you will need the protocol parameters. These parameters are necessary for calculating the transaction fee at a later stage. Querying the protocol parameters requires a running node: ```bash -cardano-cli babbage query protocol-parameters --out-file pparams.json +cardano-cli conway query protocol-parameters --out-file pparams.json ``` You also need to know the inputs (UTXOs) you will use. A UTXO is identified by its **transaction hash** (`TxHash`) and **transaction index** (`TxIx`) with the syntax `TxHash#TxIx`. You can only use UTXOs controlled by your `payment.skey`. @@ -65,7 +63,7 @@ You also need to know the inputs (UTXOs) you will use. A UTXO is identified by i To query the UTXOs associated to your `payment.addr`, run: ```bash -cardano-cli babbage query utxo --address $(< payment.addr) +cardano-cli conway query utxo --address $(< payment.addr) TxHash TxIx Amount -------------------------------------------------------------------------------------- @@ -83,7 +81,7 @@ Assume you want to send 1,000,000 lovelace (1,000 ada) from `payment.addr` to a At this stage, you do not need to worry about the transaction fees. Save the transaction body in the `tx.draft` file: ```shell -cardano-cli babbage transaction build-raw \ +cardano-cli conway transaction build-raw \ --tx-in e29e96a012c2443d59f2e53c156503a857c2f27c069ae003dab8125594038891#0 \ --tx-out addr_test1vzuztsedkqanfm7elu9nshfr4gh2gl0aj4djmayav2t7x8ch3pg30+1000000000 \ --tx-out addr_test1qp39w0fa0ccdc4gmg87puydf2kxt5mgt0vteq4a22ktrcssg7ysmx64l90xa0k4z25wpuejngya833qeu9cdxvveynfscsskf5+8994790937 \ @@ -96,7 +94,7 @@ cardano-cli babbage transaction build-raw \ ```shell -cardano-cli babbage transaction build-raw \ +cardano-cli conway transaction build-raw \ --tx-in e29e96a012c2443d59f2e53c156503a857c2f27c069ae003dab8125594038891#0 \ --tx-out "$(< payment2.addr)+1000000000" \ --tx-out "$(< payment.addr)+8994790937" \ @@ -118,7 +116,7 @@ cat tx.draft Use the `transaction view` command to show the transaction body in a human-readable format: ```shell -cardano-cli babbage transaction view --tx-body-file tx.draft +cardano-cli debug transaction view --tx-body-file tx.draft ``` ```json @@ -182,7 +180,7 @@ In Cardano, transaction fees are [deterministic](https://iohk.io/en/blog/posts/2 To process a transaction on the network, it must include fees specified within the transaction body. To calculate the exact cost, use the `transaction calculate-min-fee` command, which takes `tx.draft` and `pparams.json` files as inputs. Within this command, specify details like the total number of inputs, outputs, and the required number of signatures. In this case, only one witness, the `payment.skey` signature, is needed: ```shell -cardano-cli babbage transaction calculate-min-fee \ +cardano-cli conway transaction calculate-min-fee \ --tx-body-file tx.draft \ --protocol-params-file pparams.json \ --witness-count 1 @@ -203,7 +201,7 @@ echo $((9994790937 - 1000000000 - 173993)) Re-run `transaction build-raw`, include the fee, and adjust the change (the second tx-out). This completes the transaction body, and conventionally, it is saved into the `tx.raw` file. ```shell -cardano-cli babbage transaction build-raw \ +cardano-cli conway transaction build-raw \ --tx-in e29e96a012c2443d59f2e53c156503a857c2f27c069ae003dab8125594038891#0 \ --tx-out $(< payment2.addr)+1000000000 \ --tx-out $(< payment.addr)+8994616944 \ @@ -217,7 +215,7 @@ cardano-cli babbage transaction build-raw \ Sign the transaction with the `transaction sign` command. You must sign with the `payment.skey` that controls the UTXO you are trying to spend. This time, we produce the `tx.signed` file: ```shell -cardano-cli babbage transaction sign \ +cardano-cli conway transaction sign \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ --testnet-magic 2 \ @@ -227,7 +225,7 @@ cardano-cli babbage transaction sign \ Inspecting `tx.signed` with `transaction view` reveals that the `"witnesses"` field is no longer empty; it now contains the signature. ```shell -cardano-cli babbage transaction view --tx-file tx.signed +cardano-cli debug transaction view --tx-file tx.signed ``` ```json { @@ -290,7 +288,7 @@ cardano-cli babbage transaction view --tx-file tx.signed Submitting the transaction means sending it to the blockchain for processing by the stake pools and eventual inclusion in a block. While building and signing a transaction can be done without a running node, submitting the transaction requires an active connection to a running node. Use the `tx.signed` file: ```shell -cardano-cli babbage transaction submit \ +cardano-cli conway transaction submit \ --tx-file tx.signed Transaction successfully submitted. ``` @@ -313,7 +311,7 @@ c57f25ebf9cf1487b13deeb8449215c499f3d61c2836d84ab92a73b0bbaadd38 1 89 Build the transaction: ```shell -cardano-cli babbage transaction build \ +cardano-cli conway transaction build \ --tx-in c57f25ebf9cf1487b13deeb8449215c499f3d61c2836d84ab92a73b0bbaadd38#1 \ --tx-out $(< payment2.addr)+500000000 \ --change-address $(< payment.addr) \ @@ -328,7 +326,7 @@ Estimated transaction fee: Lovelace 167041 Inspecting `tx.raw` with `transaction view` reveals that the transaction body already includes the fee, and the transaction is already balanced. ```shell -cardano-cli babbage transaction view --tx-file tx.raw +cardano-cli debug transaction view --tx-file tx.raw ``` ```json @@ -388,7 +386,7 @@ cardano-cli babbage transaction view --tx-file tx.raw As previously, sign the transaction with the `payment.skey`: ```shell -cardano-cli transaction sign \ +cardano-cli conway transaction sign \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ --out-file tx.signed @@ -396,7 +394,7 @@ cardano-cli transaction sign \ ### Submitting the transaction ```shell -cardano-cli transaction submit \ +cardano-cli conway transaction submit \ --tx-file tx.signed Transaction successfully submitted. ``` @@ -405,7 +403,7 @@ Transaction successfully submitted. You can parse `cardano-cli` JSON outputs with `jq` to create programmatic workflows. For example, you can parse the output of `query utxo` to obtain the first UTXO associated with the payment address and use it as input (`--tx-in`) in `transaction build`: ``` -cardano-cli babbage transaction build \ +cardano-cli conway transaction build \ --tx-in $(cardano-cli query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ --tx-out $(< payment.addr)+500000000 \ --change-address $(< payment.addr) \ diff --git a/docs/get-started/cardano-cli/get-started/stake-address-delegation.md b/docs/get-started/cardano-cli/get-started/stake-address-delegation.md index 55cc49d2a8..70a0947068 100644 --- a/docs/get-started/cardano-cli/get-started/stake-address-delegation.md +++ b/docs/get-started/cardano-cli/get-started/stake-address-delegation.md @@ -7,10 +7,6 @@ description: How to delegate stake to a stake pool. keywords: [cardano-cli, cli, delegation, delegate, stake, stake addresses, cardano-node, transactions] --- -:::tip -To accommodate the integration of the Conway era, which significantly differs from all previous eras, `cardano-cli` has introduced `` as a top-level command, replacing the previous `` flags. For example, instead of using era-specific flags like `--babbage-era` with commands such as `cardano-cli transaction build --babbage-era`, users must now use the syntax `cardano-cli babbage transaction build `. -::: - ## Delegating stake to a stake pool Delegating your stake to a stake pool is the simplest method to engage with the protocol. By delegating your stake, you empower the stake pool to generate blocks on your behalf, which, in turn, accrues rewards for you. Rewards are automatically paid by the protocol at the start of every epoch to all pool members who contributed to block production. @@ -21,24 +17,32 @@ In Cardano, delegating to a stake pool doesn't necessitate locking your funds or ### Create a delegation certificate -To delegate your stake to a stake pool, you need to create a **stake delegation certificate**. `cardano-cli` offers a simple way to create one, you'll find the corresponding command under `cardano-cli babbage stake-address`: +To delegate your stake to a stake pool, you need to create a **stake delegation certificate**. `cardano-cli` offers a simple way to create one, you'll find the corresponding command under `cardano-cli conway stake-address`: ```shell -cardano-cli babbage stake-address -Usage: cardano-cli babbage stake-address - ( key-gen - | key-hash - | build - | registration-certificate - | deregistration-certificate - | stake-delegation-certificate - ) +cardano-cli conway stake-address +Usage: cardano-cli conway stake-address + ( key-gen + | key-hash + | build + | registration-certificate + | deregistration-certificate + | stake-delegation-certificate + | stake-and-vote-delegation-certificate + | vote-delegation-certificate + | registration-and-delegation-certificate + | registration-and-vote-delegation-certificate + | registration-stake-and-vote-delegation-certificate + ) + + Stake address commands. + ``` -To produce the delegation certificate, your stake address must already be registered on the chain, as outlined in the documentation on [registering the stake address](./stake-address-registration). Additionally, you need to know the pool ID to which you will delegate. +To produce a delegation certificate, your stake address must already be registered on the chain, as outlined in the documentation on [registering the stake address](./stake-address-registration). Additionally, you need to know the pool ID to which you will delegate. ```shell -cardano-cli babbage stake-address stake-delegation-certificate \ +cardano-cli conway stake-address stake-delegation-certificate \ --stake-verification-key-file stake.vkey \ --stake-pool-id pool17navl486tuwjg4t95vwtlqslx9225x5lguwuy6ahc58x5dnm9ma \ --out-file delegation.cert @@ -62,7 +66,7 @@ After generating the delegation certificate, you need to submit it to the chain This type of transaction requires signatures from both `payment.skey` and `stake.skey`, making the transaction slightly larger due to the two signatures. Consequently, it incurs a slightly higher fee. To help the build command accurately calculate transaction fees, you must use the `--witness-override 2` flag: ``` -cardano-cli babbage transaction build \ +cardano-cli conway transaction build \ --tx-in $(cardano-cli query utxo --address $(< payment.addr) --out-file /dev/stdout | jq -r 'keys[0]') \ --change-address $(< payment.addr) \ --certificate-file delegation.cert \ @@ -71,7 +75,7 @@ cardano-cli babbage transaction build \ ``` ``` -cardano-cli transaction sign \ +cardano-cli conway transaction sign \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ --signing-key-file stake.skey \ @@ -79,7 +83,7 @@ cardano-cli transaction sign \ ``` ``` -cardano-cli transaction submit \ +cardano-cli conway transaction submit \ --tx-file tx.signed ``` diff --git a/docs/get-started/cardano-cli/get-started/stakeaddress-registration.md b/docs/get-started/cardano-cli/get-started/stakeaddress-registration.md index 48a9c9179e..2f126d37c6 100644 --- a/docs/get-started/cardano-cli/get-started/stakeaddress-registration.md +++ b/docs/get-started/cardano-cli/get-started/stakeaddress-registration.md @@ -8,7 +8,7 @@ keywords: [cardano-cli, cli, keys, stake addresses, register, cardano-node, tran --- :::tip -To integrate the Conway era, which differs significantly from previous eras, `cardano-cli` has introduced `` as a top-level command, replacing the former `` flags. For example, instead of using era-specific flags like `--babbage-era` with commands such as `cardano-cli transaction build --babbage-era`, users must now utilize the syntax `cardano-cli babbage transaction build `. +To integrate the Conway era, which differs significantly from previous eras, `cardano-cli` has introduced `` as a top-level command, replacing the former `` flags. For example, instead of using era-specific flags like `--babbage-era` with commands such as `cardano-cli conway transaction build --babbage-era`, users must now utilize the syntax `cardano-cli conway transaction build `. ::: ## Registering a stake address @@ -17,18 +17,25 @@ To participate in the protocol, such as delegating stake to a stake pool to earn Delegating to a stake pool also involves submitting a certificate to the chain, in this case, a **stake address delegation certificate**. -You can easily generate such certificates with `cardano-cli`. The corresponding commands can be found under `cardano-cli babbage stake-address`: +You can easily generate such certificates with `cardano-cli`. The corresponding commands can be found under `cardano-cli conway stake-address`: ```shell -cardano-cli babbage stake-address -Usage: cardano-cli babbage stake-address - ( key-gen - | key-hash - | build - | registration-certificate - | deregistration-certificate - | stake-delegation-certificate - ) +cardano-cli conway stake-address +Usage: cardano-cli conway stake-address + ( key-gen + | key-hash + | build + | registration-certificate + | deregistration-certificate + | stake-delegation-certificate + | stake-and-vote-delegation-certificate + | vote-delegation-certificate + | registration-and-delegation-certificate + | registration-and-vote-delegation-certificate + | registration-stake-and-vote-delegation-certificate + ) + + Stake address commands. ``` ## Generating the stake address registration certificate @@ -36,7 +43,7 @@ Usage: cardano-cli babbage stake-address Query the protocol parameters to find out the amount of lovelace required as a deposit for registering a stake address, in this case, it is 2000000 lovelace (two ada): ```shell -cardano-cli babbage query protocol-parameters | jq .stakeAddressDeposit +cardano-cli conway query protocol-parameters | jq .stakeAddressDeposit 2000000 ``` @@ -68,7 +75,7 @@ It's important to note that when using `build`, the deposit is automatically inc ### Using the `build` command ```shell -cardano-cli babbage transaction build \ +cardano-cli conway transaction build \ --tx-in $(cardano-cli query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ --change-address $(< payment.addr) \ --certificate-file registration.cert \ @@ -81,7 +88,7 @@ With the `build` command, you don't need to worry about the transaction fees and Inspecting the `tx.raw` file reveals that this transaction includes the certificate, and is ready to be signed and submitted. ```shell -cardano-cli babbage transaction view --tx-file tx.raw +cardano-cli debug transaction view --tx-file tx.raw ``` ```json { @@ -137,7 +144,7 @@ Using the `build-raw` command involves a slightly more intricate process. Simila Query the balance of the `payment.addr`: ```shell -cardano-cli babbage query utxo --address $(< paymentstake.addr) +cardano-cli conway query utxo --address $(< paymentstake.addr) TxHash TxIx Amount -------------------------------------------------------------------------------------- 0690c70f117281627fc128ede51b1fe762c2bbc15c2e3d4eff2101c9d2613cd8 0 9999834851 lovelace + TxOutDatumNone @@ -147,7 +154,7 @@ cardano-cli babbage query utxo --address $(< paymentstake.addr) You can leverage `jq` by having `cardano-cli` return the output in JSON: ```shell -cardano-cli babbage query utxo --address $(< paymentstake.addr) --output-json +cardano-cli conway query utxo --address $(< paymentstake.addr) --output-json { "0690c70f117281627fc128ede51b1fe762c2bbc15c2e3d4eff2101c9d2613cd8#0": { "address": "addr_test1qp9khgeajxw8snjjvaaule727hpytrvpsnq8z7h9t3zeue2jrk54ttv0yj7llrfuhr66z4wynpcqxuqeln0jp9y70e0qvjewan", @@ -163,7 +170,7 @@ cardano-cli babbage query utxo --address $(< paymentstake.addr) --output-json ``` Using `jq` to parse that JSON ```shell -cardano-cli babbage query utxo --address $(< payment.addr) --output-json | jq -r .[].value.lovelace +cardano-cli conway query utxo --address $(< payment.addr) --output-json | jq -r .[].value.lovelace 9999834851 ``` ::: @@ -171,15 +178,15 @@ cardano-cli babbage query utxo --address $(< payment.addr) --output-json | jq -r Query the protocol parameters: ```shell -cardano-cli babbage query protocol parameters --out-file pparams.json +cardano-cli conway query protocol parameters --out-file pparams.json ``` Draft the transaction to calculate its transaction fee: ```shell -cardano-cli babbage transaction build-raw \ +cardano-cli conway transaction build-raw \ --tx-in $(cardano-cli query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ - --tx-out $(< payment.addr)+"$(cardano-cli babbage query utxo --address $(< payment.addr) --out-file /dev/stdout | jq -r .[].value.lovelace)" \ + --tx-out $(< payment.addr)+"$(cardano-cli conway query utxo --address $(< payment.addr) --out-file /dev/stdout | jq -r .[].value.lovelace)" \ --fee 0 \ --certificate-file registration.cert \ --out-file tx.draft @@ -188,7 +195,7 @@ cardano-cli babbage transaction build-raw \ Calculate the transaction fee, it is useful to assign the output to a variable (`fee`): ```shell -cardano-cli babbage transaction calculate-min-fee \ +cardano-cli conway transaction calculate-min-fee \ --tx-body-file tx.draft \ --protocol-params-file pparams.json \ --tx-in-count 1 \ @@ -203,14 +210,14 @@ Calculate the change of the transaction. Note that the deposit is not explicitly Query the protocol parameters to get the deposit amount: ```shell -cardano-cli babbage query protocol-parameters | jq .stakeAddressDeposit +cardano-cli conway query protocol-parameters | jq .stakeAddressDeposit 2000000 ``` Query the current balance of `payment.addr`: ```shell -cardano-cli babbage query utxo --address $(< payment.addr) --output-json | jq -r .[].value.lovelace +cardano-cli conway query utxo --address $(< payment.addr) --output-json | jq -r .[].value.lovelace 9999834851 ``` @@ -221,7 +228,7 @@ change=$((9999834851 - 171089 - 2000000)) Build the transaction: ```shell -cardano-cli babbage transaction build-raw \ +cardano-cli conway transaction build-raw \ --tx-in $(cardano-cli query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ --tx-out $(< payment.addr)+$change \ --fee 171089 \ @@ -231,13 +238,13 @@ cardano-cli babbage transaction build-raw \ ## Sign and submit the transaction ```shell -cardano-cli transaction sign \ +cardano-cli conway transaction sign \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ --out-file tx.signed ``` ```shell -cardano-cli transaction submit \ +cardano-cli conway transaction submit \ --tx-file tx.signed ``` diff --git a/docs/get-started/cardano-cli/get-started/treasury-donations.md b/docs/get-started/cardano-cli/get-started/treasury-donations.md index 4af57e417a..5035201a84 100644 --- a/docs/get-started/cardano-cli/get-started/treasury-donations.md +++ b/docs/get-started/cardano-cli/get-started/treasury-donations.md @@ -95,7 +95,7 @@ cardano-cli conway transaction sign \ --out-file treasury.tx.signed ``` ``` -cardano-cli transaction submit \ +cardano-cli conway transaction submit \ --tx-file treasury.tx.signed ``` @@ -132,7 +132,7 @@ cardano-cli conway transaction sign \ ### Submit the transaction: ``` -cardano-cli transaction submit \ +cardano-cli conway transaction submit \ --tx-file treasury.tx.signed ``` @@ -148,7 +148,7 @@ cardano-cli conway query treasury The transaction body carries the fields `"currentTreasuryValue":` and `"treasuryDonation":`, these are `null` in other transactions, this time the fields have a value. ``` -cardano-cli conway transaction view --tx-file example/transactions/treasury.tx.signed +cardano-cli debug transaction view --tx-file example/transactions/treasury.tx.signed { "auxiliary scripts": null, "certificates": null, diff --git a/docs/get-started/cardano-cli/get-started/withdraw-rewards.md b/docs/get-started/cardano-cli/get-started/withdraw-rewards.md index 42ccf4ef5f..f21a5b8a92 100644 --- a/docs/get-started/cardano-cli/get-started/withdraw-rewards.md +++ b/docs/get-started/cardano-cli/get-started/withdraw-rewards.md @@ -7,22 +7,19 @@ description: How to withdraw staking rewards from stake address to a payment add keywords: [cardano-cli, cli, delegation, rewards, withdrawal, stake, stake addresses, cardano-node, transactions] --- -:::tip -To integrate the Conway era, which differs significantly from previous eras, `cardano-cli` has introduced `` as a top-level command, replacing the former `` flags. For example, instead of using era-specific flags like `--babbage-era` with commands such as `cardano-cli transaction build --babbage-era`, users must now utilize the syntax `cardano-cli babbage transaction build `. -::: - ## Querying the stake address balance First, check if you have some rewards to withdraw: ```shell -cardano-cli babbage query stake-address-info --address $(< stake.addr) +cardano-cli conway query stake-address-info --address $(< stake.addr) [ { "address": "stake_test1ur453z5nxrgvvu9wfyuxut8ss0mrvca4n8ly44tcu8camlqaz98mh", "delegationDeposit": 2000000, "rewardAccountBalance": 10534638802, "stakeDelegation": "pool17xgtj7ayvsaju4clums0mfusla4pmtfm6t4fj6guqqlsvne2mwm", + "voteDelegation": "scriptHash-59aa3f091b3bcef254abfb89aea64973a61b78fdb2ac44839c7ccba8" } ] ``` @@ -40,7 +37,7 @@ To withdraw rewards from the rewards account, you must withdraw its entire balan By default, the `build` command considers the transaction to only require one witness. However, this type of transaction needs to be signed by `payment.skey` to pay for the transaction fees, and also by `stake.skey` to prove that we control that stake address. Therefore, we inform the `build` command that the transaction will carry two signatures using the `--witness-override 2` flag. This has a slight impact on the fee: ```shell -cardano-cli babbage transaction build \ +cardano-cli conway transaction build \ --tx-in $(cardano-cli query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ --withdrawal stake_test1ur453z5nxrgvvu9wfyuxut8ss0mrvca4n8ly44tcu8camlqaz98mh+10534638802 \ --change-address $(< payment1.addr) \ @@ -52,7 +49,7 @@ cardano-cli babbage transaction build \ or using `<` and the `$rewards` variable from above: ```shell -cardano-cli babbage transaction build \ +cardano-cli conway transaction build \ --tx-in $(cardano-cli query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ --withdrawal "$(< stake.addr)+$rewards" \ --change-address $(< payment.addr) \ @@ -67,7 +64,7 @@ cardano-cli babbage transaction build \ As before, sign the transaction with the `payment.skey`: ```shell -cardano-cli babbage transaction sign \ +cardano-cli conway transaction sign \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ --signing-key-file stake.skey \ @@ -77,7 +74,7 @@ cardano-cli babbage transaction sign \ If you inspect the transaction, you'll notice that the 'withdrawals' field contains reward withdrawal details: ```shell -cardano-cli conway transaction view --tx-file tx.signed +cardano-cli debug transaction view --tx-file tx.signed ``` ```json { @@ -140,7 +137,7 @@ cardano-cli conway transaction view --tx-file tx.signed ## Submitting the transaction ```shell -cardano-cli babbage transaction submit \ +cardano-cli conway transaction submit \ --tx-file tx.signed Transaction successfully submitted. @@ -149,13 +146,14 @@ Transaction successfully submitted. If you query the stake address details again, you'll notice that it has been emptied, and the funds were sent to the payment address. ```shell -cardano-cli babbage query stake-address-info --address $(< stake1.addr) +cardano-cli conway query stake-address-info --address $(< stake1.addr) [ { "address": "stake_test1ur453z5nxrgvvu9wfyuxut8ss0mrvca4n8ly44tcu8camlqaz98mh", "delegationDeposit": 2000000, "rewardAccountBalance": 0, "stakeDelegation": "pool17xgtj7ayvsaju4clums0mfusla4pmtfm6t4fj6guqqlsvne2mwm", + "voteDelegation": "scriptHash-59aa3f091b3bcef254abfb89aea64973a61b78fdb2ac44839c7ccba8" } ] ``` diff --git a/docs/get-started/cardano-cli/governance/constitutional-committee.md b/docs/get-started/cardano-cli/governance/constitutional-committee.md index f06b7e37f0..9e787676cf 100644 --- a/docs/get-started/cardano-cli/governance/constitutional-committee.md +++ b/docs/get-started/cardano-cli/governance/constitutional-committee.md @@ -372,7 +372,7 @@ cardano-cli conway transaction witness \ Assemble the tranaction with all the witnesses from previous step: ```shell -cardano-cli transaction assemble \ +cardano-cli conway transaction assemble \ --tx-body-file tx.raw \ --witness-file payment.witness \ --witness-file alice.witness \ diff --git a/docs/get-started/cardano-cli/governance/delegating-vote.md b/docs/get-started/cardano-cli/governance/delegating-vote.md index 66bce3511a..47313b105e 100644 --- a/docs/get-started/cardano-cli/governance/delegating-vote.md +++ b/docs/get-started/cardano-cli/governance/delegating-vote.md @@ -56,7 +56,7 @@ cardano-cli conway stake-address vote-delegation-certificate \ ```shell cardano-cli conway stake-address vote-delegation-certificate \ --stake-verification-key-file stake.vkey \ - --drep-script-hash $(< drep-multisig.id) \ + --drep-script-hash $(< script.hash) \ --out-file vote-deleg.cert ``` diff --git a/docs/get-started/cardano-cli/governance/governance.md b/docs/get-started/cardano-cli/governance/governance.md index 79e3b88119..d6ac8449ee 100644 --- a/docs/get-started/cardano-cli/governance/governance.md +++ b/docs/get-started/cardano-cli/governance/governance.md @@ -7,10 +7,6 @@ description: Overview ov cardano governance across ledger eras. keywords: [governance, update proposals, cardano, cardano-node] --- -## Update proposals - -Currently (Babbage era), and until the Conway era ushers in participatory governance, Cardano operates under a **federated governance** mechanism. This framework enables the updating of protocol parameters, including the addition of new features, through an update proposal process. Only the holders of the genesis delegate keys have the authority to submit and vote on proposals. - ## Cardano ledger eras Cardano has undergone various ledger era upgrades – Byron, Shelley, Allegra, Mary, Alonzo, and the current Babbage era. Each era has introduced new functionalities to the network. The upcoming era, Conway, is planned to introduce decentralized governance, implementing [CIP-1694](https://cips.cardano.org/cip/CIP-1694) functionality. @@ -57,51 +53,13 @@ The procedure is as follows: 3. **Quorum.** At the end of the epoch, if the majority of nodes, determined by the **Quorum** specification constant (which must exceed half the total number of nodes), have most recently submitted the identical proposal, it becomes adopted. 4. **Update.** The update is applied at the epoch boundary. -Changing the values of the protocol parameters and global constants can be done via an update proposal. +Changing the values of the protocol parameters and global constants was done via an update proposal. Changing the values of the global constants always requires a software update, including an increase in the protocol version. An increase in the major version indicates a hard fork, while the minor version indicates a soft fork (meaning old software can validate but not produce new blocks). On the other hand, updating protocol parameters can be done without a software update. -Until the Conway era is released, only **genesis delegate key** holders can submit and vote on proposals. From time to time, you will find it useful to deploy a local or private testnet. In that case, you will need to use the governance commands to upgrade your network to the desired era. - -Example of a protocol parameter update proposal updating `nOpt` (the desired number of pools): - -:::note -Only **genesis delegate key** holders can create this type of update proposals. -This applies to mainnet and testnets running in any pre-Conway era. -If you are running a private testnet, you can use this feature to update your testnet parameters. -::: - -```shell -cardano-cli babbage governance action create-protocol-parameters-update \ - --genesis-verification-key-file genesis-keys/non.extended.shelley.delegate.vkey \ - --number-of-pools 1000 \ - --out-file updateNOpt.proposal -``` - -Build, sign, and submit the transaction: - -```shell -balance=$(cardano-cli query utxo --address $(< payment.addr) --out-file /dev/stdout | jq '. | .[keys[0]].value.lovelace') -fee=1000000 -change=$(($balance - $fee)) - -cardano-cli babbage transaction build-raw \ - --fee $fee \ - --tx-in $(cardano-cli query utxo --address $(< payment.addr) --out-file /dev/stdout | jq -r 'keys[0]' \ - --tx-out $(< payment.addr)+$change \ - --update-proposal-file updateNOpt.proposal \ - --out-file updateNOpt.tx.raw - -cardano-cli conway transaction sign \ - --tx-body-file updateNOpt.tx.raw \ - --signing-key-file payment.skey \ - --signing-key-file genesis-keys/non.extended.shelley.delegate.skey \ - --out-file updateNOpt.tx.signed - -cardano-cli conway transaction submit --tx-file updateNOpt.tx.signed -``` +Before the Chang hardfork that brought Cardano to the Conway era, only **genesis delegate key** holders were able to submit and vote on proposals. ## Conway era update proposals @@ -191,12 +149,4 @@ A vote is **Yes**, **No** or **Abstain**, to be cast, a vote must include addit 5. The **Hardfork-combinator** requires to "know" about a potential hardfork 6k/f slots before the epoch change. To meet this requiterement, if the _votingStakeDistribution_ is not finished by the time we reach that point, the computation is forced to complete. 6. On the first `TICK` that occures within the **last 6k/f** slots of the epoch (2 stability windows), the system _solidifies_ the next epoch protocol parameters, see [_solidifyNextEpochPParams_](https://github.com/IntersectMBO/cardano-ledger/blob/a00b723cd93658e67d21f40c771fad80c463d9c4/eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/Tick.hs#L180C1-L195C6). The RATIFY and ENACT rules are executed at this point to deterimne the _enactState_. If a governance action has enough votes (meets the thresholds for its type), it is said to be **Ratified** and it is added to the _enactState_. 7. At the next epoch boundary, the system **applies** the _enactState_. -8. A governance action **Expires** if it does not accumulate enough votes during it's lifetime. Its last chance to be ratified is when the _DRepPulser_ talies the votes on the epoch following its expiration. - - - - - - - - \ No newline at end of file +8. A governance action **Expires** if it does not accumulate enough votes during it's lifetime. Its last chance to be ratified is when the _DRepPulser_ talies the votes on the epoch following its expiration. \ No newline at end of file diff --git a/docs/get-started/cardano-cli/governance/register-drep.md b/docs/get-started/cardano-cli/governance/register-drep.md index bc145f4a64..7f0de4e8e9 100644 --- a/docs/get-started/cardano-cli/governance/register-drep.md +++ b/docs/get-started/cardano-cli/governance/register-drep.md @@ -435,7 +435,7 @@ cardano-cli conway transaction witness \ Assemble the tranaction with all the witnesses from previous step: ```bash -cardano-cli transaction assemble \ +cardano-cli conway transaction assemble \ --tx-body-file tx.raw \ --witness-file payment.witness \ --witness-file drep1.witness \ @@ -561,13 +561,13 @@ cardano-cli conway transaction build \ ``` ```bash -cardano-cli transaction sign \ +cardano-cli conway transaction sign \ --signing-key-file payment.skey \ --tx-body-file tx.raw \ --out-file tx.signed ``` ```bash -cardano-cli transaction submit --tx-file tx.signed +cardano-cli conway transaction submit --tx-file tx.signed ``` diff --git a/docs/get-started/cardano-cli/governance/voting.md b/docs/get-started/cardano-cli/governance/voting.md index d3f976911a..c41b745b68 100644 --- a/docs/get-started/cardano-cli/governance/voting.md +++ b/docs/get-started/cardano-cli/governance/voting.md @@ -133,26 +133,26 @@ cardano-cli conway transaction build \ ``` Sign it with the DRep key: ```shell -cardano-cli transaction sign --tx-body-file vote-tx.raw \ +cardano-cli conway transaction sign --tx-body-file vote-tx.raw \ --signing-key-file drep.skey \ --signing-key-file payment.skey \ --out-file vote-tx.signed ``` OR sign it with the CC hot key: ```shell -cardano-cli transaction sign --tx-body-file vote-tx.raw \ +cardano-cli conway transaction sign --tx-body-file vote-tx.raw \ --signing-key-file cc-hot.skey \ --signing-key-file payment.skey \ --out-file vote-tx.signed ``` OR sign it with the SPO cold key: ```shell -cardano-cli transaction sign --tx-body-file vote-tx.raw \ +cardano-cli conway transaction sign --tx-body-file vote-tx.raw \ --signing-key-file cold.skey \ --signing-key-file payment.skey \ --out-file vote-tx.signed ``` Submit the transaction: ```shell -cardano-cli transaction submit --tx-file vote-tx.signed +cardano-cli conway transaction submit --tx-file vote-tx.signed ``` \ No newline at end of file diff --git a/docs/get-started/cardano-cli/native-assets/native-assets.md b/docs/get-started/cardano-cli/native-assets/native-assets.md index 64594b1260..149a98ca63 100644 --- a/docs/get-started/cardano-cli/native-assets/native-assets.md +++ b/docs/get-started/cardano-cli/native-assets/native-assets.md @@ -85,10 +85,10 @@ Values can be combined using the binary operator `+`. For example: The native tokens syntax can be used in the following contexts: -- `cardano-cli transaction build-raw --tx-out="..."` -- `cardano-cli transaction build-raw --mint="..."` +- `cardano-cli conway transaction build-raw --tx-out="..."` +- `cardano-cli conway transaction build-raw --mint="..."` -The CLI command `cardano-cli transaction build-raw` creates the transaction body. The `--tx-out` option specifies the transaction output in the usual way *(This is expressed as address+lovelace, where address is a Bech32-encoded address, and lovelace is the amount in lovelace)*, and the `--mint` option specifies the value to be minted or burnt. +The CLI command `cardano-cli conway transaction build-raw` creates the transaction body. The `--tx-out` option specifies the transaction output in the usual way *(This is expressed as address+lovelace, where address is a Bech32-encoded address, and lovelace is the amount in lovelace)*, and the `--mint` option specifies the value to be minted or burnt. ### Transaction outputs (TxOuts) @@ -260,7 +260,7 @@ cardano-cli query protocol-parameters --out-file pparams.json 2. Calculate the minimum utxo size required to hold the desired number of native assets. Let's mint 1000 `customcoin`: ```shell -cardano-cli babbage transaction calculate-min-required-utxo \ +cardano-cli conway transaction calculate-min-required-utxo \ --protocol-params-file pparams.json \ --tx-out addr_test1vp6jzppqqegyvjnwc25dg853eam2xmxvydjntfw6d8x4p7qrnsnj9+"1000 11375f8ee31c280e1f2ec6fe11a73bca79d7a6a64f18e1e6980f0c74.637573746f6d636f696e" Coin 1051640 @@ -272,7 +272,7 @@ we will send 10 ada on the minting transaction. 1. This transaction will mint 1000 "customcoin", with asset id `11375f8ee31c280e1f2ec6fe11a73bca79d7a6a64f18e1e6980f0c74.637573746f6d636f696e` ```bash -cardano-cli transaction build \ +cardano-cli conway transaction build \ --tx-in 503c699e81d4abc3f8a1d2681425aee1e2ac5770a5be5b9314339591a7158f34#0 \ --tx-out $(< payment.addr)+10000000+"1000 11375f8ee31c280e1f2ec6fe11a73bca79d7a6a64f18e1e6980f0c74.637573746f6d636f696e" \ --mint="1000 11375f8ee31c280e1f2ec6fe11a73bca79d7a6a64f18e1e6980f0c74.637573746f6d636f696e" \ @@ -286,7 +286,7 @@ Estimated transaction fee: Coin 175621 #### Sign the transaction: ```bash -cardano-cli transaction sign \ +cardano-cli conway transaction sign \ --tx-file mint-tx.raw \ --signing-key-file policy.skey \ --signing-key-file payment.skey \ @@ -297,7 +297,7 @@ cardano-cli transaction sign \ #### Submit the transaction: ```bash -cardano-cli transaction submit --tx-file mint-tx.signed +cardano-cli conway transaction submit --tx-file mint-tx.signed Transaction successfully submitted. ``` @@ -320,7 +320,7 @@ use `--change-address` to automatically balance ada-only utxos. For example, to send 1 `customcoin` to the address `addr_test1vp9khgeajxw8snjjvaaule727hpytrvpsnq8z7h9t3zeuegh55grh` we do: ```shell -cardano-cli babbage transaction calculate-min-required-utxo \ +cardano-cli conway transaction calculate-min-required-utxo \ --protocol-params-file pparams.json \ --tx-out addr_test1vp9khgeajxw8snjjvaaule727hpytrvpsnq8z7h9t3zeuegh55grh+"1 11375f8ee31c280e1f2ec6fe11a73bca79d7a6a64f18e1e6980f0c74.637573746f6d636f696e" Coin 1043020 @@ -329,7 +329,7 @@ Coin 1043020 and build the transaction with: ```shell -cardano-cli transaction build \ +cardano-cli conway transaction build \ --tx-in d4b158e58cb58da28b25837300f6ef8f9f7d67fd5a5ce07648d17a6fae31b88a#0 \ --tx-in d4b158e58cb58da28b25837300f6ef8f9f7d67fd5a5ce07648d17a6fae31b88a#1 \ --tx-out addr_test1vp9khgeajxw8snjjvaaule727hpytrvpsnq8z7h9t3zeuegh55grh+1043020+"1 11375f8ee31c280e1f2ec6fe11a73bca79d7a6a64f18e1e6980f0c74.637573746f6d636f696e" \ @@ -338,10 +338,10 @@ cardano-cli transaction build \ --out-file tx.raw ``` ``` -cardano-cli transaction sign --tx-file tx.raw --signing-key-file policy.skey --signing-key-file payment.skey --out-file tx.signed +cardano-cli conway transaction sign --tx-file tx.raw --signing-key-file policy.skey --signing-key-file payment.skey --out-file tx.signed ``` ``` -cardano-cli transaction submit --tx-file tx.signedTransaction successfully submitted. +cardano-cli conway transaction submit --tx-file tx.signedTransaction successfully submitted. ``` ### Buying and spending tokens @@ -351,11 +351,11 @@ Token holders “buy” tokens from a token issuer. This will usually involve se Tokens that have been issued to a token holder can be “spent” by returning them to a token issuer (i.e. by redeeming the tokens). This is done using a normal transaction. The token issuer will then provide the token holder with the agreed object in return (which may be an item of value, a service, a different kind of token, some ada, etc). ``` -cardano-cli transaction build-raw ... --out-file txbody +cardano-cli conway transaction build-raw ... --out-file txbody -cardano-cli transaction sign ... --tx-body-file txbody --out-file tx +cardano-cli conway transaction sign ... --tx-body-file txbody --out-file tx -cardano-cli transaction submit ... --tx-file tx +cardano-cli conway transaction submit ... --tx-file tx ``` ### Destroying (burning) tokens @@ -363,25 +363,25 @@ cardano-cli transaction submit ... --tx-file tx Tokens can be destroyed by a token issuer according to the token policy by supplying a negative value in the `--mint` field. That allows acquiring tokens in the UTXO entry in the input of a transaction, without adding them to one of the outputs, effectively destroying them. For example, tokens created in the previous section can be destroyed as follows: ``` -TXID1=$(cardano-cli transaction txid --tx-body-file "$TX_BODY_FILE_1") +TXID1=$(cardano-cli conway transaction txid --tx-body-file "$TX_BODY_FILE_1") TX_BODY_FILE_2=... TX_FILE_2=... -cardano-cli transaction build-raw \ +cardano-cli conway transaction build-raw \ --fee 0 \ --tx-in "$TXID1"#0 \ --tx-out="$ADDR+$LOVELACE" \ --mint="-5 $POLICYID.637573746f6d636f696e" \ --out-file "$TX_BODY_FILE_2" -cardano-cli transaction sign \ +cardano-cli conway transaction sign \ --signing-key-file "$SPENDING_KEY" \ --signing-key-file "$MINTING_KEY" \ --script-file "$SCRIPT" \ --tx-body-file "$TX_BODY_FILE_2" \ --out-file "TX_FILE_2" -cardano-cli transaction submit --tx-file "$TX_FILE_2" +cardano-cli conway transaction submit --tx-file "$TX_FILE_2" ``` > Note: Destroying tokens requires both the payment credential for using the UTXO entry with the tokens, *and* a credential for the minting policy script. diff --git a/docs/get-started/cardano-cli/plutus-scripts/plutus-scripts.md b/docs/get-started/cardano-cli/plutus-scripts/plutus-scripts.md index cd13356a09..0416ed1bc6 100644 --- a/docs/get-started/cardano-cli/plutus-scripts/plutus-scripts.md +++ b/docs/get-started/cardano-cli/plutus-scripts/plutus-scripts.md @@ -99,7 +99,7 @@ We can create the file `datum.json` with the following content: When building the transaction, it is important to use the `--tx-out-inline-datum-file` flag immediately after the `--tx-out` option to which the datum should be attached. The order of these options matters. ``` -cardano-cli transaction build \ +cardano-cli conway transaction build \ --tx-in $(cardano-cli conway query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ --tx-out $(< script.addr)+10000000 \ --tx-out-inline-datum-file datum.json \ @@ -112,7 +112,7 @@ cardano-cli transaction build \ Sign the transaction with the payment.skey ``` -cardano-cli transaction sign \ +cardano-cli conway transaction sign \ --tx-file lock.tx `\ -signing-key-file payment.skey \ --out-file lock.tx.signed @@ -121,7 +121,7 @@ cardano-cli transaction sign \ Submit the transaction ``` -cardano-cli transaction submit \ +cardano-cli conway transaction submit \ --tx-file lock.tx.signed >Transaction successfully submitted. @@ -155,7 +155,7 @@ Perfect, we have locked 10 ada on the script address, the only way to spend it i We could say that failing is the primarily duty of a Plutus script. Let's check that our script fails if we pass the wrong redeemer. ``` -cardano-cli transaction build \ +cardano-cli conway transaction build \ --tx-in $(cardano-cli conway query utxo --address $(< script.addr) --output-json | jq -r 'keys[0]') \ --tx-in-collateral $(cardano-cli conway query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ --tx-in-script-file fortytwotyped.plutus \ @@ -185,7 +185,7 @@ If we really wanted, we could use `build-raw` to construct the same transaction Let's re-use the `build` command from above, this time we pass the correct redeemer value `--tx-in-redeemer-value 42`. ``` -cardano-cli transaction build \ +cardano-cli conway transaction build \ --tx-in $(cardano-cli conway query utxo --address $(< script.addr) --output-json | jq -r 'keys[0]') \ --tx-in-collateral $(cardano-cli conway query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ --tx-in-script-file fortytwotyped.plutus \ @@ -236,13 +236,13 @@ This time, the node validated the transaction and successfully ran the script. T ``` -cardano-cli transaction sign \ +cardano-cli conway transaction sign \ --tx-file unlock.tx \ --signing-key-file payment.skey \ --out-file unlock.tx.signed ``` ``` -cardano-cli transaction submit -\ +cardano-cli conway transaction submit -\ -tx-file unlock.tx.signed > Transaction successfully submitted. @@ -251,7 +251,7 @@ cardano-cli transaction submit -\ For tracking purposes, lets find our transaction id ``` -cardano-cli transaction txid --tx-file unlock.tx.signed +cardano-cli conway transaction txid --tx-file unlock.tx.signed 74c856f90276315a14bd2bd35b3a2f803b763a1bdfa2648ec30a85a129048131 ``` diff --git a/docs/get-started/cardano-cli/simple-scripts/simple-scripts.md b/docs/get-started/cardano-cli/simple-scripts/simple-scripts.md index 0404252d23..38650a6ce7 100644 --- a/docs/get-started/cardano-cli/simple-scripts/simple-scripts.md +++ b/docs/get-started/cardano-cli/simple-scripts/simple-scripts.md @@ -427,7 +427,7 @@ To construct and submit a tx to send ada to the script address, construct the transaction body: ```shell -cardano-cli transaction build-raw +cardano-cli conway transaction build-raw --invalid-hereafter 1000 --fee 0 --tx-in utxoinput @@ -440,7 +440,7 @@ literal value. Create the transaction witness: ```bash -cardano-cli transaction witness +cardano-cli conway transaction witness --tx-body-file txbody --signing-key-file utxoSignKey --out-file utxoWitness @@ -449,7 +449,7 @@ cardano-cli transaction witness Assemble the transaction witness and the tx body to create the transaction: ```bash -cardano-cli transaction assemble +cardano-cli conway transaction assemble --tx-body-file txbody --witness-file utxoWitness --out-file allWitnessesTx @@ -463,7 +463,7 @@ will be "guarded" by the script. #### Step 1 - construct the tx body ```bash -cardano-cli transaction build-raw \ +cardano-cli conway transaction build-raw \ --invalid-hereafter 1000 \ --fee 0 \ --tx-in (txin of script address) @@ -477,22 +477,22 @@ To construct the script witness and three key witnesses required by the example `all` script, run the following commands: ```bash -cardano-cli transaction witness \ +cardano-cli conway transaction witness \ --tx-body-file spendScriptTxBody \ --script-file allMultiSigScript \ --out-file scriptWitness -cardano-cli transaction witness \ +cardano-cli conway transaction witness \ --tx-body-file spendScriptTxBody \ --signing-key-file paySignKey1 \ --out-file key1witness -cardano-cli transaction witness \ +cardano-cli conway transaction witness \ --tx-body-file spendScriptTxBody \ --signing-key-file paySignKey2 \ --out-file key2witness -cardano-cli transaction witness \ +cardano-cli conway transaction witness \ --tx-body-file spendScriptTxBody \ --signing-key-file paySignKey3 \ --out-file key3witness @@ -504,7 +504,7 @@ To construct and submit a transaction, you must assemble it with the script witness and all the other required key witnesses. ```bash -cardano-cli transaction assemble \ +cardano-cli conway transaction assemble \ --tx-body-file spendScriptTxBody \ --witness-file scriptWitness \ --witness-file key1witness \ @@ -512,7 +512,7 @@ cardano-cli transaction assemble \ --witness-file key3witness \ --out-file spendMultiSig ``` -You can now submit this tx via `cardano-cli transaction submit`! +You can now submit this tx via `cardano-cli conway transaction submit`! ### Example of using a script for time locking @@ -588,7 +588,7 @@ than or equal to the specified slot number in our simple script. In the example above this means >= 1000. ```bash -cardano-cli transaction build-raw \ +cardano-cli conway transaction build-raw \ --invalid-before 1000 \ --fee 0 \ --tx-in (txin of script address) @@ -622,7 +622,7 @@ than or equal to the specified slot number in our simple script. In the example above this means `<= 3000`: ```bash -cardano-cli transaction build-raw \ +cardano-cli conway transaction build-raw \ --invalid-hereafter 3000\ --fee 0 \ --tx-in (txin of script address) diff --git a/docs/get-started/create-simple-transaction.md b/docs/get-started/create-simple-transaction.md index bcf3951589..e5f9625753 100644 --- a/docs/get-started/create-simple-transaction.md +++ b/docs/get-started/create-simple-transaction.md @@ -42,7 +42,7 @@ For `--tx-in` we use the following syntax: `TxHash#TxIx` where `TxHash` is the t :::note ```sh -cardano-cli transaction build-raw \ +cardano-cli conway transaction build-raw \ --tx-in 4e3a6e7fdcb0d0efa17bf79c13aed2b4cb9baf37fb1aa2e39553d5bd720c5c99#4 \ --tx-out $(cat payment2.addr)+0 \ --tx-out $(cat payment.addr)+0 \ @@ -61,7 +61,7 @@ A simple transaction needs one input, a valid UTXO from `payment.addr`, and two Note that to calculate the fee you need to include the draft transaction ```sh -cardano-cli transaction calculate-min-fee \ +cardano-cli conway transaction calculate-min-fee \ --tx-body-file tx.draft \ --tx-in-count 1 \ --tx-out-count 2 \ @@ -111,7 +111,7 @@ Calculate your TTL, for example: 369200 + 200 slots = 369400 We write the transaction in a file, we will name it `tx.raw`. ```sh -cardano-cli transaction build-raw \ +cardano-cli conway transaction build-raw \ --tx-in 4e3a6e7fdcb0d0efa17bf79c13aed2b4cb9baf37fb1aa2e39553d5bd720c5c99#4 \ --tx-out $(cat payment2.addr)+10000000 \ --tx-out $(cat payment.addr)+9832035 \ @@ -125,7 +125,7 @@ cardano-cli transaction build-raw \ Sign the transaction with the signing key **payment.skey** and save the signed transaction in **tx.signed** ```sh -cardano-cli transaction sign \ +cardano-cli conway transaction sign \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ --mainnet \ @@ -135,7 +135,7 @@ cardano-cli transaction sign \ ## Submit the transaction ```sh -cardano-cli transaction submit \ +cardano-cli conway transaction submit \ --tx-file tx.signed \ --mainnet ``` diff --git a/docs/get-started/secure-workflow.md b/docs/get-started/secure-workflow.md index 041289c8bf..bd8f4fd87a 100644 --- a/docs/get-started/secure-workflow.md +++ b/docs/get-started/secure-workflow.md @@ -121,7 +121,7 @@ Create a draft for the transaction and save it in `tx.draft`. Notes: - The values after `--tx-in` are taken from the output of `cardano-cli query utxo` that you saved in your scratch file. ``` sh -cardano-cli transaction build-raw \ +cardano-cli conway transaction build-raw \ --tx-in 4e3a6e7fdcb0d0efa17bf79c13aed2b4cb9baf37fb1aa2e39553d5bd720c5c99#4 \ --tx-out $(cat payment2.addr)+0 \ --tx-out $(cat payment.addr)+0 \ @@ -140,7 +140,7 @@ The generally simplest transaction needs one input (a valid UTXO from `payment.a Note that to calculate the fee you need to include the draft transaction: ``` sh -cardano-cli transaction calculate-min-fee \ +cardano-cli conway transaction calculate-min-fee \ --tx-body-file tx.draft \ --tx-in-count 1 \ --tx-out-count 2 \ @@ -168,7 +168,7 @@ expr 20000000 - 10000000 - 167965 We write the transaction in a file; we will name it `tx.raw`: ``` sh -cardano-cli transaction build-raw \ +cardano-cli conway transaction build-raw \ --tx-in 4e3a6e7fdcb0d0efa17bf79c13aed2b4cb9baf37fb1aa2e39553d5bd720c5c99#4 \ --tx-out $(cat payment2.addr)+10000000 \ --tx-out $(cat payment.addr)+9832035 \ @@ -181,7 +181,7 @@ cardano-cli transaction build-raw \ Sign the transaction with the signing key `payment.skey` and save the signed transaction in `tx.signed`: ``` sh -cardano-cli transaction sign \ +cardano-cli conway transaction sign \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ --mainnet \ @@ -198,7 +198,7 @@ Reattach your transfer memory stick back to the Internet connected computer, the Log into your Cardano node (or prepare Daedalus if using its node) and execute: ``` sh -cardano-cli transaction submit \ +cardano-cli conway transaction submit \ --tx-file tx.signed \ --mainnet ``` @@ -207,20 +207,20 @@ Then check for a successful transaction by whatever means you prefer, e.g. as il ## FAQ -### Why can't I use `cardano-cli transaction build`? +### Why can't I use `cardano-cli conway transaction build`? This is a convenient command to avoid the ["change" (return UTxO) calculation](../get-started/secure-workflow#calculate-the-change-to-send-back-to-paymentaddr) which requires you to prepare a test transaction, estimate fees, and calculate a final value of the funds to be moved. Instead, `transaction build` sends back "change" to a designated address. Some consider this so much easier to use that ***all*** transactions should be performed with this command, as discussed here: - - [Please use `cardano-cli transaction build` instead of `cardano-cli transaction build-raw`](https://forum.cardano.org/t/please-use-cardano-cli-transaction-build-instead-of-cardano-cli-transaction-build-raw/94919) + - [Please use `cardano-cli conway transaction build` instead of `cardano-cli conway transaction build-raw`](https://forum.cardano.org/t/please-use-cardano-cli-transaction-build-instead-of-cardano-cli-transaction-build-raw/94919) However, this discussion revealed the undocumented condition that `transaction build` can only be done on a **live** Cardano node. The community in general doesn't know the reasons for this (with some speculation in the thread above), so in the meantime: - Using `transaction build` would require, in addition to accumulating the UTxO and balance information from your live Cardano node or network environment to build your transaction, that you also run the `build` command in the networked environment as well and save the unsigned transaction file on your transfer media. - This transaction file would then need to be copied from the live environment to the air gap environment, where it would be signed... but in a security paranoid environment the user could never be sure the transaction was not built or modified maliciously outside the air gap. -Therefore this guide suggests *only* assembling transaction *details* outside the air gap, to be applied to `cardano-cli transaction build-raw` inside the air gap, because there is not much more convenience overall in using `transaction build` while perhaps introducing some security risk. +Therefore this guide suggests *only* assembling transaction *details* outside the air gap, to be applied to `cardano-cli conway transaction build-raw` inside the air gap, because there is not much more convenience overall in using `transaction build` while perhaps introducing some security risk. ## Other pending topics in secure workflow diff --git a/docs/integrate-cardano/creating-wallet-faucet.md b/docs/integrate-cardano/creating-wallet-faucet.md index ffe7f4ed22..bd7a5e0e5a 100644 --- a/docs/integrate-cardano/creating-wallet-faucet.md +++ b/docs/integrate-cardano/creating-wallet-faucet.md @@ -339,7 +339,7 @@ This will produce a **JSON** file that looks something like this: Next, we create a draft transaction like so: ```bash -cardano-cli transaction build-raw \ +cardano-cli conway transaction build-raw \ --tx-in cf3cf4850c8862f2d698b2ece926578b3815795c9e38d2f907280f02f577cf85#0 \ --tx-out $(cat $HOME/cardano/keys/payment2.addr)+0 \ --tx-out $(cat $HOME/cardano/keys/payment1.addr)+0 \ @@ -347,7 +347,7 @@ cardano-cli transaction build-raw \ --out-file $HOME/cardano/tx.draft ``` -`cardano-cli transaction build-raw` : This tells `cardano-cli` to build a raw transaction. +`cardano-cli conway transaction build-raw` : This tells `cardano-cli` to build a raw transaction. `--tx-in` : This specifies the **UTXO** input that the transaction will use, you can add as many **UTXO** input as you want by adding multiple `--tx-in` in the `cardano-cli` arguments as long as they have a unique `TxHash` and `TxIdx` within all your inputs. @@ -360,7 +360,7 @@ cardano-cli transaction build-raw \ In this case, we are just building a draft transaction to calculate how much fee would the transaction need. We can do that by executing the following command: ```bash -cardano-cli transaction calculate-min-fee \ +cardano-cli conway transaction calculate-min-fee \ --tx-body-file $HOME/cardano/tx.draft \ --tx-in-count 1 \ --tx-out-count 2 \ @@ -387,7 +387,7 @@ The `--witness-count 1` basically tells `cardano-cli` that there will be only `1 We can then finally build the real transaction like so: ```bash -cardano-cli transaction build-raw \ +cardano-cli conway transaction build-raw \ --tx-in cf3cf4850c8862f2d698b2ece926578b3815795c9e38d2f907280f02f577cf85#0 \ --tx-out $(cat $HOME/cardano/keys/payment2.addr)+250000000 \ --tx-out $(cat $HOME/cardano/keys/payment1.addr)+749825831 \ @@ -438,7 +438,7 @@ And then we specify where we will save the transaction file: Now that we have the transaction file, we must sign the transaction in-order to prove that we are the owner of the input **UTXO** that was used. ```bash -cardano-cli transaction sign \ +cardano-cli conway transaction sign \ --tx-body-file $HOME/cardano/tx.draft \ --signing-key-file $HOME/cardano/keys/payment1.skey \ --testnet-magic 1097911063 \ @@ -450,7 +450,7 @@ cardano-cli transaction sign \ Finally, we submit the transaction to the blockchain! ```bash -cardano-cli transaction submit \ +cardano-cli conway transaction submit \ --tx-file $HOME/cardano/tx.signed \ --testnet-magic 1097911063 ``` diff --git a/docs/integrate-cardano/multi-witness-transactions-cli.md b/docs/integrate-cardano/multi-witness-transactions-cli.md index aff8f13aa3..75a3efcc9f 100644 --- a/docs/integrate-cardano/multi-witness-transactions-cli.md +++ b/docs/integrate-cardano/multi-witness-transactions-cli.md @@ -65,7 +65,7 @@ $ cardano-cli query protocol-parameters \ ``` ```bash -$ cardano-cli transaction build-raw \ +$ cardano-cli conway transaction build-raw \ --tx-in 264c0aa805652e3607c5ea2b1e8a9f3bf9c3bc8d4d938e1a9035f352083ba703#0 \ --tx-out $(cat keys/payment2.addr)+0 \ --tx-out $(cat keys/payment1.addr)+0 \ @@ -74,7 +74,7 @@ $ cardano-cli transaction build-raw \ ``` ```bash {8} -$ cardano-cli transaction calculate-min-fee \ +$ cardano-cli conway transaction calculate-min-fee \ --tx-body-file tx.draft \ --tx-in-count 1 \ --tx-out-count 2 \ @@ -90,7 +90,7 @@ $ cardano-cli transaction calculate-min-fee \ From the expected fee of `174169 Lovelace`, we were able to calculate the outputs and build our transaction. ```bash {3,4,5} -cardano-cli transaction build-raw \ +cardano-cli conway transaction build-raw \ --tx-in 264c0aa805652e3607c5ea2b1e8a9f3bf9c3bc8d4d938e1a9035f352083ba703#0 \ --tx-out $(cat keys/payment2.addr)+250000000 \ --tx-out $(cat keys/payment1.addr)+749825831 \ @@ -110,13 +110,13 @@ Your fees might have been different hence you would have different amounts. We used `payment1.skey` to sign our transaction and submitted it to the blockchain. ```bash {3,10} -cardano-cli transaction sign \ +cardano-cli conway transaction sign \ --tx-body-file tx.draft \ --signing-key-file keys/payment1.skey \ --testnet-magic 1097911063 \ --out-file tx.signed -cardano-cli transaction submit \ +cardano-cli conway transaction submit \ --tx-file cardano/tx.signed \ --testnet-magic 1097911063 Transaction successfully submitted. @@ -256,7 +256,7 @@ What about the outputs? Well, the *devious store-owner* wants us to spend it all Lets build that transaction. ```bash -cardano-cli transaction build-raw \ +cardano-cli conway transaction build-raw \ --tx-in b73b7503576412219241731230b5b7dd3b64eed62ccfc3ce69eb86822f1db251#0 \ --tx-in b73b7503576412219241731230b5b7dd3b64eed62ccfc3ce69eb86822f1db251#1 \ --tx-out $(cat ../keys/store-owner.addr)+0 \ @@ -267,7 +267,7 @@ cardano-cli transaction build-raw \ The last thing we need to do is to calculate the fees for `tx2.draft`. Notice the `--tx-in-count` and `--witness-count`. ```bash {3,4,5,8} -cardano-cli transaction calculate-min-fee \ +cardano-cli conway transaction calculate-min-fee \ --tx-body-file tx2.draft \ --tx-in-count 2 \ --tx-out-count 1 \ @@ -297,21 +297,21 @@ We know the *output amount* as well as the *fee*. We can finally build, sign and We have to use `payment1.skey` and `payment2.skey` to sign our transaction. ```bash {10,11,18} -cardano-cli transaction build-raw \ +cardano-cli conway transaction build-raw \ --tx-in b73b7503576412219241731230b5b7dd3b64eed62ccfc3ce69eb86822f1db251#0 \ --tx-in b73b7503576412219241731230b5b7dd3b64eed62ccfc3ce69eb86822f1db251#1 \ --tx-out $(cat ../keys/store-owner.addr)+999646250 \ --fee 179581 \ --out-file tx2.draft -cardano-cli transaction sign \ +cardano-cli conway transaction sign \ --tx-body-file tx2.draft \ --signing-key-file ../keys/payment1.skey \ --signing-key-file ../keys/payment2.skey \ --testnet-magic 1097911063 \ --out-file tx2.signed -cardano-cli transaction submit \ +cardano-cli conway transaction submit \ --tx-file tx2.signed \ --testnet-magic 1097911063 Transaction successfully submitted @@ -346,13 +346,13 @@ We had to pay `179581 Lovelace` to get all of our funds from A+B to C. Let's com For that we draft two transactions ```sh -cardano-cli transaction build-raw \ +cardano-cli conway transaction build-raw \ --tx-in 258abd628eef7d6ff0f7b4e6866b4f7c21065f4d6b5e49b51e2ac4ff035ad06f#0 \ --tx-out $(cat $HOME/cardano/keys/payment1.addr)+0 \ --fee 0 \ --out-file $HOME/cardano/multi-witness-sample/tx-single1.draft -cardano-cli transaction build-raw \ +cardano-cli conway transaction build-raw \ --tx-in 258abd628eef7d6ff0f7b4e6866b4f7c21065f4d6b5e49b51e2ac4ff035ad06f#0 \ --tx-out $(cat $HOME/cardano/keys/payment2.addr)+0 \ --fee 0 \ @@ -362,7 +362,7 @@ cardano-cli transaction build-raw \ And invoke the calculate-min-fees endpoint on `cardano-cli` for both of them: ```bash {8,17} -cardano-cli transaction calculate-min-fee \ +cardano-cli conway transaction calculate-min-fee \ --tx-body-file $HOME/cardano/multi-witness-sample/tx-single1.draft \ --tx-in-count 1 \ --tx-out-count 1 \ @@ -371,7 +371,7 @@ cardano-cli transaction calculate-min-fee \ --protocol-params-file $HOME/cardano/protocol.json 169857 Lovelace -cardano-cli transaction calculate-min-fee \ +cardano-cli conway transaction calculate-min-fee \ --tx-body-file $HOME/cardano/multi-witness-sample/tx-single2.draft \ --tx-in-count 1 \ --tx-out-count 1 \ diff --git a/docs/native-tokens/minting-nfts.md b/docs/native-tokens/minting-nfts.md index d1d51eb0d4..4dde648ffa 100644 --- a/docs/native-tokens/minting-nfts.md +++ b/docs/native-tokens/minting-nfts.md @@ -533,7 +533,7 @@ script="policy/policy.script" The last step is to generate the policyID: ```bash -cardano-cli transaction policyid --script-file ./policy/policy.script > policy/policyID +cardano-cli conway transaction policyid --script-file ./policy/policy.script > policy/policyID ``` ### Metadata @@ -672,7 +672,7 @@ values={[ ```bash -cardano-cli transaction build \ +cardano-cli conway transaction build \ --testnet-magic 2 \ --alonzo-era \ --tx-in $txhash#$txix \ @@ -691,7 +691,7 @@ cardano-cli transaction build \ ```bash -cardano-cli transaction build \ +cardano-cli conway transaction build \ --testnet-magic 1 \ --alonzo-era \ --tx-in $txhash#$txix \ @@ -710,7 +710,7 @@ cardano-cli transaction build \ ```bash -cardano-cli transaction build \ +cardano-cli conway transaction build \ --mainnet \ --alonzo-era \ --tx-in $txhash#$txix \ @@ -753,7 +753,7 @@ Estimated transaction fee: Lovelace 176677 Sign the transaction: ```bash -cardano-cli transaction sign \ +cardano-cli conway transaction sign \ --signing-key-file payment.skey \ --signing-key-file policy/policy.skey \ --mainnet --tx-body-file matx.raw \ @@ -780,7 +780,7 @@ values={[ ```bash -cardano-cli transaction submit --tx-file matx.signed --testnet-magic 2 +cardano-cli conway transaction submit --tx-file matx.signed --testnet-magic 2 ``` @@ -788,7 +788,7 @@ cardano-cli transaction submit --tx-file matx.signed --testnet-magic 2 ```bash -cardano-cli transaction submit --tx-file matx.signed --testnet-magic 1 +cardano-cli conway transaction submit --tx-file matx.signed --testnet-magic 1 ``` @@ -796,7 +796,7 @@ cardano-cli transaction submit --tx-file matx.signed --testnet-magic 1 ```bash -cardano-cli transaction submit --tx-file matx.signed --mainnet +cardano-cli conway transaction submit --tx-file matx.signed --mainnet ``` @@ -928,7 +928,7 @@ values={[ ```bash -cardano-cli transaction build --testnet-magic 2 --alonzo-era --tx-in $txhash#$txix --tx-out $address+$burnoutput --mint="-1 $policyid.$tokenname" --minting-script-file $script --change-address $address --invalid-hereafter $slot --witness-override 2 --out-file burning.raw +cardano-cli conway transaction build --testnet-magic 2 --alonzo-era --tx-in $txhash#$txix --tx-out $address+$burnoutput --mint="-1 $policyid.$tokenname" --minting-script-file $script --change-address $address --invalid-hereafter $slot --witness-override 2 --out-file burning.raw ``` @@ -936,7 +936,7 @@ cardano-cli transaction build --testnet-magic 2 --alonzo-era --tx-in $txhash#$tx ```bash -cardano-cli transaction build --testnet-magic 1 --alonzo-era --tx-in $txhash#$txix --tx-out $address+$burnoutput --mint="-1 $policyid.$tokenname" --minting-script-file $script --change-address $address --invalid-hereafter $slot --witness-override 2 --out-file burning.raw +cardano-cli conway transaction build --testnet-magic 1 --alonzo-era --tx-in $txhash#$txix --tx-out $address+$burnoutput --mint="-1 $policyid.$tokenname" --minting-script-file $script --change-address $address --invalid-hereafter $slot --witness-override 2 --out-file burning.raw ``` @@ -944,7 +944,7 @@ cardano-cli transaction build --testnet-magic 1 --alonzo-era --tx-in $txhash#$tx ```bash -cardano-cli transaction build --mainnet --alonzo-era --tx-in $txhash#$txix --tx-out $address+$burnoutput --mint="-1 $policyid.$tokenname" --minting-script-file $script --change-address $address --invalid-hereafter $slot --witness-override 2 --out-file burning.raw +cardano-cli conway transaction build --mainnet --alonzo-era --tx-in $txhash#$txix --tx-out $address+$burnoutput --mint="-1 $policyid.$tokenname" --minting-script-file $script --change-address $address --invalid-hereafter $slot --witness-override 2 --out-file burning.raw ``` @@ -969,7 +969,7 @@ values={[ ```bash -cardano-cli transaction sign --signing-key-file payment.skey --signing-key-file policy/policy.skey --testnet-magic 2 --tx-body-file burning.raw --out-file burning.signed +cardano-cli conway transaction sign --signing-key-file payment.skey --signing-key-file policy/policy.skey --testnet-magic 2 --tx-body-file burning.raw --out-file burning.signed ``` @@ -977,7 +977,7 @@ cardano-cli transaction sign --signing-key-file payment.skey --signing-key-fil ```bash -cardano-cli transaction sign --signing-key-file payment.skey --signing-key-file policy/policy.skey --testnet-magic 1 --tx-body-file burning.raw --out-file burning.signed +cardano-cli conway transaction sign --signing-key-file payment.skey --signing-key-file policy/policy.skey --testnet-magic 1 --tx-body-file burning.raw --out-file burning.signed ``` @@ -985,7 +985,7 @@ cardano-cli transaction sign --signing-key-file payment.skey --signing-key-fil ```bash -cardano-cli transaction sign --signing-key-file payment.skey --signing-key-file policy/policy.skey --mainnet --tx-body-file burning.raw --out-file burning.signed +cardano-cli conway transaction sign --signing-key-file payment.skey --signing-key-file policy/policy.skey --mainnet --tx-body-file burning.raw --out-file burning.signed ``` @@ -1006,7 +1006,7 @@ values={[ ```bash -cardano-cli transaction submit --tx-file burning.signed --testnet-magic 2 +cardano-cli conway transaction submit --tx-file burning.signed --testnet-magic 2 ``` @@ -1014,7 +1014,7 @@ cardano-cli transaction submit --tx-file burning.signed --testnet-magic 2 ```bash -cardano-cli transaction submit --tx-file burning.signed --testnet-magic 1 +cardano-cli conway transaction submit --tx-file burning.signed --testnet-magic 1 ``` @@ -1022,7 +1022,7 @@ cardano-cli transaction submit --tx-file burning.signed --testnet-magic 1 ```bash -cardano-cli transaction submit --tx-file burning.signed --mainnet +cardano-cli conway transaction submit --tx-file burning.signed --mainnet ``` diff --git a/docs/native-tokens/minting.md b/docs/native-tokens/minting.md index f04f5968ac..67986f9830 100644 --- a/docs/native-tokens/minting.md +++ b/docs/native-tokens/minting.md @@ -239,7 +239,7 @@ We now have a simple script file that defines the policy verification key as a w To mint the native assets, we need to generate the policy ID from the script file we created. ```bash -cardano-cli transaction policyid --script-file ./policy/policy.script > policy/policyID +cardano-cli conway transaction policyid --script-file ./policy/policy.script > policy/policyID ``` The output gets saved to the file `policyID` as we need to reference it later on. @@ -304,7 +304,7 @@ Now we are ready to build the first transaction to calculate our fee and save it We will reference the variables in our transaction to improve readability because we saved almost all of the needed values in variables. This is what our transaction looks like: ```bash -cardano-cli transaction build-raw \ +cardano-cli conway transaction build-raw \ --fee $fee \ --tx-in $txhash#$txix \ --tx-out $address+$output+"$tokenamount $policyid.$tokenname1 + $tokenamount $policyid.$tokenname2" \ @@ -375,7 +375,7 @@ Just be sure to reference the correct filename in upcoming commands. I chose to Based on this raw transaction we can calculate the minimal transaction fee and store it in the variable $fee. We get a bit fancy here and only store the value so we can use the variable for terminal based calculations: ```bash -fee=$(cardano-cli transaction calculate-min-fee --tx-body-file matx.raw --tx-in-count 1 --tx-out-count 1 --witness-count 2 $testnet --protocol-params-file protocol.json | cut -d " " -f1) +fee=$(cardano-cli conway transaction calculate-min-fee --tx-body-file matx.raw --tx-in-count 1 --tx-out-count 1 --witness-count 2 $testnet --protocol-params-file protocol.json | cut -d " " -f1) ``` Remember, the transaction input and the output of ada must be equal, or otherwise, the transaction will fail. There can be no leftovers. @@ -388,7 +388,7 @@ output=$(expr $funds - $fee) We now have every value we need to re-build the transaction, ready to be signed. So we reissue the same command to re-build, the only difference being our variables now holding the correct values. ```bash -cardano-cli transaction build-raw \ +cardano-cli conway transaction build-raw \ --fee $fee \ --tx-in $txhash#$txix \ --tx-out $address+$output+"$tokenamount $policyid.$tokenname1 + $tokenamount $policyid.$tokenname2" \ @@ -400,7 +400,7 @@ cardano-cli transaction build-raw \ Transactions need to be signed to prove the authenticity and ownership of the policy key. ```bash -cardano-cli transaction sign \ +cardano-cli conway transaction sign \ --signing-key-file payment.skey \ --signing-key-file policy/policy.skey \ $testnet --tx-body-file matx.raw \ @@ -412,7 +412,7 @@ $testnet --tx-body-file matx.raw \ Now we are going to submit the transaction, therefore minting our native assets: ```bash -cardano-cli transaction submit --tx-file matx.signed $testnet +cardano-cli conway transaction submit --tx-file matx.signed $testnet ``` Congratulations, we have now successfully minted our own token. @@ -480,7 +480,7 @@ Since we will send 2 of our first tokens to the remote address we are left with Here’s what the `raw` transaction looks like: ```bash -cardano-cli transaction build-raw \ +cardano-cli conway transaction build-raw \ --fee $fee \ --tx-in $txhash#$txix \ --tx-out $receiver+$receiver_output+"2 $policyid.$tokenname1" \ @@ -491,7 +491,7 @@ cardano-cli transaction build-raw \ Again we are going to calculate the fee and save it in a variable. ```bash -fee=$(cardano-cli transaction calculate-min-fee --tx-body-file rec_matx.raw --tx-in-count 1 --tx-out-count 2 --witness-count 1 $testnet --protocol-params-file protocol.json | cut -d " " -f1) +fee=$(cardano-cli conway transaction calculate-min-fee --tx-body-file rec_matx.raw --tx-in-count 1 --tx-out-count 2 --witness-count 1 $testnet --protocol-params-file protocol.json | cut -d " " -f1) ``` As stated above, we need to calculate the leftovers that will get sent back to our address. @@ -505,7 +505,7 @@ output=$(expr $funds - $fee - 10000000) Let’s update the transaction: ```bash -cardano-cli transaction build-raw \ +cardano-cli conway transaction build-raw \ --fee $fee \ --tx-in $txhash#$txix \ --tx-out $receiver+$receiver_output+"2 $policyid.$tokenname1" \ @@ -515,12 +515,12 @@ cardano-cli transaction build-raw \ Sign it: ```bash -cardano-cli transaction sign --signing-key-file payment.skey $testnet --tx-body-file rec_matx.raw --out-file rec_matx.signed +cardano-cli conway transaction sign --signing-key-file payment.skey $testnet --tx-body-file rec_matx.raw --out-file rec_matx.signed ``` Send it: ```bash -cardano-cli transaction submit --tx-file rec_matx.signed $testnet +cardano-cli conway transaction submit --tx-file rec_matx.signed $testnet ``` After a few seconds, you, the receiver, should have your tokens. For this example, a Daedalus testnet wallet is used. @@ -559,7 +559,7 @@ Burning tokens is fairly straightforward. You will issue a new minting action, but this time with a negative input. This will essentially subtract the amount of token. ```bash -cardano-cli transaction build-raw \ +cardano-cli conway transaction build-raw \ --fee $burnfee \ --tx-in $txhash#$txix \ --tx-out $address+$burnoutput+"9999998 $policyid.$tokenname1 + 9995000 $policyid.$tokenname2" \ @@ -579,7 +579,7 @@ As usual, we need to calculate the fee. To make a better differentiation, we named the variable burnfee: ```bash -burnfee=$(cardano-cli transaction calculate-min-fee --tx-body-file burning.raw --tx-in-count 1 --tx-out-count 1 --witness-count 2 $testnet --protocol-params-file protocol.json | cut -d " " -f1) +burnfee=$(cardano-cli conway transaction calculate-min-fee --tx-body-file burning.raw --tx-in-count 1 --tx-out-count 1 --witness-count 2 $testnet --protocol-params-file protocol.json | cut -d " " -f1) ``` Calculate the correct output value @@ -590,7 +590,7 @@ burnoutput=$(expr $funds - $burnfee) Re-build the transaction with the correct amounts ```bash -cardano-cli transaction build-raw \ +cardano-cli conway transaction build-raw \ --fee $burnfee \ --tx-in $txhash#$txix \ --tx-out $address+$burnoutput+"9999998 $policyid.$tokenname1 + 9995000 $policyid.$tokenname2" \ @@ -602,7 +602,7 @@ cardano-cli transaction build-raw \ Sign the transaction: ```bash - cardano-cli transaction sign \ + cardano-cli conway transaction sign \ --signing-key-file payment.skey \ --signing-key-file policy/policy.skey \ $testnet \ @@ -613,7 +613,7 @@ $testnet \ Send it: ```bash -cardano-cli transaction submit --tx-file burning.signed $testnet +cardano-cli conway transaction submit --tx-file burning.signed $testnet ``` Check your address: diff --git a/docs/operate-a-stake-pool/on-chain-polls.md b/docs/operate-a-stake-pool/on-chain-polls.md index b2cfd48d9c..d4ac62fa3b 100644 --- a/docs/operate-a-stake-pool/on-chain-polls.md +++ b/docs/operate-a-stake-pool/on-chain-polls.md @@ -87,7 +87,7 @@ From this point, you can utilize the `transaction build` command to generate a t Assuming you have stored the metadata generated from the previous step in a file named `answer.json`, the command to construct the transaction would appear as follows: ``` -$ cardano-cli transaction build \ +$ cardano-cli conway transaction build \ --babbage-era \ --cardano-mode \ --mainnet \ diff --git a/docs/operate-a-stake-pool/register-stake-address.md b/docs/operate-a-stake-pool/register-stake-address.md index fc0f8a6984..5d4361ba28 100644 --- a/docs/operate-a-stake-pool/register-stake-address.md +++ b/docs/operate-a-stake-pool/register-stake-address.md @@ -75,7 +75,7 @@ When calculating the fee for a transaction, the `--witness-count` option indicat Now, we build the transaction which will return the `tx.raw` transaction file and also the transaction fees: ``` -cardano-cli transaction build \ +cardano-cli conway transaction build \ --tx-in b64ae44e1195b04663ab863b62337e626c65b0c9855a9fbb9ef4458f81a6f5ee#1 \ --tx-out $(cat payment.addr)+1000000 \ --change-address $(cat payment.addr) \ @@ -116,7 +116,7 @@ echo ${txOut} Now we have all the information in place to build the final transaction file: ``` -cardano-cli transaction build-raw \ +cardano-cli conway transaction build-raw \ --tx-in b64ae44e1195b04663ab863b62337e626c65b0c9855a9fbb9ef4458f81a6f5ee#1 \ --tx-out $(cat payment.addr)+${txOut} \ --invalid-hereafter $((${currentSlot} + 1000)) \ @@ -130,7 +130,7 @@ cardano-cli transaction build-raw \ Sign the transaction with both the payment and stake secret keys: ``` -cardano-cli transaction sign \ +cardano-cli conway transaction sign \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ --signing-key-file stake.skey \ @@ -141,7 +141,7 @@ cardano-cli transaction sign \ And submit it: ``` -cardano-cli transaction submit \ +cardano-cli conway transaction submit \ --tx-file tx.signed \ --testnet-magic 1 ``` diff --git a/docs/operate-a-stake-pool/register-stake-pool-metadata.md b/docs/operate-a-stake-pool/register-stake-pool-metadata.md index c5699970b8..6545bec562 100644 --- a/docs/operate-a-stake-pool/register-stake-pool-metadata.md +++ b/docs/operate-a-stake-pool/register-stake-pool-metadata.md @@ -127,7 +127,7 @@ To submit the `pool registration certificate` and the `delegation certificates` #### Draft the transaction ```sh -cardano-cli transaction build-raw \ +cardano-cli conway transaction build-raw \ --tx-in # \ --tx-out $(cat payment.addr)+0 \ --invalid-hereafter 0 \ @@ -140,7 +140,7 @@ cardano-cli transaction build-raw \ #### Calculate the fees ```sh -cardano-cli transaction calculate-min-fee \ +cardano-cli conway transaction calculate-min-fee \ --tx-body-file tx.draft \ --tx-in-count 1 \ --tx-out-count 1 \ @@ -172,7 +172,7 @@ expr - - #### Build the transaction: ```sh -cardano-cli transaction build-raw \ +cardano-cli conway transaction build-raw \ --tx-in # \ --tx-out $(cat payment.addr)+ \ --invalid-hereafter \ @@ -185,7 +185,7 @@ cardano-cli transaction build-raw \ #### Sign the transaction: ```sh -cardano-cli transaction sign \ +cardano-cli conway transaction sign \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ --signing-key-file stake.skey \ @@ -197,7 +197,7 @@ cardano-cli transaction sign \ #### Submit the transaction: ```sh -cardano-cli transaction submit \ +cardano-cli conway transaction submit \ --tx-file tx.signed \ --mainnet ``` diff --git a/docs/operate-a-stake-pool/register-stake-pool.md b/docs/operate-a-stake-pool/register-stake-pool.md index 9eec152a4a..9cb06b06d6 100644 --- a/docs/operate-a-stake-pool/register-stake-pool.md +++ b/docs/operate-a-stake-pool/register-stake-pool.md @@ -220,7 +220,7 @@ expr UTxO BALANCE - poolDeposit - TRANSACTION FEE which in our case would be 9497237500 - 500000000 - 1000000 = 8996237500 ``` -cardano-cli transaction build \ +cardano-cli conway transaction build \ ${tx_in} \ --tx-out $(cat payment.addr)+8996237500 \ --change-address $(cat payment.addr) \ @@ -247,7 +247,7 @@ echo ${txOut} Build the transaction: ``` -cardano-cli transaction build-raw \ +cardano-cli conway transaction build-raw \ ${tx_in} \ --tx-out $(cat payment.addr)+${txOut} \ --invalid-hereafter $((${currentSlot} + 1000)) \ @@ -259,7 +259,7 @@ cardano-cli transaction build-raw \ Sign the transaction: ``` -cardano-cli transaction sign \ +cardano-cli conway transaction sign \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ --signing-key-file cold.skey \ @@ -270,7 +270,7 @@ cardano-cli transaction sign \ Submit the transaction: ``` -cardano-cli transaction submit \ +cardano-cli conway transaction submit \ --tx-file tx.signed \ --testnet-magic 1 ``` diff --git a/docs/transaction-metadata/how-to-create-a-metadata-transaction-cli.md b/docs/transaction-metadata/how-to-create-a-metadata-transaction-cli.md index 7f492621bf..5a1f44ffcd 100644 --- a/docs/transaction-metadata/how-to-create-a-metadata-transaction-cli.md +++ b/docs/transaction-metadata/how-to-create-a-metadata-transaction-cli.md @@ -101,7 +101,7 @@ Here we can see that our **wallet address** contains some spendable `lovelace` w Next, we create a draft transaction with the metadata embedded into it using the `TxHash` and `TxIndex` result from our last query. ```bash {2} -cardano-cli transaction build-raw \ +cardano-cli conway transaction build-raw \ --tx-in dfb99f8f103e56a856e04e087255dbaf402f3801acb71a6baf423a1054d3ccd5#0 \ --tx-out $(cat payment.addr)+0 \ --metadata-json-file metadata.json \ @@ -112,7 +112,7 @@ cardano-cli transaction build-raw \ Then we calculate the transaction fee like so: ```bash -cardano-cli transaction calculate-min-fee \ +cardano-cli conway transaction calculate-min-fee \ --tx-body-file tx.draft \ --tx-in-count 1 \ --tx-out-count 1 \ @@ -131,7 +131,7 @@ You should see something like this: With that, We build the final transaction with the total amount of our wallet minus the calculated fee as the total output amount. `1749651926 - 171793 = 1749480133` ```bash {3} -cardano-cli transaction build-raw \ +cardano-cli conway transaction build-raw \ --tx-in dfb99f8f103e56a856e04e087255dbaf402f3801acb71a6baf423a1054d3ccd5#0 \ --tx-out $(cat payment.addr)+1749480133 \ --metadata-json-file metadata.json \ @@ -142,7 +142,7 @@ cardano-cli transaction build-raw \ We then sign the transaction using our **payment signing key**: ```bash -cardano-cli transaction sign \ +cardano-cli conway transaction sign \ --tx-body-file tx.draft \ --signing-key-file payment.skey \ --testnet-magic 1097911063 \ @@ -153,7 +153,7 @@ Finally, we submit the signed transaction to the blockchain: ```bash -cardano-cli transaction submit \ +cardano-cli conway transaction submit \ --tx-file tx.signed \ --testnet-magic 1097911063 ```