Skip to main content

SetSignatureValidatorProposal

This proposal type enables validating, or setting arbitrary ERC1271 signature validators for a given hash. To simply validate a hash, the hash validator is set to address(1). Otherwise, a contract validator is set —- these validators must implement IERC1271 and are called by the party when isValidSignature is called with the given hash.

When the tx.origin is address(0) (indicative of an off-chain call), we fallback to the validator stored for the zero hash if none is set for the given hash. If the party hasn't set a validator for the zero hash, the party uses the GLOBAL_OFF_CHAIN_SIGNATURE_VALIDATOR stored in globals.

Code

SetSignatureValidatorProposal.sol

Functions

_executeSetSignatureValidator

function _executeSetSignatureValidator(
IProposalExecutionEngine.ExecuteProposalParams memory params
)

getSignatureValidatorForHash

function getSignatureValidatorForHash(bytes32 hash) public view returns (IERC1271)

Structs

SetSignatureValidatorProposalData

struct SetSignatureValidatorProposalData {
bytes32 signatureHash;
IERC1271 signatureValidator;
}