Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
kroist committed Feb 27, 2024
1 parent 5bb844c commit 9722cbc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 2 additions & 3 deletions shielder/contract/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@ pub mod contract {
impl Contract {
/// Constructor
#[ink(constructor)]
// pub fn new(supported_tokens: [Scalar; TOKENS_NUMBER]) -> Self {
pub fn new() -> Self {
pub fn new(supported_tokens: [Scalar; TOKENS_NUMBER]) -> Self {
Self {
supported_tokens: [0_u128.into(); TOKENS_NUMBER],
supported_tokens,
..Default::default()
}
}
Expand Down
8 changes: 7 additions & 1 deletion shielder/drink_tests/src/utils/shielder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@ pub fn deploy_shielder(
let shielder_bundle = BundleProvider::ShielderContract.bundle()?;
let mut tokens: [Scalar; TOKENS_NUMBER] = [0_u128.into(); TOKENS_NUMBER];
tokens[0] = Scalar::from_bytes(*((*token).as_ref()));
let res = session.deploy_bundle(shielder_bundle, "new", NO_ARGS, NO_SALT, NO_ENDOWMENT)?;
let res = session.deploy_bundle(
shielder_bundle,
"new",
&[format!("{:?}", tokens)],
NO_SALT,
NO_ENDOWMENT,
)?;
Ok(res)
}

Expand Down

0 comments on commit 9722cbc

Please sign in to comment.