From d1c6b691f93b836aa7668b3d4b876b2afad09a26 Mon Sep 17 00:00:00 2001 From: kweijack Date: Sun, 23 Feb 2025 19:09:52 +0800 Subject: [PATCH 1/5] CLI Doc: Update conway stake address registration --- .../cardano-cli/get-started/stakeaddress-registration.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 2f126d37c6..02fd60995d 100644 --- a/docs/get-started/cardano-cli/get-started/stakeaddress-registration.md +++ b/docs/get-started/cardano-cli/get-started/stakeaddress-registration.md @@ -50,8 +50,9 @@ cardano-cli conway query protocol-parameters | jq .stakeAddressDeposit To generate the registration certificate, run: ```shell -cardano-cli stake-address registration-certificate \ +cardano-cli conway stake-address registration-certificate \ --stake-verification-key-file stake.vkey \ + --key-reg-deposit-amt 2000000 \ --out-file registration.cert ``` From 60330043445ad274cf53d2992e7be94a6a274e48 Mon Sep 17 00:00:00 2001 From: kweijack Date: Sun, 23 Feb 2025 19:26:08 +0800 Subject: [PATCH 2/5] CLI Doc: Standardized cardano-cli conway query --- .../cardano-cli/get-started/stakeaddress-registration.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 02fd60995d..b7cbd963f5 100644 --- a/docs/get-started/cardano-cli/get-started/stakeaddress-registration.md +++ b/docs/get-started/cardano-cli/get-started/stakeaddress-registration.md @@ -77,7 +77,7 @@ It's important to note that when using `build`, the deposit is automatically inc ```shell cardano-cli conway transaction build \ - --tx-in $(cardano-cli query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ + --tx-in $(cardano-cli conway query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ --change-address $(< payment.addr) \ --certificate-file registration.cert \ --out-file tx.raw @@ -186,7 +186,7 @@ Draft the transaction to calculate its transaction fee: ```shell cardano-cli conway transaction build-raw \ - --tx-in $(cardano-cli query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ + --tx-in $(cardano-cli conway query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ --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 \ @@ -230,7 +230,7 @@ Build the transaction: ```shell cardano-cli conway transaction build-raw \ - --tx-in $(cardano-cli query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ + --tx-in $(cardano-cli conway query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ --tx-out $(< payment.addr)+$change \ --fee 171089 \ --certificate-file registration.cert \ From 85cbb2078af7f100ba6de0c5cbe017c3ce1c82e2 Mon Sep 17 00:00:00 2001 From: kweijack Date: Sun, 23 Feb 2025 20:27:05 +0800 Subject: [PATCH 3/5] CLI Doc: Replace cli `conway` with `latest` --- .../get-started/deregister-stake-address.md | 26 ++++---- .../get-started/simple-transactions.md | 30 ++++----- .../get-started/stake-address-delegation.md | 14 ++--- .../get-started/stakeaddress-registration.md | 46 +++++++------- .../get-started/treasury-donations.md | 26 ++++---- .../get-started/withdraw-rewards.md | 14 ++--- .../governance/constitutional-committee.md | 54 ++++++++-------- .../cardano-cli/governance/delegating-vote.md | 14 ++--- .../cardano-cli/governance/gov-queries.md | 24 +++---- .../governance/governance-actions.md | 60 +++++++++--------- .../cardano-cli/governance/register-drep.md | 62 +++++++++---------- .../cardano-cli/governance/voting.md | 18 +++--- .../native-assets/native-assets.md | 36 +++++------ .../plutus-scripts/plutus-scripts.md | 30 ++++----- .../simple-scripts/simple-scripts.md | 24 +++---- docs/get-started/create-simple-transaction.md | 10 +-- docs/get-started/secure-workflow.md | 16 ++--- .../creating-wallet-faucet.md | 12 ++-- .../multi-witness-transactions-cli.md | 28 ++++----- docs/native-tokens/minting-nfts.md | 34 +++++----- docs/native-tokens/minting.md | 32 +++++----- docs/operate-a-stake-pool/on-chain-polls.md | 2 +- .../register-stake-address.md | 8 +-- .../register-stake-pool-metadata.md | 10 +-- .../register-stake-pool.md | 8 +-- ...ow-to-create-a-metadata-transaction-cli.md | 10 +-- 26 files changed, 324 insertions(+), 324 deletions(-) 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 032c87f418..f00a13ab47 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 @@ -38,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 conway stake-address deregistration-certificate \ +cardano-cli latest stake-address deregistration-certificate \ --stake-verification-key-file stake.vkey \ --out-file dereg.cert ``` @@ -64,7 +64,7 @@ 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 conway query stake-address-info --address $(< stake.addr) +cardano-cli latest query stake-address-info --address $(< stake.addr) ``` ```json [ @@ -88,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 conway query utxo --address $(< payment.addr) +cardano-cli latest query utxo --address $(< payment.addr) TxHash TxIx Amount -------------------------------------------------------------------------------------- 77b95d3c0031f918d2dcd796352d123dd3fec9f8599377ef96f1ee0e488f5ec1 0 9997495621 lovelace + TxOutDatumNone @@ -96,7 +96,7 @@ cardano-cli conway query utxo --address $(< payment.addr) #### Get the stake address deposit amount ``` -cardano-cli conway query protocol-parameters | jq .stakeAddressDeposit +cardano-cli latest query protocol-parameters | jq .stakeAddressDeposit > 2000000 ``` @@ -107,7 +107,7 @@ cardano-cli conway query protocol-parameters | jq .stakeAddressDeposit Here we use the information from the above queries to build the transaction: ``` -cardano-cli conway transaction build \ +cardano-cli latest transaction build \ --tx-in 77b95d3c0031f918d2dcd796352d123dd3fec9f8599377ef96f1ee0e488f5ec1#0 \ --change-address addr_test1vp9khgeajxw8snjjvaaule727hpytrvpsnq8z7h9t3zeuegh55grh \ --withdrawal stake_test1upfpm2244k8jf00l357t3adp2hzfsuqrwqvleheqjj08uhswme5cn+291385529 \ @@ -119,10 +119,10 @@ cardano-cli conway transaction build \ Of course, we could use command substitution and run all the queries within `build`, so this is equivalent: ``` -cardano-cli conway transaction build \ ---tx-in "$(cardano-cli conway query utxo --address "$(< new-payment.addr)" --output-json | jq -r 'keys[0]')" \ +cardano-cli latest transaction build \ +--tx-in "$(cardano-cli latest query utxo --address "$(< new-payment.addr)" --output-json | jq -r 'keys[0]')" \ --change-address "$(< new-payment.addr)" \ ---withdrawal "$(< stake.addr)+$(cardano-cli conway query stake-address-info --address "$(< stake.addr)" | jq -r .[].rewardAccountBalance)" \ +--withdrawal "$(< stake.addr)+$(cardano-cli latest query stake-address-info --address "$(< stake.addr)" | jq -r .[].rewardAccountBalance)" \ --certificate-file dereg.cert \ --witness-override 2 \ --out-file tx.raw @@ -191,13 +191,13 @@ cardano-cli debug transaction view --tx-file tx.raw Confirm that the keyHash for the stake address deregistration is correct with: ``` -cardano-cli conway stake-address key-hash --stake-verification-key-file stake.vkey +cardano-cli latest stake-address key-hash --stake-verification-key-file stake.vkey 521da955ad8f24bdff8d3cb8f5a155c49870037019fcdf20949e7e5e ``` All good! Ready to sign the transaction: ``` -cardano-cli conway transaction sign \ +cardano-cli latest transaction sign \ --tx-file tx.raw \ --signing-key-file new-payment.skey \ --signing-key-file stake.skey \ @@ -207,13 +207,13 @@ cardano-cli conway transaction sign \ And submit it to the chain: ``` -cardano-cli conway transaction submit --tx-file tx.signed +cardano-cli latest 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 conway query utxo --address $(< new-payment.addr) +cardano-cli latest query utxo --address $(< new-payment.addr) TxHash TxIx Amount -------------------------------------------------------------------------------------- c09bf08fdf6ae655d8ba7c5e9f44b5cbe11b6bb9621eabb9b1b08c1b27b987eb 0 10290700645 lovelace + TxOutDatumNone @@ -222,6 +222,6 @@ c09bf08fdf6ae655d8ba7c5e9f44b5cbe11b6bb9621eabb9b1b08c1b27b987eb 0 10 If we query the stake address info, we get `[]`, meaning that the deregistration has been sucessful: ``` -cardano-cli conway query stake-address-info --address $(< stake.addr) +cardano-cli latest 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 b1706bb61e..2784bccf46 100644 --- a/docs/get-started/cardano-cli/get-started/simple-transactions.md +++ b/docs/get-started/cardano-cli/get-started/simple-transactions.md @@ -16,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 conway transaction` +You'll find commands for these tasks under `cardano-cli latest transaction` ```bash -cardano-cli conway transaction -Usage: cardano-cli conway transaction +cardano-cli latest transaction +Usage: cardano-cli latest transaction ( build-raw | build | build-estimate @@ -55,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 conway query protocol-parameters --out-file pparams.json +cardano-cli latest 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`. @@ -63,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 conway query utxo --address $(< payment.addr) +cardano-cli latest query utxo --address $(< payment.addr) TxHash TxIx Amount -------------------------------------------------------------------------------------- @@ -81,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 conway transaction build-raw \ +cardano-cli latest transaction build-raw \ --tx-in e29e96a012c2443d59f2e53c156503a857c2f27c069ae003dab8125594038891#0 \ --tx-out addr_test1vzuztsedkqanfm7elu9nshfr4gh2gl0aj4djmayav2t7x8ch3pg30+1000000000 \ --tx-out addr_test1qp39w0fa0ccdc4gmg87puydf2kxt5mgt0vteq4a22ktrcssg7ysmx64l90xa0k4z25wpuejngya833qeu9cdxvveynfscsskf5+8994790937 \ @@ -94,7 +94,7 @@ cardano-cli conway transaction build-raw \ ```shell -cardano-cli conway transaction build-raw \ +cardano-cli latest transaction build-raw \ --tx-in e29e96a012c2443d59f2e53c156503a857c2f27c069ae003dab8125594038891#0 \ --tx-out "$(< payment2.addr)+1000000000" \ --tx-out "$(< payment.addr)+8994790937" \ @@ -180,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 conway transaction calculate-min-fee \ +cardano-cli latest transaction calculate-min-fee \ --tx-body-file tx.draft \ --protocol-params-file pparams.json \ --witness-count 1 @@ -201,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 conway transaction build-raw \ +cardano-cli latest transaction build-raw \ --tx-in e29e96a012c2443d59f2e53c156503a857c2f27c069ae003dab8125594038891#0 \ --tx-out $(< payment2.addr)+1000000000 \ --tx-out $(< payment.addr)+8994616944 \ @@ -215,7 +215,7 @@ cardano-cli conway 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 conway transaction sign \ +cardano-cli latest transaction sign \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ --testnet-magic 2 \ @@ -288,7 +288,7 @@ cardano-cli debug 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 conway transaction submit \ +cardano-cli latest transaction submit \ --tx-file tx.signed Transaction successfully submitted. ``` @@ -311,7 +311,7 @@ c57f25ebf9cf1487b13deeb8449215c499f3d61c2836d84ab92a73b0bbaadd38 1 89 Build the transaction: ```shell -cardano-cli conway transaction build \ +cardano-cli latest transaction build \ --tx-in c57f25ebf9cf1487b13deeb8449215c499f3d61c2836d84ab92a73b0bbaadd38#1 \ --tx-out $(< payment2.addr)+500000000 \ --change-address $(< payment.addr) \ @@ -386,7 +386,7 @@ cardano-cli debug transaction view --tx-file tx.raw As previously, sign the transaction with the `payment.skey`: ```shell -cardano-cli conway transaction sign \ +cardano-cli latest transaction sign \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ --out-file tx.signed @@ -394,7 +394,7 @@ cardano-cli conway transaction sign \ ### Submitting the transaction ```shell -cardano-cli conway transaction submit \ +cardano-cli latest transaction submit \ --tx-file tx.signed Transaction successfully submitted. ``` @@ -403,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 conway transaction build \ +cardano-cli latest 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 70a0947068..6c97aad2e7 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 @@ -17,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 conway 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 latest stake-address`: ```shell -cardano-cli conway stake-address -Usage: cardano-cli conway stake-address +cardano-cli latest stake-address +Usage: cardano-cli latest stake-address ( key-gen | key-hash | build @@ -42,7 +42,7 @@ Usage: cardano-cli conway stake-address 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 conway stake-address stake-delegation-certificate \ +cardano-cli latest stake-address stake-delegation-certificate \ --stake-verification-key-file stake.vkey \ --stake-pool-id pool17navl486tuwjg4t95vwtlqslx9225x5lguwuy6ahc58x5dnm9ma \ --out-file delegation.cert @@ -66,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 conway transaction build \ +cardano-cli latest 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 \ @@ -75,7 +75,7 @@ cardano-cli conway transaction build \ ``` ``` -cardano-cli conway transaction sign \ +cardano-cli latest transaction sign \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ --signing-key-file stake.skey \ @@ -83,7 +83,7 @@ cardano-cli conway transaction sign \ ``` ``` -cardano-cli conway transaction submit \ +cardano-cli latest 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 b7cbd963f5..f5a3a4b3bf 100644 --- a/docs/get-started/cardano-cli/get-started/stakeaddress-registration.md +++ b/docs/get-started/cardano-cli/get-started/stakeaddress-registration.md @@ -8,20 +8,20 @@ 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 conway transaction build --babbage-era`, users must now utilize the syntax `cardano-cli conway transaction build `. +To integrate the latest (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 transaction build `. ::: ## Registering a stake address -To participate in the protocol, such as delegating stake to a stake pool to earn rewards or, in the upcoming Conway era, delegating stake to a delegate representative, you must first register your stake credentials on the chain. This registration is accomplished by submitting a **stake address registration certificate** within a transaction. The process includes paying a deposit, the amount of which is determined by the `stakeAddressDeposit` protocol parameter. You can get the deposit back when you submit a **stake address deregistration certificate**. +To participate in the protocol, such as delegating stake to a stake pool to earn rewards or, in the Conway era, delegating stake to a delegate representative, you must first register your stake credentials on the chain. This registration is accomplished by submitting a **stake address registration certificate** within a transaction. The process includes paying a deposit, the amount of which is determined by the `stakeAddressDeposit` protocol parameter. You can get the deposit back when you submit a **stake address deregistration certificate**. 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 conway stake-address`: +You can easily generate such certificates with `cardano-cli`. The corresponding commands can be found under `cardano-cli latest stake-address`: ```shell -cardano-cli conway stake-address -Usage: cardano-cli conway stake-address +cardano-cli latest stake-address +Usage: cardano-cli latest stake-address ( key-gen | key-hash | build @@ -43,14 +43,14 @@ Usage: cardano-cli conway 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 conway query protocol-parameters | jq .stakeAddressDeposit +cardano-cli latest query protocol-parameters | jq .stakeAddressDeposit 2000000 ``` To generate the registration certificate, run: ```shell -cardano-cli conway stake-address registration-certificate \ +cardano-cli latest stake-address registration-certificate \ --stake-verification-key-file stake.vkey \ --key-reg-deposit-amt 2000000 \ --out-file registration.cert @@ -76,8 +76,8 @@ It's important to note that when using `build`, the deposit is automatically inc ### Using the `build` command ```shell -cardano-cli conway transaction build \ - --tx-in $(cardano-cli conway query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ +cardano-cli latest transaction build \ + --tx-in $(cardano-cli latest query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ --change-address $(< payment.addr) \ --certificate-file registration.cert \ --out-file tx.raw @@ -145,7 +145,7 @@ Using the `build-raw` command involves a slightly more intricate process. Simila Query the balance of the `payment.addr`: ```shell -cardano-cli conway query utxo --address $(< paymentstake.addr) +cardano-cli latest query utxo --address $(< paymentstake.addr) TxHash TxIx Amount -------------------------------------------------------------------------------------- 0690c70f117281627fc128ede51b1fe762c2bbc15c2e3d4eff2101c9d2613cd8 0 9999834851 lovelace + TxOutDatumNone @@ -155,7 +155,7 @@ cardano-cli conway query utxo --address $(< paymentstake.addr) You can leverage `jq` by having `cardano-cli` return the output in JSON: ```shell -cardano-cli conway query utxo --address $(< paymentstake.addr) --output-json +cardano-cli latest query utxo --address $(< paymentstake.addr) --output-json { "0690c70f117281627fc128ede51b1fe762c2bbc15c2e3d4eff2101c9d2613cd8#0": { "address": "addr_test1qp9khgeajxw8snjjvaaule727hpytrvpsnq8z7h9t3zeue2jrk54ttv0yj7llrfuhr66z4wynpcqxuqeln0jp9y70e0qvjewan", @@ -171,7 +171,7 @@ cardano-cli conway query utxo --address $(< paymentstake.addr) --output-json ``` Using `jq` to parse that JSON ```shell -cardano-cli conway query utxo --address $(< payment.addr) --output-json | jq -r .[].value.lovelace +cardano-cli latest query utxo --address $(< payment.addr) --output-json | jq -r .[].value.lovelace 9999834851 ``` ::: @@ -179,15 +179,15 @@ cardano-cli conway query utxo --address $(< payment.addr) --output-json | jq -r Query the protocol parameters: ```shell -cardano-cli conway query protocol parameters --out-file pparams.json +cardano-cli latest query protocol parameters --out-file pparams.json ``` Draft the transaction to calculate its transaction fee: ```shell -cardano-cli conway transaction build-raw \ - --tx-in $(cardano-cli conway query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ - --tx-out $(< payment.addr)+"$(cardano-cli conway query utxo --address $(< payment.addr) --out-file /dev/stdout | jq -r .[].value.lovelace)" \ +cardano-cli latest transaction build-raw \ + --tx-in $(cardano-cli latest query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ + --tx-out $(< payment.addr)+"$(cardano-cli latest query utxo --address $(< payment.addr) --out-file /dev/stdout | jq -r .[].value.lovelace)" \ --fee 0 \ --certificate-file registration.cert \ --out-file tx.draft @@ -196,7 +196,7 @@ cardano-cli conway transaction build-raw \ Calculate the transaction fee, it is useful to assign the output to a variable (`fee`): ```shell -cardano-cli conway transaction calculate-min-fee \ +cardano-cli latest transaction calculate-min-fee \ --tx-body-file tx.draft \ --protocol-params-file pparams.json \ --tx-in-count 1 \ @@ -211,14 +211,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 conway query protocol-parameters | jq .stakeAddressDeposit +cardano-cli latest query protocol-parameters | jq .stakeAddressDeposit 2000000 ``` Query the current balance of `payment.addr`: ```shell -cardano-cli conway query utxo --address $(< payment.addr) --output-json | jq -r .[].value.lovelace +cardano-cli latest query utxo --address $(< payment.addr) --output-json | jq -r .[].value.lovelace 9999834851 ``` @@ -229,8 +229,8 @@ change=$((9999834851 - 171089 - 2000000)) Build the transaction: ```shell -cardano-cli conway transaction build-raw \ - --tx-in $(cardano-cli conway query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ +cardano-cli latest transaction build-raw \ + --tx-in $(cardano-cli latest query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ --tx-out $(< payment.addr)+$change \ --fee 171089 \ --certificate-file registration.cert \ @@ -239,13 +239,13 @@ cardano-cli conway transaction build-raw \ ## Sign and submit the transaction ```shell -cardano-cli conway transaction sign \ +cardano-cli latest transaction sign \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ --out-file tx.signed ``` ```shell -cardano-cli conway transaction submit \ +cardano-cli latest 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 5855bda4a4..91330c4150 100644 --- a/docs/get-started/cardano-cli/get-started/treasury-donations.md +++ b/docs/get-started/cardano-cli/get-started/treasury-donations.md @@ -21,13 +21,13 @@ The treasury donation is created on epoch 0 so that when querying the treasury v ### Query the protocol-parameters: ``` -cardano-cli conway query protocol-parameters --out-file pparams.json +cardano-cli latest query protocol-parameters --out-file pparams.json ``` ### Query the utxos of your address: ``` -cardano-cli conway query utxo --address $(< example/utxo-keys/payment1.addr) +cardano-cli latest query utxo --address $(< example/utxo-keys/payment1.addr) TxHash TxIx Amount -------------------------------------------------------------------------------------- 6b3cac1a1b63498452ef36ff114ad4f51e5be00c6fbf7ff7b8dbf380483642aa 0 589993592922 lovelace + TxOutDatumNone @@ -36,7 +36,7 @@ cardano-cli conway query utxo --address $(< example/utxo-keys/payment1.addr) ### Query the current treasury value: ``` -cardano-cli conway query treasury +cardano-cli latest query treasury 0 ``` @@ -45,7 +45,7 @@ cardano-cli conway query treasury When building the transaction we need to pass the current value of the treasury. Also, we use a fee that is close to the minimum possible fee, We will calculate the acrtual fee in the next step. ``` -cardano-cli conway transaction build-raw \ +cardano-cli latest transaction build-raw \ --tx-in 6b3cac1a1b63498452ef36ff114ad4f51e5be00c6fbf7ff7b8dbf380483642aa#0 \ --current-treasury-value 0 \ --treasury-donation 987654321 \ @@ -58,7 +58,7 @@ cardano-cli conway transaction build-raw \ ### Calculate the fee: ``` -cardano-cli conway transaction calculate-min-fee \ +cardano-cli latest transaction calculate-min-fee \ --tx-body-file example/transactions/treasury.tx.raw \ --protocol-params-file pparams.json \ --witness-count 1 \ @@ -77,7 +77,7 @@ echo $((589993592922 - 166117 - 987654321)) ### Re-build the transaction with the updated values: ``` -cardano-cli conway transaction build-raw \ +cardano-cli latest transaction build-raw \ --tx-in 6b3cac1a1b63498452ef36ff114ad4f51e5be00c6fbf7ff7b8dbf380483642aa#0 \ --current-treasury-value 0 \ --treasury-donation 987654321 \ @@ -87,20 +87,20 @@ cardano-cli conway transaction build-raw \ --out-file example/transactions/treasury.tx.raw ``` ``` -cardano-cli conway transaction sign \ +cardano-cli latest transaction sign \ --tx-file treasury.tx.raw \ --signing-key-file payment.skey \ --out-file treasury.tx.signed ``` ``` -cardano-cli conway transaction submit \ +cardano-cli latest transaction submit \ --tx-file treasury.tx.signed ``` At the epoch transition following our transaction, the treasury will be updated. ``` -cardano-cli conway query treasury +cardano-cli latest query treasury 987654321 ``` @@ -111,7 +111,7 @@ cardano-cli conway query treasury The `build` command automatically queries the `currentTreasuryValue` so there is no need to pass it in a flag. As usual. `--change-address` helps us to automatically balance the transaction. ``` -cardano-cli conway transaction build \ +cardano-cli latest transaction build \ --tx-in $(cardano-cli query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ --treasury-donation 987654321 \ --change-address $(< payment.addr) \ @@ -121,7 +121,7 @@ cardano-cli conway transaction build \ ### Sign the transaction: ``` -cardano-cli conway transaction sign \ +cardano-cli latest transaction sign \ --tx-file treasury.tx.raw \ --signing-key-file payment.skey \ --out-file treasury.tx.signed @@ -130,14 +130,14 @@ cardano-cli conway transaction sign \ ### Submit the transaction: ``` -cardano-cli conway transaction submit \ +cardano-cli latest transaction submit \ --tx-file treasury.tx.signed ``` At the epoch transition following our transaction, the treasury will be updated. ``` -cardano-cli conway query treasury +cardano-cli latest query treasury 987654321 ``` 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 f21a5b8a92..aa87807fd4 100644 --- a/docs/get-started/cardano-cli/get-started/withdraw-rewards.md +++ b/docs/get-started/cardano-cli/get-started/withdraw-rewards.md @@ -12,7 +12,7 @@ keywords: [cardano-cli, cli, delegation, rewards, withdrawal, stake, stake addre First, check if you have some rewards to withdraw: ```shell -cardano-cli conway query stake-address-info --address $(< stake.addr) +cardano-cli latest query stake-address-info --address $(< stake.addr) [ { "address": "stake_test1ur453z5nxrgvvu9wfyuxut8ss0mrvca4n8ly44tcu8camlqaz98mh", @@ -27,7 +27,7 @@ cardano-cli conway query stake-address-info --address $(< stake.addr) Nice! There are some rewards, let's store the `rewardAccountBalance` in a variable for future use: ```shell -rewards="$(cardano-cli conway query stake-address-info --address $(< stake1.addr) | jq .[].rewardAccountBalance)" +rewards="$(cardano-cli latest query stake-address-info --address $(< stake1.addr) | jq .[].rewardAccountBalance)" ``` ## Building the transaction @@ -37,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 conway transaction build \ +cardano-cli latest 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) \ @@ -49,7 +49,7 @@ cardano-cli conway transaction build \ or using `<` and the `$rewards` variable from above: ```shell -cardano-cli conway transaction build \ +cardano-cli latest 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) \ @@ -64,7 +64,7 @@ cardano-cli conway transaction build \ As before, sign the transaction with the `payment.skey`: ```shell -cardano-cli conway transaction sign \ +cardano-cli latest transaction sign \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ --signing-key-file stake.skey \ @@ -137,7 +137,7 @@ cardano-cli debug transaction view --tx-file tx.signed ## Submitting the transaction ```shell -cardano-cli conway transaction submit \ +cardano-cli latest transaction submit \ --tx-file tx.signed Transaction successfully submitted. @@ -146,7 +146,7 @@ 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 conway query stake-address-info --address $(< stake1.addr) +cardano-cli latest query stake-address-info --address $(< stake1.addr) [ { "address": "stake_test1ur453z5nxrgvvu9wfyuxut8ss0mrvca4n8ly44tcu8camlqaz98mh", diff --git a/docs/get-started/cardano-cli/governance/constitutional-committee.md b/docs/get-started/cardano-cli/governance/constitutional-committee.md index 9e787676cf..a5c35cfd89 100644 --- a/docs/get-started/cardano-cli/governance/constitutional-committee.md +++ b/docs/get-started/cardano-cli/governance/constitutional-committee.md @@ -30,7 +30,7 @@ The most basic setup for a Constitutional Committee member is using Ed25519 keys ### Generate cold key pair: ```shell -cardano-cli conway governance committee key-gen-cold \ +cardano-cli latest governance committee key-gen-cold \ --cold-verification-key-file cc-cold.vkey \ --cold-signing-key-file cc-cold.skey ``` @@ -54,7 +54,7 @@ As usual, the ed25519 keys are wrapped on a text envelope: ### Generate the cold verification key hash: ```shell -cardano-cli conway governance committee key-hash \ +cardano-cli latest governance committee key-hash \ --verification-key-file cc-cold.vkey > cc-key.hash ``` @@ -76,7 +76,7 @@ submit an _Authorization Certificate_. This also applies to new Committee member To generate a hot key-pair run the following command: ```shell -cardano-cli conway governance committee key-gen-hot \ +cardano-cli latest governance committee key-gen-hot \ --verification-key-file cc-hot.vkey \ --signing-key-file cc-hot.skey ``` @@ -106,7 +106,7 @@ The _Authorization Certificate_ allows the hot credential to act on behalf of th ```shell -cardano-cli conway governance committee create-hot-key-authorization-certificate \ +cardano-cli latest governance committee create-hot-key-authorization-certificate \ --cold-verification-key-file cc-cold.vkey \ --hot-verification-key-file cc-hot.vkey \ --out-file cc-authorization.cert @@ -125,7 +125,7 @@ cat cc-authorization.cert ### Submit the authorization certificate in a transaction: ```shell -cardano-cli conway transaction build \ +cardano-cli latest transaction build \ --tx-in "$(cardano-cli query utxo --address "$(< payment.addr)" --output-json | jq -r 'keys[0]')" \ --change-address payment.addr \ --certificate-file cc-authorization.cert \ @@ -134,7 +134,7 @@ cardano-cli conway transaction build \ ``` ```shell -cardano-cli conway transaction sign \ +cardano-cli latest transaction sign \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ --signing-key-file cc-cold.skey \ @@ -142,7 +142,7 @@ cardano-cli conway transaction sign \ ``` ```shell -cardano-cli conway transaction submit \ +cardano-cli latest transaction submit \ --tx-file tx.signed ``` @@ -162,7 +162,7 @@ Alice, Bob, and Carol need to generate a key-pair for the multisignature cold cr Alice: ```shell -cardano-cli conway governance committee key-gen-cold \ +cardano-cli latest governance committee key-gen-cold \ --cold-verification-key-file alice-cold.vkey \ --cold-signing-key-file alice-cold.skey ``` @@ -170,14 +170,14 @@ cardano-cli conway governance committee key-gen-cold \ Bob: ```shell -cardano-cli conway governance committee key-gen-cold \ +cardano-cli latest governance committee key-gen-cold \ --cold-verification-key-file bob-cold.vkey \ --cold-signing-key-file bob-cold.skey ``` Carol: ```shell -cardano-cli conway governance committee key-gen-cold \ +cardano-cli latest governance committee key-gen-cold \ --cold-verification-key-file carol-cold.vkey \ --cold-signing-key-file carol-cold.skey ``` @@ -187,13 +187,13 @@ cardano-cli conway governance committee key-gen-cold \ To generate a multisignature script, Alice, Bob, and Carol need to obtain their verification key hashes: ```shell -cardano-cli conway governance committee key-hash --verification-key-file alice-cold.vkey +cardano-cli latest governance committee key-hash --verification-key-file alice-cold.vkey 8d6ae7ddc48e434d28ee36985043a180a98e8566e1d83cfe79a35270 -cardano-cli conway governance committee key-hash --verification-key-file bob-cold.vkey +cardano-cli latest governance committee key-hash --verification-key-file bob-cold.vkey 6689c9c9749266c2470ff49ee115a6e040e0a97042f1982c3de52f25 -cardano-cli conway governance committee key-hash --verification-key-file carol-cold.vkey +cardano-cli latest governance committee key-hash --verification-key-file carol-cold.vkey da1a4d13a1c951f30a7efb4dac2b4c1f603f4eabbfa0ecc7f361bfc1 ``` @@ -241,14 +241,14 @@ If ratified, "ABC" will need to generate a *Hot* credential and an Authorization Alice: ```shell -cardano-cli conway governance committee key-gen-hot \ +cardano-cli latest governance committee key-gen-hot \ --verification-key-file alice-hot.vkey \ --signing-key-file alice-hot.skey ``` Bob: ```shell -cardano-cli conway governance committee key-gen-hot \ +cardano-cli latest governance committee key-gen-hot \ --verification-key-file bob-hot.vkey \ --signing-key-file bob-hot.skey ``` @@ -256,20 +256,20 @@ cardano-cli conway governance committee key-gen-hot \ Carol: ```shell -cardano-cli conway governance committee key-gen-hot \ +cardano-cli latest governance committee key-gen-hot \ --verification-key-file carol-hot.vkey \ --signing-key-file carol-hot.skey ``` ### Get the hot key hashes: ```shell -cardano-cli conway governance committee key-hash --verification-key-file alice-hot.vkey +cardano-cli latest governance committee key-hash --verification-key-file alice-hot.vkey d775c28b6635d6eaecdc149f490f27d651ff4a10e2f37d60dfb23f11 -cardano-cli conway governance committee key-hash --verification-key-file bob-hot.vkey +cardano-cli latest governance committee key-hash --verification-key-file bob-hot.vkey 7be259f2b92d9587c3f0fddfa7ebdd19ad5b8e0f82e0a17166186001 -cardano-cli conway governance committee key-hash --verification-key-file carol-hot.vkey +cardano-cli latest governance committee key-hash --verification-key-file carol-hot.vkey 643f4e3d521675e199e38a6904038057252507fd69b97b9f181912b1 ``` @@ -312,7 +312,7 @@ The _Authorization Certificate_ allows the hot credential to act on behalf of th *hot* credential is compromised at any point, the committee member must generate a new one and issue a new Authorization Certificate. A new Authorization Certificate registered on-chain overrides the previous one, effectively invalidating any votes signed by the old hot credential. This applies only to actions that have not yet been ratified. Actions that have been already ratified or enacted by the old hot credential are not affected. ```shell -cardano-cli conway governance committee create-hot-key-authorization-certificate \ +cardano-cli latest governance committee create-hot-key-authorization-certificate \ --cold-script-hash ad31d247bb2549db98020c5a6331732ebe559ad85b5768abbda3eb0d \ --hot-script-hash f5d42214cb2625cfc34e5c0cfb1daceee44a4a3c2e6807ab67cd6adb \ --out-file cc-authorization.cert @@ -322,7 +322,7 @@ cardano-cli conway governance committee create-hot-key-authorization-certificate Build the transaction: ```shell -cardano-cli conway transaction build \ +cardano-cli latest transaction build \ --tx-in "$(cardano-cli query utxo --address "$(< payment.addr)" --output-json | jq -r 'keys[0]')" \ --change-address "$(< payment.addr)" \ --certificate-file cc-authorization.cert \ @@ -336,7 +336,7 @@ cardano-cli conway transaction build \ Witness the transaction with the payment key: ```shell -cardano-cli conway transaction witness \ +cardano-cli latest transaction witness \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ --out-file payment.witness @@ -345,7 +345,7 @@ cardano-cli conway transaction witness \ Alice witnesses the transaction: ```shell -cardano-cli conway transaction witness \ +cardano-cli latest transaction witness \ --tx-body-file tx.raw \ --signing-key-file alice-cold.skey \ --out-file alice.witness @@ -354,7 +354,7 @@ cardano-cli conway transaction witness \ Bob witnesses the transaction: ```shell -cardano-cli conway transaction witness \ +cardano-cli latest transaction witness \ --tx-body-file tx.raw \ --signing-key-file bob-cold.skey \ --out-file bob.witness @@ -363,7 +363,7 @@ cardano-cli conway transaction witness \ Carol witnesses the transaction: ```shell -cardano-cli conway transaction witness \ +cardano-cli latest transaction witness \ --tx-body-file tx.raw \ --signing-key-file carol-cold.skey \ --out-file carol.witness @@ -372,7 +372,7 @@ cardano-cli conway transaction witness \ Assemble the tranaction with all the witnesses from previous step: ```shell -cardano-cli conway transaction assemble \ +cardano-cli latest transaction assemble \ --tx-body-file tx.raw \ --witness-file payment.witness \ --witness-file alice.witness \ @@ -384,7 +384,7 @@ cardano-cli conway transaction assemble \ Submit the transaction ```shell -cardano-cli conway transaction submit \ +cardano-cli latest transaction submit \ --tx-file tx.signed ``` diff --git a/docs/get-started/cardano-cli/governance/delegating-vote.md b/docs/get-started/cardano-cli/governance/delegating-vote.md index 47313b105e..395a8035f9 100644 --- a/docs/get-started/cardano-cli/governance/delegating-vote.md +++ b/docs/get-started/cardano-cli/governance/delegating-vote.md @@ -28,7 +28,7 @@ In addition to the registered DReps, the system features a couple of default vot * Delegating to the `--always-abstain` default voting option: ```shell -cardano-cli conway stake-address vote-delegation-certificate \ +cardano-cli latest stake-address vote-delegation-certificate \ --stake-verification-key-file stake.vkey \ --always-abstain \ --out-file vote-deleg.cert @@ -37,7 +37,7 @@ cardano-cli conway stake-address vote-delegation-certificate \ * Delegating to the `--always-no-confidence` default voting option: ```shell -cardano-cli conway stake-address vote-delegation-certificate \ +cardano-cli latest stake-address vote-delegation-certificate \ --stake-verification-key-file stake.vkey \ --always-no-confidence \ --out-file vote-deleg.cert @@ -46,7 +46,7 @@ cardano-cli conway stake-address vote-delegation-certificate \ * Delegating to a **key-based** registered DRep: ```shell -cardano-cli conway stake-address vote-delegation-certificate \ +cardano-cli latest stake-address vote-delegation-certificate \ --stake-verification-key-file stake.vkey \ --drep-key-hash $(< drep.id) \ --out-file vote-deleg.cert @@ -54,7 +54,7 @@ cardano-cli conway stake-address vote-delegation-certificate \ * Delegating to a **script-based** (i.e. multisignature) registered DRep: ```shell -cardano-cli conway stake-address vote-delegation-certificate \ +cardano-cli latest stake-address vote-delegation-certificate \ --stake-verification-key-file stake.vkey \ --drep-script-hash $(< script.hash) \ --out-file vote-deleg.cert @@ -65,7 +65,7 @@ cardano-cli conway stake-address vote-delegation-certificate \ * Build: ```shell -cardano-cli conway transaction build \ +cardano-cli latest transaction build \ --tx-in $(cardano-cli query utxo --address $(< payment.addr) --testnet-magic 4 --out-file /dev/stdout | jq -r 'keys[0]') \ --change-address $(< payment.addr) \ --certificate-file vote-deleg.cert \ @@ -76,7 +76,7 @@ cardano-cli conway transaction build \ * Sign with payment and stake keys: ```shell -cardano-cli conway transaction sign \ +cardano-cli latest transaction sign \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ --signing-key-file stake.skey \ @@ -86,6 +86,6 @@ cardano-cli conway transaction sign \ * Submit: ```shell -cardano-cli conway transaction submit \ +cardano-cli latest transaction submit \ --tx-file tx.signed ``` \ No newline at end of file diff --git a/docs/get-started/cardano-cli/governance/gov-queries.md b/docs/get-started/cardano-cli/governance/gov-queries.md index e7fc8b9100..9af21e19d1 100644 --- a/docs/get-started/cardano-cli/governance/gov-queries.md +++ b/docs/get-started/cardano-cli/governance/gov-queries.md @@ -15,13 +15,13 @@ There are various queries you can do to your local node to find relevant informa This query returns all the proposals that can be ratified in the current epoch. This means that it excludes proposals that were submitted on the current epoch, as these cannot be ratified on the current epoch. ```shell -cardano-cli conway query proposals --all-proposals +cardano-cli latest query proposals --all-proposals ``` #### Query proposal by ID To query an individual proposal by its governance action id: ```shell -cardano-cli conway query proposals \ +cardano-cli latest query proposals \ --governance-action-tx-id d098afe0db98605c243c13c8a537a3eb51e6ded5e3a48acca83e7082a0086428 \ --governance-action-index 0 @@ -63,7 +63,7 @@ cardano-cli conway query proposals \ We are showing only the top level keys of the governance state, the dump is to large to show on this tutorial. ```shell -cardano-cli conway query gov-state +cardano-cli latest query gov-state { "committee": {}, @@ -83,7 +83,7 @@ cardano-cli conway query gov-state ### Query the constitution: ```shell -cardano-cli conway query constitution +cardano-cli latest query constitution { "anchor": { "dataHash": "ca41a91f399259bcefe57f9858e91f6d00e1a38d6d9c63d4052914ea7bd70cb2", @@ -95,7 +95,7 @@ cardano-cli conway query constitution ### Query the DRep state for all DReps: ```shell -cardano-cli conway query drep-state --all-dreps +cardano-cli latest query drep-state --all-dreps [ [ { @@ -143,7 +143,7 @@ cardano-cli conway query drep-state --all-dreps ### Query the DRep state for an individual DRep: ```shell -cardano-cli conway query drep-state --drep-key-hash 8f4fefcf28017a57b41517a67d56ef4c0dc04181a11d35178dd53f4c +cardano-cli latest query drep-state --drep-key-hash 8f4fefcf28017a57b41517a67d56ef4c0dc04181a11d35178dd53f4c [ [ { @@ -160,7 +160,7 @@ cardano-cli conway query drep-state --drep-key-hash 8f4fefcf28017a57b41517a67d56 ### Query the DRep stake distribution (voting power): ```shell -cardano-cli conway query drep-stake-distribution --all-dreps +cardano-cli latest query drep-stake-distribution --all-dreps [ [ "drep-keyHash-13797df5308dfebf2348fa58b312a177cf97939f5f7d21168e1a54db", @@ -180,7 +180,7 @@ cardano-cli conway query drep-stake-distribution --all-dreps ### Query the committee state: ```shell -cardano-cli conway query committee-state +cardano-cli latest query committee-state { "committee": { "scriptHash-27999ed757d6dac217471ae61d69b1b067b8b240d9e3ff36eb66b5d0": { @@ -251,7 +251,7 @@ cardano-cli conway query committee-state ### Query the state of an individual committee key hash: ```shell -cardano-cli conway query committee-state --cold-script-hash 7ceede7d6a89e006408e6b7c6acb3dd094b3f6817e43b4a36d01535b +cardano-cli latest query committee-state --cold-script-hash 7ceede7d6a89e006408e6b7c6acb3dd094b3f6817e43b4a36d01535b { "committee": { "scriptHash-7ceede7d6a89e006408e6b7c6acb3dd094b3f6817e43b4a36d01535b": { @@ -275,7 +275,7 @@ cardano-cli conway query committee-state --cold-script-hash 7ceede7d6a89e006408e ### Query expired committee members ```shell -cardano-cli conway query committee-state --expired +cardano-cli latest query committee-state --expired { "committee": { "keyHash-059349cd1e77dc3e500d3ffc498adb7307001ecc022c8b083faaa48b": { @@ -297,7 +297,7 @@ cardano-cli conway query committee-state --expired ### Query active committee members ```shell -cardano-cli conway query committee-state --active +cardano-cli latest query committee-state --active { "committee": { "keyHash-059349cd1e77dc3e500d3ffc498adb7307001ecc022c8b083faaa48b": { @@ -341,7 +341,7 @@ cardano-cli conway query committee-state --active ### Query unrecognized committee keys ```shell -cardano-cli conway query committee-state --unrecognized +cardano-cli latest query committee-state --unrecognized { "committee": {}, "epoch": 106, diff --git a/docs/get-started/cardano-cli/governance/governance-actions.md b/docs/get-started/cardano-cli/governance/governance-actions.md index 32053a8efc..b26cd901d6 100644 --- a/docs/get-started/cardano-cli/governance/governance-actions.md +++ b/docs/get-started/cardano-cli/governance/governance-actions.md @@ -30,7 +30,7 @@ the most recently enacted action of its respective type. Notably, this requireme You can get the last enacted governance action IDs with: ```shell -cardano-cli conway query gov-state | jq -r .nextRatifyState.nextEnactState.prevGovActionIds +cardano-cli latest query gov-state | jq -r .nextRatifyState.nextEnactState.prevGovActionIds ``` ```json { @@ -88,7 +88,7 @@ You can create a proposal to add them as new CC members with an expiration epoch * Create the proposal: ```shell -cardano-cli conway governance action update-committee \ +cardano-cli latest governance action update-committee \ --testnet \ --governance-action-deposit $(cardano-cli query protocol-parameters | jq -r '.govActionDeposit') \ --deposit-return-stake-verification-key-file stake.vkey \ @@ -111,9 +111,9 @@ cardano-cli conway governance action update-committee \ Assume that you want to remove the CC member with the key hash `89181f26b47c3d3b6b127df163b15b74b45bba7c3b7a1d185c05c2de`. You can do this with: ```shell -cardano-cli conway governance action update-committee \ +cardano-cli latest governance action update-committee \ --testnet \ - --governance-action-deposit $(cardano-cli conway query gov-state | jq -r '.currentPParams.govActionDeposit') \ + --governance-action-deposit $(cardano-cli latest query gov-state | jq -r '.currentPParams.govActionDeposit') \ --deposit-return-stake-verification-key-file stake.vkey \ --anchor-url https://raw.githubusercontent.com/cardano-foundation/CIPs/refs/heads/master/CIP-0108/examples/treasury-withdrawal.jsonld \ --anchor-data-hash 311b148ca792007a3b1fee75a8698165911e306c3bc2afef6cf0145ecc7d03d4 \ @@ -127,9 +127,9 @@ cardano-cli conway governance action update-committee \ ### Update committee to only change the *threshold*: ```shell -cardano-cli conway governance action update-committee \ +cardano-cli latest governance action update-committee \ --testnet \ - --governance-action-deposit $(cardano-cli conway query gov-state | jq -r '.currentPParams.govActionDeposit') \ + --governance-action-deposit $(cardano-cli latest query gov-state | jq -r '.currentPParams.govActionDeposit') \ --deposit-return-stake-verification-key-file stake.vkey \ --anchor-url https://raw.githubusercontent.com/cardano-foundation/CIPs/refs/heads/master/CIP-0108/examples/treasury-withdrawal.jsonld \ --anchor-data-hash 311b148ca792007a3b1fee75a8698165911e306c3bc2afef6cf0145ecc7d03d4 \ @@ -149,14 +149,14 @@ on Mainnet. It is available in https://ipfs.io/ipfs/bafkreifnwj6zpu3ixa4siz2lndq Find the last enacted governance action of this type, If the query returns `null` it means the current constitution (if it exists) is not enacted in a governance action, but instead supplied on the Conway genesis file. ```shell -cardano-cli conway query gov-state | jq -r '.nextRatifyState.nextEnactState.prevGovActionIds.Constitution' +cardano-cli latest query gov-state | jq -r '.nextRatifyState.nextEnactState.prevGovActionIds.Constitution' null ``` When the constitution has been enacted through a governance action, you will see the transaction ID and index of the proposing transaction, we will use this information later: ```shell -cardano-cli conway query gov-state | jq -r '.nextRatifyState.nextEnactState.prevGovActionIds.Constitution' +cardano-cli latest query gov-state | jq -r '.nextRatifyState.nextEnactState.prevGovActionIds.Constitution' { "govActionIx": 0, "txId": "bf4832f443fe34f26f929ce2fbb26cc35ef4fda31150b2da45969a9bac4f7a8c" @@ -183,7 +183,7 @@ a77245f63bc7504c6ce34383633729692388dc1823723b0ee9825743a87a6a6d constitution.t or ```shell -cardano-cli conway governance hash anchor-data --file-text constitution.txt +cardano-cli latest governance hash anchor-data --file-text constitution.txt a77245f63bc7504c6ce34383633729692388dc1823723b0ee9825743a87a6a6d ``` @@ -222,9 +222,9 @@ fa24fb305126805cf2164c161d852a0e7330cf988f1fe558cf7d4a64 When there is no previously enacted constitution: ```shell -cardano-cli conway governance action create-constitution \ +cardano-cli latest governance action create-constitution \ --testnet \ - --governance-action-deposit $(cardano-cli conway query gov-state | jq -r '.currentPParams.govActionDeposit') \ + --governance-action-deposit $(cardano-cli latest query gov-state | jq -r '.currentPParams.govActionDeposit') \ --deposit-return-stake-verification-key-file stake.vkey \ --anchor-url https://raw.githubusercontent.com/cardano-foundation/CIPs/master/CIP-0100/cip-0100.common.schema.json \ --anchor-data-hash "9d99fbca260b2d77e6d3012204e1a8658f872637ae94cdb1d8a53f4369400aa9" \ @@ -236,9 +236,9 @@ cardano-cli conway governance action create-constitution \ When there is a previously enacted constitution, we need to reference the previous governance action id (TXID and INDEX): ```shell -cardano-cli conway governance action create-constitution \ +cardano-cli latest governance action create-constitution \ --testnet \ - --governance-action-deposit $(cardano-cli conway query gov-state | jq -r '.currentPParams.govActionDeposit') \ + --governance-action-deposit $(cardano-cli latest query gov-state | jq -r '.currentPParams.govActionDeposit') \ --deposit-return-stake-verification-key-file stake.vkey \ --anchor-url https://raw.githubusercontent.com/cardano-foundation/CIPs/refs/heads/master/CIP-0108/examples/treasury-withdrawal.jsonld \ --anchor-data-hash 311b148ca792007a3b1fee75a8698165911e306c3bc2afef6cf0145ecc7d03d4 \ @@ -256,7 +256,7 @@ From here, you just need to [submit the proposal in a transaction](#build-sign-a - Find the last governance action enacted of this type: ```shell -cardano-cli conway query gov-state | jq -r '.nextRatifyState.nextEnactState.prevGovActionIds.Committee' +cardano-cli latest query gov-state | jq -r '.nextRatifyState.nextEnactState.prevGovActionIds.Committee' ``` ```json { @@ -268,9 +268,9 @@ cardano-cli conway query gov-state | jq -r '.nextRatifyState.nextEnactState.prev #### Create a motion no-confidence governance action: ```shell -cardano-cli conway governance action create-no-confidence \ +cardano-cli latest governance action create-no-confidence \ --testnet \ - --governance-action-deposit $(cardano-cli conway query gov-state | jq -r '.currentPParams.govActionDeposit') \ + --governance-action-deposit $(cardano-cli latest query gov-state | jq -r '.currentPParams.govActionDeposit') \ --deposit-return-stake-verification-key-file stake.vkey \ --anchor-url https://raw.githubusercontent.com/cardano-foundation/CIPs/refs/heads/master/CIP-0108/examples/treasury-withdrawal.jsonld \ --anchor-data-hash 311b148ca792007a3b1fee75a8698165911e306c3bc2afef6cf0145ecc7d03d4 \ @@ -289,9 +289,9 @@ Also, treasury withdrawals must reference the Guardrails script when present. #### Create the treasury withdrawal proposal: ```shell -cardano-cli conway governance action create-treasury-withdrawal \ +cardano-cli latest governance action create-treasury-withdrawal \ --testnet \ - --governance-action-deposit $(cardano-cli conway query gov-state | jq -r '.currentPParams.govActionDeposit') \ + --governance-action-deposit $(cardano-cli latest query gov-state | jq -r '.currentPParams.govActionDeposit') \ --deposit-return-stake-verification-key-file stake.vkey \ --anchor-url https://raw.githubusercontent.com/cardano-foundation/CIPs/refs/heads/master/CIP-0108/examples/treasury-withdrawal.jsonld \ --anchor-data-hash 311b148ca792007a3b1fee75a8698165911e306c3bc2afef6cf0145ecc7d03d4 \ @@ -310,8 +310,8 @@ From here, you just need to [submit the proposal in a transaction](#build-sign-a #### Create the 'info' governance action: ```shell -cardano-cli conway governance action create-info --testnet \ - --governance-action-deposit $(cardano-cli conway query gov-state | jq -r '.currentPParams.govActionDeposit') \ +cardano-cli latest governance action create-info --testnet \ + --governance-action-deposit $(cardano-cli latest query gov-state | jq -r '.currentPParams.govActionDeposit') \ --deposit-return-stake-verification-key-file stake.vkey \ --anchor-url https://raw.githubusercontent.com/cardano-foundation/CIPs/master/CIP-0108/examples/treasury-withdrawal.jsonld \ --anchor-data-hash 311b148ca792007a3b1fee75a8698165911e306c3bc2afef6cf0145ecc7d03d4 \ @@ -326,9 +326,9 @@ because, actions can be created off-line so the cli may not have access to a nod anticipating that a new Guardrails script will be ratified and enacted during the proposal's lifespan. ```shell -cardano-cli conway governance action create-protocol-parameters-update \ +cardano-cli latest governance action create-protocol-parameters-update \ --testnet \ - --governance-action-deposit $(cardano-cli conway query gov-state | jq -r '.currentPParams.govActionDeposit') \ + --governance-action-deposit $(cardano-cli latest query gov-state | jq -r '.currentPParams.govActionDeposit') \ --deposit-return-stake-verification-key-file stake.vkey \ --anchor-url https://raw.githubusercontent.com/cardano-foundation/CIPs/refs/heads/master/CIP-0108/examples/treasury-withdrawal.jsonld \ --anchor-data-hash 311b148ca792007a3b1fee75a8698165911e306c3bc2afef6cf0145ecc7d03d4 \ @@ -350,7 +350,7 @@ while also allowing members of the governance bodies to review, discuss, and ult * Note that you can also use `build-raw` and `calculate-min-fee` to build transactions in an off-line setting. The example below uses the convenient `build`: ```shell -cardano-cli conway transaction build \ +cardano-cli latest transaction build \ --tx-in "$(cardano-cli query utxo --address "$(< payment.addr)" --output-json | jq -r 'keys[0]')" \ --change-address $(< payment.addr) \ --proposal-file info.action \ @@ -358,14 +358,14 @@ cardano-cli conway transaction build \ ``` ```shell -cardano-cli conway transaction sign \ +cardano-cli latest transaction sign \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ --out-file tx.signed ``` ```shell -cardano-cli conway transaction submit \ +cardano-cli latest transaction submit \ --tx-file tx.signed ``` @@ -381,7 +381,7 @@ a reference script. When building the transaction, we include the `*.action` file and supply the guardrails script with --proposal-script-file. Note that the guardrails script does not require a datum to be passed, only a redeemer value, which can be just an empty json. ```shell -cardano-cli conway transaction build \ +cardano-cli latest transaction build \ --proposal-script-file guardrails-script.plutus \ --tx-in-collateral "$(cardano-cli query utxo --address "$(< payment.addr)" --output-json | jq -r 'keys[0]')" \ --proposal-redeemer-value {} \ @@ -396,7 +396,7 @@ Estimated transaction fee: Coin 313228 - Sign the transaction with `payment.skey`: ```shell -cardano-cli conway transaction sign \ +cardano-cli latest transaction sign \ --tx-file pparams-tx.raw \ --signing-key-file payment.skey \ --out-file pparams-tx.signed @@ -405,7 +405,7 @@ cardano-cli conway transaction sign \ - Submit it to the chain with: ```shell -cardano-cli conway transaction submit \ +cardano-cli latest transaction submit \ --tx-file pparams-tx.signed ``` @@ -417,14 +417,14 @@ proposal serve as the action ID. An effective way to find your governance action First, find your key hash with: ```shell -cardano-cli conway stake-address key-hash --stake-verification-key-file stake.vkey +cardano-cli latest stake-address key-hash --stake-verification-key-file stake.vkey ``` `8e0debc9fdc6c616ac40d98bf3950b436895eea9cccf0396a6e5e12b` Use `jq` to filter the `gov-state` output by the stake key hash. The output contains all the relevant information about your governance actions, including `actionId`: ```shell -cardano-cli conway query gov-state \ +cardano-cli latest query gov-state \ | jq -r --arg keyHash "8e0debc9fdc6c616ac40d98bf3950b436895eea9cccf0396a6e5e12b" '.proposals | to_entries[] | select(.value.returnAddr.credential.keyHash | contains($keyHash)) | .value' ``` diff --git a/docs/get-started/cardano-cli/governance/register-drep.md b/docs/get-started/cardano-cli/governance/register-drep.md index 7f0de4e8e9..40a6df0b94 100644 --- a/docs/get-started/cardano-cli/governance/register-drep.md +++ b/docs/get-started/cardano-cli/governance/register-drep.md @@ -29,7 +29,7 @@ import TabItem from '@theme/TabItem'; ### Generate DRep keys: ```shell -cardano-cli conway governance drep key-gen \ +cardano-cli latest governance drep key-gen \ --verification-key-file drep.vkey \ --signing-key-file drep.skey ``` @@ -54,7 +54,7 @@ This returns the keys wrapped on text envelopes: The hash of the verification key is the DRep ID, get it with: ```shell -cardano-cli conway governance drep id \ +cardano-cli latest governance drep id \ --drep-verification-key-file drep.vkey \ --output-format hex ``` @@ -65,7 +65,7 @@ cardano-cli conway governance drep id \ Or in bech32 format ```shell -cardano-cli conway governance drep id \ +cardano-cli latest governance drep id \ --drep-verification-key-file drep.vkey \ --output-format bech32 ``` @@ -92,7 +92,7 @@ wget https://raw.githubusercontent.com/cardano-foundation/CIPs/master/CIP-0119/e Use cardano-cli or b2sum to get its hash ```bash -cardano-cli conway governance drep metadata-hash \ +cardano-cli latest governance drep metadata-hash \ --drep-metadata-file drep.jsonld a14a5ad4f36bddc00f92ddb39fd9ac633c0fd43f8bfa57758f9163d10ef916de @@ -115,7 +115,7 @@ cardano-cli query protocol-parameters | jq .dRepDeposit Generate the certificate Using the `drep.vkey` file: ```bash -cardano-cli conway governance drep registration-certificate \ +cardano-cli latest governance drep registration-certificate \ --drep-verification-key-file drep.vkey \ --key-reg-deposit-amt 500000000 \ --drep-metadata-url https://raw.githubusercontent.com/cardano-foundation/CIPs/master/CIP-0119/examples/drep.jsonld \ @@ -126,7 +126,7 @@ cardano-cli conway governance drep registration-certificate \ Or using the DRep verification key: ```bash -cardano-cli conway governance drep registration-certificate \ +cardano-cli latest governance drep registration-certificate \ --drep-verification-key c19e0e939609531cfd04dcfa5bf1a5f3e245aa88e163759341aba296af34cc7e \ --key-reg-deposit-amt 500000000 \ --drep-metadata-url https://raw.githubusercontent.com/cardano-foundation/CIPs/master/CIP-0119/examples/drep.jsonld \ @@ -137,7 +137,7 @@ cardano-cli conway governance drep registration-certificate \ Or using the DRep ID: ```bash -cardano-cli conway governance drep registration-certificate \ +cardano-cli latest governance drep registration-certificate \ --drep-key-hash "$(< drep.id)" \ --key-reg-deposit-amt 500000000 \ --drep-metadata-url https://raw.githubusercontent.com/cardano-foundation/CIPs/master/CIP-0119/examples/drep.jsonld \ @@ -160,7 +160,7 @@ Any of the above methods produces `drep-reg.cert ` in a text envelope: Build the transaction. Note that we use `--witness-override 2` because this tranaction will contain 2 signatures, with the `payment.skey` and with the `drep.skey`. ```bash -cardano-cli conway transaction build \ +cardano-cli latest transaction build \ --tx-in $(cardano-cli query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ --change-address $(< payment.addr) \ --certificate-file drep-reg.cert \ @@ -171,7 +171,7 @@ cardano-cli conway transaction build \ Sign it with payment and DRep signing keys: ```bash -cardano-cli conway transaction sign \ +cardano-cli latest transaction sign \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ --signing-key-file drep.skey \ @@ -181,17 +181,17 @@ cardano-cli conway transaction sign \ Submit it to the chain: ```bash -cardano-cli conway transaction submit \ +cardano-cli latest transaction submit \ --tx-file tx.signed ``` ### Query the DRep state to confirm: ```bash -cardano-cli conway query drep-state --all-dreps +cardano-cli latest query drep-state --all-dreps -cardano-cli conway query drep-state --drep-key-hash 687c9849e1792f9b43d2a78153c412406950ee0c6f2b417226da9dcc +cardano-cli latest query drep-state --drep-key-hash 687c9849e1792f9b43d2a78153c412406950ee0c6f2b417226da9dcc [ [ { @@ -216,7 +216,7 @@ A basic example of a DRep using a native script is a DRep that consists of vario ### Generate a DRep key pair for each member ```bash -cardano-cli conway governance drep key-gen \ +cardano-cli latest governance drep key-gen \ --verification-key-file drep1.vkey \ --signing-key-file drep1.skey ``` @@ -239,7 +239,7 @@ cardano-cli conway governance drep key-gen \ Each member generates the hash of the verification key (This is exactly what the `governance drep id` command do) ```bash -cardano-cli conway governance drep id \ +cardano-cli latest governance drep id \ --drep-verification-key-file drep1.vkey \ --output-format hex \ --out-file drep1.id @@ -340,7 +340,7 @@ wget https://raw.githubusercontent.com/cardano-foundation/CIPs/master/CIP-0119/e Use cardano-cli or b2sum to get its hash: ```bash -cardano-cli conway governance drep metadata-hash \ +cardano-cli latest governance drep metadata-hash \ --drep-metadata-file drep.jsonld a14a5ad4f36bddc00f92ddb39fd9ac633c0fd43f8bfa57758f9163d10ef916de @@ -378,7 +378,7 @@ echo $drepDeposit Generate the registration certificate: ```bash -cardano-cli conway governance drep registration-certificate \ +cardano-cli latest governance drep registration-certificate \ --drep-script-hash "$(< drep-multisig.id)" \ --key-reg-deposit-amt "$drepDeposit" \ --out-file drep-multisig-reg.cert @@ -389,8 +389,8 @@ cardano-cli conway governance drep registration-certificate \ Build the transaction. Note that we use `--witness-override 4` because this tranaction will contain up to 4 signatures, 1 from the payment key and up to 3 members of the DRep. ```bash -cardano-cli conway transaction build \ - --tx-in $(cardano-cli conway query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ +cardano-cli latest transaction build \ + --tx-in $(cardano-cli latest query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ --change-address $(< payment.addr) \ --certificate-file drep-multisig-reg.cert \ --certificate-script-file drep-multisig.json \ @@ -403,7 +403,7 @@ Each member of the DRep will witness the transaction with its individual keys fr Witnessing the transaction with the payment key: ```bash -cardano-cli conway transaction witness \ +cardano-cli latest transaction witness \ \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ @@ -413,20 +413,20 @@ cardano-cli conway transaction witness \ Witnessing the transaction with the DRep keys from each member: ```bash -cardano-cli conway transaction witness \ +cardano-cli latest transaction witness \ --tx-body-file tx.raw \ --signing-key-file drep1.skey \ --out-file drep1.witness ``` ```bash -cardano-cli conway transaction witness \ +cardano-cli latest transaction witness \ --tx-body-file tx.raw \ --signing-key-file drep2.skey \ --out-file drep2.witness ``` ```bash -cardano-cli conway transaction witness \ +cardano-cli latest transaction witness \ --tx-body-file tx.raw \ --signing-key-file drep3.skey \ --out-file drep3.witness @@ -435,7 +435,7 @@ cardano-cli conway transaction witness \ Assemble the tranaction with all the witnesses from previous step: ```bash -cardano-cli conway transaction assemble \ +cardano-cli latest transaction assemble \ --tx-body-file tx.raw \ --witness-file payment.witness \ --witness-file drep1.witness \ @@ -447,14 +447,14 @@ cardano-cli conway transaction assemble \ Submit the transaction ```bash -cardano-cli conway transaction submit \ +cardano-cli latest transaction submit \ --tx-file tx.signed ``` ### Query the DRep state to confirm: ```bash -cardano-cli conway query drep-state \ +cardano-cli latest query drep-state \ --drep-script-hash $(< drep-multisig.id) ``` ```json @@ -501,7 +501,7 @@ wget https://raw.githubusercontent.com/cardano-foundation/CIPs/master/CIP-0119/e Use cardano-cli or b2sum to get its hash: ```bash -cardano-cli conway governance drep metadata-hash \ +cardano-cli latest governance drep metadata-hash \ --drep-metadata-file drep.jsonld a14a5ad4f36bddc00f92ddb39fd9ac633c0fd43f8bfa57758f9163d10ef916de @@ -540,7 +540,7 @@ echo $drepDeposit Generate the registration certificate: ```bash -cardano-cli conway governance drep registration-certificate \ +cardano-cli latest governance drep registration-certificate \ --drep-script-hash "$(< alwaysVoteYesDrep.id)" \ --key-reg-deposit-amt "$drepDeposit" \ --out-file alwaysVoteYesDrep.cert @@ -550,8 +550,8 @@ cardano-cli conway governance drep registration-certificate \ Build the transaction, we need to provide a collateral and a redeemer value: ```bash -cardano-cli conway transaction build \ - --tx-in $(cardano-cli conway query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ +cardano-cli latest transaction build \ + --tx-in $(cardano-cli latest query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ --tx-in-collateral $(cardano-cli query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ --certificate-file alwaysVoteYesDrep.cert \ --certificate-script-file alwaysVoteYesDrep.plutus \ @@ -561,13 +561,13 @@ cardano-cli conway transaction build \ ``` ```bash -cardano-cli conway transaction sign \ +cardano-cli latest transaction sign \ --signing-key-file payment.skey \ --tx-body-file tx.raw \ --out-file tx.signed ``` ```bash -cardano-cli conway transaction submit --tx-file tx.signed +cardano-cli latest 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 c41b745b68..35a809572c 100644 --- a/docs/get-started/cardano-cli/governance/voting.md +++ b/docs/get-started/cardano-cli/governance/voting.md @@ -26,7 +26,7 @@ Assume we need to submit a vote on the governance action with ID `df58f714c0765f 1. Obtain the URL and hash of the new constitution proposal from the governance state: ```shell -cardano-cli conway query gov-state | \ +cardano-cli latest query gov-state | \ jq -r --arg govActionId "df58f714c0765f3489afb6909384a16c31d600695be7e86ff9c59cf2e8a48c79" '.proposals | to_entries[] | select(.value.actionId.txId | contains($govActionId)) | .value' ``` ```json @@ -90,7 +90,7 @@ In the future, voting apps, explorers, wallets, and other tools could perform th Voting with DRep keys: ```shell -cardano-cli conway governance vote create \ +cardano-cli latest governance vote create \ --yes \ --governance-action-tx-id "df58f714c0765f3489afb6909384a16c31d600695be7e86ff9c59cf2e8a48c79" \ --governance-action-index "0" \ @@ -101,7 +101,7 @@ cardano-cli conway governance vote create \ Voting with CC hot keys: ```shell -cardano-cli conway governance vote create \ +cardano-cli latest governance vote create \ --yes \ --governance-action-tx-id "df58f714c0765f3489afb6909384a16c31d600695be7e86ff9c59cf2e8a48c79" \ --governance-action-index "0" \ @@ -111,7 +111,7 @@ cardano-cli conway governance vote create \ Voting with SPO keys: ```shell -cardano-cli conway governance vote create \ +cardano-cli latest governance vote create \ --yes \ --governance-action-tx-id "df58f714c0765f3489afb6909384a16c31d600695be7e86ff9c59cf2e8a48c79" \ --governance-action-index "0" \ @@ -124,7 +124,7 @@ cardano-cli conway governance vote create \ Build the transaction: ```shell -cardano-cli conway transaction build \ +cardano-cli latest transaction build \ --tx-in "$(cardano-cli query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]')" \ --change-address $(< payment.addr) \ --vote-file df58f714c0765f3489afb6909384a16c31d600695be7e86ff9c59cf2e8a48c79-constitution.vote \ @@ -133,26 +133,26 @@ cardano-cli conway transaction build \ ``` Sign it with the DRep key: ```shell -cardano-cli conway transaction sign --tx-body-file vote-tx.raw \ +cardano-cli latest 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 conway transaction sign --tx-body-file vote-tx.raw \ +cardano-cli latest 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 conway transaction sign --tx-body-file vote-tx.raw \ +cardano-cli latest 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 conway transaction submit --tx-file vote-tx.signed +cardano-cli latest 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 149a98ca63..4c36009afd 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 conway transaction build-raw --tx-out="..."` -- `cardano-cli conway transaction build-raw --mint="..."` +- `cardano-cli latest transaction build-raw --tx-out="..."` +- `cardano-cli latest transaction build-raw --mint="..."` -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. +The CLI command `cardano-cli latest 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 conway transaction calculate-min-required-utxo \ +cardano-cli latest 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 conway transaction build \ +cardano-cli latest 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 conway transaction sign \ +cardano-cli latest transaction sign \ --tx-file mint-tx.raw \ --signing-key-file policy.skey \ --signing-key-file payment.skey \ @@ -297,7 +297,7 @@ cardano-cli conway transaction sign \ #### Submit the transaction: ```bash -cardano-cli conway transaction submit --tx-file mint-tx.signed +cardano-cli latest 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 conway transaction calculate-min-required-utxo \ +cardano-cli latest 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 conway transaction build \ +cardano-cli latest transaction build \ --tx-in d4b158e58cb58da28b25837300f6ef8f9f7d67fd5a5ce07648d17a6fae31b88a#0 \ --tx-in d4b158e58cb58da28b25837300f6ef8f9f7d67fd5a5ce07648d17a6fae31b88a#1 \ --tx-out addr_test1vp9khgeajxw8snjjvaaule727hpytrvpsnq8z7h9t3zeuegh55grh+1043020+"1 11375f8ee31c280e1f2ec6fe11a73bca79d7a6a64f18e1e6980f0c74.637573746f6d636f696e" \ @@ -338,10 +338,10 @@ cardano-cli conway transaction build \ --out-file tx.raw ``` ``` -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 latest transaction sign --tx-file tx.raw --signing-key-file policy.skey --signing-key-file payment.skey --out-file tx.signed ``` ``` -cardano-cli conway transaction submit --tx-file tx.signedTransaction successfully submitted. +cardano-cli latest 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 conway transaction build-raw ... --out-file txbody +cardano-cli latest transaction build-raw ... --out-file txbody -cardano-cli conway transaction sign ... --tx-body-file txbody --out-file tx +cardano-cli latest transaction sign ... --tx-body-file txbody --out-file tx -cardano-cli conway transaction submit ... --tx-file tx +cardano-cli latest transaction submit ... --tx-file tx ``` ### Destroying (burning) tokens @@ -363,25 +363,25 @@ cardano-cli conway 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 conway transaction txid --tx-body-file "$TX_BODY_FILE_1") +TXID1=$(cardano-cli latest transaction txid --tx-body-file "$TX_BODY_FILE_1") TX_BODY_FILE_2=... TX_FILE_2=... -cardano-cli conway transaction build-raw \ +cardano-cli latest 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 conway transaction sign \ +cardano-cli latest 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 conway transaction submit --tx-file "$TX_FILE_2" +cardano-cli latest 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 0416ed1bc6..8d8abedbd7 100644 --- a/docs/get-started/cardano-cli/plutus-scripts/plutus-scripts.md +++ b/docs/get-started/cardano-cli/plutus-scripts/plutus-scripts.md @@ -99,8 +99,8 @@ 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 conway transaction build \ ---tx-in $(cardano-cli conway query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ +cardano-cli latest transaction build \ +--tx-in $(cardano-cli latest query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ --tx-out $(< script.addr)+10000000 \ --tx-out-inline-datum-file datum.json \ --change-address $(< payment.addr) \ @@ -112,7 +112,7 @@ cardano-cli conway transaction build \ Sign the transaction with the payment.skey ``` -cardano-cli conway transaction sign \ +cardano-cli latest transaction sign \ --tx-file lock.tx `\ -signing-key-file payment.skey \ --out-file lock.tx.signed @@ -121,7 +121,7 @@ cardano-cli conway transaction sign \ Submit the transaction ``` -cardano-cli conway transaction submit \ +cardano-cli latest transaction submit \ --tx-file lock.tx.signed >Transaction successfully submitted. @@ -155,9 +155,9 @@ 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 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]') \ +cardano-cli latest transaction build \ +--tx-in $(cardano-cli latest query utxo --address $(< script.addr) --output-json | jq -r 'keys[0]') \ +--tx-in-collateral $(cardano-cli latest query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ --tx-in-script-file fortytwotyped.plutus \ --tx-in-inline-datum-present \ --tx-in-redeemer-value 57 \ @@ -185,9 +185,9 @@ 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 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]') \ +cardano-cli latest transaction build \ +--tx-in $(cardano-cli latest query utxo --address $(< script.addr) --output-json | jq -r 'keys[0]') \ +--tx-in-collateral $(cardano-cli latest query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ --tx-in-script-file fortytwotyped.plutus \ --tx-in-inline-datum-present \ --tx-in-redeemer-value 42 \ @@ -197,11 +197,11 @@ cardano-cli conway transaction build \ Lets break down the command: -- `--tx-in $(cardano-cli conway query utxo --address $(< script.addr) --output-json | jq -r 'keys[0]')` +- `--tx-in $(cardano-cli latest query utxo --address $(< script.addr) --output-json | jq -r 'keys[0]')` We use the first UTxO on the script address as input for the transaction. So we are trying to spend the locked funds. -- `--tx-in-collateral $(cardano-cli conway query utxo --address $(< payment.addr)` +- `--tx-in-collateral $(cardano-cli latest query utxo --address $(< payment.addr)` `--output-json | jq -r 'keys[0]')` Since we are running a Plutus script, we must provide a collateral. We use the first utxo of payment address. @@ -236,13 +236,13 @@ This time, the node validated the transaction and successfully ran the script. T ``` -cardano-cli conway transaction sign \ +cardano-cli latest transaction sign \ --tx-file unlock.tx \ --signing-key-file payment.skey \ --out-file unlock.tx.signed ``` ``` -cardano-cli conway transaction submit -\ +cardano-cli latest transaction submit -\ -tx-file unlock.tx.signed > Transaction successfully submitted. @@ -251,7 +251,7 @@ cardano-cli conway transaction submit -\ For tracking purposes, lets find our transaction id ``` -cardano-cli conway transaction txid --tx-file unlock.tx.signed +cardano-cli latest 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 38650a6ce7..5125a6d376 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 conway transaction build-raw +cardano-cli latest transaction build-raw --invalid-hereafter 1000 --fee 0 --tx-in utxoinput @@ -440,7 +440,7 @@ literal value. Create the transaction witness: ```bash -cardano-cli conway transaction witness +cardano-cli latest transaction witness --tx-body-file txbody --signing-key-file utxoSignKey --out-file utxoWitness @@ -449,7 +449,7 @@ cardano-cli conway transaction witness Assemble the transaction witness and the tx body to create the transaction: ```bash -cardano-cli conway transaction assemble +cardano-cli latest 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 conway transaction build-raw \ +cardano-cli latest 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 conway transaction witness \ +cardano-cli latest transaction witness \ --tx-body-file spendScriptTxBody \ --script-file allMultiSigScript \ --out-file scriptWitness -cardano-cli conway transaction witness \ +cardano-cli latest transaction witness \ --tx-body-file spendScriptTxBody \ --signing-key-file paySignKey1 \ --out-file key1witness -cardano-cli conway transaction witness \ +cardano-cli latest transaction witness \ --tx-body-file spendScriptTxBody \ --signing-key-file paySignKey2 \ --out-file key2witness -cardano-cli conway transaction witness \ +cardano-cli latest 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 conway transaction assemble \ +cardano-cli latest transaction assemble \ --tx-body-file spendScriptTxBody \ --witness-file scriptWitness \ --witness-file key1witness \ @@ -512,7 +512,7 @@ cardano-cli conway transaction assemble \ --witness-file key3witness \ --out-file spendMultiSig ``` -You can now submit this tx via `cardano-cli conway transaction submit`! +You can now submit this tx via `cardano-cli latest 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 conway transaction build-raw \ +cardano-cli latest 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 conway transaction build-raw \ +cardano-cli latest 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 e5f9625753..9a45c3f7b0 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 conway transaction build-raw \ +cardano-cli latest 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 conway transaction calculate-min-fee \ +cardano-cli latest 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 conway transaction build-raw \ +cardano-cli latest 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 conway transaction build-raw \ Sign the transaction with the signing key **payment.skey** and save the signed transaction in **tx.signed** ```sh -cardano-cli conway transaction sign \ +cardano-cli latest transaction sign \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ --mainnet \ @@ -135,7 +135,7 @@ cardano-cli conway transaction sign \ ## Submit the transaction ```sh -cardano-cli conway transaction submit \ +cardano-cli latest transaction submit \ --tx-file tx.signed \ --mainnet ``` diff --git a/docs/get-started/secure-workflow.md b/docs/get-started/secure-workflow.md index bd8f4fd87a..6f92cf537e 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 conway transaction build-raw \ +cardano-cli latest 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 conway transaction calculate-min-fee \ +cardano-cli latest 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 conway transaction build-raw \ +cardano-cli latest 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 conway transaction build-raw \ Sign the transaction with the signing key `payment.skey` and save the signed transaction in `tx.signed`: ``` sh -cardano-cli conway transaction sign \ +cardano-cli latest 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 conway transaction submit \ +cardano-cli latest 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 conway transaction build`? +### Why can't I use `cardano-cli latest 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 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) + - [Please use `cardano-cli latest transaction build` instead of `cardano-cli latest 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 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. +Therefore this guide suggests *only* assembling transaction *details* outside the air gap, to be applied to `cardano-cli latest 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 bd7a5e0e5a..61db73f04a 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 conway transaction build-raw \ +cardano-cli latest 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 conway transaction build-raw \ --out-file $HOME/cardano/tx.draft ``` -`cardano-cli conway transaction build-raw` : This tells `cardano-cli` to build a raw transaction. +`cardano-cli latest 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 conway 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 conway transaction calculate-min-fee \ +cardano-cli latest 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 conway transaction build-raw \ +cardano-cli latest 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 conway transaction sign \ +cardano-cli latest 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 conway transaction sign \ Finally, we submit the transaction to the blockchain! ```bash -cardano-cli conway transaction submit \ +cardano-cli latest 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 75a3efcc9f..ecd19db783 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 conway transaction build-raw \ +$ cardano-cli latest 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 conway transaction build-raw \ ``` ```bash {8} -$ cardano-cli conway transaction calculate-min-fee \ +$ cardano-cli latest transaction calculate-min-fee \ --tx-body-file tx.draft \ --tx-in-count 1 \ --tx-out-count 2 \ @@ -90,7 +90,7 @@ $ cardano-cli conway 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 conway transaction build-raw \ +cardano-cli latest 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 conway transaction sign \ +cardano-cli latest transaction sign \ --tx-body-file tx.draft \ --signing-key-file keys/payment1.skey \ --testnet-magic 1097911063 \ --out-file tx.signed -cardano-cli conway transaction submit \ +cardano-cli latest 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 conway transaction build-raw \ +cardano-cli latest 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 conway 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 conway transaction calculate-min-fee \ +cardano-cli latest 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 conway transaction build-raw \ +cardano-cli latest 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 conway transaction sign \ +cardano-cli latest 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 conway transaction submit \ +cardano-cli latest 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 conway transaction build-raw \ +cardano-cli latest 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 conway transaction build-raw \ +cardano-cli latest transaction build-raw \ --tx-in 258abd628eef7d6ff0f7b4e6866b4f7c21065f4d6b5e49b51e2ac4ff035ad06f#0 \ --tx-out $(cat $HOME/cardano/keys/payment2.addr)+0 \ --fee 0 \ @@ -362,7 +362,7 @@ cardano-cli conway transaction build-raw \ And invoke the calculate-min-fees endpoint on `cardano-cli` for both of them: ```bash {8,17} -cardano-cli conway transaction calculate-min-fee \ +cardano-cli latest 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 conway transaction calculate-min-fee \ --protocol-params-file $HOME/cardano/protocol.json 169857 Lovelace -cardano-cli conway transaction calculate-min-fee \ +cardano-cli latest 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 4dde648ffa..9ea80d5298 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 conway transaction policyid --script-file ./policy/policy.script > policy/policyID +cardano-cli latest transaction policyid --script-file ./policy/policy.script > policy/policyID ``` ### Metadata @@ -672,7 +672,7 @@ values={[ ```bash -cardano-cli conway transaction build \ +cardano-cli latest transaction build \ --testnet-magic 2 \ --alonzo-era \ --tx-in $txhash#$txix \ @@ -691,7 +691,7 @@ cardano-cli conway transaction build \ ```bash -cardano-cli conway transaction build \ +cardano-cli latest transaction build \ --testnet-magic 1 \ --alonzo-era \ --tx-in $txhash#$txix \ @@ -710,7 +710,7 @@ cardano-cli conway transaction build \ ```bash -cardano-cli conway transaction build \ +cardano-cli latest transaction build \ --mainnet \ --alonzo-era \ --tx-in $txhash#$txix \ @@ -753,7 +753,7 @@ Estimated transaction fee: Lovelace 176677 Sign the transaction: ```bash -cardano-cli conway transaction sign \ +cardano-cli latest 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 conway transaction submit --tx-file matx.signed --testnet-magic 2 +cardano-cli latest transaction submit --tx-file matx.signed --testnet-magic 2 ``` @@ -788,7 +788,7 @@ cardano-cli conway transaction submit --tx-file matx.signed --testnet-magic 2 ```bash -cardano-cli conway transaction submit --tx-file matx.signed --testnet-magic 1 +cardano-cli latest transaction submit --tx-file matx.signed --testnet-magic 1 ``` @@ -796,7 +796,7 @@ cardano-cli conway transaction submit --tx-file matx.signed --testnet-magic 1 ```bash -cardano-cli conway transaction submit --tx-file matx.signed --mainnet +cardano-cli latest transaction submit --tx-file matx.signed --mainnet ``` @@ -928,7 +928,7 @@ values={[ ```bash -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 +cardano-cli latest 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 conway transaction build --testnet-magic 2 --alonzo-era --tx-in $txh ```bash -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 +cardano-cli latest 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 conway transaction build --testnet-magic 1 --alonzo-era --tx-in $txh ```bash -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 +cardano-cli latest 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 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 +cardano-cli latest 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 conway transaction sign --signing-key-file payment.skey --signing- ```bash -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 +cardano-cli latest 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 conway transaction sign --signing-key-file payment.skey --signing- ```bash -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 +cardano-cli latest 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 conway transaction submit --tx-file burning.signed --testnet-magic 2 +cardano-cli latest transaction submit --tx-file burning.signed --testnet-magic 2 ``` @@ -1014,7 +1014,7 @@ cardano-cli conway transaction submit --tx-file burning.signed --testnet-magic 2 ```bash -cardano-cli conway transaction submit --tx-file burning.signed --testnet-magic 1 +cardano-cli latest transaction submit --tx-file burning.signed --testnet-magic 1 ``` @@ -1022,7 +1022,7 @@ cardano-cli conway transaction submit --tx-file burning.signed --testnet-magic 1 ```bash -cardano-cli conway transaction submit --tx-file burning.signed --mainnet +cardano-cli latest transaction submit --tx-file burning.signed --mainnet ``` diff --git a/docs/native-tokens/minting.md b/docs/native-tokens/minting.md index 67986f9830..4510a259bb 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 conway transaction policyid --script-file ./policy/policy.script > policy/policyID +cardano-cli latest 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 conway transaction build-raw \ +cardano-cli latest 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 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) +fee=$(cardano-cli latest 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 conway transaction build-raw \ +cardano-cli latest 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 conway transaction build-raw \ Transactions need to be signed to prove the authenticity and ownership of the policy key. ```bash -cardano-cli conway transaction sign \ +cardano-cli latest 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 conway transaction submit --tx-file matx.signed $testnet +cardano-cli latest 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 conway transaction build-raw \ +cardano-cli latest transaction build-raw \ --fee $fee \ --tx-in $txhash#$txix \ --tx-out $receiver+$receiver_output+"2 $policyid.$tokenname1" \ @@ -491,7 +491,7 @@ cardano-cli conway transaction build-raw \ Again we are going to calculate the fee and save it in a variable. ```bash -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) +fee=$(cardano-cli latest 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 conway transaction build-raw \ +cardano-cli latest transaction build-raw \ --fee $fee \ --tx-in $txhash#$txix \ --tx-out $receiver+$receiver_output+"2 $policyid.$tokenname1" \ @@ -515,12 +515,12 @@ cardano-cli conway transaction build-raw \ Sign it: ```bash -cardano-cli conway transaction sign --signing-key-file payment.skey $testnet --tx-body-file rec_matx.raw --out-file rec_matx.signed +cardano-cli latest transaction sign --signing-key-file payment.skey $testnet --tx-body-file rec_matx.raw --out-file rec_matx.signed ``` Send it: ```bash -cardano-cli conway transaction submit --tx-file rec_matx.signed $testnet +cardano-cli latest 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 conway transaction build-raw \ +cardano-cli latest 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 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) +burnfee=$(cardano-cli latest 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 conway transaction build-raw \ +cardano-cli latest 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 conway transaction build-raw \ Sign the transaction: ```bash - cardano-cli conway transaction sign \ + cardano-cli latest transaction sign \ --signing-key-file payment.skey \ --signing-key-file policy/policy.skey \ $testnet \ @@ -613,7 +613,7 @@ $testnet \ Send it: ```bash -cardano-cli conway transaction submit --tx-file burning.signed $testnet +cardano-cli latest 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 d4ac62fa3b..afb9e472a7 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 conway transaction build \ +$ cardano-cli latest 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 5d4361ba28..33a236f09a 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 conway transaction build \ +cardano-cli latest 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 conway transaction build-raw \ +cardano-cli latest transaction build-raw \ --tx-in b64ae44e1195b04663ab863b62337e626c65b0c9855a9fbb9ef4458f81a6f5ee#1 \ --tx-out $(cat payment.addr)+${txOut} \ --invalid-hereafter $((${currentSlot} + 1000)) \ @@ -130,7 +130,7 @@ cardano-cli conway transaction build-raw \ Sign the transaction with both the payment and stake secret keys: ``` -cardano-cli conway transaction sign \ +cardano-cli latest transaction sign \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ --signing-key-file stake.skey \ @@ -141,7 +141,7 @@ cardano-cli conway transaction sign \ And submit it: ``` -cardano-cli conway transaction submit \ +cardano-cli latest 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 6545bec562..f9c45f3ef4 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 conway transaction build-raw \ +cardano-cli latest transaction build-raw \ --tx-in # \ --tx-out $(cat payment.addr)+0 \ --invalid-hereafter 0 \ @@ -140,7 +140,7 @@ cardano-cli conway transaction build-raw \ #### Calculate the fees ```sh -cardano-cli conway transaction calculate-min-fee \ +cardano-cli latest 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 conway transaction build-raw \ +cardano-cli latest transaction build-raw \ --tx-in # \ --tx-out $(cat payment.addr)+ \ --invalid-hereafter \ @@ -185,7 +185,7 @@ cardano-cli conway transaction build-raw \ #### Sign the transaction: ```sh -cardano-cli conway transaction sign \ +cardano-cli latest transaction sign \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ --signing-key-file stake.skey \ @@ -197,7 +197,7 @@ cardano-cli conway transaction sign \ #### Submit the transaction: ```sh -cardano-cli conway transaction submit \ +cardano-cli latest 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 9cb06b06d6..a490d2ecb7 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 conway transaction build \ +cardano-cli latest 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 conway transaction build-raw \ +cardano-cli latest transaction build-raw \ ${tx_in} \ --tx-out $(cat payment.addr)+${txOut} \ --invalid-hereafter $((${currentSlot} + 1000)) \ @@ -259,7 +259,7 @@ cardano-cli conway transaction build-raw \ Sign the transaction: ``` -cardano-cli conway transaction sign \ +cardano-cli latest transaction sign \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ --signing-key-file cold.skey \ @@ -270,7 +270,7 @@ cardano-cli conway transaction sign \ Submit the transaction: ``` -cardano-cli conway transaction submit \ +cardano-cli latest 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 5a1f44ffcd..f8163848fc 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 conway transaction build-raw \ +cardano-cli latest transaction build-raw \ --tx-in dfb99f8f103e56a856e04e087255dbaf402f3801acb71a6baf423a1054d3ccd5#0 \ --tx-out $(cat payment.addr)+0 \ --metadata-json-file metadata.json \ @@ -112,7 +112,7 @@ cardano-cli conway transaction build-raw \ Then we calculate the transaction fee like so: ```bash -cardano-cli conway transaction calculate-min-fee \ +cardano-cli latest 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 conway transaction build-raw \ +cardano-cli latest transaction build-raw \ --tx-in dfb99f8f103e56a856e04e087255dbaf402f3801acb71a6baf423a1054d3ccd5#0 \ --tx-out $(cat payment.addr)+1749480133 \ --metadata-json-file metadata.json \ @@ -142,7 +142,7 @@ cardano-cli conway transaction build-raw \ We then sign the transaction using our **payment signing key**: ```bash -cardano-cli conway transaction sign \ +cardano-cli latest 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 conway transaction submit \ +cardano-cli latest transaction submit \ --tx-file tx.signed \ --testnet-magic 1097911063 ``` From abcfda3e221d0281e6ac9dc8757b3f4e4f8c6fc5 Mon Sep 17 00:00:00 2001 From: kweijack Date: Sun, 23 Feb 2025 20:56:25 +0800 Subject: [PATCH 4/5] Revert "CLI Doc: Replace cli `conway` with `latest`" This reverts commit 85cbb2078af7f100ba6de0c5cbe017c3ce1c82e2. --- .../get-started/deregister-stake-address.md | 26 ++++---- .../get-started/simple-transactions.md | 30 ++++----- .../get-started/stake-address-delegation.md | 14 ++--- .../get-started/stakeaddress-registration.md | 46 +++++++------- .../get-started/treasury-donations.md | 26 ++++---- .../get-started/withdraw-rewards.md | 14 ++--- .../governance/constitutional-committee.md | 54 ++++++++-------- .../cardano-cli/governance/delegating-vote.md | 14 ++--- .../cardano-cli/governance/gov-queries.md | 24 +++---- .../governance/governance-actions.md | 60 +++++++++--------- .../cardano-cli/governance/register-drep.md | 62 +++++++++---------- .../cardano-cli/governance/voting.md | 18 +++--- .../native-assets/native-assets.md | 36 +++++------ .../plutus-scripts/plutus-scripts.md | 30 ++++----- .../simple-scripts/simple-scripts.md | 24 +++---- docs/get-started/create-simple-transaction.md | 10 +-- docs/get-started/secure-workflow.md | 16 ++--- .../creating-wallet-faucet.md | 12 ++-- .../multi-witness-transactions-cli.md | 28 ++++----- docs/native-tokens/minting-nfts.md | 34 +++++----- docs/native-tokens/minting.md | 32 +++++----- docs/operate-a-stake-pool/on-chain-polls.md | 2 +- .../register-stake-address.md | 8 +-- .../register-stake-pool-metadata.md | 10 +-- .../register-stake-pool.md | 8 +-- ...ow-to-create-a-metadata-transaction-cli.md | 10 +-- 26 files changed, 324 insertions(+), 324 deletions(-) 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 f00a13ab47..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 @@ -38,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 latest stake-address deregistration-certificate \ +cardano-cli conway stake-address deregistration-certificate \ --stake-verification-key-file stake.vkey \ --out-file dereg.cert ``` @@ -64,7 +64,7 @@ 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 latest query stake-address-info --address $(< stake.addr) +cardano-cli conway query stake-address-info --address $(< stake.addr) ``` ```json [ @@ -88,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 latest query utxo --address $(< payment.addr) +cardano-cli conway query utxo --address $(< payment.addr) TxHash TxIx Amount -------------------------------------------------------------------------------------- 77b95d3c0031f918d2dcd796352d123dd3fec9f8599377ef96f1ee0e488f5ec1 0 9997495621 lovelace + TxOutDatumNone @@ -96,7 +96,7 @@ cardano-cli latest query utxo --address $(< payment.addr) #### Get the stake address deposit amount ``` -cardano-cli latest query protocol-parameters | jq .stakeAddressDeposit +cardano-cli conway query protocol-parameters | jq .stakeAddressDeposit > 2000000 ``` @@ -107,7 +107,7 @@ cardano-cli latest query protocol-parameters | jq .stakeAddressDeposit Here we use the information from the above queries to build the transaction: ``` -cardano-cli latest transaction build \ +cardano-cli conway transaction build \ --tx-in 77b95d3c0031f918d2dcd796352d123dd3fec9f8599377ef96f1ee0e488f5ec1#0 \ --change-address addr_test1vp9khgeajxw8snjjvaaule727hpytrvpsnq8z7h9t3zeuegh55grh \ --withdrawal stake_test1upfpm2244k8jf00l357t3adp2hzfsuqrwqvleheqjj08uhswme5cn+291385529 \ @@ -119,10 +119,10 @@ cardano-cli latest transaction build \ Of course, we could use command substitution and run all the queries within `build`, so this is equivalent: ``` -cardano-cli latest transaction build \ ---tx-in "$(cardano-cli latest 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 latest 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 @@ -191,13 +191,13 @@ cardano-cli debug transaction view --tx-file tx.raw Confirm that the keyHash for the stake address deregistration is correct with: ``` -cardano-cli latest 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 latest transaction sign \ +cardano-cli conway transaction sign \ --tx-file tx.raw \ --signing-key-file new-payment.skey \ --signing-key-file stake.skey \ @@ -207,13 +207,13 @@ cardano-cli latest transaction sign \ And submit it to the chain: ``` -cardano-cli latest 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 latest query utxo --address $(< new-payment.addr) +cardano-cli conway query utxo --address $(< new-payment.addr) TxHash TxIx Amount -------------------------------------------------------------------------------------- c09bf08fdf6ae655d8ba7c5e9f44b5cbe11b6bb9621eabb9b1b08c1b27b987eb 0 10290700645 lovelace + TxOutDatumNone @@ -222,6 +222,6 @@ c09bf08fdf6ae655d8ba7c5e9f44b5cbe11b6bb9621eabb9b1b08c1b27b987eb 0 10 If we query the stake address info, we get `[]`, meaning that the deregistration has been sucessful: ``` -cardano-cli latest 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 2784bccf46..b1706bb61e 100644 --- a/docs/get-started/cardano-cli/get-started/simple-transactions.md +++ b/docs/get-started/cardano-cli/get-started/simple-transactions.md @@ -16,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 latest transaction` +You'll find commands for these tasks under `cardano-cli conway transaction` ```bash -cardano-cli latest transaction -Usage: cardano-cli latest transaction +cardano-cli conway transaction +Usage: cardano-cli conway transaction ( build-raw | build | build-estimate @@ -55,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 latest 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`. @@ -63,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 latest query utxo --address $(< payment.addr) +cardano-cli conway query utxo --address $(< payment.addr) TxHash TxIx Amount -------------------------------------------------------------------------------------- @@ -81,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 latest transaction build-raw \ +cardano-cli conway transaction build-raw \ --tx-in e29e96a012c2443d59f2e53c156503a857c2f27c069ae003dab8125594038891#0 \ --tx-out addr_test1vzuztsedkqanfm7elu9nshfr4gh2gl0aj4djmayav2t7x8ch3pg30+1000000000 \ --tx-out addr_test1qp39w0fa0ccdc4gmg87puydf2kxt5mgt0vteq4a22ktrcssg7ysmx64l90xa0k4z25wpuejngya833qeu9cdxvveynfscsskf5+8994790937 \ @@ -94,7 +94,7 @@ cardano-cli latest transaction build-raw \ ```shell -cardano-cli latest transaction build-raw \ +cardano-cli conway transaction build-raw \ --tx-in e29e96a012c2443d59f2e53c156503a857c2f27c069ae003dab8125594038891#0 \ --tx-out "$(< payment2.addr)+1000000000" \ --tx-out "$(< payment.addr)+8994790937" \ @@ -180,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 latest transaction calculate-min-fee \ +cardano-cli conway transaction calculate-min-fee \ --tx-body-file tx.draft \ --protocol-params-file pparams.json \ --witness-count 1 @@ -201,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 latest transaction build-raw \ +cardano-cli conway transaction build-raw \ --tx-in e29e96a012c2443d59f2e53c156503a857c2f27c069ae003dab8125594038891#0 \ --tx-out $(< payment2.addr)+1000000000 \ --tx-out $(< payment.addr)+8994616944 \ @@ -215,7 +215,7 @@ cardano-cli latest 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 latest transaction sign \ +cardano-cli conway transaction sign \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ --testnet-magic 2 \ @@ -288,7 +288,7 @@ cardano-cli debug 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 latest transaction submit \ +cardano-cli conway transaction submit \ --tx-file tx.signed Transaction successfully submitted. ``` @@ -311,7 +311,7 @@ c57f25ebf9cf1487b13deeb8449215c499f3d61c2836d84ab92a73b0bbaadd38 1 89 Build the transaction: ```shell -cardano-cli latest transaction build \ +cardano-cli conway transaction build \ --tx-in c57f25ebf9cf1487b13deeb8449215c499f3d61c2836d84ab92a73b0bbaadd38#1 \ --tx-out $(< payment2.addr)+500000000 \ --change-address $(< payment.addr) \ @@ -386,7 +386,7 @@ cardano-cli debug transaction view --tx-file tx.raw As previously, sign the transaction with the `payment.skey`: ```shell -cardano-cli latest transaction sign \ +cardano-cli conway transaction sign \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ --out-file tx.signed @@ -394,7 +394,7 @@ cardano-cli latest transaction sign \ ### Submitting the transaction ```shell -cardano-cli latest transaction submit \ +cardano-cli conway transaction submit \ --tx-file tx.signed Transaction successfully submitted. ``` @@ -403,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 latest 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 6c97aad2e7..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 @@ -17,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 latest 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 latest stake-address -Usage: cardano-cli latest stake-address +cardano-cli conway stake-address +Usage: cardano-cli conway stake-address ( key-gen | key-hash | build @@ -42,7 +42,7 @@ Usage: cardano-cli latest stake-address 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 latest 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 @@ -66,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 latest 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 \ @@ -75,7 +75,7 @@ cardano-cli latest transaction build \ ``` ``` -cardano-cli latest transaction sign \ +cardano-cli conway transaction sign \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ --signing-key-file stake.skey \ @@ -83,7 +83,7 @@ cardano-cli latest transaction sign \ ``` ``` -cardano-cli latest 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 f5a3a4b3bf..b7cbd963f5 100644 --- a/docs/get-started/cardano-cli/get-started/stakeaddress-registration.md +++ b/docs/get-started/cardano-cli/get-started/stakeaddress-registration.md @@ -8,20 +8,20 @@ keywords: [cardano-cli, cli, keys, stake addresses, register, cardano-node, tran --- :::tip -To integrate the latest (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 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 -To participate in the protocol, such as delegating stake to a stake pool to earn rewards or, in the Conway era, delegating stake to a delegate representative, you must first register your stake credentials on the chain. This registration is accomplished by submitting a **stake address registration certificate** within a transaction. The process includes paying a deposit, the amount of which is determined by the `stakeAddressDeposit` protocol parameter. You can get the deposit back when you submit a **stake address deregistration certificate**. +To participate in the protocol, such as delegating stake to a stake pool to earn rewards or, in the upcoming Conway era, delegating stake to a delegate representative, you must first register your stake credentials on the chain. This registration is accomplished by submitting a **stake address registration certificate** within a transaction. The process includes paying a deposit, the amount of which is determined by the `stakeAddressDeposit` protocol parameter. You can get the deposit back when you submit a **stake address deregistration certificate**. 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 latest 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 latest stake-address -Usage: cardano-cli latest stake-address +cardano-cli conway stake-address +Usage: cardano-cli conway stake-address ( key-gen | key-hash | build @@ -43,14 +43,14 @@ Usage: cardano-cli latest 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 latest query protocol-parameters | jq .stakeAddressDeposit +cardano-cli conway query protocol-parameters | jq .stakeAddressDeposit 2000000 ``` To generate the registration certificate, run: ```shell -cardano-cli latest stake-address registration-certificate \ +cardano-cli conway stake-address registration-certificate \ --stake-verification-key-file stake.vkey \ --key-reg-deposit-amt 2000000 \ --out-file registration.cert @@ -76,8 +76,8 @@ It's important to note that when using `build`, the deposit is automatically inc ### Using the `build` command ```shell -cardano-cli latest transaction build \ - --tx-in $(cardano-cli latest query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ +cardano-cli conway transaction build \ + --tx-in $(cardano-cli conway query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ --change-address $(< payment.addr) \ --certificate-file registration.cert \ --out-file tx.raw @@ -145,7 +145,7 @@ Using the `build-raw` command involves a slightly more intricate process. Simila Query the balance of the `payment.addr`: ```shell -cardano-cli latest query utxo --address $(< paymentstake.addr) +cardano-cli conway query utxo --address $(< paymentstake.addr) TxHash TxIx Amount -------------------------------------------------------------------------------------- 0690c70f117281627fc128ede51b1fe762c2bbc15c2e3d4eff2101c9d2613cd8 0 9999834851 lovelace + TxOutDatumNone @@ -155,7 +155,7 @@ cardano-cli latest query utxo --address $(< paymentstake.addr) You can leverage `jq` by having `cardano-cli` return the output in JSON: ```shell -cardano-cli latest query utxo --address $(< paymentstake.addr) --output-json +cardano-cli conway query utxo --address $(< paymentstake.addr) --output-json { "0690c70f117281627fc128ede51b1fe762c2bbc15c2e3d4eff2101c9d2613cd8#0": { "address": "addr_test1qp9khgeajxw8snjjvaaule727hpytrvpsnq8z7h9t3zeue2jrk54ttv0yj7llrfuhr66z4wynpcqxuqeln0jp9y70e0qvjewan", @@ -171,7 +171,7 @@ cardano-cli latest query utxo --address $(< paymentstake.addr) --output-json ``` Using `jq` to parse that JSON ```shell -cardano-cli latest 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 ``` ::: @@ -179,15 +179,15 @@ cardano-cli latest query utxo --address $(< payment.addr) --output-json | jq -r Query the protocol parameters: ```shell -cardano-cli latest 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 latest transaction build-raw \ - --tx-in $(cardano-cli latest query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ - --tx-out $(< payment.addr)+"$(cardano-cli latest query utxo --address $(< payment.addr) --out-file /dev/stdout | jq -r .[].value.lovelace)" \ +cardano-cli conway transaction build-raw \ + --tx-in $(cardano-cli conway query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ + --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 @@ -196,7 +196,7 @@ cardano-cli latest transaction build-raw \ Calculate the transaction fee, it is useful to assign the output to a variable (`fee`): ```shell -cardano-cli latest 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 \ @@ -211,14 +211,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 latest query protocol-parameters | jq .stakeAddressDeposit +cardano-cli conway query protocol-parameters | jq .stakeAddressDeposit 2000000 ``` Query the current balance of `payment.addr`: ```shell -cardano-cli latest 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 ``` @@ -229,8 +229,8 @@ change=$((9999834851 - 171089 - 2000000)) Build the transaction: ```shell -cardano-cli latest transaction build-raw \ - --tx-in $(cardano-cli latest query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ +cardano-cli conway transaction build-raw \ + --tx-in $(cardano-cli conway query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ --tx-out $(< payment.addr)+$change \ --fee 171089 \ --certificate-file registration.cert \ @@ -239,13 +239,13 @@ cardano-cli latest transaction build-raw \ ## Sign and submit the transaction ```shell -cardano-cli latest transaction sign \ +cardano-cli conway transaction sign \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ --out-file tx.signed ``` ```shell -cardano-cli latest 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 91330c4150..5855bda4a4 100644 --- a/docs/get-started/cardano-cli/get-started/treasury-donations.md +++ b/docs/get-started/cardano-cli/get-started/treasury-donations.md @@ -21,13 +21,13 @@ The treasury donation is created on epoch 0 so that when querying the treasury v ### Query the protocol-parameters: ``` -cardano-cli latest query protocol-parameters --out-file pparams.json +cardano-cli conway query protocol-parameters --out-file pparams.json ``` ### Query the utxos of your address: ``` -cardano-cli latest query utxo --address $(< example/utxo-keys/payment1.addr) +cardano-cli conway query utxo --address $(< example/utxo-keys/payment1.addr) TxHash TxIx Amount -------------------------------------------------------------------------------------- 6b3cac1a1b63498452ef36ff114ad4f51e5be00c6fbf7ff7b8dbf380483642aa 0 589993592922 lovelace + TxOutDatumNone @@ -36,7 +36,7 @@ cardano-cli latest query utxo --address $(< example/utxo-keys/payment1.addr) ### Query the current treasury value: ``` -cardano-cli latest query treasury +cardano-cli conway query treasury 0 ``` @@ -45,7 +45,7 @@ cardano-cli latest query treasury When building the transaction we need to pass the current value of the treasury. Also, we use a fee that is close to the minimum possible fee, We will calculate the acrtual fee in the next step. ``` -cardano-cli latest transaction build-raw \ +cardano-cli conway transaction build-raw \ --tx-in 6b3cac1a1b63498452ef36ff114ad4f51e5be00c6fbf7ff7b8dbf380483642aa#0 \ --current-treasury-value 0 \ --treasury-donation 987654321 \ @@ -58,7 +58,7 @@ cardano-cli latest transaction build-raw \ ### Calculate the fee: ``` -cardano-cli latest transaction calculate-min-fee \ +cardano-cli conway transaction calculate-min-fee \ --tx-body-file example/transactions/treasury.tx.raw \ --protocol-params-file pparams.json \ --witness-count 1 \ @@ -77,7 +77,7 @@ echo $((589993592922 - 166117 - 987654321)) ### Re-build the transaction with the updated values: ``` -cardano-cli latest transaction build-raw \ +cardano-cli conway transaction build-raw \ --tx-in 6b3cac1a1b63498452ef36ff114ad4f51e5be00c6fbf7ff7b8dbf380483642aa#0 \ --current-treasury-value 0 \ --treasury-donation 987654321 \ @@ -87,20 +87,20 @@ cardano-cli latest transaction build-raw \ --out-file example/transactions/treasury.tx.raw ``` ``` -cardano-cli latest transaction sign \ +cardano-cli conway transaction sign \ --tx-file treasury.tx.raw \ --signing-key-file payment.skey \ --out-file treasury.tx.signed ``` ``` -cardano-cli latest transaction submit \ +cardano-cli conway transaction submit \ --tx-file treasury.tx.signed ``` At the epoch transition following our transaction, the treasury will be updated. ``` -cardano-cli latest query treasury +cardano-cli conway query treasury 987654321 ``` @@ -111,7 +111,7 @@ cardano-cli latest query treasury The `build` command automatically queries the `currentTreasuryValue` so there is no need to pass it in a flag. As usual. `--change-address` helps us to automatically balance the transaction. ``` -cardano-cli latest transaction build \ +cardano-cli conway transaction build \ --tx-in $(cardano-cli query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ --treasury-donation 987654321 \ --change-address $(< payment.addr) \ @@ -121,7 +121,7 @@ cardano-cli latest transaction build \ ### Sign the transaction: ``` -cardano-cli latest transaction sign \ +cardano-cli conway transaction sign \ --tx-file treasury.tx.raw \ --signing-key-file payment.skey \ --out-file treasury.tx.signed @@ -130,14 +130,14 @@ cardano-cli latest transaction sign \ ### Submit the transaction: ``` -cardano-cli latest transaction submit \ +cardano-cli conway transaction submit \ --tx-file treasury.tx.signed ``` At the epoch transition following our transaction, the treasury will be updated. ``` -cardano-cli latest query treasury +cardano-cli conway query treasury 987654321 ``` 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 aa87807fd4..f21a5b8a92 100644 --- a/docs/get-started/cardano-cli/get-started/withdraw-rewards.md +++ b/docs/get-started/cardano-cli/get-started/withdraw-rewards.md @@ -12,7 +12,7 @@ keywords: [cardano-cli, cli, delegation, rewards, withdrawal, stake, stake addre First, check if you have some rewards to withdraw: ```shell -cardano-cli latest query stake-address-info --address $(< stake.addr) +cardano-cli conway query stake-address-info --address $(< stake.addr) [ { "address": "stake_test1ur453z5nxrgvvu9wfyuxut8ss0mrvca4n8ly44tcu8camlqaz98mh", @@ -27,7 +27,7 @@ cardano-cli latest query stake-address-info --address $(< stake.addr) Nice! There are some rewards, let's store the `rewardAccountBalance` in a variable for future use: ```shell -rewards="$(cardano-cli latest query stake-address-info --address $(< stake1.addr) | jq .[].rewardAccountBalance)" +rewards="$(cardano-cli conway query stake-address-info --address $(< stake1.addr) | jq .[].rewardAccountBalance)" ``` ## Building the transaction @@ -37,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 latest 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) \ @@ -49,7 +49,7 @@ cardano-cli latest transaction build \ or using `<` and the `$rewards` variable from above: ```shell -cardano-cli latest 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) \ @@ -64,7 +64,7 @@ cardano-cli latest transaction build \ As before, sign the transaction with the `payment.skey`: ```shell -cardano-cli latest transaction sign \ +cardano-cli conway transaction sign \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ --signing-key-file stake.skey \ @@ -137,7 +137,7 @@ cardano-cli debug transaction view --tx-file tx.signed ## Submitting the transaction ```shell -cardano-cli latest transaction submit \ +cardano-cli conway transaction submit \ --tx-file tx.signed Transaction successfully submitted. @@ -146,7 +146,7 @@ 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 latest query stake-address-info --address $(< stake1.addr) +cardano-cli conway query stake-address-info --address $(< stake1.addr) [ { "address": "stake_test1ur453z5nxrgvvu9wfyuxut8ss0mrvca4n8ly44tcu8camlqaz98mh", diff --git a/docs/get-started/cardano-cli/governance/constitutional-committee.md b/docs/get-started/cardano-cli/governance/constitutional-committee.md index a5c35cfd89..9e787676cf 100644 --- a/docs/get-started/cardano-cli/governance/constitutional-committee.md +++ b/docs/get-started/cardano-cli/governance/constitutional-committee.md @@ -30,7 +30,7 @@ The most basic setup for a Constitutional Committee member is using Ed25519 keys ### Generate cold key pair: ```shell -cardano-cli latest governance committee key-gen-cold \ +cardano-cli conway governance committee key-gen-cold \ --cold-verification-key-file cc-cold.vkey \ --cold-signing-key-file cc-cold.skey ``` @@ -54,7 +54,7 @@ As usual, the ed25519 keys are wrapped on a text envelope: ### Generate the cold verification key hash: ```shell -cardano-cli latest governance committee key-hash \ +cardano-cli conway governance committee key-hash \ --verification-key-file cc-cold.vkey > cc-key.hash ``` @@ -76,7 +76,7 @@ submit an _Authorization Certificate_. This also applies to new Committee member To generate a hot key-pair run the following command: ```shell -cardano-cli latest governance committee key-gen-hot \ +cardano-cli conway governance committee key-gen-hot \ --verification-key-file cc-hot.vkey \ --signing-key-file cc-hot.skey ``` @@ -106,7 +106,7 @@ The _Authorization Certificate_ allows the hot credential to act on behalf of th ```shell -cardano-cli latest governance committee create-hot-key-authorization-certificate \ +cardano-cli conway governance committee create-hot-key-authorization-certificate \ --cold-verification-key-file cc-cold.vkey \ --hot-verification-key-file cc-hot.vkey \ --out-file cc-authorization.cert @@ -125,7 +125,7 @@ cat cc-authorization.cert ### Submit the authorization certificate in a transaction: ```shell -cardano-cli latest 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 cc-authorization.cert \ @@ -134,7 +134,7 @@ cardano-cli latest transaction build \ ``` ```shell -cardano-cli latest transaction sign \ +cardano-cli conway transaction sign \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ --signing-key-file cc-cold.skey \ @@ -142,7 +142,7 @@ cardano-cli latest transaction sign \ ``` ```shell -cardano-cli latest transaction submit \ +cardano-cli conway transaction submit \ --tx-file tx.signed ``` @@ -162,7 +162,7 @@ Alice, Bob, and Carol need to generate a key-pair for the multisignature cold cr Alice: ```shell -cardano-cli latest governance committee key-gen-cold \ +cardano-cli conway governance committee key-gen-cold \ --cold-verification-key-file alice-cold.vkey \ --cold-signing-key-file alice-cold.skey ``` @@ -170,14 +170,14 @@ cardano-cli latest governance committee key-gen-cold \ Bob: ```shell -cardano-cli latest governance committee key-gen-cold \ +cardano-cli conway governance committee key-gen-cold \ --cold-verification-key-file bob-cold.vkey \ --cold-signing-key-file bob-cold.skey ``` Carol: ```shell -cardano-cli latest governance committee key-gen-cold \ +cardano-cli conway governance committee key-gen-cold \ --cold-verification-key-file carol-cold.vkey \ --cold-signing-key-file carol-cold.skey ``` @@ -187,13 +187,13 @@ cardano-cli latest governance committee key-gen-cold \ To generate a multisignature script, Alice, Bob, and Carol need to obtain their verification key hashes: ```shell -cardano-cli latest governance committee key-hash --verification-key-file alice-cold.vkey +cardano-cli conway governance committee key-hash --verification-key-file alice-cold.vkey 8d6ae7ddc48e434d28ee36985043a180a98e8566e1d83cfe79a35270 -cardano-cli latest governance committee key-hash --verification-key-file bob-cold.vkey +cardano-cli conway governance committee key-hash --verification-key-file bob-cold.vkey 6689c9c9749266c2470ff49ee115a6e040e0a97042f1982c3de52f25 -cardano-cli latest governance committee key-hash --verification-key-file carol-cold.vkey +cardano-cli conway governance committee key-hash --verification-key-file carol-cold.vkey da1a4d13a1c951f30a7efb4dac2b4c1f603f4eabbfa0ecc7f361bfc1 ``` @@ -241,14 +241,14 @@ If ratified, "ABC" will need to generate a *Hot* credential and an Authorization Alice: ```shell -cardano-cli latest governance committee key-gen-hot \ +cardano-cli conway governance committee key-gen-hot \ --verification-key-file alice-hot.vkey \ --signing-key-file alice-hot.skey ``` Bob: ```shell -cardano-cli latest governance committee key-gen-hot \ +cardano-cli conway governance committee key-gen-hot \ --verification-key-file bob-hot.vkey \ --signing-key-file bob-hot.skey ``` @@ -256,20 +256,20 @@ cardano-cli latest governance committee key-gen-hot \ Carol: ```shell -cardano-cli latest governance committee key-gen-hot \ +cardano-cli conway governance committee key-gen-hot \ --verification-key-file carol-hot.vkey \ --signing-key-file carol-hot.skey ``` ### Get the hot key hashes: ```shell -cardano-cli latest governance committee key-hash --verification-key-file alice-hot.vkey +cardano-cli conway governance committee key-hash --verification-key-file alice-hot.vkey d775c28b6635d6eaecdc149f490f27d651ff4a10e2f37d60dfb23f11 -cardano-cli latest governance committee key-hash --verification-key-file bob-hot.vkey +cardano-cli conway governance committee key-hash --verification-key-file bob-hot.vkey 7be259f2b92d9587c3f0fddfa7ebdd19ad5b8e0f82e0a17166186001 -cardano-cli latest governance committee key-hash --verification-key-file carol-hot.vkey +cardano-cli conway governance committee key-hash --verification-key-file carol-hot.vkey 643f4e3d521675e199e38a6904038057252507fd69b97b9f181912b1 ``` @@ -312,7 +312,7 @@ The _Authorization Certificate_ allows the hot credential to act on behalf of th *hot* credential is compromised at any point, the committee member must generate a new one and issue a new Authorization Certificate. A new Authorization Certificate registered on-chain overrides the previous one, effectively invalidating any votes signed by the old hot credential. This applies only to actions that have not yet been ratified. Actions that have been already ratified or enacted by the old hot credential are not affected. ```shell -cardano-cli latest governance committee create-hot-key-authorization-certificate \ +cardano-cli conway governance committee create-hot-key-authorization-certificate \ --cold-script-hash ad31d247bb2549db98020c5a6331732ebe559ad85b5768abbda3eb0d \ --hot-script-hash f5d42214cb2625cfc34e5c0cfb1daceee44a4a3c2e6807ab67cd6adb \ --out-file cc-authorization.cert @@ -322,7 +322,7 @@ cardano-cli latest governance committee create-hot-key-authorization-certificate Build the transaction: ```shell -cardano-cli latest 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 cc-authorization.cert \ @@ -336,7 +336,7 @@ cardano-cli latest transaction build \ Witness the transaction with the payment key: ```shell -cardano-cli latest transaction witness \ +cardano-cli conway transaction witness \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ --out-file payment.witness @@ -345,7 +345,7 @@ cardano-cli latest transaction witness \ Alice witnesses the transaction: ```shell -cardano-cli latest transaction witness \ +cardano-cli conway transaction witness \ --tx-body-file tx.raw \ --signing-key-file alice-cold.skey \ --out-file alice.witness @@ -354,7 +354,7 @@ cardano-cli latest transaction witness \ Bob witnesses the transaction: ```shell -cardano-cli latest transaction witness \ +cardano-cli conway transaction witness \ --tx-body-file tx.raw \ --signing-key-file bob-cold.skey \ --out-file bob.witness @@ -363,7 +363,7 @@ cardano-cli latest transaction witness \ Carol witnesses the transaction: ```shell -cardano-cli latest transaction witness \ +cardano-cli conway transaction witness \ --tx-body-file tx.raw \ --signing-key-file carol-cold.skey \ --out-file carol.witness @@ -372,7 +372,7 @@ cardano-cli latest transaction witness \ Assemble the tranaction with all the witnesses from previous step: ```shell -cardano-cli latest transaction assemble \ +cardano-cli conway transaction assemble \ --tx-body-file tx.raw \ --witness-file payment.witness \ --witness-file alice.witness \ @@ -384,7 +384,7 @@ cardano-cli latest transaction assemble \ Submit the transaction ```shell -cardano-cli latest transaction submit \ +cardano-cli conway transaction submit \ --tx-file tx.signed ``` diff --git a/docs/get-started/cardano-cli/governance/delegating-vote.md b/docs/get-started/cardano-cli/governance/delegating-vote.md index 395a8035f9..47313b105e 100644 --- a/docs/get-started/cardano-cli/governance/delegating-vote.md +++ b/docs/get-started/cardano-cli/governance/delegating-vote.md @@ -28,7 +28,7 @@ In addition to the registered DReps, the system features a couple of default vot * Delegating to the `--always-abstain` default voting option: ```shell -cardano-cli latest stake-address vote-delegation-certificate \ +cardano-cli conway stake-address vote-delegation-certificate \ --stake-verification-key-file stake.vkey \ --always-abstain \ --out-file vote-deleg.cert @@ -37,7 +37,7 @@ cardano-cli latest stake-address vote-delegation-certificate \ * Delegating to the `--always-no-confidence` default voting option: ```shell -cardano-cli latest stake-address vote-delegation-certificate \ +cardano-cli conway stake-address vote-delegation-certificate \ --stake-verification-key-file stake.vkey \ --always-no-confidence \ --out-file vote-deleg.cert @@ -46,7 +46,7 @@ cardano-cli latest stake-address vote-delegation-certificate \ * Delegating to a **key-based** registered DRep: ```shell -cardano-cli latest stake-address vote-delegation-certificate \ +cardano-cli conway stake-address vote-delegation-certificate \ --stake-verification-key-file stake.vkey \ --drep-key-hash $(< drep.id) \ --out-file vote-deleg.cert @@ -54,7 +54,7 @@ cardano-cli latest stake-address vote-delegation-certificate \ * Delegating to a **script-based** (i.e. multisignature) registered DRep: ```shell -cardano-cli latest stake-address vote-delegation-certificate \ +cardano-cli conway stake-address vote-delegation-certificate \ --stake-verification-key-file stake.vkey \ --drep-script-hash $(< script.hash) \ --out-file vote-deleg.cert @@ -65,7 +65,7 @@ cardano-cli latest stake-address vote-delegation-certificate \ * Build: ```shell -cardano-cli latest transaction build \ +cardano-cli conway transaction build \ --tx-in $(cardano-cli query utxo --address $(< payment.addr) --testnet-magic 4 --out-file /dev/stdout | jq -r 'keys[0]') \ --change-address $(< payment.addr) \ --certificate-file vote-deleg.cert \ @@ -76,7 +76,7 @@ cardano-cli latest transaction build \ * Sign with payment and stake keys: ```shell -cardano-cli latest transaction sign \ +cardano-cli conway transaction sign \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ --signing-key-file stake.skey \ @@ -86,6 +86,6 @@ cardano-cli latest transaction sign \ * Submit: ```shell -cardano-cli latest transaction submit \ +cardano-cli conway transaction submit \ --tx-file tx.signed ``` \ No newline at end of file diff --git a/docs/get-started/cardano-cli/governance/gov-queries.md b/docs/get-started/cardano-cli/governance/gov-queries.md index 9af21e19d1..e7fc8b9100 100644 --- a/docs/get-started/cardano-cli/governance/gov-queries.md +++ b/docs/get-started/cardano-cli/governance/gov-queries.md @@ -15,13 +15,13 @@ There are various queries you can do to your local node to find relevant informa This query returns all the proposals that can be ratified in the current epoch. This means that it excludes proposals that were submitted on the current epoch, as these cannot be ratified on the current epoch. ```shell -cardano-cli latest query proposals --all-proposals +cardano-cli conway query proposals --all-proposals ``` #### Query proposal by ID To query an individual proposal by its governance action id: ```shell -cardano-cli latest query proposals \ +cardano-cli conway query proposals \ --governance-action-tx-id d098afe0db98605c243c13c8a537a3eb51e6ded5e3a48acca83e7082a0086428 \ --governance-action-index 0 @@ -63,7 +63,7 @@ cardano-cli latest query proposals \ We are showing only the top level keys of the governance state, the dump is to large to show on this tutorial. ```shell -cardano-cli latest query gov-state +cardano-cli conway query gov-state { "committee": {}, @@ -83,7 +83,7 @@ cardano-cli latest query gov-state ### Query the constitution: ```shell -cardano-cli latest query constitution +cardano-cli conway query constitution { "anchor": { "dataHash": "ca41a91f399259bcefe57f9858e91f6d00e1a38d6d9c63d4052914ea7bd70cb2", @@ -95,7 +95,7 @@ cardano-cli latest query constitution ### Query the DRep state for all DReps: ```shell -cardano-cli latest query drep-state --all-dreps +cardano-cli conway query drep-state --all-dreps [ [ { @@ -143,7 +143,7 @@ cardano-cli latest query drep-state --all-dreps ### Query the DRep state for an individual DRep: ```shell -cardano-cli latest query drep-state --drep-key-hash 8f4fefcf28017a57b41517a67d56ef4c0dc04181a11d35178dd53f4c +cardano-cli conway query drep-state --drep-key-hash 8f4fefcf28017a57b41517a67d56ef4c0dc04181a11d35178dd53f4c [ [ { @@ -160,7 +160,7 @@ cardano-cli latest query drep-state --drep-key-hash 8f4fefcf28017a57b41517a67d56 ### Query the DRep stake distribution (voting power): ```shell -cardano-cli latest query drep-stake-distribution --all-dreps +cardano-cli conway query drep-stake-distribution --all-dreps [ [ "drep-keyHash-13797df5308dfebf2348fa58b312a177cf97939f5f7d21168e1a54db", @@ -180,7 +180,7 @@ cardano-cli latest query drep-stake-distribution --all-dreps ### Query the committee state: ```shell -cardano-cli latest query committee-state +cardano-cli conway query committee-state { "committee": { "scriptHash-27999ed757d6dac217471ae61d69b1b067b8b240d9e3ff36eb66b5d0": { @@ -251,7 +251,7 @@ cardano-cli latest query committee-state ### Query the state of an individual committee key hash: ```shell -cardano-cli latest query committee-state --cold-script-hash 7ceede7d6a89e006408e6b7c6acb3dd094b3f6817e43b4a36d01535b +cardano-cli conway query committee-state --cold-script-hash 7ceede7d6a89e006408e6b7c6acb3dd094b3f6817e43b4a36d01535b { "committee": { "scriptHash-7ceede7d6a89e006408e6b7c6acb3dd094b3f6817e43b4a36d01535b": { @@ -275,7 +275,7 @@ cardano-cli latest query committee-state --cold-script-hash 7ceede7d6a89e006408e ### Query expired committee members ```shell -cardano-cli latest query committee-state --expired +cardano-cli conway query committee-state --expired { "committee": { "keyHash-059349cd1e77dc3e500d3ffc498adb7307001ecc022c8b083faaa48b": { @@ -297,7 +297,7 @@ cardano-cli latest query committee-state --expired ### Query active committee members ```shell -cardano-cli latest query committee-state --active +cardano-cli conway query committee-state --active { "committee": { "keyHash-059349cd1e77dc3e500d3ffc498adb7307001ecc022c8b083faaa48b": { @@ -341,7 +341,7 @@ cardano-cli latest query committee-state --active ### Query unrecognized committee keys ```shell -cardano-cli latest query committee-state --unrecognized +cardano-cli conway query committee-state --unrecognized { "committee": {}, "epoch": 106, diff --git a/docs/get-started/cardano-cli/governance/governance-actions.md b/docs/get-started/cardano-cli/governance/governance-actions.md index b26cd901d6..32053a8efc 100644 --- a/docs/get-started/cardano-cli/governance/governance-actions.md +++ b/docs/get-started/cardano-cli/governance/governance-actions.md @@ -30,7 +30,7 @@ the most recently enacted action of its respective type. Notably, this requireme You can get the last enacted governance action IDs with: ```shell -cardano-cli latest query gov-state | jq -r .nextRatifyState.nextEnactState.prevGovActionIds +cardano-cli conway query gov-state | jq -r .nextRatifyState.nextEnactState.prevGovActionIds ``` ```json { @@ -88,7 +88,7 @@ You can create a proposal to add them as new CC members with an expiration epoch * Create the proposal: ```shell -cardano-cli latest governance action update-committee \ +cardano-cli conway governance action update-committee \ --testnet \ --governance-action-deposit $(cardano-cli query protocol-parameters | jq -r '.govActionDeposit') \ --deposit-return-stake-verification-key-file stake.vkey \ @@ -111,9 +111,9 @@ cardano-cli latest governance action update-committee \ Assume that you want to remove the CC member with the key hash `89181f26b47c3d3b6b127df163b15b74b45bba7c3b7a1d185c05c2de`. You can do this with: ```shell -cardano-cli latest governance action update-committee \ +cardano-cli conway governance action update-committee \ --testnet \ - --governance-action-deposit $(cardano-cli latest query gov-state | jq -r '.currentPParams.govActionDeposit') \ + --governance-action-deposit $(cardano-cli conway query gov-state | jq -r '.currentPParams.govActionDeposit') \ --deposit-return-stake-verification-key-file stake.vkey \ --anchor-url https://raw.githubusercontent.com/cardano-foundation/CIPs/refs/heads/master/CIP-0108/examples/treasury-withdrawal.jsonld \ --anchor-data-hash 311b148ca792007a3b1fee75a8698165911e306c3bc2afef6cf0145ecc7d03d4 \ @@ -127,9 +127,9 @@ cardano-cli latest governance action update-committee \ ### Update committee to only change the *threshold*: ```shell -cardano-cli latest governance action update-committee \ +cardano-cli conway governance action update-committee \ --testnet \ - --governance-action-deposit $(cardano-cli latest query gov-state | jq -r '.currentPParams.govActionDeposit') \ + --governance-action-deposit $(cardano-cli conway query gov-state | jq -r '.currentPParams.govActionDeposit') \ --deposit-return-stake-verification-key-file stake.vkey \ --anchor-url https://raw.githubusercontent.com/cardano-foundation/CIPs/refs/heads/master/CIP-0108/examples/treasury-withdrawal.jsonld \ --anchor-data-hash 311b148ca792007a3b1fee75a8698165911e306c3bc2afef6cf0145ecc7d03d4 \ @@ -149,14 +149,14 @@ on Mainnet. It is available in https://ipfs.io/ipfs/bafkreifnwj6zpu3ixa4siz2lndq Find the last enacted governance action of this type, If the query returns `null` it means the current constitution (if it exists) is not enacted in a governance action, but instead supplied on the Conway genesis file. ```shell -cardano-cli latest query gov-state | jq -r '.nextRatifyState.nextEnactState.prevGovActionIds.Constitution' +cardano-cli conway query gov-state | jq -r '.nextRatifyState.nextEnactState.prevGovActionIds.Constitution' null ``` When the constitution has been enacted through a governance action, you will see the transaction ID and index of the proposing transaction, we will use this information later: ```shell -cardano-cli latest query gov-state | jq -r '.nextRatifyState.nextEnactState.prevGovActionIds.Constitution' +cardano-cli conway query gov-state | jq -r '.nextRatifyState.nextEnactState.prevGovActionIds.Constitution' { "govActionIx": 0, "txId": "bf4832f443fe34f26f929ce2fbb26cc35ef4fda31150b2da45969a9bac4f7a8c" @@ -183,7 +183,7 @@ a77245f63bc7504c6ce34383633729692388dc1823723b0ee9825743a87a6a6d constitution.t or ```shell -cardano-cli latest governance hash anchor-data --file-text constitution.txt +cardano-cli conway governance hash anchor-data --file-text constitution.txt a77245f63bc7504c6ce34383633729692388dc1823723b0ee9825743a87a6a6d ``` @@ -222,9 +222,9 @@ fa24fb305126805cf2164c161d852a0e7330cf988f1fe558cf7d4a64 When there is no previously enacted constitution: ```shell -cardano-cli latest governance action create-constitution \ +cardano-cli conway governance action create-constitution \ --testnet \ - --governance-action-deposit $(cardano-cli latest query gov-state | jq -r '.currentPParams.govActionDeposit') \ + --governance-action-deposit $(cardano-cli conway query gov-state | jq -r '.currentPParams.govActionDeposit') \ --deposit-return-stake-verification-key-file stake.vkey \ --anchor-url https://raw.githubusercontent.com/cardano-foundation/CIPs/master/CIP-0100/cip-0100.common.schema.json \ --anchor-data-hash "9d99fbca260b2d77e6d3012204e1a8658f872637ae94cdb1d8a53f4369400aa9" \ @@ -236,9 +236,9 @@ cardano-cli latest governance action create-constitution \ When there is a previously enacted constitution, we need to reference the previous governance action id (TXID and INDEX): ```shell -cardano-cli latest governance action create-constitution \ +cardano-cli conway governance action create-constitution \ --testnet \ - --governance-action-deposit $(cardano-cli latest query gov-state | jq -r '.currentPParams.govActionDeposit') \ + --governance-action-deposit $(cardano-cli conway query gov-state | jq -r '.currentPParams.govActionDeposit') \ --deposit-return-stake-verification-key-file stake.vkey \ --anchor-url https://raw.githubusercontent.com/cardano-foundation/CIPs/refs/heads/master/CIP-0108/examples/treasury-withdrawal.jsonld \ --anchor-data-hash 311b148ca792007a3b1fee75a8698165911e306c3bc2afef6cf0145ecc7d03d4 \ @@ -256,7 +256,7 @@ From here, you just need to [submit the proposal in a transaction](#build-sign-a - Find the last governance action enacted of this type: ```shell -cardano-cli latest query gov-state | jq -r '.nextRatifyState.nextEnactState.prevGovActionIds.Committee' +cardano-cli conway query gov-state | jq -r '.nextRatifyState.nextEnactState.prevGovActionIds.Committee' ``` ```json { @@ -268,9 +268,9 @@ cardano-cli latest query gov-state | jq -r '.nextRatifyState.nextEnactState.prev #### Create a motion no-confidence governance action: ```shell -cardano-cli latest governance action create-no-confidence \ +cardano-cli conway governance action create-no-confidence \ --testnet \ - --governance-action-deposit $(cardano-cli latest query gov-state | jq -r '.currentPParams.govActionDeposit') \ + --governance-action-deposit $(cardano-cli conway query gov-state | jq -r '.currentPParams.govActionDeposit') \ --deposit-return-stake-verification-key-file stake.vkey \ --anchor-url https://raw.githubusercontent.com/cardano-foundation/CIPs/refs/heads/master/CIP-0108/examples/treasury-withdrawal.jsonld \ --anchor-data-hash 311b148ca792007a3b1fee75a8698165911e306c3bc2afef6cf0145ecc7d03d4 \ @@ -289,9 +289,9 @@ Also, treasury withdrawals must reference the Guardrails script when present. #### Create the treasury withdrawal proposal: ```shell -cardano-cli latest governance action create-treasury-withdrawal \ +cardano-cli conway governance action create-treasury-withdrawal \ --testnet \ - --governance-action-deposit $(cardano-cli latest query gov-state | jq -r '.currentPParams.govActionDeposit') \ + --governance-action-deposit $(cardano-cli conway query gov-state | jq -r '.currentPParams.govActionDeposit') \ --deposit-return-stake-verification-key-file stake.vkey \ --anchor-url https://raw.githubusercontent.com/cardano-foundation/CIPs/refs/heads/master/CIP-0108/examples/treasury-withdrawal.jsonld \ --anchor-data-hash 311b148ca792007a3b1fee75a8698165911e306c3bc2afef6cf0145ecc7d03d4 \ @@ -310,8 +310,8 @@ From here, you just need to [submit the proposal in a transaction](#build-sign-a #### Create the 'info' governance action: ```shell -cardano-cli latest governance action create-info --testnet \ - --governance-action-deposit $(cardano-cli latest query gov-state | jq -r '.currentPParams.govActionDeposit') \ +cardano-cli conway governance action create-info --testnet \ + --governance-action-deposit $(cardano-cli conway query gov-state | jq -r '.currentPParams.govActionDeposit') \ --deposit-return-stake-verification-key-file stake.vkey \ --anchor-url https://raw.githubusercontent.com/cardano-foundation/CIPs/master/CIP-0108/examples/treasury-withdrawal.jsonld \ --anchor-data-hash 311b148ca792007a3b1fee75a8698165911e306c3bc2afef6cf0145ecc7d03d4 \ @@ -326,9 +326,9 @@ because, actions can be created off-line so the cli may not have access to a nod anticipating that a new Guardrails script will be ratified and enacted during the proposal's lifespan. ```shell -cardano-cli latest governance action create-protocol-parameters-update \ +cardano-cli conway governance action create-protocol-parameters-update \ --testnet \ - --governance-action-deposit $(cardano-cli latest query gov-state | jq -r '.currentPParams.govActionDeposit') \ + --governance-action-deposit $(cardano-cli conway query gov-state | jq -r '.currentPParams.govActionDeposit') \ --deposit-return-stake-verification-key-file stake.vkey \ --anchor-url https://raw.githubusercontent.com/cardano-foundation/CIPs/refs/heads/master/CIP-0108/examples/treasury-withdrawal.jsonld \ --anchor-data-hash 311b148ca792007a3b1fee75a8698165911e306c3bc2afef6cf0145ecc7d03d4 \ @@ -350,7 +350,7 @@ while also allowing members of the governance bodies to review, discuss, and ult * Note that you can also use `build-raw` and `calculate-min-fee` to build transactions in an off-line setting. The example below uses the convenient `build`: ```shell -cardano-cli latest 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) \ --proposal-file info.action \ @@ -358,14 +358,14 @@ cardano-cli latest transaction build \ ``` ```shell -cardano-cli latest transaction sign \ +cardano-cli conway transaction sign \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ --out-file tx.signed ``` ```shell -cardano-cli latest transaction submit \ +cardano-cli conway transaction submit \ --tx-file tx.signed ``` @@ -381,7 +381,7 @@ a reference script. When building the transaction, we include the `*.action` file and supply the guardrails script with --proposal-script-file. Note that the guardrails script does not require a datum to be passed, only a redeemer value, which can be just an empty json. ```shell -cardano-cli latest transaction build \ +cardano-cli conway transaction build \ --proposal-script-file guardrails-script.plutus \ --tx-in-collateral "$(cardano-cli query utxo --address "$(< payment.addr)" --output-json | jq -r 'keys[0]')" \ --proposal-redeemer-value {} \ @@ -396,7 +396,7 @@ Estimated transaction fee: Coin 313228 - Sign the transaction with `payment.skey`: ```shell -cardano-cli latest transaction sign \ +cardano-cli conway transaction sign \ --tx-file pparams-tx.raw \ --signing-key-file payment.skey \ --out-file pparams-tx.signed @@ -405,7 +405,7 @@ cardano-cli latest transaction sign \ - Submit it to the chain with: ```shell -cardano-cli latest transaction submit \ +cardano-cli conway transaction submit \ --tx-file pparams-tx.signed ``` @@ -417,14 +417,14 @@ proposal serve as the action ID. An effective way to find your governance action First, find your key hash with: ```shell -cardano-cli latest stake-address key-hash --stake-verification-key-file stake.vkey +cardano-cli conway stake-address key-hash --stake-verification-key-file stake.vkey ``` `8e0debc9fdc6c616ac40d98bf3950b436895eea9cccf0396a6e5e12b` Use `jq` to filter the `gov-state` output by the stake key hash. The output contains all the relevant information about your governance actions, including `actionId`: ```shell -cardano-cli latest query gov-state \ +cardano-cli conway query gov-state \ | jq -r --arg keyHash "8e0debc9fdc6c616ac40d98bf3950b436895eea9cccf0396a6e5e12b" '.proposals | to_entries[] | select(.value.returnAddr.credential.keyHash | contains($keyHash)) | .value' ``` diff --git a/docs/get-started/cardano-cli/governance/register-drep.md b/docs/get-started/cardano-cli/governance/register-drep.md index 40a6df0b94..7f0de4e8e9 100644 --- a/docs/get-started/cardano-cli/governance/register-drep.md +++ b/docs/get-started/cardano-cli/governance/register-drep.md @@ -29,7 +29,7 @@ import TabItem from '@theme/TabItem'; ### Generate DRep keys: ```shell -cardano-cli latest governance drep key-gen \ +cardano-cli conway governance drep key-gen \ --verification-key-file drep.vkey \ --signing-key-file drep.skey ``` @@ -54,7 +54,7 @@ This returns the keys wrapped on text envelopes: The hash of the verification key is the DRep ID, get it with: ```shell -cardano-cli latest governance drep id \ +cardano-cli conway governance drep id \ --drep-verification-key-file drep.vkey \ --output-format hex ``` @@ -65,7 +65,7 @@ cardano-cli latest governance drep id \ Or in bech32 format ```shell -cardano-cli latest governance drep id \ +cardano-cli conway governance drep id \ --drep-verification-key-file drep.vkey \ --output-format bech32 ``` @@ -92,7 +92,7 @@ wget https://raw.githubusercontent.com/cardano-foundation/CIPs/master/CIP-0119/e Use cardano-cli or b2sum to get its hash ```bash -cardano-cli latest governance drep metadata-hash \ +cardano-cli conway governance drep metadata-hash \ --drep-metadata-file drep.jsonld a14a5ad4f36bddc00f92ddb39fd9ac633c0fd43f8bfa57758f9163d10ef916de @@ -115,7 +115,7 @@ cardano-cli query protocol-parameters | jq .dRepDeposit Generate the certificate Using the `drep.vkey` file: ```bash -cardano-cli latest governance drep registration-certificate \ +cardano-cli conway governance drep registration-certificate \ --drep-verification-key-file drep.vkey \ --key-reg-deposit-amt 500000000 \ --drep-metadata-url https://raw.githubusercontent.com/cardano-foundation/CIPs/master/CIP-0119/examples/drep.jsonld \ @@ -126,7 +126,7 @@ cardano-cli latest governance drep registration-certificate \ Or using the DRep verification key: ```bash -cardano-cli latest governance drep registration-certificate \ +cardano-cli conway governance drep registration-certificate \ --drep-verification-key c19e0e939609531cfd04dcfa5bf1a5f3e245aa88e163759341aba296af34cc7e \ --key-reg-deposit-amt 500000000 \ --drep-metadata-url https://raw.githubusercontent.com/cardano-foundation/CIPs/master/CIP-0119/examples/drep.jsonld \ @@ -137,7 +137,7 @@ cardano-cli latest governance drep registration-certificate \ Or using the DRep ID: ```bash -cardano-cli latest governance drep registration-certificate \ +cardano-cli conway governance drep registration-certificate \ --drep-key-hash "$(< drep.id)" \ --key-reg-deposit-amt 500000000 \ --drep-metadata-url https://raw.githubusercontent.com/cardano-foundation/CIPs/master/CIP-0119/examples/drep.jsonld \ @@ -160,7 +160,7 @@ Any of the above methods produces `drep-reg.cert ` in a text envelope: Build the transaction. Note that we use `--witness-override 2` because this tranaction will contain 2 signatures, with the `payment.skey` and with the `drep.skey`. ```bash -cardano-cli latest 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 drep-reg.cert \ @@ -171,7 +171,7 @@ cardano-cli latest transaction build \ Sign it with payment and DRep signing keys: ```bash -cardano-cli latest transaction sign \ +cardano-cli conway transaction sign \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ --signing-key-file drep.skey \ @@ -181,17 +181,17 @@ cardano-cli latest transaction sign \ Submit it to the chain: ```bash -cardano-cli latest transaction submit \ +cardano-cli conway transaction submit \ --tx-file tx.signed ``` ### Query the DRep state to confirm: ```bash -cardano-cli latest query drep-state --all-dreps +cardano-cli conway query drep-state --all-dreps -cardano-cli latest query drep-state --drep-key-hash 687c9849e1792f9b43d2a78153c412406950ee0c6f2b417226da9dcc +cardano-cli conway query drep-state --drep-key-hash 687c9849e1792f9b43d2a78153c412406950ee0c6f2b417226da9dcc [ [ { @@ -216,7 +216,7 @@ A basic example of a DRep using a native script is a DRep that consists of vario ### Generate a DRep key pair for each member ```bash -cardano-cli latest governance drep key-gen \ +cardano-cli conway governance drep key-gen \ --verification-key-file drep1.vkey \ --signing-key-file drep1.skey ``` @@ -239,7 +239,7 @@ cardano-cli latest governance drep key-gen \ Each member generates the hash of the verification key (This is exactly what the `governance drep id` command do) ```bash -cardano-cli latest governance drep id \ +cardano-cli conway governance drep id \ --drep-verification-key-file drep1.vkey \ --output-format hex \ --out-file drep1.id @@ -340,7 +340,7 @@ wget https://raw.githubusercontent.com/cardano-foundation/CIPs/master/CIP-0119/e Use cardano-cli or b2sum to get its hash: ```bash -cardano-cli latest governance drep metadata-hash \ +cardano-cli conway governance drep metadata-hash \ --drep-metadata-file drep.jsonld a14a5ad4f36bddc00f92ddb39fd9ac633c0fd43f8bfa57758f9163d10ef916de @@ -378,7 +378,7 @@ echo $drepDeposit Generate the registration certificate: ```bash -cardano-cli latest governance drep registration-certificate \ +cardano-cli conway governance drep registration-certificate \ --drep-script-hash "$(< drep-multisig.id)" \ --key-reg-deposit-amt "$drepDeposit" \ --out-file drep-multisig-reg.cert @@ -389,8 +389,8 @@ cardano-cli latest governance drep registration-certificate \ Build the transaction. Note that we use `--witness-override 4` because this tranaction will contain up to 4 signatures, 1 from the payment key and up to 3 members of the DRep. ```bash -cardano-cli latest transaction build \ - --tx-in $(cardano-cli latest query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ +cardano-cli conway transaction build \ + --tx-in $(cardano-cli conway query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ --change-address $(< payment.addr) \ --certificate-file drep-multisig-reg.cert \ --certificate-script-file drep-multisig.json \ @@ -403,7 +403,7 @@ Each member of the DRep will witness the transaction with its individual keys fr Witnessing the transaction with the payment key: ```bash -cardano-cli latest transaction witness \ +cardano-cli conway transaction witness \ \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ @@ -413,20 +413,20 @@ cardano-cli latest transaction witness \ Witnessing the transaction with the DRep keys from each member: ```bash -cardano-cli latest transaction witness \ +cardano-cli conway transaction witness \ --tx-body-file tx.raw \ --signing-key-file drep1.skey \ --out-file drep1.witness ``` ```bash -cardano-cli latest transaction witness \ +cardano-cli conway transaction witness \ --tx-body-file tx.raw \ --signing-key-file drep2.skey \ --out-file drep2.witness ``` ```bash -cardano-cli latest transaction witness \ +cardano-cli conway transaction witness \ --tx-body-file tx.raw \ --signing-key-file drep3.skey \ --out-file drep3.witness @@ -435,7 +435,7 @@ cardano-cli latest transaction witness \ Assemble the tranaction with all the witnesses from previous step: ```bash -cardano-cli latest transaction assemble \ +cardano-cli conway transaction assemble \ --tx-body-file tx.raw \ --witness-file payment.witness \ --witness-file drep1.witness \ @@ -447,14 +447,14 @@ cardano-cli latest transaction assemble \ Submit the transaction ```bash -cardano-cli latest transaction submit \ +cardano-cli conway transaction submit \ --tx-file tx.signed ``` ### Query the DRep state to confirm: ```bash -cardano-cli latest query drep-state \ +cardano-cli conway query drep-state \ --drep-script-hash $(< drep-multisig.id) ``` ```json @@ -501,7 +501,7 @@ wget https://raw.githubusercontent.com/cardano-foundation/CIPs/master/CIP-0119/e Use cardano-cli or b2sum to get its hash: ```bash -cardano-cli latest governance drep metadata-hash \ +cardano-cli conway governance drep metadata-hash \ --drep-metadata-file drep.jsonld a14a5ad4f36bddc00f92ddb39fd9ac633c0fd43f8bfa57758f9163d10ef916de @@ -540,7 +540,7 @@ echo $drepDeposit Generate the registration certificate: ```bash -cardano-cli latest governance drep registration-certificate \ +cardano-cli conway governance drep registration-certificate \ --drep-script-hash "$(< alwaysVoteYesDrep.id)" \ --key-reg-deposit-amt "$drepDeposit" \ --out-file alwaysVoteYesDrep.cert @@ -550,8 +550,8 @@ cardano-cli latest governance drep registration-certificate \ Build the transaction, we need to provide a collateral and a redeemer value: ```bash -cardano-cli latest transaction build \ - --tx-in $(cardano-cli latest query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ +cardano-cli conway transaction build \ + --tx-in $(cardano-cli conway query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ --tx-in-collateral $(cardano-cli query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ --certificate-file alwaysVoteYesDrep.cert \ --certificate-script-file alwaysVoteYesDrep.plutus \ @@ -561,13 +561,13 @@ cardano-cli latest transaction build \ ``` ```bash -cardano-cli latest transaction sign \ +cardano-cli conway transaction sign \ --signing-key-file payment.skey \ --tx-body-file tx.raw \ --out-file tx.signed ``` ```bash -cardano-cli latest 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 35a809572c..c41b745b68 100644 --- a/docs/get-started/cardano-cli/governance/voting.md +++ b/docs/get-started/cardano-cli/governance/voting.md @@ -26,7 +26,7 @@ Assume we need to submit a vote on the governance action with ID `df58f714c0765f 1. Obtain the URL and hash of the new constitution proposal from the governance state: ```shell -cardano-cli latest query gov-state | \ +cardano-cli conway query gov-state | \ jq -r --arg govActionId "df58f714c0765f3489afb6909384a16c31d600695be7e86ff9c59cf2e8a48c79" '.proposals | to_entries[] | select(.value.actionId.txId | contains($govActionId)) | .value' ``` ```json @@ -90,7 +90,7 @@ In the future, voting apps, explorers, wallets, and other tools could perform th Voting with DRep keys: ```shell -cardano-cli latest governance vote create \ +cardano-cli conway governance vote create \ --yes \ --governance-action-tx-id "df58f714c0765f3489afb6909384a16c31d600695be7e86ff9c59cf2e8a48c79" \ --governance-action-index "0" \ @@ -101,7 +101,7 @@ cardano-cli latest governance vote create \ Voting with CC hot keys: ```shell -cardano-cli latest governance vote create \ +cardano-cli conway governance vote create \ --yes \ --governance-action-tx-id "df58f714c0765f3489afb6909384a16c31d600695be7e86ff9c59cf2e8a48c79" \ --governance-action-index "0" \ @@ -111,7 +111,7 @@ cardano-cli latest governance vote create \ Voting with SPO keys: ```shell -cardano-cli latest governance vote create \ +cardano-cli conway governance vote create \ --yes \ --governance-action-tx-id "df58f714c0765f3489afb6909384a16c31d600695be7e86ff9c59cf2e8a48c79" \ --governance-action-index "0" \ @@ -124,7 +124,7 @@ cardano-cli latest governance vote create \ Build the transaction: ```shell -cardano-cli latest 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) \ --vote-file df58f714c0765f3489afb6909384a16c31d600695be7e86ff9c59cf2e8a48c79-constitution.vote \ @@ -133,26 +133,26 @@ cardano-cli latest transaction build \ ``` Sign it with the DRep key: ```shell -cardano-cli latest 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 latest 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 latest 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 latest 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 4c36009afd..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 latest transaction build-raw --tx-out="..."` -- `cardano-cli latest transaction build-raw --mint="..."` +- `cardano-cli conway transaction build-raw --tx-out="..."` +- `cardano-cli conway transaction build-raw --mint="..."` -The CLI command `cardano-cli latest 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 latest 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 latest 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 latest 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 latest transaction sign \ #### Submit the transaction: ```bash -cardano-cli latest 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 latest 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 latest 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 latest transaction build \ --out-file tx.raw ``` ``` -cardano-cli latest 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 latest 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 latest transaction build-raw ... --out-file txbody +cardano-cli conway transaction build-raw ... --out-file txbody -cardano-cli latest transaction sign ... --tx-body-file txbody --out-file tx +cardano-cli conway transaction sign ... --tx-body-file txbody --out-file tx -cardano-cli latest transaction submit ... --tx-file tx +cardano-cli conway transaction submit ... --tx-file tx ``` ### Destroying (burning) tokens @@ -363,25 +363,25 @@ cardano-cli latest 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 latest 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 latest 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 latest 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 latest 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 8d8abedbd7..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,8 +99,8 @@ 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 latest transaction build \ ---tx-in $(cardano-cli latest query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ +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 \ --change-address $(< payment.addr) \ @@ -112,7 +112,7 @@ cardano-cli latest transaction build \ Sign the transaction with the payment.skey ``` -cardano-cli latest 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 latest transaction sign \ Submit the transaction ``` -cardano-cli latest transaction submit \ +cardano-cli conway transaction submit \ --tx-file lock.tx.signed >Transaction successfully submitted. @@ -155,9 +155,9 @@ 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 latest transaction build \ ---tx-in $(cardano-cli latest query utxo --address $(< script.addr) --output-json | jq -r 'keys[0]') \ ---tx-in-collateral $(cardano-cli latest query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ +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 \ --tx-in-inline-datum-present \ --tx-in-redeemer-value 57 \ @@ -185,9 +185,9 @@ 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 latest transaction build \ ---tx-in $(cardano-cli latest query utxo --address $(< script.addr) --output-json | jq -r 'keys[0]') \ ---tx-in-collateral $(cardano-cli latest query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ +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 \ --tx-in-inline-datum-present \ --tx-in-redeemer-value 42 \ @@ -197,11 +197,11 @@ cardano-cli latest transaction build \ Lets break down the command: -- `--tx-in $(cardano-cli latest query utxo --address $(< script.addr) --output-json | jq -r 'keys[0]')` +- `--tx-in $(cardano-cli conway query utxo --address $(< script.addr) --output-json | jq -r 'keys[0]')` We use the first UTxO on the script address as input for the transaction. So we are trying to spend the locked funds. -- `--tx-in-collateral $(cardano-cli latest query utxo --address $(< payment.addr)` +- `--tx-in-collateral $(cardano-cli conway query utxo --address $(< payment.addr)` `--output-json | jq -r 'keys[0]')` Since we are running a Plutus script, we must provide a collateral. We use the first utxo of payment address. @@ -236,13 +236,13 @@ This time, the node validated the transaction and successfully ran the script. T ``` -cardano-cli latest transaction sign \ +cardano-cli conway transaction sign \ --tx-file unlock.tx \ --signing-key-file payment.skey \ --out-file unlock.tx.signed ``` ``` -cardano-cli latest transaction submit -\ +cardano-cli conway transaction submit -\ -tx-file unlock.tx.signed > Transaction successfully submitted. @@ -251,7 +251,7 @@ cardano-cli latest transaction submit -\ For tracking purposes, lets find our transaction id ``` -cardano-cli latest 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 5125a6d376..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 latest 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 latest transaction witness +cardano-cli conway transaction witness --tx-body-file txbody --signing-key-file utxoSignKey --out-file utxoWitness @@ -449,7 +449,7 @@ cardano-cli latest transaction witness Assemble the transaction witness and the tx body to create the transaction: ```bash -cardano-cli latest 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 latest 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 latest transaction witness \ +cardano-cli conway transaction witness \ --tx-body-file spendScriptTxBody \ --script-file allMultiSigScript \ --out-file scriptWitness -cardano-cli latest transaction witness \ +cardano-cli conway transaction witness \ --tx-body-file spendScriptTxBody \ --signing-key-file paySignKey1 \ --out-file key1witness -cardano-cli latest transaction witness \ +cardano-cli conway transaction witness \ --tx-body-file spendScriptTxBody \ --signing-key-file paySignKey2 \ --out-file key2witness -cardano-cli latest 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 latest transaction assemble \ +cardano-cli conway transaction assemble \ --tx-body-file spendScriptTxBody \ --witness-file scriptWitness \ --witness-file key1witness \ @@ -512,7 +512,7 @@ cardano-cli latest transaction assemble \ --witness-file key3witness \ --out-file spendMultiSig ``` -You can now submit this tx via `cardano-cli latest 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 latest 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 latest 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 9a45c3f7b0..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 latest 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 latest 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 latest 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 latest transaction build-raw \ Sign the transaction with the signing key **payment.skey** and save the signed transaction in **tx.signed** ```sh -cardano-cli latest transaction sign \ +cardano-cli conway transaction sign \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ --mainnet \ @@ -135,7 +135,7 @@ cardano-cli latest transaction sign \ ## Submit the transaction ```sh -cardano-cli latest 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 6f92cf537e..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 latest 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 latest 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 latest 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 latest transaction build-raw \ Sign the transaction with the signing key `payment.skey` and save the signed transaction in `tx.signed`: ``` sh -cardano-cli latest 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 latest 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 latest 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 latest transaction build` instead of `cardano-cli latest 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 latest 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 61db73f04a..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 latest 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 latest transaction build-raw \ --out-file $HOME/cardano/tx.draft ``` -`cardano-cli latest 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 latest 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 latest 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 latest 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 latest 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 latest transaction sign \ Finally, we submit the transaction to the blockchain! ```bash -cardano-cli latest 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 ecd19db783..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 latest 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 latest transaction build-raw \ ``` ```bash {8} -$ cardano-cli latest 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 latest 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 latest 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 latest 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 latest 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 latest 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 latest 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 latest 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 latest 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 latest 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 latest 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 latest 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 latest 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 latest transaction build-raw \ And invoke the calculate-min-fees endpoint on `cardano-cli` for both of them: ```bash {8,17} -cardano-cli latest 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 latest transaction calculate-min-fee \ --protocol-params-file $HOME/cardano/protocol.json 169857 Lovelace -cardano-cli latest 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 9ea80d5298..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 latest 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 latest transaction build \ +cardano-cli conway transaction build \ --testnet-magic 2 \ --alonzo-era \ --tx-in $txhash#$txix \ @@ -691,7 +691,7 @@ cardano-cli latest transaction build \ ```bash -cardano-cli latest transaction build \ +cardano-cli conway transaction build \ --testnet-magic 1 \ --alonzo-era \ --tx-in $txhash#$txix \ @@ -710,7 +710,7 @@ cardano-cli latest transaction build \ ```bash -cardano-cli latest 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 latest 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 latest 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 latest transaction submit --tx-file matx.signed --testnet-magic 2 ```bash -cardano-cli latest 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 latest transaction submit --tx-file matx.signed --testnet-magic 1 ```bash -cardano-cli latest 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 latest 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 latest transaction build --testnet-magic 2 --alonzo-era --tx-in $txh ```bash -cardano-cli latest 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 latest transaction build --testnet-magic 1 --alonzo-era --tx-in $txh ```bash -cardano-cli latest 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 latest 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 latest transaction sign --signing-key-file payment.skey --signing- ```bash -cardano-cli latest 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 latest transaction sign --signing-key-file payment.skey --signing- ```bash -cardano-cli latest 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 latest 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 latest transaction submit --tx-file burning.signed --testnet-magic 2 ```bash -cardano-cli latest 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 latest transaction submit --tx-file burning.signed --testnet-magic 1 ```bash -cardano-cli latest 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 4510a259bb..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 latest 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 latest 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 latest 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 latest 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 latest transaction build-raw \ Transactions need to be signed to prove the authenticity and ownership of the policy key. ```bash -cardano-cli latest 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 latest 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 latest 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 latest transaction build-raw \ Again we are going to calculate the fee and save it in a variable. ```bash -fee=$(cardano-cli latest 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 latest 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 latest transaction build-raw \ Sign it: ```bash -cardano-cli latest 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 latest 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 latest 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 latest 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 latest 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 latest transaction build-raw \ Sign the transaction: ```bash - cardano-cli latest 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 latest 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 afb9e472a7..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 latest 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 33a236f09a..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 latest 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 latest 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 latest transaction build-raw \ Sign the transaction with both the payment and stake secret keys: ``` -cardano-cli latest 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 latest transaction sign \ And submit it: ``` -cardano-cli latest 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 f9c45f3ef4..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 latest 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 latest transaction build-raw \ #### Calculate the fees ```sh -cardano-cli latest 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 latest transaction build-raw \ +cardano-cli conway transaction build-raw \ --tx-in # \ --tx-out $(cat payment.addr)+ \ --invalid-hereafter \ @@ -185,7 +185,7 @@ cardano-cli latest transaction build-raw \ #### Sign the transaction: ```sh -cardano-cli latest 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 latest transaction sign \ #### Submit the transaction: ```sh -cardano-cli latest 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 a490d2ecb7..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 latest 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 latest 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 latest transaction build-raw \ Sign the transaction: ``` -cardano-cli latest 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 latest transaction sign \ Submit the transaction: ``` -cardano-cli latest 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 f8163848fc..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 latest 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 latest transaction build-raw \ Then we calculate the transaction fee like so: ```bash -cardano-cli latest 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 latest 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 latest transaction build-raw \ We then sign the transaction using our **payment signing key**: ```bash -cardano-cli latest 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 latest transaction submit \ +cardano-cli conway transaction submit \ --tx-file tx.signed \ --testnet-magic 1097911063 ``` From 4542288de24ee5f9a6db808dd1e355e09b502f0d Mon Sep 17 00:00:00 2001 From: kweijack Date: Sun, 23 Feb 2025 20:59:41 +0800 Subject: [PATCH 5/5] CLI Doc: Replace cli `conway` with `latest` in stakeaddress registration --- .../get-started/stakeaddress-registration.md | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) 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 b7cbd963f5..f5a3a4b3bf 100644 --- a/docs/get-started/cardano-cli/get-started/stakeaddress-registration.md +++ b/docs/get-started/cardano-cli/get-started/stakeaddress-registration.md @@ -8,20 +8,20 @@ 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 conway transaction build --babbage-era`, users must now utilize the syntax `cardano-cli conway transaction build `. +To integrate the latest (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 transaction build `. ::: ## Registering a stake address -To participate in the protocol, such as delegating stake to a stake pool to earn rewards or, in the upcoming Conway era, delegating stake to a delegate representative, you must first register your stake credentials on the chain. This registration is accomplished by submitting a **stake address registration certificate** within a transaction. The process includes paying a deposit, the amount of which is determined by the `stakeAddressDeposit` protocol parameter. You can get the deposit back when you submit a **stake address deregistration certificate**. +To participate in the protocol, such as delegating stake to a stake pool to earn rewards or, in the Conway era, delegating stake to a delegate representative, you must first register your stake credentials on the chain. This registration is accomplished by submitting a **stake address registration certificate** within a transaction. The process includes paying a deposit, the amount of which is determined by the `stakeAddressDeposit` protocol parameter. You can get the deposit back when you submit a **stake address deregistration certificate**. 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 conway stake-address`: +You can easily generate such certificates with `cardano-cli`. The corresponding commands can be found under `cardano-cli latest stake-address`: ```shell -cardano-cli conway stake-address -Usage: cardano-cli conway stake-address +cardano-cli latest stake-address +Usage: cardano-cli latest stake-address ( key-gen | key-hash | build @@ -43,14 +43,14 @@ Usage: cardano-cli conway 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 conway query protocol-parameters | jq .stakeAddressDeposit +cardano-cli latest query protocol-parameters | jq .stakeAddressDeposit 2000000 ``` To generate the registration certificate, run: ```shell -cardano-cli conway stake-address registration-certificate \ +cardano-cli latest stake-address registration-certificate \ --stake-verification-key-file stake.vkey \ --key-reg-deposit-amt 2000000 \ --out-file registration.cert @@ -76,8 +76,8 @@ It's important to note that when using `build`, the deposit is automatically inc ### Using the `build` command ```shell -cardano-cli conway transaction build \ - --tx-in $(cardano-cli conway query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ +cardano-cli latest transaction build \ + --tx-in $(cardano-cli latest query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ --change-address $(< payment.addr) \ --certificate-file registration.cert \ --out-file tx.raw @@ -145,7 +145,7 @@ Using the `build-raw` command involves a slightly more intricate process. Simila Query the balance of the `payment.addr`: ```shell -cardano-cli conway query utxo --address $(< paymentstake.addr) +cardano-cli latest query utxo --address $(< paymentstake.addr) TxHash TxIx Amount -------------------------------------------------------------------------------------- 0690c70f117281627fc128ede51b1fe762c2bbc15c2e3d4eff2101c9d2613cd8 0 9999834851 lovelace + TxOutDatumNone @@ -155,7 +155,7 @@ cardano-cli conway query utxo --address $(< paymentstake.addr) You can leverage `jq` by having `cardano-cli` return the output in JSON: ```shell -cardano-cli conway query utxo --address $(< paymentstake.addr) --output-json +cardano-cli latest query utxo --address $(< paymentstake.addr) --output-json { "0690c70f117281627fc128ede51b1fe762c2bbc15c2e3d4eff2101c9d2613cd8#0": { "address": "addr_test1qp9khgeajxw8snjjvaaule727hpytrvpsnq8z7h9t3zeue2jrk54ttv0yj7llrfuhr66z4wynpcqxuqeln0jp9y70e0qvjewan", @@ -171,7 +171,7 @@ cardano-cli conway query utxo --address $(< paymentstake.addr) --output-json ``` Using `jq` to parse that JSON ```shell -cardano-cli conway query utxo --address $(< payment.addr) --output-json | jq -r .[].value.lovelace +cardano-cli latest query utxo --address $(< payment.addr) --output-json | jq -r .[].value.lovelace 9999834851 ``` ::: @@ -179,15 +179,15 @@ cardano-cli conway query utxo --address $(< payment.addr) --output-json | jq -r Query the protocol parameters: ```shell -cardano-cli conway query protocol parameters --out-file pparams.json +cardano-cli latest query protocol parameters --out-file pparams.json ``` Draft the transaction to calculate its transaction fee: ```shell -cardano-cli conway transaction build-raw \ - --tx-in $(cardano-cli conway query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ - --tx-out $(< payment.addr)+"$(cardano-cli conway query utxo --address $(< payment.addr) --out-file /dev/stdout | jq -r .[].value.lovelace)" \ +cardano-cli latest transaction build-raw \ + --tx-in $(cardano-cli latest query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ + --tx-out $(< payment.addr)+"$(cardano-cli latest query utxo --address $(< payment.addr) --out-file /dev/stdout | jq -r .[].value.lovelace)" \ --fee 0 \ --certificate-file registration.cert \ --out-file tx.draft @@ -196,7 +196,7 @@ cardano-cli conway transaction build-raw \ Calculate the transaction fee, it is useful to assign the output to a variable (`fee`): ```shell -cardano-cli conway transaction calculate-min-fee \ +cardano-cli latest transaction calculate-min-fee \ --tx-body-file tx.draft \ --protocol-params-file pparams.json \ --tx-in-count 1 \ @@ -211,14 +211,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 conway query protocol-parameters | jq .stakeAddressDeposit +cardano-cli latest query protocol-parameters | jq .stakeAddressDeposit 2000000 ``` Query the current balance of `payment.addr`: ```shell -cardano-cli conway query utxo --address $(< payment.addr) --output-json | jq -r .[].value.lovelace +cardano-cli latest query utxo --address $(< payment.addr) --output-json | jq -r .[].value.lovelace 9999834851 ``` @@ -229,8 +229,8 @@ change=$((9999834851 - 171089 - 2000000)) Build the transaction: ```shell -cardano-cli conway transaction build-raw \ - --tx-in $(cardano-cli conway query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ +cardano-cli latest transaction build-raw \ + --tx-in $(cardano-cli latest query utxo --address $(< payment.addr) --output-json | jq -r 'keys[0]') \ --tx-out $(< payment.addr)+$change \ --fee 171089 \ --certificate-file registration.cert \ @@ -239,13 +239,13 @@ cardano-cli conway transaction build-raw \ ## Sign and submit the transaction ```shell -cardano-cli conway transaction sign \ +cardano-cli latest transaction sign \ --tx-body-file tx.raw \ --signing-key-file payment.skey \ --out-file tx.signed ``` ```shell -cardano-cli conway transaction submit \ +cardano-cli latest transaction submit \ --tx-file tx.signed ```