📌Account
Overview
ERC6551Account
is a versatile contract designed to interact with multiple token standards (ERC20, ERC721, ERC1155) and execute general transactions.
It features functions for token management and transaction execution, leveraging OpenZeppelin's robust contract libraries.
Methods
executeCall
executeCall
Executes a transaction to a specified address.
Parameters
Name | Type | Description |
---|---|---|
to | address | Recipient address of the call. |
value | uint256 | Amount of ETH to send. |
data | bytes | Transaction data. |
token
token
Retrieves token details associated with the account.
Returns
Name | Type | Description |
---|---|---|
chainId | uint256 | Chain ID. |
tokenContract | address | Token contract address. |
tokenId | uint256 | Token ID. |
owner
owner
Returns the owner of the token.
Returns
address
- Owner address.
withdrawERC20
withdrawERC20
Withdraws ERC20 tokens from the contract.
Parameters
Name | Type | Description |
---|---|---|
token | address | ERC20 token address. |
amount | uint256 | Amount to withdraw. |
to | address | Recipient address. |
withdrawERC1155
withdrawERC1155
Withdraws ERC1155 tokens.
Parameters
Name | Type | Description |
---|---|---|
|
| ERC1155 token address. |
|
| Token ID. |
|
| Amount to withdraw. |
|
| Recipient address. |
withdrawERC721
withdrawERC721
Withdraws an ERC721 token.
Parameters
Name | Type | Description |
---|---|---|
|
| ERC721 token address. |
|
| Token ID. |
|
| Recipient address. |
Last updated