I'm using a Safe multisig contract, and I would like to have a public mapping on that contract which keeps track of all the tx that a signer has approved. The contract has an approvedHashes mapping of address to tx_hash to bool but that mapping does not get updated by safe.

Is there an augmented safe contract or some sort of add-on that accomplishes this?

Thank you

1 Answer 1


Safe supports multiple signature types, and most of the interfaces use the off-chain ECDSA signatures, which are not tracked anywhere in the contract except events emitted in the L2 version of the Safe singleton.

There are "on-chain" signatures, and the approvedHashes mapping is used in the pre-validated signature type. Most apps do not use this signature type for UX reasons. You can build an app that would exclusively use this type of signatures. From Safe docs:

Pre-Validated Signatures
signature type == 1
Constant Part:
{32-bytes hash validator}{32-bytes ignored}{1-byte signature type}.
Hash validator - Padded address of the account that pre-validated the hash that should be validated. The Safe keeps track of all hashes that have been pre validated. This is done with a mapping address to mapping of bytes32 to boolean where it is possible to set a hash as validated by a certain address (hash validator). To add an entry to this mapping use approveHash. Also if the validator is the sender of transaction that executed the Safe transaction it is not required to use approveHash to add an entry to the mapping.

Learn more about the signatures here: https://docs.safe.global/learn/safe-core/safe-core-protocol/signatures

You can also check out the legacy Gnosis Multisig that exclusively uses on-chain transaction approvals.

  • Hey mike, thanks for responding, but my question is simpler. I want to keep track of how many transactions a validator (safe signer) has signed, the signatures bytes themselves are not important to me, I need to track which validators (safe signers) are active or not by tracking how many transactions they've approved or not. Is there a way to do that within the Safe framework? May 30 at 11:09
  • On-chain there's no easy way to do it. You can do it using the Safe Transaction Service API
    – mikheevm
    May 30 at 11:52
  • What is the non-easy way to do it? 2 days ago

Your Answer

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

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