ERC721Token
contract ERC721Token
See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md.
Source: token/ERC721/ERC721Token.sol
Index
Reference
Functions
_burn
function _burn(address _owner, uint256 _tokenId) internal
Reverts if the token does not exist.
- Parameters:
_owner
- owner of the token to burn_tokenId
- uint256 ID of the token being burned by the msg.sender
_mint
function _mint(address _to, uint256 _tokenId) internal
Reverts if the given token ID already exists.
- Parameters:
_to
- address the beneficiary that will own the minted token_tokenId
- uint256 ID of the token to be minted by the msg.sender
_setTokenURI
function _setTokenURI(uint256 _tokenId, string _uri) internal
Reverts if the token ID does not exist.
- Parameters:
_tokenId
- uint256 ID of the token to set its URI_uri
- string URI to assign
addTokenTo
function addTokenTo(address _to, uint256 _tokenId) internal
Internal function to add a token ID to the list of a given address.
- Parameters:
_to
- address representing the new owner of the given token ID_tokenId
- uint256 ID of the token to be added to the tokens list of the given address
fallback
function (string _name, string _symbol) public
Constructor function.
- Parameters:
_name
- string_symbol
- string
name
function name() public view returns (string)
Gets the token name.
- Returns:
- string representing the token name
removeTokenFrom
function removeTokenFrom(address _from, uint256 _tokenId) internal
Internal function to remove a token ID from the list of a given address.
- Parameters:
_from
- address representing the previous owner of the given token ID_tokenId
- uint256 ID of the token to be removed from the tokens list of the given address
symbol
function symbol() public view returns (string)
Gets the token symbol.
- Returns:
- string representing the token symbol
tokenByIndex
function tokenByIndex(uint256 _index) public view returns (uint256)
Reverts if the index is greater or equal to the total number of tokens.
- Parameters:
_index
- uint256 representing the index to be accessed of the tokens list- Returns:
- uint256 token ID at the given index of the tokens list
tokenOfOwnerByIndex
function tokenOfOwnerByIndex(address _owner, uint256 _index) public view returns (uint256)
Gets the token ID at a given index of the tokens list of the requested owner.
- Parameters:
_owner
- address owning the tokens list to be accessed_index
- uint256 representing the index to be accessed of the requested tokens list- Returns:
- uint256 token ID at the given index of the tokens list owned by the requested address
tokenURI
function tokenURI(uint256 _tokenId) public view returns (string)
Throws if the token ID does not exist. May return an empty string.
- Parameters:
_tokenId
- uint256 ID of the token to query- Returns:
- string
totalSupply
function totalSupply() public view returns (uint256)
Gets the total amount of tokens stored by the contract.
- Returns:
- uint256 representing the total amount of tokens