diff --git a/miden-lib/asm/miden/contracts/wallets/basic.masm b/miden-lib/asm/miden/contracts/wallets/basic.masm index bdd1b2951..033313e37 100644 --- a/miden-lib/asm/miden/contracts/wallets/basic.masm +++ b/miden-lib/asm/miden/contracts/wallets/basic.masm @@ -73,27 +73,3 @@ export.send_asset.1 # prepare the stack for return - stack has 6 elements too many movupw.3 dropw swap drop swap drop end - -#! Increments the account nonce by the provided value. -#! -#! Stack: [value] -#! Output: [] -#! -#! - value is the value to increment the nonce by. value can be at most 2^32 - 1 otherwise this -#! procedure panics. -export.incr_nonce - exec.account::incr_nonce - # => [] -end - -#! Sets the code of the account the transaction is being executed against. This procedure can only -#! executed on regular accounts with updatable code. Otherwise, this procedure fails. -#! -#! Stack: [CODE_ROOT] -#! Output: [] -#! -#! - CODE_ROOT is the hash of the code to set. -export.set_code - exec.account::set_code - # => [] -end diff --git a/objects/src/testing/account_code.rs b/objects/src/testing/account_code.rs index 2fdebbc19..af1bb5f4a 100644 --- a/objects/src/testing/account_code.rs +++ b/objects/src/testing/account_code.rs @@ -86,8 +86,14 @@ impl AccountCode { end # acct proc 2 + # + # NOTE: Procedure expose for testing purposes only. This procedure should not be part of the + # account's public API. An account must increment its nonce when its state change, but for a + # production account code implementation, the increment is expected to be done together with + # the transaction authencation. That is to say, the nonce is increment iff the transaction + # contains a valid signature. export.incr_nonce - exec.wallet::incr_nonce + exec.account::incr_nonce end # acct proc 3 @@ -102,7 +108,7 @@ impl AccountCode { # acct proc 5 export.set_code - exec.wallet::set_code + exec.account::set_code end # acct proc 6