ITokenERC721
SignatureMint
is an ERC 721 contract. It lets anyone mint NFTs by producing a mint request and a signature (produced by an account with MINTER_ROLE, signing the mint request).
Methods
approve
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: - The caller must own the token or be an approved operator. - tokenId
must exist. Emits an {Approval} event.
Parameters
to
address
undefined
tokenId
uint256
undefined
balanceOf
Returns the number of tokens in owner
's account.
Parameters
owner
address
undefined
Returns
balance
uint256
undefined
getApproved
Returns the account approved for tokenId
token. Requirements: - tokenId
must exist.
Parameters
tokenId
uint256
undefined
Returns
operator
address
undefined
isApprovedForAll
Returns if the operator
is allowed to manage all of the assets of owner
. See {setApprovalForAll}
Parameters
owner
address
undefined
operator
address
undefined
Returns
_0
bool
undefined
mintTo
Lets an account with MINTER_ROLE mint an NFT.
Parameters
to
address
The address to mint the NFT to.
uri
string
The URI to assign to the NFT.
Returns
_0
uint256
tokenId of the NFT minted.
mintWithSignature
Parameters
req
ITokenERC721.MintRequest
undefined
signature
bytes
undefined
Returns
_0
uint256
undefined
ownerOf
Returns the owner of the tokenId
token. Requirements: - tokenId
must exist.
Parameters
tokenId
uint256
undefined
Returns
owner
address
undefined
safeTransferFrom
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
. - If the caller is not from
, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. - If to
refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. Emits a {Transfer} event.
Parameters
from
address
undefined
to
address
undefined
tokenId
uint256
undefined
safeTransferFrom
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
. - If the caller is not from
, it must be approved to move this token by either {approve} or {setApprovalForAll}. - If to
refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. Emits a {Transfer} event.
Parameters
from
address
undefined
to
address
undefined
tokenId
uint256
undefined
data
bytes
undefined
setApprovalForAll
Approve or remove operator
as an operator for the caller. Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. Requirements: - The operator
cannot be the caller. Emits an {ApprovalForAll} event.
Parameters
operator
address
undefined
_approved
bool
undefined
supportsInterface
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.
Parameters
interfaceId
bytes4
undefined
Returns
_0
bool
undefined
transferFrom
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
. - If the caller is not from
, it must be approved to move this token by either {approve} or {setApprovalForAll}. Emits a {Transfer} event.
Parameters
from
address
undefined
to
address
undefined
tokenId
uint256
undefined
verify
Parameters
req
ITokenERC721.MintRequest
undefined
signature
bytes
undefined
Returns
success
bool
undefined
signer
address
undefined
Events
Approval
Parameters
owner indexed
address
undefined
approved indexed
address
undefined
tokenId indexed
uint256
undefined
ApprovalForAll
Parameters
owner indexed
address
undefined
operator indexed
address
undefined
approved
bool
undefined
TokensMinted
Emitted when an account with MINTER_ROLE mints an NFT.
Parameters
mintedTo indexed
address
undefined
tokenIdMinted indexed
uint256
undefined
uri
string
undefined
TokensMintedWithSignature
Emitted when tokens are minted.
Parameters
signer indexed
address
undefined
mintedTo indexed
address
undefined
tokenIdMinted indexed
uint256
undefined
mintRequest
ITokenERC721.MintRequest
undefined
Transfer
Parameters
from indexed
address
undefined
to indexed
address
undefined
tokenId indexed
uint256
undefined
Last updated