0

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 1

1

Safe nonces 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, nonces 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.

nonces 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.