Skip to content
Lattice

IERC6551Account

Git Source

Author: Vendored minimal subset of the ERC-6551 reference implementation (https://github.com/erc6551/reference).

Upstream license: MIT.

ERC-6551 account introspection + signer validation.

Functions

receive

The account must be able to receive native value.

receive() external payable;

isValidSigner

Returns the magic value 0x523e3260 if signer is authorized to act for the account in context, else bytes4(0).

function isValidSigner(address signer, bytes calldata context) external view returns (bytes4 magicValue);

Parameters

NameTypeDescription
signeraddress
contextbytes

Returns

NameTypeDescription
magicValuebytes4

state

A value that changes every time the account state changes (e.g. after each execution).

function state() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256

token

The token that owns this account: (chainId, tokenContract, tokenId).

function token() external view returns (uint256 chainId, address tokenContract, uint256 tokenId);

Returns

NameTypeDescription
chainIduint256
tokenContractaddress
tokenIduint256