From 4c022ea1b6b85fc91329a48363ecb90285a85a8d Mon Sep 17 00:00:00 2001 From: jr-kenny Date: Tue, 12 May 2026 02:11:44 +0100 Subject: [PATCH] docs: align tutorial step labels and clarify account refresh --- .../src/rust-client/create_deploy_tutorial.md | 20 +++++++++---------- .../mint_consume_create_tutorial.md | 6 ++++++ 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/docs/src/rust-client/create_deploy_tutorial.md b/docs/src/rust-client/create_deploy_tutorial.md index f355e862..674489ca 100644 --- a/docs/src/rust-client/create_deploy_tutorial.md +++ b/docs/src/rust-client/create_deploy_tutorial.md @@ -153,9 +153,9 @@ Add this snippet to the end of your file in the `main()` function: ```rust ignore //------------------------------------------------------------ -// STEP 1: Create a basic wallet for Alice +// STEP 3: Create a basic wallet for Alice //------------------------------------------------------------ -println!("\n[STEP 1] Creating a new account for Alice"); +println!("\n[STEP 3] Creating a new account for Alice"); // Account seed let mut init_seed = [0_u8; 32]; @@ -193,9 +193,9 @@ Add this snippet to the end of your file in the `main()` function: ```rust ignore //------------------------------------------------------------ -// STEP 2: Deploy a fungible faucet +// STEP 4: Deploy a fungible faucet //------------------------------------------------------------ -println!("\n[STEP 2] Deploying a new fungible faucet."); +println!("\n[STEP 4] Deploying a new fungible faucet."); // Faucet seed let mut init_seed = [0u8; 32]; @@ -292,9 +292,9 @@ async fn main() -> Result<(), ClientError> { println!("Latest block: {}", sync_summary.block_num); //------------------------------------------------------------ - // STEP 1: Create a basic wallet for Alice + // STEP 3: Create a basic wallet for Alice //------------------------------------------------------------ - println!("\n[STEP 1] Creating a new account for Alice"); + println!("\n[STEP 3] Creating a new account for Alice"); // Account seed let mut init_seed = [0_u8; 32]; @@ -321,9 +321,9 @@ async fn main() -> Result<(), ClientError> { println!("Alice's account ID: {:?}", alice_account_id_bech32); //------------------------------------------------------------ - // STEP 2: Deploy a fungible faucet + // STEP 4: Deploy a fungible faucet //------------------------------------------------------------ - println!("\n[STEP 2] Deploying a new fungible faucet."); + println!("\n[STEP 4] Deploying a new fungible faucet."); // Faucet seed let mut init_seed = [0u8; 32]; @@ -375,10 +375,10 @@ The output will look like this: ```text Latest block: 17771 -[STEP 1] Creating a new account for Alice +[STEP 3] Creating a new account for Alice Alice's account ID: "0x3cb3e596d14ad410000017901eaa7b" -[STEP 2] Deploying a new fungible faucet. +[STEP 4] Deploying a new fungible faucet. Faucet account ID: "0x6ad1894ac233e4200000088311bb6b" ``` diff --git a/docs/src/rust-client/mint_consume_create_tutorial.md b/docs/src/rust-client/mint_consume_create_tutorial.md index 302aca40..6727f237 100644 --- a/docs/src/rust-client/mint_consume_create_tutorial.md +++ b/docs/src/rust-client/mint_consume_create_tutorial.md @@ -129,6 +129,12 @@ loop { } ``` +If you want to verify Alice's updated balance after the consume transaction, first call +`client.sync_state().await?` and then fetch a fresh account snapshot with +`client.get_account(alice_account.id()).await?`. The original `alice_account` variable was +created earlier in the tutorial, so it does not update in place when later transactions change the +wallet state. + ## Step 4: Sending tokens to other accounts After consuming the notes, Alice has tokens in her wallet. Now, she wants to send tokens to her friends. She has two options: create a separate transaction for each transfer or batch multiple transfers into a single transaction.