Skip to content

Commit

Permalink
Update test helper to match doc example
Browse files Browse the repository at this point in the history
  • Loading branch information
HCastano committed Mar 27, 2022
1 parent a16b674 commit 498eaee
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions examples/multisig/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ mod multisig {
mod tests {
use super::*;
use ink_env::{
call,
call::utils::ArgumentList,
test,
};
use ink_lang as ink;
Expand All @@ -724,13 +724,14 @@ mod multisig {

impl Transaction {
fn change_requirement(requirement: u32) -> Self {
use scale::Encode;
let call_args = ArgumentList::empty().push_arg(&requirement);

// Multisig::change_requirement()
let mut call = test::CallData::new(call::Selector::new([0x00; 4]));
call.push_arg(&requirement);
Self {
callee: AccountId::from(WALLET),
selector: call.selector().to_bytes(),
input: call.params().to_owned(),
selector: ink::selector_bytes!("change_requirement"),
input: call_args.encode(),
transferred_value: 0,
gas_limit: 1000000,
}
Expand Down

0 comments on commit 498eaee

Please sign in to comment.