# Account

## Overview

`ERC6551Account` is a versatile contract designed to interact with multiple token standards (ERC20, ERC721, ERC1155) and execute general transactions.&#x20;

It features functions for token management and transaction execution, leveraging OpenZeppelin's robust contract libraries.

## Methods

## <mark style="color:blue;">`executeCall`</mark>

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.              |

## <mark style="color:blue;">`token`</mark>

Retrieves token details associated with the account.

### Returns

| Name          | Type    | Description             |
| ------------- | ------- | ----------------------- |
| chainId       | uint256 | Chain ID.               |
| tokenContract | address | Token contract address. |
| tokenId       | uint256 | Token ID.               |

## <mark style="color:blue;">`owner`</mark>

Returns the owner of the token.

### Returns

`address` - Owner address.

## <mark style="color:blue;">`withdrawERC20`</mark>

Withdraws ERC20 tokens from the contract.

### Parameters

| Name   | Type    | Description          |
| ------ | ------- | -------------------- |
| token  | address | ERC20 token address. |
| amount | uint256 | Amount to withdraw.  |
| to     | address | Recipient address.   |

## <mark style="color:blue;">`withdrawERC1155`</mark>

Withdraws ERC1155 tokens.

### Parameters

| Name     | Type      | Description            |
| -------- | --------- | ---------------------- |
| `token`  | `address` | ERC1155 token address. |
| `id`     | `uint256` | Token ID.              |
| `amount` | `uint256` | Amount to withdraw.    |
| `to`     | `address` | Recipient address.     |

## <mark style="color:blue;">`withdrawERC721`</mark>

Withdraws an ERC721 token.

### Parameters

| Name      | Type      | Description           |
| --------- | --------- | --------------------- |
| `token`   | `address` | ERC721 token address. |
| `tokenId` | `uint256` | Token ID.             |
| `to`      | `address` | Recipient address.    |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.volary.io/template-library/smart-contracts/erc6551/account.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
