Smart Account Reference
Signatures
approveHash

approveHash

Marks hash hashToApprove as approved.

This can be used with a pre-approved hash transaction signature.

⚠️

The approved hash stays approved forever. There's no revocation mechanism, so it behaves similarly to ECDSA signatures.

Usage


_10
interface ISafe {
_10
function approveHash(bytes32 hashToApprove) external;
_10
}
_10
_10
contract Example {
_10
function example() ... {
_10
(ISafe safe).approveHash("0x...");
_10
}
_10
}

Parameters

hashToApprove

  • Type: bytes32

The hash to mark as approved for signatures that are verified by this contract.


_10
(ISafe safe).approveHash(
_10
"0x..."
_10
);

Events

ApproveHash


_10
event ApproveHash(bytes32 approvedHash, address owner);

Emitted when a hash is approved by an owner.

Was this page helpful?