diff --git a/shielder/contract/lib.rs b/shielder/contract/lib.rs index d0fdde3..c84ee81 100755 --- a/shielder/contract/lib.rs +++ b/shielder/contract/lib.rs @@ -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() } } diff --git a/shielder/drink_tests/src/utils/shielder.rs b/shielder/drink_tests/src/utils/shielder.rs index abb8e75..ad975b5 100644 --- a/shielder/drink_tests/src/utils/shielder.rs +++ b/shielder/drink_tests/src/utils/shielder.rs @@ -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) }