IERC721
Title: IERC721
Author: Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/IERC721.sol)
Interface for the ERC-721 Non-Fungible Token standard, including metadata extension.
Functions
balanceOf
Returns the number of tokens owned by owner.
function balanceOf(address owner) external view returns (uint256 balance);Parameters
| Name | Type | Description |
|---|---|---|
| owner | address |
Returns
| Name | Type | Description |
|---|---|---|
| balance | uint256 |
ownerOf
Returns the owner of the tokenId token.
function ownerOf(uint256 tokenId) external view returns (address owner);Parameters
| Name | Type | Description |
|---|---|---|
| tokenId | uint256 |
Returns
| Name | Type | Description |
|---|---|---|
| owner | address |
safeTransferFrom
Safely transfers tokenId from from to to with additional data.
function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;Parameters
| Name | Type | Description |
|---|---|---|
| from | address | |
| to | address | |
| tokenId | uint256 | |
| data | bytes |
safeTransferFrom
Safely transfers tokenId from from to to.
function safeTransferFrom(address from, address to, uint256 tokenId) external;Parameters
| Name | Type | Description |
|---|---|---|
| from | address | |
| to | address | |
| tokenId | uint256 |
transferFrom
Transfers tokenId from from to to without safety checks.
function transferFrom(address from, address to, uint256 tokenId) external;Parameters
| Name | Type | Description |
|---|---|---|
| from | address | |
| to | address | |
| tokenId | uint256 |
approve
Approves to to transfer tokenId on behalf of the caller.
function approve(address to, uint256 tokenId) external;Parameters
| Name | Type | Description |
|---|---|---|
| to | address | |
| tokenId | uint256 |
setApprovalForAll
Enables or disables approval for operator to manage all of the caller's assets.
function setApprovalForAll(address operator, bool approved) external;Parameters
| Name | Type | Description |
|---|---|---|
| operator | address | |
| approved | bool |
getApproved
Returns the address approved for tokenId.
function getApproved(uint256 tokenId) external view returns (address operator);Parameters
| Name | Type | Description |
|---|---|---|
| tokenId | uint256 |
Returns
| Name | Type | Description |
|---|---|---|
| operator | address |
isApprovedForAll
Returns true if operator is approved to manage all of owner's assets.
function isApprovedForAll(address owner, address operator) external view returns (bool);Parameters
| Name | Type | Description |
|---|---|---|
| owner | address | |
| operator | address |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | bool |
name
Returns the token name.
function name() external view returns (string memory);Returns
| Name | Type | Description |
|---|---|---|
| <none> | string |
symbol
Returns the token symbol.
function symbol() external view returns (string memory);Returns
| Name | Type | Description |
|---|---|---|
| <none> | string |
tokenURI
Returns the Uniform Resource Identifier (URI) for tokenId token.
function tokenURI(uint256 tokenId) external view returns (string memory);Parameters
| Name | Type | Description |
|---|---|---|
| tokenId | uint256 |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | string |
Events
Transfer
Emitted when tokenId is transferred from from to to.
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);Parameters
| Name | Type | Description |
|---|---|---|
| from | address | |
| to | address | |
| tokenId | uint256 |
Approval
Emitted when owner enables approved to manage the tokenId token.
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);Parameters
| Name | Type | Description |
|---|---|---|
| owner | address | |
| approved | address | |
| tokenId | uint256 |
ApprovalForAll
Emitted when owner enables or disables (approved) operator to manage all of its assets.
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);Parameters
| Name | Type | Description |
|---|---|---|
| owner | address | |
| operator | address | |
| approved | bool |
Errors
ERC721InvalidOwner
owner is the zero address — invalid owner.
error ERC721InvalidOwner(address owner);Parameters
| Name | Type | Description |
|---|---|---|
| owner | address |
ERC721NonexistentToken
tokenId does not exist.
error ERC721NonexistentToken(uint256 tokenId);Parameters
| Name | Type | Description |
|---|---|---|
| tokenId | uint256 |
ERC721IncorrectOwner
sender is not the owner of tokenId. The owner is owner.
error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);Parameters
| Name | Type | Description |
|---|---|---|
| sender | address | |
| tokenId | uint256 | |
| owner | address |
ERC721InvalidSender
sender is the zero address — invalid sender.
error ERC721InvalidSender(address sender);Parameters
| Name | Type | Description |
|---|---|---|
| sender | address |
ERC721InvalidReceiver
receiver is the zero address or does not implement IERC721Receiver correctly.
error ERC721InvalidReceiver(address receiver);Parameters
| Name | Type | Description |
|---|---|---|
| receiver | address |
ERC721InsufficientApproval
operator is not approved and does not have sufficient authorization for tokenId.
error ERC721InsufficientApproval(address operator, uint256 tokenId);Parameters
| Name | Type | Description |
|---|---|---|
| operator | address | |
| tokenId | uint256 |
ERC721InvalidApprover
approver is the zero address or is not the owner of the token.
error ERC721InvalidApprover(address approver);Parameters
| Name | Type | Description |
|---|---|---|
| approver | address |
ERC721InvalidOperator
operator is the zero address.
error ERC721InvalidOperator(address operator);Parameters
| Name | Type | Description |
|---|---|---|
| operator | address |