> For the complete documentation index, see [llms.txt](https://docs.play.cronos.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.play.cronos.org/readme-1/classes/structorg_1_1defi__wallet__core_1_1_erc721.md).

# org::defi\_wallet\_core::Erc721

`#include <contract.rs.h>`

## Public Types

|                         | Name                                      |
| ----------------------- | ----------------------------------------- |
| using ::std::true\_type | [**IsRelocatable**](#using-isrelocatable) |

## Public Functions

|                                                                                                                                                   | Name                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ::[org::defi\_wallet\_core::U256](/readme-1/classes/structorg_1_1defi__wallet__core_1_1_u256.md)                                                  | <p><a href="#function-balance-of"><strong>balance\_of</strong></a>(::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> account\_address) const<br>Returns the number of tokens in owner's <code>account\_address</code>.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ::[rust::String](/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md)                                                                         | <p><a href="#function-owner-of"><strong>owner\_of</strong></a>(::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> token\_id) const<br>Returns the owner of the <code>token\_id</code> token.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ::[rust::String](/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md)                                                                         | <p><a href="#function-name"><strong>name</strong></a>() const<br>Get the descriptive name for a collection of NFTs in this contract.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ::[rust::String](/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md)                                                                         | <p><a href="#function-symbol"><strong>symbol</strong></a>() const<br>Get the abbreviated name for NFTs in this contract.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ::[rust::String](/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md)                                                                         | <p><a href="#function-token-uri"><strong>token\_uri</strong></a>(::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> token\_id) const<br>Get the distinct Uniform Resource Identifier (URI) for a given asset.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ::[org::defi\_wallet\_core::Erc721](/readme-1/classes/structorg_1_1defi__wallet__core_1_1_erc721.md)                                              | <p><a href="#function-legacy"><strong>legacy</strong></a>()<br>Makes a legacy transaction instead of an EIP-1559 one.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ::[org::defi\_wallet\_core::Erc721](/readme-1/classes/structorg_1_1defi__wallet__core_1_1_erc721.md)                                              | <p><a href="#function-interval"><strong>interval</strong></a>(::std::uint64\_t polling\_interval\_ms)<br>Sets the default polling interval for event filters and pending transactions.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ::[org::defi\_wallet\_core::CronosTransactionReceiptRaw](/readme-1/classes/structorg_1_1defi__wallet__core_1_1_cronos_transaction_receipt_raw.md) | <p><a href="#function-transfer-from"><strong>transfer\_from</strong></a>(::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> from\_address, ::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> to\_address, ::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> token\_id, ::<a href="/readme-1/classes/structorg_1_1defi__wallet__core_1_1_private_key.md">org::defi\_wallet\_core::PrivateKey</a> const & private\_key) const<br>Transfers <code>token\_id</code> token from <code>from\_address</code> to <code>to\_address</code>.</p>                                                                                                                                                                                               |
| ::[org::defi\_wallet\_core::CronosTransactionReceiptRaw](/readme-1/classes/structorg_1_1defi__wallet__core_1_1_cronos_transaction_receipt_raw.md) | <p><a href="#function-safe-transfer-from"><strong>safe\_transfer\_from</strong></a>(::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> from\_address, ::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> to\_address, ::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> token\_id, ::<a href="/readme-1/classes/structorg_1_1defi__wallet__core_1_1_private_key.md">org::defi\_wallet\_core::PrivateKey</a> const & private\_key) const<br>Safely transfers <code>token\_id</code> token from <code>from\_address</code> to <code>to\_address</code>.</p>                                                                                                                                                                             |
| ::[org::defi\_wallet\_core::CronosTransactionReceiptRaw](/readme-1/classes/structorg_1_1defi__wallet__core_1_1_cronos_transaction_receipt_raw.md) | <p><a href="#function-safe-transfer-from-with-data"><strong>safe\_transfer\_from\_with\_data</strong></a>(::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> from\_address, ::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> to\_address, ::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> token\_id, ::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_vec.md">rust::Vec</a><::std::uint8\_t > additional\_data, ::<a href="/readme-1/classes/structorg_1_1defi__wallet__core_1_1_private_key.md">org::defi\_wallet\_core::PrivateKey</a> const & private\_key) const<br>Safely transfers <code>token\_id</code> token from <code>from\_address</code> to <code>to\_address</code> with <code>additional\_data</code>.</p> |
| ::[org::defi\_wallet\_core::CronosTransactionReceiptRaw](/readme-1/classes/structorg_1_1defi__wallet__core_1_1_cronos_transaction_receipt_raw.md) | <p><a href="#function-approve"><strong>approve</strong></a>(::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> approved\_address, ::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> token\_id, ::<a href="/readme-1/classes/structorg_1_1defi__wallet__core_1_1_private_key.md">org::defi\_wallet\_core::PrivateKey</a> const & private\_key) const<br>Gives permission to <code>approved\_address</code> to transfer <code>token\_id</code> token to another account.</p>                                                                                                                                                                                                                                                                                              |
| ::[org::defi\_wallet\_core::CronosTransactionReceiptRaw](/readme-1/classes/structorg_1_1defi__wallet__core_1_1_cronos_transaction_receipt_raw.md) | <p><a href="#function-set-approval-for-all"><strong>set\_approval\_for\_all</strong></a>(::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> approved\_address, bool approved, ::<a href="/readme-1/classes/structorg_1_1defi__wallet__core_1_1_private_key.md">org::defi\_wallet\_core::PrivateKey</a> const & private\_key) const<br>Enable or disable approval for a third party <code>approved\_address</code> to manage all of sender's assets.</p>                                                                                                                                                                                                                                                                                                                                                    |
| ::[rust::String](/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md)                                                                         | <p><a href="#function-get-approved"><strong>get\_approved</strong></a>(::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> token\_id) const<br>Get the approved address for a single NFT by <code>token\_id</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| bool                                                                                                                                              | <p><a href="#function-is-approved-for-all"><strong>is\_approved\_for\_all</strong></a>(::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> owner, ::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> approved\_address) const<br>Query if an address is an authorized <code>approved\_address</code> for <code>owner</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ::[org::defi\_wallet\_core::U256](/readme-1/classes/structorg_1_1defi__wallet__core_1_1_u256.md)                                                  | <p><a href="#function-total-supply"><strong>total\_supply</strong></a>() const<br>Returns the total amount of tokens stored by the contract.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ::[rust::String](/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md)                                                                         | <p><a href="#function-token-by-index"><strong>token\_by\_index</strong></a>(::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> index) const<br>Returns a token ID at a given index of all the tokens stored by the contract.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ::[rust::String](/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md)                                                                         | <p><a href="#function-token-of-owner-by-index"><strong>token\_of\_owner\_by\_index</strong></a>(::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> owner, ::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> index) const<br>Returns a token ID owned by owner at a given index of its token list.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |

## Public Attributes

|                                                                           | Name                                                                    |
| ------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| ::[rust::String](/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md) | [**contract\_address**](#variable-contract-address)                     |
| ::[rust::String](/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md) | [**web3api\_url**](#variable-web3api-url)                               |
| bool                                                                      | [**inner\_legacy**](#variable-inner-legacy)                             |
| ::std::uint64\_t                                                          | [**inner\_polling\_interval\_ms**](#variable-inner-polling-interval-ms) |
| ::std::uint64\_t                                                          | [**chain\_id**](#variable-chain-id)                                     |

## Public Types Documentation

### using IsRelocatable

```cpp
using org::defi_wallet_core::Erc721::IsRelocatable =  ::std::true_type;
```

## Public Functions Documentation

### function balance\_of

```cpp
::org::defi_wallet_core::U256 balance_of(
    ::rust::String account_address
) const
```

Returns the number of tokens in owner's `account_address`.

### function owner\_of

```cpp
::rust::String owner_of(
    ::rust::String token_id
) const
```

Returns the owner of the `token_id` token.

### function name

```cpp
::rust::String name() const
```

Get the descriptive name for a collection of NFTs in this contract.

### function symbol

```cpp
::rust::String symbol() const
```

Get the abbreviated name for NFTs in this contract.

### function token\_uri

```cpp
::rust::String token_uri(
    ::rust::String token_id
) const
```

Get the distinct Uniform Resource Identifier (URI) for a given asset.

### function legacy

```cpp
::org::defi_wallet_core::Erc721 legacy()
```

Makes a legacy transaction instead of an EIP-1559 one.

### function interval

```cpp
::org::defi_wallet_core::Erc721 interval(
    ::std::uint64_t polling_interval_ms
)
```

Sets the default polling interval for event filters and pending transactions.

### function transfer\_from

```cpp
::org::defi_wallet_core::CronosTransactionReceiptRaw transfer_from(
    ::rust::String from_address,
    ::rust::String to_address,
    ::rust::String token_id,
    ::org::defi_wallet_core::PrivateKey const & private_key
) const
```

Transfers `token_id` token from `from_address` to `to_address`.

### function safe\_transfer\_from

```cpp
::org::defi_wallet_core::CronosTransactionReceiptRaw safe_transfer_from(
    ::rust::String from_address,
    ::rust::String to_address,
    ::rust::String token_id,
    ::org::defi_wallet_core::PrivateKey const & private_key
) const
```

Safely transfers `token_id` token from `from_address` to `to_address`.

### function safe\_transfer\_from\_with\_data

```cpp
::org::defi_wallet_core::CronosTransactionReceiptRaw safe_transfer_from_with_data(
    ::rust::String from_address,
    ::rust::String to_address,
    ::rust::String token_id,
    ::rust::Vec<::std::uint8_t > additional_data,
    ::org::defi_wallet_core::PrivateKey const & private_key
) const
```

Safely transfers `token_id` token from `from_address` to `to_address` with `additional_data`.

### function approve

```cpp
::org::defi_wallet_core::CronosTransactionReceiptRaw approve(
    ::rust::String approved_address,
    ::rust::String token_id,
    ::org::defi_wallet_core::PrivateKey const & private_key
) const
```

Gives permission to `approved_address` to transfer `token_id` token to another account.

The approval is cleared when the token is transferred. Only a single account can be approved at a time, so approving the zero address clears previous approvals.

### function set\_approval\_for\_all

```cpp
::org::defi_wallet_core::CronosTransactionReceiptRaw set_approval_for_all(
    ::rust::String approved_address,
    bool approved,
    ::org::defi_wallet_core::PrivateKey const & private_key
) const
```

Enable or disable approval for a third party `approved_address` to manage all of sender's assets.

### function get\_approved

```cpp
::rust::String get_approved(
    ::rust::String token_id
) const
```

Get the approved address for a single NFT by `token_id`

### function is\_approved\_for\_all

```cpp
bool is_approved_for_all(
    ::rust::String owner,
    ::rust::String approved_address
) const
```

Query if an address is an authorized `approved_address` for `owner`

### function total\_supply

```cpp
::org::defi_wallet_core::U256 total_supply() const
```

Returns the total amount of tokens stored by the contract.

From IERC721Enumerable, an optional extension of the standard ERC721

### function token\_by\_index

```cpp
::rust::String token_by_index(
    ::rust::String index
) const
```

Returns a token ID at a given index of all the tokens stored by the contract.

Use along with totalSupply to enumerate all tokens.

From IERC721Enumerable, an optional extension of the standard ERC721

### function token\_of\_owner\_by\_index

```cpp
::rust::String token_of_owner_by_index(
    ::rust::String owner,
    ::rust::String index
) const
```

Returns a token ID owned by owner at a given index of its token list.

Use along with balanceOf to enumerate all of owner's tokens.

From IERC721Enumerable, an optional extension of the standard ERC721

## Public Attributes Documentation

### variable contract\_address

```cpp
::rust::String contract_address;
```

### variable web3api\_url

```cpp
::rust::String web3api_url;
```

### variable inner\_legacy

```cpp
bool inner_legacy;
```

### variable inner\_polling\_interval\_ms

```cpp
::std::uint64_t inner_polling_interval_ms;
```

### variable chain\_id

```cpp
::std::uint64_t chain_id;
```

***

Updated on 2023-01-11 at 18:25:18 +0800
