Gives permission to to
to transfer tokenId
token to another account.
The approval is cleared when the token is transferred.
Only a single account can be approved at a time, so approving the zero address clears previous approvals.
Requirements:
tokenId
must exist.Emits an {Approval} event.
Approve an address to stoke a specific pyro
approved stoker
the pyro tokenId
Returns the number of tokens in owner
's account.
Returns the base URI for the PYRO token
Permanently destroy the PYRO token
the pyro tokenId
Returns if the pyro can stoke
the pyro tokenId
Returns if the two donors can stoke
pyro tokenId for donorA
pyro tokenId for donorB
Returns the rate at which MBRS are created by playing with the pyro
the id of the pyro
Returns the contract address for MBRS token
Feeds a pyro, must be between 1-255 units of hunger
the pyro tokenId
units of hunger to replenish
Returns the cap for generation 0 pyros
Returns the current count of generation 0 pyros
Returns the cost of generation
Returns the generation of a pyro
the pyro tokenId
Generate a new generation 0 pyro
the name of the new pyro
Generate a new generation 0 pyro for an address
the name of the new pyro
the owner of the pyro
Returns the account approved for tokenId
token.
Requirements:
tokenId
must exist.Returns a Pyro object
the pyro tokenId
Returns a SaleAuction for a given pyro
the pyro tokenId
Returns a StokingAuction for a given pyro
the pyro tokenId
Ignite a new pyro
the pyro tokenId
the name of the new pyro
Returns if the operator
is allowed to manage all of the assets of owner
.
Returns whether 2 pyros are a valid stoking pair
pyro tokenId for donorA
pyro tokenId for donorB
Returns the last time a pyro ate
the pyro tokenId
Returns the last time an address minted a generation 0 pyro
the address which minted
the pyro tokenId
Burn MBRS tokens in exchange for levels
the pyro tokenId
amount of levels to add
Returns the token collection name.
Returns the owner of the tokenId
token.
Requirements:
tokenId
must exist.Play with a pyro
the pyro tokenId
the pyro tokenId
Returns the cost for pyrogenesis (stoking)
the pyro tokenId
Returns the level of a pyro
the pyro tokenId
Returns a Pyro object
the pyro tokenId
Safely transfers tokenId
token from from
to to
, checking first that contract recipients
are aware of the ERC721 protocol to prevent tokens from being forever locked.
Requirements:
from
cannot be the zero address.to
cannot be the zero address.tokenId
token must exist and be owned by from
.from
, it must be have been allowed to move this token by either approve or setApprovalForAll.to
refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.Emits a {Transfer} event.
Safely transfers tokenId
token from from
to to
.
Requirements:
from
cannot be the zero address.to
cannot be the zero address.tokenId
token must exist and be owned by from
.from
, it must be approved to move this token by either approve or setApprovalForAll.to
refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.Emits a {Transfer} event.
Returns the SaleAuction contract address
Approve or remove operator
as an operator for the caller.
Operators can call transferFrom or safeTransferFrom for any token owned by the caller.
Requirements:
operator
cannot be the caller.Emits an {ApprovalForAll} event.
Set the color of a pyro
the pyro tokenId
an integer 0-7
Set the name of a pyro
the pyro tokenId
the new name of the pyro
Breeds 2 pyros
pyro tokenId for donorA
pyro tokenId for donorB
Returns the address which is allowed to stoke a pyro
the pyro tokenId
Returns the StokingAuction contract address
Returns the base cost (in satoshi) for stoking pyros
Returns true if this contract implements the interface defined by
interfaceId
. See the corresponding
https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
to learn more about how these ids are created.
This function call must use less than 30 000 gas. Defined in EIP181.
if the interface is supported
Returns the token collection symbol.
Returns a token ID at a given index
of all the tokens stored by the contract.
Use along with totalSupply to enumerate all tokens.
Returns a token ID owned by owner
at a given index
of its token list.
Use along with balanceOf to enumerate all of owner
's tokens.
Returns the Uniform Resource Identifier (URI) for tokenId
token.
Returns the total amount of tokens stored by the contract.
Transfers tokenId
token from from
to to
.
WARNING: Usage of this method is discouraged, use safeTransferFrom whenever possible.
Requirements:
from
cannot be the zero address.to
cannot be the zero address.tokenId
token must be owned by from
.from
, it must be approved to move this token by either approve or setApprovalForAll.Emits a {Transfer} event.
Generated using TypeDoc
Class which can be used to interact with the PyroPets (PYRO) token contract