From cb4c2fbf3c2ad28bf18b8cab7fd4b8efe479692a Mon Sep 17 00:00:00 2001 From: Joshua Colvin Date: Tue, 10 Oct 2023 13:48:33 -0700 Subject: [PATCH 1/3] Fix delegate_call `delegate_call` was calling `RawCall::new_with_value` instead of `RawCall::new_delegate` --- stylus-sdk/src/call/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stylus-sdk/src/call/mod.rs b/stylus-sdk/src/call/mod.rs index 684eab60..9fa3df02 100644 --- a/stylus-sdk/src/call/mod.rs +++ b/stylus-sdk/src/call/mod.rs @@ -71,7 +71,7 @@ pub unsafe fn delegate_call( #[cfg(all(feature = "storage-cache", feature = "reentrant"))] Storage::clear(); // clear the storage to persist changes, invalidating the cache - RawCall::new_with_value(context.value()) + RawCall::new_delegate() .gas(context.gas()) .call(to, data) .map_err(Error::Revert) From e3fa7ad4d80cf50728146ff35c8bea56aff25dc0 Mon Sep 17 00:00:00 2001 From: Rachel Bousfield Date: Tue, 28 Nov 2023 13:51:27 -0700 Subject: [PATCH 2/3] bump version --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0c81a27c..ef6b96c3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -434,7 +434,7 @@ dependencies = [ [[package]] name = "stylus-proc" -version = "0.4.1" +version = "0.4.2" dependencies = [ "alloy-primitives", "alloy-sol-types", @@ -451,7 +451,7 @@ dependencies = [ [[package]] name = "stylus-sdk" -version = "0.4.1" +version = "0.4.2" dependencies = [ "alloy-primitives", "alloy-sol-types", diff --git a/Cargo.toml b/Cargo.toml index be337069..c21d3988 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ members = ["stylus-sdk", "stylus-proc"] resolver = "2" [workspace.package] -version = "0.4.1" +version = "0.4.2" edition = "2021" authors = ["Offchain Labs"] license = "MIT OR Apache-2.0" From f6d5b046aed1429328e7be2720b69901777c8f23 Mon Sep 17 00:00:00 2001 From: Michael Benfield Date: Wed, 29 Nov 2023 14:52:24 -0700 Subject: [PATCH 3/3] examples/erc20 bugfix --- examples/erc20/Cargo.lock | 6 ++++-- examples/erc20/src/main.rs | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/examples/erc20/Cargo.lock b/examples/erc20/Cargo.lock index 52f131b8..578ef6e0 100644 --- a/examples/erc20/Cargo.lock +++ b/examples/erc20/Cargo.lock @@ -624,10 +624,11 @@ dependencies = [ [[package]] name = "stylus-proc" -version = "0.1.0" +version = "0.4.2" dependencies = [ "alloy-primitives", "alloy-sol-types", + "cfg-if 1.0.0", "convert_case 0.6.0", "lazy_static", "proc-macro2", @@ -640,10 +641,11 @@ dependencies = [ [[package]] name = "stylus-sdk" -version = "0.1.0" +version = "0.4.2" dependencies = [ "alloy-primitives", "alloy-sol-types", + "cfg-if 1.0.0", "derivative", "fnv", "hex", diff --git a/examples/erc20/src/main.rs b/examples/erc20/src/main.rs index e12bf2fb..6778a35b 100644 --- a/examples/erc20/src/main.rs +++ b/examples/erc20/src/main.rs @@ -48,7 +48,7 @@ impl Weth { self.erc20.burn(msg::sender(), amount)?; // send the user their funds - call::transfer_eth(self, msg::sender(), amount) + call::transfer_eth(msg::sender(), amount) } // sums numbers