ERC1155Lib
ERC1155Lib
derived from https://github.com/OpenZeppelin/openzeppelin-contracts/ (MIT license)
TransferSingle
TransferBatch
ApprovalForAll
_balanceOf
query the balance of given token held by given address
Parameters
account
address
address to query
id
uint256
token to query
Return Values
[0]
uint256
token balance
_mint
mint given quantity of tokens for given address
ERC1155Receiver implementation is not checked
Parameters
account
address
beneficiary of minting
id
uint256
token ID
amount
uint256
quantity of tokens to mint
data
bytes
data payload
_safeMint
mint given quantity of tokens for given address
Parameters
account
address
beneficiary of minting
id
uint256
token ID
amount
uint256
quantity of tokens to mint
data
bytes
data payload
_mintBatch
mint batch of tokens for given address
ERC1155Receiver implementation is not checked
Parameters
account
address
beneficiary of minting
ids
uint256[]
list of token IDs
amounts
uint256[]
list of quantities of tokens to mint
data
bytes
data payload
_safeMintBatch
mint batch of tokens for given address
Parameters
account
address
beneficiary of minting
ids
uint256[]
list of token IDs
amounts
uint256[]
list of quantities of tokens to mint
data
bytes
data payload
_burn
burn given quantity of tokens held by given address
Parameters
account
address
holder of tokens to burn
id
uint256
token ID
amount
uint256
quantity of tokens to burn
_burnBatch
burn given batch of tokens held by given address
Parameters
account
address
holder of tokens to burn
ids
uint256[]
token IDs
amounts
uint256[]
quantities of tokens to burn
_transfer
transfer tokens between given addresses
ERC1155Receiver implementation is not checked
Parameters
operator
address
executor of transfer
sender
address
sender of tokens
recipient
address
receiver of tokens
id
uint256
token ID
amount
uint256
quantity of tokens to transfer
data
bytes
data payload
_safeTransfer
transfer tokens between given addresses
Parameters
operator
address
executor of transfer
sender
address
sender of tokens
recipient
address
receiver of tokens
id
uint256
token ID
amount
uint256
quantity of tokens to transfer
data
bytes
data payload
_transferBatch
transfer batch of tokens between given addresses
ERC1155Receiver implementation is not checked
Parameters
operator
address
executor of transfer
sender
address
sender of tokens
recipient
address
receiver of tokens
ids
uint256[]
token IDs
amounts
uint256[]
quantities of tokens to transfer
data
bytes
data payload
_safeTransferBatch
transfer batch of tokens between given addresses
Parameters
operator
address
executor of transfer
sender
address
sender of tokens
recipient
address
receiver of tokens
ids
uint256[]
token IDs
amounts
uint256[]
quantities of tokens to transfer
data
bytes
data payload
_beforeTokenTransfer
ERC1155 hook, called before all transfers including mint and burn
function should be overridden and new implementation must call super called for both single and batch transfers
Parameters
operator
address
executor of transfer
from
address
sender of tokens
to
address
receiver of tokens
ids
uint256[]
token IDs
amounts
uint256[]
quantities of tokens to transfer
data
bytes
data payload
_balanceOfBatch
query the balances of given tokens held by given addresses
Parameters
accounts
address[]
addresss to query
ids
uint256[]
tokens to query
Return Values
[0]
uint256[]
token balances
totalSupply
query total minted supply of given token
Parameters
id
uint256
token id to query
Return Values
[0]
uint256
token supply
isApprovedForAll
Was this helpful?