ERC721Token
Index
Reference
Modifiers
onlyOwnerOf
modifier onlyOwnerOf(uint256 _tokenId)
Guarantees msg.sender is owner of the given token.
- Parameters:
_tokenId
- uint256 ID of the token to validate its ownership belongs to msg.sender
Functions
_burn
function _burn(uint256 _tokenId) internal
Burns a specific token.
- Modifiers:
- onlyOwnerOf
- Parameters:
_tokenId
- uint256 ID of the token being burned by the msg.sender
_mint
function _mint(address _to, uint256 _tokenId) internal
Mint token function.
- Parameters:
_to
- The address that will own the minted token_tokenId
- uint256 ID of the token to be minted by the msg.sender
approve
function approve(address _to, uint256 _tokenId) public
Approves another address to claim for the ownership of the given token ID.
- Modifiers:
- onlyOwnerOf
- Parameters:
_to
- address to be approved for the given token ID_tokenId
- uint256 ID of the token to be approved
approvedFor
function approvedFor(uint256 _tokenId) public view returns (address)
Gets the approved address to take ownership of a given token ID.
- Parameters:
_tokenId
- uint256 ID of the token to query the approval of- Returns:
- address currently approved to take ownership of the given token ID
balanceOf
function balanceOf(address _owner) public view returns (uint256)
Gets the balance of the specified address.
- Parameters:
_owner
- address to query the balance of- Returns:
- uint256 representing the amount owned by the passed address
clearApprovalAndTransfer
function clearApprovalAndTransfer(address _from, address _to, uint256 _tokenId) internal
Internal function to clear current approval and transfer the ownership of a given token ID.
- Parameters:
_from
- address which you want to send tokens from_to
- address which you want to transfer the token to_tokenId
- uint256 ID of the token to be transferred
isApprovedFor
function isApprovedFor(address _owner, uint256 _tokenId) internal view returns (bool)
Tells whether the msg.sender is approved for the given token ID or not This function is not private so it can be extended in further implementations like the operatable ERC721.
- Parameters:
_owner
- address of the owner to query the approval of_tokenId
- uint256 ID of the token to query the approval of- Returns:
- bool whether the msg.sender is approved for the given token ID or not
ownerOf
function ownerOf(uint256 _tokenId) public view returns (address)
Gets the owner of the specified token ID.
- Parameters:
_tokenId
- uint256 ID of the token to query the owner of- Returns:
- owner address currently marked as the owner of the given token ID
takeOwnership
function takeOwnership(uint256 _tokenId) public
Claims the ownership of a given token ID.
- Parameters:
_tokenId
- uint256 ID of the token being claimed by the msg.sender
tokensOf
function tokensOf(address _owner) public view returns (uint256[])
Gets the list of tokens owned by a given address.
- Parameters:
_owner
- address to query the tokens of- Returns:
- uint256[] representing the list of tokens owned by the passed address
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
transfer
function transfer(address _to, uint256 _tokenId) public
Transfers the ownership of a given token ID to another address.
- Modifiers:
- onlyOwnerOf
- Parameters:
_to
- address to receive the ownership of the given token ID_tokenId
- uint256 ID of the token to be transferred