ERC721
Inherits: IERC721
Title: ERC721
Author: Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/ERC721.sol)
Stateless Diamond facet for the ERC-721 Non-Fungible Token standard.
All logic lives in ERC721Lib. This contract is a pure delegator.
transferFrom and both safeTransferFrom overloads are the movement selectors a movement-replacing
extension replaces; only one such extension per diamond (D25, #234).
Notes:
- lattice-version: 0.1.0
- lattice-source: OpenZeppelin v5.6.1
Functions
name
Returns the token name.
function name() public view virtual returns (string memory);Returns
| Name | Type | Description |
|---|---|---|
| <none> | string |
symbol
Returns the token symbol.
function symbol() public view virtual returns (string memory);Returns
| Name | Type | Description |
|---|---|---|
| <none> | string |
tokenURI
Returns the Uniform Resource Identifier (URI) for tokenId token.
function tokenURI(uint256 tokenId) public view virtual returns (string memory);Parameters
| Name | Type | Description |
|---|---|---|
| tokenId | uint256 |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | string |
balanceOf
Returns the number of tokens owned by owner.
function balanceOf(address owner) public view virtual returns (uint256);Parameters
| Name | Type | Description |
|---|---|---|
| owner | address |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | uint256 |
ownerOf
Returns the owner of the tokenId token.
function ownerOf(uint256 tokenId) public view virtual returns (address);Parameters
| Name | Type | Description |
|---|---|---|
| tokenId | uint256 |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | address |
getApproved
Returns the address approved for tokenId.
function getApproved(uint256 tokenId) public view virtual returns (address);Parameters
| Name | Type | Description |
|---|---|---|
| tokenId | uint256 |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | address |
isApprovedForAll
Returns true if operator is approved to manage all of owner's assets.
function isApprovedForAll(address owner, address operator) public view virtual returns (bool);Parameters
| Name | Type | Description |
|---|---|---|
| owner | address | |
| operator | address |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | bool |
approve
Approves to to transfer tokenId on behalf of the caller.
function approve(address to, uint256 tokenId) public virtual;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) public virtual;Parameters
| Name | Type | Description |
|---|---|---|
| operator | address | |
| approved | bool |
transferFrom
Transfers tokenId from from to to without safety checks.
function transferFrom(address from, address to, uint256 tokenId) public virtual;Parameters
| Name | Type | Description |
|---|---|---|
| from | address | |
| to | address | |
| tokenId | uint256 |
safeTransferFrom
Safely transfers tokenId from from to to.
function safeTransferFrom(address from, address to, uint256 tokenId) public virtual;Parameters
| Name | Type | Description |
|---|---|---|
| from | address | |
| to | address | |
| tokenId | uint256 |
safeTransferFrom
Safely transfers tokenId from from to to with additional data.
function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) public virtual;Parameters
| Name | Type | Description |
|---|---|---|
| from | address | |
| to | address | |
| tokenId | uint256 | |
| data | bytes |
exportSelectors
ERC-8153 selector export: this facet's cuttable selectors, tightly packed (4 bytes each).
Excludes exportSelectors() itself (0x0ef22643) - it is never cut into a diamond. Order matches
forge inspect ERC721 methodIdentifiers (alphabetical by signature); kept in exact parity by
ExportSelectorsParityTest. Chunks:
approve(address,uint256) 0x095ea7b3
balanceOf(address) 0x70a08231
getApproved(uint256) 0x081812fc
isApprovedForAll(address,address) 0xe985e9c5
name() 0x06fdde03
ownerOf(uint256) 0x6352211e
safeTransferFrom(address,address,uint256) 0x42842e0e
safeTransferFrom(address,address,uint256,bytes) 0xb88d4fde
setApprovalForAll(address,bool) 0xa22cb465
symbol() 0x95d89b41
tokenURI(uint256) 0xc87b56dd
transferFrom(address,address,uint256) 0x23b872dd
function exportSelectors() external pure virtual returns (bytes memory selectors);Returns
| Name | Type | Description |
|---|---|---|
| selectors | bytes |