From bf8e92a9b633406e18286bc940bc1c818583f9d0 Mon Sep 17 00:00:00 2001 From: Bogdan Crisan Date: Mon, 28 Aug 2023 13:05:24 +0200 Subject: [PATCH 1/2] indicate which form of address to use in sdk example --- src/rust/Cargo.lock | 26 +++++++++++++------------- src/rust/sdk/example/src/main.rs | 6 ++++-- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/rust/Cargo.lock b/src/rust/Cargo.lock index a6fbfb95d..2bf998642 100644 --- a/src/rust/Cargo.lock +++ b/src/rust/Cargo.lock @@ -5475,19 +5475,6 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e52c148ef37f8c375d49d5a73aa70713125b7f19095948a923f80afdeb22ec2" -[[package]] -name = "rust-sdk" -version = "0.1.0" -dependencies = [ - "anyhow", - "aptos-sdk", - "clap 4.3.21", - "econia-sdk", - "rand 0.7.3", - "reqwest", - "tokio", -] - [[package]] name = "rustc-demangle" version = "0.1.23" @@ -5650,6 +5637,19 @@ dependencies = [ "untrusted", ] +[[package]] +name = "sdk-example" +version = "0.1.0" +dependencies = [ + "anyhow", + "aptos-sdk", + "clap 4.3.21", + "econia-sdk", + "rand 0.7.3", + "reqwest", + "tokio", +] + [[package]] name = "security-framework" version = "2.9.2" diff --git a/src/rust/sdk/example/src/main.rs b/src/rust/sdk/example/src/main.rs index e8d337eba..b29f5070a 100644 --- a/src/rust/sdk/example/src/main.rs +++ b/src/rust/sdk/example/src/main.rs @@ -61,6 +61,8 @@ aptos move publish \ # run the script cargo run -- $APTOS_NODE_URL $APTOS_FAUCET_URL $ECONIA_ADDR $FAUCET_ADDR + +# note that when passing addresses to the executable, they must be of the form 0x1234... */ #[derive(Parser, Debug)] @@ -71,10 +73,10 @@ pub struct Args { /// The URL of the faucet pub faucet_url: String, - /// The address of the Econia contract + /// The address of the Econia contract (e.g. 0x1234...) pub econia_address: String, - /// The address of the Aptos faucet + /// The address of the Aptos faucet (e.g. 0x1234...) pub faucet_address: String, } From c638bc1bd5b4dfe28538a7cae53ee127aa90b19d Mon Sep 17 00:00:00 2001 From: Bogdan Crisan Date: Wed, 30 Aug 2023 17:29:58 +0200 Subject: [PATCH 2/2] add documentation about address form --- doc/doc-site/docs/off-chain/rust-sdk.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/doc-site/docs/off-chain/rust-sdk.md b/doc/doc-site/docs/off-chain/rust-sdk.md index bd13a55d6..bc72c0a4f 100644 --- a/doc/doc-site/docs/off-chain/rust-sdk.md +++ b/doc/doc-site/docs/off-chain/rust-sdk.md @@ -43,7 +43,7 @@ It's time to deploy our own Econia Faucet to the local chain: git clone https://github.com/econia-labs/econia.git # only if necessary cd ./econia/src/move/faucet aptos init --profile econia_faucet_deploy # enter "local" for the chain -export FAUCET_ADDR= +export FAUCET_ADDR= # make sure to put 0x at the start # deploy the faucet (all one command) aptos move publish \ --named-addresses econia_faucet=$FAUCET_ADDR \ @@ -56,7 +56,7 @@ You also need to deploy Econia: ```bash cd ./econia/src/move/econia aptos init --profile econia_exchange_deploy # enter "local" for the chain -export ECONIA_ADDR= +export ECONIA_ADDR= # make sure to put 0x at the start # deploy the exchange (all one command) aptos move publish \ --override-size-check \