Skip to content

Commit

Permalink
fix: external call
Browse files Browse the repository at this point in the history
  • Loading branch information
alenmestrov committed Dec 4, 2024
1 parent ae88208 commit 6482a61
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion contracts/icp/proxy-contract/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ crate-type = ["cdylib", "rlib"]
[dependencies]
bs58.workspace = true
calimero-context-config = { path = "../../../crates/context/config" }
candid = "0.10"
candid = { version = "0.10", features = ["value"] }
ed25519-dalek.workspace = true
hex.workspace = true
ic-cdk = "0.16"
Expand Down
9 changes: 5 additions & 4 deletions contracts/icp/proxy-contract/mock/external/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ thread_local! {
}

#[ic_cdk::update]
fn test_method(args: Vec<u8>) {
CALLS.with(|calls| {
calls.borrow_mut().push(args);
});
fn test_method(args: Vec<u8>) -> Vec<u8> {
CALLS.with(|calls| {
calls.borrow_mut().push(args.clone());
args // Return the same args back
})
}

#[ic_cdk::query]
Expand Down

0 comments on commit 6482a61

Please sign in to comment.