diff --git a/multisig-factory/res/multisig_factory.wasm b/multisig-factory/res/multisig_factory.wasm index 8c95ec9e..4d585b10 100755 Binary files a/multisig-factory/res/multisig_factory.wasm and b/multisig-factory/res/multisig_factory.wasm differ diff --git a/multisig/res/multisig.wasm b/multisig/res/multisig.wasm index edbaa54a..48e308cf 100755 Binary files a/multisig/res/multisig.wasm and b/multisig/res/multisig.wasm differ diff --git a/multisig/src/lib.rs b/multisig/src/lib.rs index 510bc2cb..0c5423ca 100644 --- a/multisig/src/lib.rs +++ b/multisig/src/lib.rs @@ -99,9 +99,13 @@ impl Default for MultiSigContract { impl MultiSigContract { /// Initialize multisig contract. /// @params num_confirmations: k of n signatures required to perform operations. - #[init] + #[init(ignore_state)] pub fn new(num_confirmations: u32) -> Self { - assert!(!env::state_exists(), "Already initialized"); + assert_eq!( + env::current_account_id(), + env::predecessor_account_id(), + "Predecessor account must match current account" + ); Self { num_confirmations, request_nonce: 0, diff --git a/multisig2/res/multisig2.wasm b/multisig2/res/multisig2.wasm index 45cfacd5..ec562f5f 100755 Binary files a/multisig2/res/multisig2.wasm and b/multisig2/res/multisig2.wasm differ diff --git a/multisig2/src/lib.rs b/multisig2/src/lib.rs index 052bfabb..81109bec 100644 --- a/multisig2/src/lib.rs +++ b/multisig2/src/lib.rs @@ -144,8 +144,13 @@ impl MultiSigContract { /// Initialize multisig contract. /// @params members: list of {"account_id": "name"} or {"public_key": "key"} members. /// @params num_confirmations: k of n signatures required to perform operations. - #[init] + #[init(ignore_state)] pub fn new(members: Vec, num_confirmations: u32) -> Self { + assert_eq!( + env::current_account_id(), + env::predecessor_account_id(), + "Predecessor account must match current account" + ); assert( members.len() >= num_confirmations as usize, "Members list must be equal or larger than number of confirmations",