From bab2adaafce632ea49ed89be2f9f7199c9a76e98 Mon Sep 17 00:00:00 2001 From: sydhds Date: Sat, 26 Oct 2024 13:39:39 +0200 Subject: [PATCH 1/2] Fix read_value(&self) return value type --- .../developer/smart-contract/guides/01-my-first-contract.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/developer/smart-contract/guides/01-my-first-contract.md b/src/content/docs/developer/smart-contract/guides/01-my-first-contract.md index 76ee739..597ef3f 100644 --- a/src/content/docs/developer/smart-contract/guides/01-my-first-contract.md +++ b/src/content/docs/developer/smart-contract/guides/01-my-first-contract.md @@ -109,7 +109,7 @@ We also need a method to read the counter value, so our `Counter` methods implem ```rust impl Counter { - pub fn read_value(&self) -> i64 { + pub fn read_value(&self) -> u32 { self.value } From c619be51358ffbfd913817ae1b9908bb478b7fe3 Mon Sep 17 00:00:00 2001 From: sydhds Date: Sat, 26 Oct 2024 13:40:10 +0200 Subject: [PATCH 2/2] Add -Znext-lockfile-bump in order to fix SC build --- .../docs/developer/smart-contract/guides/02-compiling.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/docs/developer/smart-contract/guides/02-compiling.md b/src/content/docs/developer/smart-contract/guides/02-compiling.md index c396065..62b9ba8 100644 --- a/src/content/docs/developer/smart-contract/guides/02-compiling.md +++ b/src/content/docs/developer/smart-contract/guides/02-compiling.md @@ -34,7 +34,7 @@ Make sure that you use version ``1.75.0-nightly`` of rustc. This can be achieved ```toml // rust-toolchain.toml [toolchain] -channel = "nightly-2023-11-10" +channel = "nightly-2023-11-10" # 1.75.0-nightly targets = ["wasm32-unknown-unknown"] components = ["rust-src", "rustfmt", "cargo", "clippy"] ``` @@ -54,7 +54,7 @@ rustup target add wasm32-unknown-unknown You can pass a target flag to the cargo build command, to explicitly set the target you want to compile to. This command compiles the Rust project to WebAssembly in release mode, optimizing the output for performance. ```bash title="Terminal" -cargo build --target wasm32-unknown-unknown --release +cargo build --target wasm32-unknown-unknown --release -Znext-lockfile-bump ``` :::tip[Note]