You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Approves another address to transfer the given token ID The zero address indicates there is no approved address. There can only be one approved address per token at a given time. Can only be called by the token owner or an approved operator.
Inputs
Type
Name
Description
0
address
to
address to be approved for the given token ID
1
uint256
tokenId
uint256 ID of the token to be approved
balanceOf(address)
Gets the balance of the specified address
Inputs
Type
Name
Description
0
address
owner
address to query the balance of
Outputs
Type
Name
Description
0
uint256
constructor(string,string)
Inputs
Type
Name
Description
0
string
name
1
string
symbol
getApproved(uint256)
Gets the approved address for a token ID, or zero if no address set Reverts if the token ID does not exist.
Inputs
Type
Name
Description
0
uint256
tokenId
uint256 ID of the token to query the approval of
Outputs
Type
Name
Description
0
address
initiateSunset(uint256)
Initiate a sunset. Sets sunsetInitiatedAt to current timestamp. Only owner may call this function.
Inputs
Type
Name
Description
0
uint256
tokenId
The id of the token
isApprovedForAll(address,address)
Tells whether an operator is approved by a given owner
Inputs
Type
Name
Description
0
address
owner
owner address which you want to query the approval of
1
address
operator
operator address which you want to query the approval of
Outputs
Type
Name
Description
0
bool
isOwner()
Outputs
Type
Name
Description
0
bool
mint(address,string,uint256)
Mint a token. Only owner may call this function.
Inputs
Type
Name
Description
0
address
to
The receiver of the token
1
string
tokenURI
The tokenURI of the the tokenURI
2
uint256
__sunsetLength
The length (in seconds) that a sunset period can last
name()
Gets the token name
Outputs
Type
Name
Description
0
string
nextTokenId()
Returns the token id of the next minted token
Outputs
Type
Name
Description
0
uint256
owner()
Outputs
Type
Name
Description
0
address
ownerOf(uint256)
Gets the owner of the specified token ID
Inputs
Type
Name
Description
0
uint256
tokenId
uint256 ID of the token to query the owner of
Outputs
Type
Name
Description
0
address
OwnershipTransferred(address,address)
Inputs
Type
Name
Description
Indexed?
0
address
previousOwner
true
1
address
newOwner
true
redemptionCodeHash(uint256)
Returns the redemption code hash submitted for a token
Inputs
Type
Name
Description
0
uint256
tokenId
The token id
Outputs
Type
Name
Description
0
bytes32
RedemptionCodeHashSubmitted(uint256,bytes32)
Inputs
Type
Name
Description
Indexed?
0
uint256
tokenId
true
1
bytes32
redemptionCodeHash
false
redemptionCodeHashSubmittedAt(uint256)
Returns the timestamp at which a redemption code hash was submitted
Inputs
Type
Name
Description
0
uint256
tokenId
The token id
Outputs
Type
Name
Description
0
uint256
renounceOwnership()
Allows the current owner to relinquish control of the contract.
safeTransferFrom(address,address,uint256,bytes)
Safely transfers the ownership of a given token ID to another address If the target address is a contract, it must implement onERC721Received, which is called upon a safe transfer, and return the magic value bytes4(keccak256("onERC721Received(address,address,uint256,bytes)")); otherwise, the transfer is reverted. Requires the msg sender to be the owner, approved, or operator
Inputs
Type
Name
Description
0
address
from
current owner of the token
1
address
to
address to receive the ownership of the given token ID
2
uint256
tokenId
uint256 ID of the token to be transferred
3
bytes
_data
bytes data to send along with a safe transfer check
safeTransferFrom(address,address,uint256)
Safely transfers the ownership of a given token ID to another address If the target address is a contract, it must implement onERC721Received, which is called upon a safe transfer, and return the magic value bytes4(keccak256("onERC721Received(address,address,uint256,bytes)")); otherwise, the transfer is reverted. * Requires the msg sender to be the owner, approved, or operator
Inputs
Type
Name
Description
0
address
from
current owner of the token
1
address
to
address to receive the ownership of the given token ID
2
uint256
tokenId
uint256 ID of the token to be transferred
setApprovalForAll(address,bool)
Sets or unsets the approval of a given operator An operator is allowed to transfer all tokens of the sender on their behalf
Inputs
Type
Name
Description
0
address
to
operator address to set the approval
1
bool
approved
representing the status of the approval to be set
setTokenURI(uint256,string)
Set tokenUri. Only owner may do this.
Inputs
Type
Name
Description
0
uint256
tokenId
The id of the token
1
string
tokenURI
The token URI
submitRedemptionCodeHash(uint256,bytes32)
Submit a redemption code hash for a specific token. Burns the token. Sets redemptionCodeHashSubmittedAt to current timestamp. Decreases totalSupply by 1.
Inputs
Type
Name
Description
0
uint256
tokenId
The id of the token
1
bytes32
__redemptionCodeHash
The redemption code hash
SunsetInitiated(uint256)
Inputs
Type
Name
Description
Indexed?
0
uint256
tokenId
true
sunsetInitiatedAt(uint256)
Returns the timestamp at which a token's sunset was initated. Returns 0 if no sunset has been initated.
Inputs
Type
Name
Description
0
uint256
tokenId
The token id
Outputs
Type
Name
Description
0
uint256
sunsetLength(uint256)
Returns the sunset length of a token
Inputs
Type
Name
Description
0
uint256
tokenId
The token id
Outputs
Type
Name
Description
0
uint256
supportsInterface(bytes4)
implement supportsInterface(bytes4) using a lookup table
Inputs
Type
Name
Description
0
bytes4
interfaceId
Outputs
Type
Name
Description
0
bool
symbol()
Gets the token symbol
Outputs
Type
Name
Description
0
string
tokenURI(uint256)
Returns an URI for a given token ID Throws if the token ID does not exist. May return an empty string.
Inputs
Type
Name
Description
0
uint256
tokenId
uint256 ID of the token to query
Outputs
Type
Name
Description
0
string
totalSupply()
Returns the total number of tokens (minted - burned) registered
Outputs
Type
Name
Description
0
uint256
Transfer(address,address,uint256)
Inputs
Type
Name
Description
Indexed?
0
address
from
true
1
address
to
true
2
uint256
tokenId
true
transferFrom(address,address,uint256)
Transfers the ownership of a given token ID to another address. Usage of this method is discouraged, use safeTransferFrom whenever possible. Requires the msg sender to be the owner, approved, or operator
Inputs
Type
Name
Description
0
address
from
current owner of the token
1
address
to
address to receive the ownership of the given token ID
2
uint256
tokenId
uint256 ID of the token to be transferred
transferOwnership(address)
Allows the current owner to transfer control of the contract to a newOwner.