Skip to content

Commit

Permalink
Last call result
Browse files Browse the repository at this point in the history
  • Loading branch information
kubaplas committed Nov 16, 2023
1 parent ca1d9f1 commit e0aa2a7
Show file tree
Hide file tree
Showing 14 changed files with 534 additions and 87 deletions.
40 changes: 22 additions & 18 deletions examples2/src/counter_pack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,29 +196,33 @@ mod __counter_pack_test_parts {

impl CounterPackHostRef {
pub fn get_count(&self, index_a: u8, index_b: u8) -> u32 {
self.env.call_contract(
&self.address,
CallDef::new(
String::from("get_count"),
runtime_args! {
"index_a" => index_a,
"index_b" => index_b
}
self.env
.call_contract(
&self.address,
CallDef::new(
String::from("get_count"),
runtime_args! {
"index_a" => index_a,
"index_b" => index_b
}
)
)
).unwrap()
.unwrap()
}

pub fn increment(&self, index_a: u8, index_b: u8) {
self.env.call_contract(
&self.address,
CallDef::new(
String::from("increment"),
runtime_args! {
"index_a" => index_a,
"index_b" => index_b
}
self.env
.call_contract(
&self.address,
CallDef::new(
String::from("increment"),
runtime_args! {
"index_a" => index_a,
"index_b" => index_b
}
)
)
).unwrap()
.unwrap()
}
}

Expand Down
Loading

0 comments on commit e0aa2a7

Please sign in to comment.