As the title is described . How does the Safe smart contracts verifies the nonce
which is passed in the execTransaction
function parameters. All it does is increment the nonce . But where do we know that this transaction with this nonce has been done , there's no mapping or any kind of record for it. Can someone explain this to me ?
1 Answer
Safe nonce
s are counters used internally by the Safe.sol smart contract. They are checked only once in all Safe contracts: in SafeToL2Setup.sol, to make sure a Safe being updated to L2 has never done any transaction yet. Other than this, nonce
s are not read by any other contracts from the Safe Smart Account. They are not either passed to execTransaction
; this counter is accessed (and incremented) directly by execTransaction
from the contract storage.
nonce
s are, however, heavily used in the Safe{Core} SDK and infrastructure to validate transactions and signatures offchain.
Hope it answers your question. If not, please let me know! Best, Louis