ERC721Logic
ERC721Logic¶
_onInitialize(bool isConstructor, bytes initData) → bool (internal)¶
_init(bytes data) (internal)¶
mint(address to, uint256 tokenId) → bool (public)¶
Function to mint tokens
mintAndSetTokenURI(address to, uint256 tokenId, string uri) → bool (public)¶
setTokenURI(uint256 tokenId, string uri) (public)¶
_safeTransfer(address from, address to, uint256 tokenId, bytes _data) (internal)¶
Override internal _safeTransfer to ensure _data gets passed to extensions.
_burn(uint256 tokenId) (internal)¶
supportsInterface(bytes4 interfaceId) → bool (public)¶
tokenURI(uint256 tokenId) → string (public)¶
setContractURI(string uri) (public)¶
contractURI() → string (public)¶
_beforeTokenTransfer(address from, address to, uint256 tokenId) (internal)¶
Hook that is called before any token transfer. This includes minting and burning.
Calling conditions:
- When
fromandtoare both non-zero,from‘stokenIdwill be transferred toto. - When
fromis zero,tokenIdwill be minted forto. - When
tois zero,from‘stokenIdwill be burned. fromandtoare never both zero.
To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
_afterTokenTransfer(address from, address to, uint256 tokenId) (internal)¶
Hook that is called after any transfer of tokens. This includes minting and burning.
Calling conditions:
- when
fromandtoare both non-zero. fromandtoare never both zero.
To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].