IERC6551Account
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
| Name | Type | Description |
|---|---|---|
| signer | address | |
| context | bytes |
Returns
| Name | Type | Description |
|---|---|---|
| magicValue | bytes4 |
state
A value that changes every time the account state changes (e.g. after each execution).
function state() external view returns (uint256);Returns
| Name | Type | Description |
|---|---|---|
| <none> | uint256 |
token
The token that owns this account: (chainId, tokenContract, tokenId).
function token() external view returns (uint256 chainId, address tokenContract, uint256 tokenId);Returns
| Name | Type | Description |
|---|---|---|
| chainId | uint256 | |
| tokenContract | address | |
| tokenId | uint256 |