Skip to content

Commit 00498bb

Browse files
authored
Merge pull request #1449 from Concordium/updatePLTDocsNov
Update PLT Docs
2 parents 1694668 + c9c7264 commit 00498bb

File tree

4 files changed

+496
-148
lines changed

4 files changed

+496
-148
lines changed

source/mainnet/docs/plt/examples/rust-sdk.rst

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ Before using this example, make sure your Cargo.toml includes:
1414
.. code-block:: toml
1515
1616
# Concordium dependencies
17-
concordium-rust-sdk = "=7.0.0"
18-
concordium_base = "=8.0.0"
17+
concordium-rust-sdk = "=8.0.0"
18+
concordium_base = "=9.0.0"
1919
2020
2121
Available examples
@@ -114,7 +114,6 @@ Optionally specify a block hash for historical token lists.
114114
Ok(())
115115
}
116116
117-
118117
.. _rust-get-token-info:
119118

120119
Get token information
@@ -202,7 +201,7 @@ Set the account address to query and optionally specify a block hash for histori
202201
use std::str::FromStr;
203202
204203
// CONFIGURATION - Modify these values for your use case
205-
const ACCOUNT_ADDRESS: &str = "ACCOUNT_ADDRESS"; // Replace with the actual account address you want to query
204+
const ACCOUNT_ADDRESS: &str = "TARGET_ADDRESS"; // Replace with the actual account address you want to query
206205
const BLOCK_HASH: Option<&str> = None; // Set to Some("blockhash") for specific block, None for latest
207206
208207
#[tokio::main]
@@ -294,14 +293,13 @@ Configure the recipient address and amount to complete the transfer.
294293
use std::{path::PathBuf, str::FromStr}; // Added PathBuf import
295294
296295
// CONFIGURATION - Modify these values for your use case
297-
const WALLET_FILE: &str = "wallet.export";
296+
const WALLET_FILE: &str = "keys/wallet.export";
298297
const TOKEN_ID: &str = "TOKEN_ID"; // Replace with the actual token ID you want to transfer
299298
const RECIPIENT_ADDRESS: &str = "RECIPIENT_ADDRESS"; // Replace with the actual recipient address
300-
const TOKEN_AMOUNT: &str = "12"; // Amount to transfer as decimal string
299+
const TOKEN_AMOUNT: &str = "1"; // Amount to transfer as decimal string
301300
302301
#[tokio::main]
303302
async fn main() -> anyhow::Result<()> {
304-
println!("Connecting to Concordium testnet...");
305303
let mut client = v2::Client::new(v2::Endpoint::from_str(
306304
"https://grpc.testnet.concordium.com:20000",
307305
)?)
@@ -372,7 +370,6 @@ Configure the recipient address and amount to complete the transfer.
372370
Ok(())
373371
}
374372
375-
376373
.. _rust-mint-tokens:
377374

378375
Mint tokens
@@ -408,7 +405,7 @@ Only the token issuer can perform mint operations, adding new tokens to circulat
408405
use std::{path::PathBuf, str::FromStr};
409406
410407
// CONFIGURATION - Modify these values for your use case
411-
const WALLET_FILE: &str = "wallet.export";
408+
const WALLET_FILE: &str = "keys/wallet.export";
412409
const TOKEN_ID: &str = "TOKEN_ID"; // Replace with your token ID
413410
const TOKEN_AMOUNT: &str = "10"; // Amount to mint as decimal string
414411
@@ -501,7 +498,7 @@ Only the token issuer can perform burn operations, removing tokens from circulat
501498
use std::{path::PathBuf, str::FromStr};
502499
503500
// CONFIGURATION - Modify these values for your use case
504-
const WALLET_FILE: &str = "wallet.export";
501+
const WALLET_FILE: &str = "keys/wallet.export";
505502
const TOKEN_ID: &str = "TOKEN_ID"; // Replace with your token ID
506503
const TOKEN_AMOUNT: &str = "10"; // Amount to burn as decimal string
507504
@@ -558,7 +555,6 @@ Only the token issuer can perform burn operations, removing tokens from circulat
558555
Ok(())
559556
}
560557
561-
562558
Token governance operations
563559
===========================
564560

@@ -598,7 +594,7 @@ Only the token issuer can modify the allow list.
598594
use std::{path::PathBuf, str::FromStr};
599595
600596
// CONFIGURATION - Modify these values for your use case
601-
const WALLET_FILE: &str = "wallet.export";
597+
const WALLET_FILE: &str = "keys/wallet.export";
602598
const TOKEN_ID: &str = "TOKEN_ID"; // Replace with the actual token ID
603599
const TARGET_ADDRESS: &str = "TARGET_ADDRESS"; // Replace with the actual target address
604600
@@ -685,7 +681,7 @@ Only the token issuer can modify the allow list.
685681
use std::{path::PathBuf, str::FromStr};
686682
687683
// CONFIGURATION - Modify these values for your use case
688-
const WALLET_FILE: &str = "wallet.export";
684+
const WALLET_FILE: &str = "keys/wallet.export";
689685
const TOKEN_ID: &str = "TOKEN_ID"; // Replace with the actual token ID
690686
const TARGET_ADDRESS: &str = "TARGET_ADDRESS"; // Replace with the actual target address
691687
@@ -736,7 +732,6 @@ Only the token issuer can modify the allow list.
736732
Ok(())
737733
}
738734
739-
740735
.. _rust-add-to-deny-list:
741736

742737
Add account to deny list
@@ -860,7 +855,7 @@ Only the token issuer can modify the deny list.
860855
use std::{path::PathBuf, str::FromStr};
861856
862857
// CONFIGURATION - Modify these values for your use case
863-
const WALLET_FILE: &str = "wallet.export";
858+
const WALLET_FILE: &str = "keys/wallet.export";
864859
const TOKEN_ID: &str = "TOKEN_ID"; // Replace with the actual token ID
865860
const TARGET_ADDRESS: &str = "TARGET_ADDRESS"; // Replace with the actual target address
866861
@@ -942,8 +937,8 @@ This example demonstrates how to suspend balance transfer operations for a Proto
942937
use std::{path::PathBuf, str::FromStr};
943938
944939
// CONFIGURATION - Modify these values for your use case
945-
const WALLET_FILE: &str = "wallet.export";
946-
const TOKEN_ID: &str = "TOKEN_SYMBOL"; // Replace with the actual token ID
940+
const WALLET_FILE: &str = "keys/wallet.export";
941+
const TOKEN_ID: &str = "TOKEN_ID"; // Replace with the actual token ID
947942
948943
#[tokio::main]
949944
async fn main() -> anyhow::Result<()> {
@@ -1019,8 +1014,8 @@ This example demonstrates how to resume balance transfer operations for a Protoc
10191014
use std::{path::PathBuf, str::FromStr};
10201015
10211016
// CONFIGURATION - Modify these values for your use case
1022-
const WALLET_FILE: &str = "wallet.export";
1023-
const TOKEN_ID: &str = "TOKEN_SYMBOL"; // Replace with the actual token ID
1017+
const WALLET_FILE: &str = "keys/wallet.export";
1018+
const TOKEN_ID: &str = "TOKEN_ID"; // Replace with the actual token ID
10241019
10251020
#[tokio::main]
10261021
async fn main() -> anyhow::Result<()> {

0 commit comments

Comments
 (0)