checkNSignatures
Checks whether the signature provided is valid for the provided data and hash. Reverts otherwise.
Since the EIP-1271 makes an external call, be mindful of re-entrancy attacks.
Usage
_20interface ISafe {_20 function checkNSignatures(_20 address executor,_20 bytes32 dataHash,_20 bytes signatures,_20 uint256 requiredSignatures_20 ) external view;_20}_20_20_20contract Example {_20 function example() ... {_20 (ISafe safe).checkNSignatures(_20 0x...,_20 "0x...",_20 "0x...",_20 1_20 );_20 }_20}
Parameters
executor
- Type:
address
Address executing the transaction.
⚠️
Make sure that the executor address is a legitimate executor. When incorrectly passed, the executor might reduce the threshold by one signature.
_10(ISafe safe).checkNSignatures(_10 0x...,_10 "0x...",_10 "0x...",_10 1_10);
dataHash
- Type:
bytes32
Hash of the data (could be either a message hash or transaction hash).
_10(ISafe safe).checkNSignatures(_10 0x...,_10 "0x...",_10 "0x...",_10 1_10);
signatures
- Type:
bytes
Signature data that should be verified. Can be packed ECDSA signature ((bytes32 r)(bytes32 s)(uint8 v))
, contract signature (EIP-1271), or approved hash.
_10(ISafe safe).checkNSignatures(_10 0x...,_10 "0x...",_10 "0x...",_10 1_10);
requiredSignatures
- Type:
uint256
Amount of required valid signatures.
_10(ISafe safe).checkNSignatures(_10 0x...,_10 "0x...",_10 "0x...",_10 1_10);