ERC-6492 universal signature validator
(the ValidateSigOffchain helper contract).
This contract is never deployed. Its creation code is executed deploylessly via
eth_call (an eth_call with no to address runs the given data as init code and
returns whatever the constructor returns). The constructor
(address _signer, bytes32 _hash, bytes _signature) validates the signature —
handling ERC-6492 wrapped signatures for counterfactual (not-yet-deployed) wallets,
ERC-1271 smart-contract wallets, and plain ecrecover EOA signatures — and returns
a single byte: 0x01 for valid, 0x00 for invalid.
Used by Ethers.Signature — you normally don't need to use this module directly.
Bytecode provenance
The creation bytecode is the erc6492SignatureValidatorByteCode constant from
viem, which is
the compiled ValidateSigOffchain helper from the ERC-6492 reference implementation
(Ambire's signature-validator).
Summary
Functions
Returns the creation (init) bytecode of the validator contract.
Encodes a deployless validation call for the given signer, hash and signature.
Functions
@spec creation_code() :: <<_::13472>>
Returns the creation (init) bytecode of the validator contract.
@spec encode_validation_call(<<_::160>>, <<_::256>>, binary()) :: <<_::64, _::_*8>>
Encodes a deployless validation call for the given signer, hash and signature.
Returns the binary to be used as the data of an eth_call with no to address:
the creation code followed by the ABI-encoded
(address _signer, bytes32 _hash, bytes _signature) constructor arguments.