Skip to content

Commit

Permalink
single_call checked and updated✅
Browse files Browse the repository at this point in the history
  • Loading branch information
mahsamoosavi committed Aug 27, 2024
1 parent 6f98ebc commit f813c7f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
19 changes: 15 additions & 4 deletions examples/single_call/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions examples/single_call/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[toolchain]
channel = "1.80.0"
7 changes: 2 additions & 5 deletions examples/single_call/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
#![cfg_attr(not(feature = "export-abi"), no_main)]
extern crate alloc;

#[global_allocator]
static ALLOC: mini_alloc::MiniAlloc = mini_alloc::MiniAlloc::INIT;

use stylus_sdk::{abi::Bytes, alloy_primitives::Address, call::RawCall, prelude::*};

#[solidity_storage]
#[storage]
#[entrypoint]
pub struct SingleCall;

#[external]
#[public]
impl SingleCall {
pub fn execute(&self, target: Address, data: Bytes) -> Bytes {
let result = RawCall::new().call(target, data.to_vec().as_slice());
Expand Down

0 comments on commit f813c7f

Please sign in to comment.