wNFT1155
Wrapper contract for original ERC-1155 collection contract
_owners
Mapping from token ID to owner address
InvalidTokenId
Trigged when non existing tokenId
is queried
Parameters
tokenId
uint256
Token identifier
MultipleOwnersNotAllowed
Trigged when minting of already minted ERC-1155 token is attempted This is due to limitation of the sistem that only unique (non-fungible) tokens are supported by protocol
Parameters
tokenId
uint256
Token identifier
initialize
Initializer method
Parameters
renfter_
address
renfter
contract address
uri
balanceOf
Please be aware that balanceOf
may be invalid due to token not being moved immitiatly after rent expiration but only after token is rented again or resetOwnership
is called
_See {IERC1155-balanceOf}.
Requirements:
account
cannot be the zero address._
balanceOfBatch
Please be aware that balanceOf
may be invalid due to token not being moved immitiatly after rent expiration but only after token is rented again or resetOwnership
is called
_See {IERC1155-balanceOfBatch}.
Requirements:
accounts
andids
must have the same length._
safeTransferFrom
See {IERC1155-safeTransferFrom}.
safeBatchTransferFrom
See {IERC1155-safeBatchTransferFrom}.
adminTransfer
Transfers tokenId
from current owner to to
Parameters
to
address
Receiver address
tokenId
uint256
Token identifier
mint
Mints new token
Parameters
to
address
Address token is minted for
tokenId
uint256
Token identifier
amount
uint256
Amount of tokens minted
burn
Burns token from owners account
Parameters
tokenId
uint256
Token identifier
amount
uint256
Amount of token burnt
exists
Checks if token with passed ID exists
Return Values
[0]
bool
Flag determinating if token exists
ownerOf
Returns owner of token with given identifier
Parameters
tokenId
uint256
Token identifier
Return Values
[0]
address
Owner address
_beforeTokenTransfer
_afterTokenTransfer
_Hook that is called after any token transfer. This includes minting and burning, as well as batched variants.
The same hook is called on both single and batched variants. For single transfers, the length of the id
and amount
arrays will be 1.
Calling conditions (for each id
and amount
pair):
When
from
andto
are both non-zero,amount
offrom
's tokens of token typeid
will be transferred toto
.When
from
is zero,amount
tokens of token typeid
will be minted forto
.when
to
is zero,amount
offrom
's tokens of token typeid
will be burned.from
andto
are never both zero.ids
andamounts
have the same, non-zero length.
To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]._
Last updated