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..244fd40db9 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,9 +7,7 @@ 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 +40,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,17 +66,19 @@ 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": 300000000000, + "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 +89,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 +97,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 +108,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 +120,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 +135,7 @@ Estimated transaction fee: Coin 180505 Inspect the transaction before signing: ``` -cardano-cli babbage transaction view --tx-file tx.raw +cardano-cli conway transaction view --tx-file tx.raw ``` ```json { @@ -192,13 +192,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 +208,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 +223,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..3d38c13e37 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,11 +16,11 @@ 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 +cardano-cli conway transaction +Usage: cardano-cli conway transaction ( build-raw | build | sign @@ -57,7 +53,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 +61,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 +79,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 +92,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 +114,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 conway transaction view --tx-body-file tx.draft ``` ```json @@ -182,7 +178,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 +199,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 +213,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 +223,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 conway transaction view --tx-file tx.signed ``` ```json { @@ -290,7 +286,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 +309,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 +324,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 conway transaction view --tx-file tx.raw ``` ```json @@ -405,7 +401,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..ba7aee703b 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,11 +17,11 @@ 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 +cardano-cli conway stake-address +Usage: cardano-cli conway stake-address ( key-gen | key-hash | build @@ -38,7 +34,7 @@ Usage: cardano-cli babbage stake-address 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. ```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 +58,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 \ 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..611a06364f 100644 --- a/docs/get-started/cardano-cli/get-started/stakeaddress-registration.md +++ b/docs/get-started/cardano-cli/get-started/stakeaddress-registration.md @@ -7,9 +7,7 @@ description: Register stake address on-chain keywords: [cardano-cli, cli, keys, stake addresses, register, 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 `. -::: + ## Registering a stake address @@ -17,11 +15,11 @@ 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 +cardano-cli conway stake-address +Usage: cardano-cli conway stake-address ( key-gen | key-hash | build @@ -36,7 +34,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 +66,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 +79,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 conway transaction view --tx-file tx.raw ``` ```json { @@ -137,7 +135,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 +145,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 +161,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 +169,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 +186,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 +201,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 +219,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 \ 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..44dca60703 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 \ @@ -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/governance-actions.md b/docs/get-started/cardano-cli/governance/governance-actions.md index 32053a8efc..5380fc504d 100644 --- a/docs/get-started/cardano-cli/governance/governance-actions.md +++ b/docs/get-started/cardano-cli/governance/governance-actions.md @@ -183,7 +183,7 @@ a77245f63bc7504c6ce34383633729692388dc1823723b0ee9825743a87a6a6d constitution.t or ```shell -cardano-cli conway governance hash anchor-data --file-text constitution.txt +cardano-cli hash anchor-data --file-text constitution.txt a77245f63bc7504c6ce34383633729692388dc1823723b0ee9825743a87a6a6d ``` diff --git a/docs/get-started/cardano-cli/governance/governance.md b/docs/get-started/cardano-cli/governance/governance.md index 79e3b88119..7dbaf2bea3 100644 --- a/docs/get-started/cardano-cli/governance/governance.md +++ b/docs/get-started/cardano-cli/governance/governance.md @@ -9,7 +9,9 @@ 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. +The Conway era marks a significant evolution for Cardano, transitioning from its earlier Federated Governance model to a more decentralized and community-driven approach. In this new era, a robust governance system empowers stakeholders to actively participate in shaping the network’s future by proposing, discussing, and voting on important decisions, such as protocol upgrades and adjustments to on-chain parameters. A cornerstone of this system is the introduction of Delegated Representatives (DReps), who can represent and vote on behalf of others, ensuring inclusive and diverse participation. + +A key element of Conway governance is the ability for ADA holders to submit update proposals. These proposals provide a structured mechanism for proposing changes to the system parameters, or initiating protocol upgrades. Update proposals are submitted on-chain and undergo a transparent governance process, where stakeholders, including SPOs, constitutional committee members, and DReps, collaborate to deliberate and vote. This decentralized process ensures that Cardano’s development aligns with the needs and vision of its community, fostering innovation and adaptability while maintaining the network’s integrity and security. ## Cardano ledger eras @@ -74,7 +76,7 @@ If you are running a private testnet, you can use this feature to update your te ::: ```shell -cardano-cli babbage governance action create-protocol-parameters-update \ +cardano-cli conway 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 @@ -87,7 +89,7 @@ balance=$(cardano-cli query utxo --address $(< payment.addr) --out-file /dev/std fee=1000000 change=$(($balance - $fee)) -cardano-cli babbage transaction build-raw \ +cardano-cli conway 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 \ 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..d0682c0b55 100644 --- a/docs/get-started/cardano-cli/native-assets/native-assets.md +++ b/docs/get-started/cardano-cli/native-assets/native-assets.md @@ -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 @@ -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