ITokenERC1155
SignatureMint1155
is an ERC 1155 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
balanceOf
Returns the amount of tokens of token type id
owned by account
. Requirements: - account
cannot be the zero address.
Parameters
account
address
undefined
id
uint256
undefined
Returns
_0
uint256
undefined
balanceOfBatch
xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. Requirements: - accounts
and ids
must have the same length.
Parameters
accounts
address[]
undefined
ids
uint256[]
undefined
Returns
_0
uint256[]
undefined
isApprovedForAll
Returns true if operator
is approved to transfer account
's tokens. See {setApprovalForAll}.
Parameters
account
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.
tokenId
uint256
The tokenId of the NFTs to mint
uri
string
The URI to assign to the NFT.
amount
uint256
The number of copies of the NFT to mint.
mintWithSignature
Parameters
req
ITokenERC1155.MintRequest
undefined
signature
bytes
undefined
safeBatchTransferFrom
xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. Emits a {TransferBatch} event. Requirements: - ids
and amounts
must have the same length. - If to
refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the acceptance magic value.
Parameters
from
address
undefined
to
address
undefined
ids
uint256[]
undefined
amounts
uint256[]
undefined
data
bytes
undefined
safeTransferFrom
Transfers amount
tokens of token type id
from from
to to
. Emits a {TransferSingle} event. Requirements: - to
cannot be the zero address. - If the caller is not from
, it must have been approved to spend from
's tokens via {setApprovalForAll}. - from
must have a balance of tokens of type id
of at least amount
. - If to
refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the acceptance magic value.
Parameters
from
address
undefined
to
address
undefined
id
uint256
undefined
amount
uint256
undefined
data
bytes
undefined
setApprovalForAll
Grants or revokes permission to operator
to transfer the caller's tokens, according to approved
, Emits an {ApprovalForAll} event. Requirements: - operator
cannot be the caller.
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
verify
Parameters
req
ITokenERC1155.MintRequest
undefined
signature
bytes
undefined
Returns
success
bool
undefined
signer
address
undefined
Events
ApprovalForAll
Parameters
account 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
quantityMinted
uint256
undefined
TokensMintedWithSignature
Emitted when tokens are minted.
Parameters
signer indexed
address
undefined
mintedTo indexed
address
undefined
tokenIdMinted indexed
uint256
undefined
mintRequest
ITokenERC1155.MintRequest
undefined
TransferBatch
Parameters
operator indexed
address
undefined
from indexed
address
undefined
to indexed
address
undefined
ids
uint256[]
undefined
values
uint256[]
undefined
TransferSingle
Parameters
operator indexed
address
undefined
from indexed
address
undefined
to indexed
address
undefined
id
uint256
undefined
value
uint256
undefined
URI
Parameters
value
string
undefined
id indexed
uint256
undefined
Last updated