Sets or unsets the approval of a given operator An operator is allowed to transfer all tokens of the sender on their behalf
Parameters
Name
Type
Description
operator
address
address to set the approval
approved
bool
representing the status of the approval to be set
isApprovedForAll
Queries the approval status of an operator for a given owner.
Parameters
Name
Type
Description
owner
address
The owner of the Tokens
operator
address
Address of authorized operator
Return Values
Name
Type
Description
[0]
bool
True if the operator is approved, false if not
safeTransferFrom
Transfers value amount of an id from the from address to the to address specified. Caller must be approved to manage the tokens being transferred out of the from account. If to is a smart contract, will call onERC1155Received on to and act appropriately.
Parameters
Name
Type
Description
from
address
Source address
to
address
Target address
id
uint256
ID of the token type
value
uint256
Transfer amount
data
bytes
Data forwarded to onERC1155Received if to is a contract receiver
safeBatchTransferFrom
Transfers values amount(s) of ids from the from address to the to address specified. Caller must be approved to manage the tokens being transferred out of the from account. If to is a smart contract, will call onERC1155BatchReceived on to and act appropriately.
Parameters
Name
Type
Description
from
address
Source address
to
address
Target address
ids
uint256[]
IDs of each token type
values
uint256[]
Transfer amounts per token type
data
bytes
Data forwarded to onERC1155Received if to is a contract receiver
_mint
Internal function to mint an amount of a token with the given ID
Parameters
Name
Type
Description
to
address
The address that will own the minted token
id
uint256
ID of the token to be minted
value
uint256
Amount of the token to be minted
data
bytes
Data forwarded to onERC1155Received if to is a contract receiver
_batchMint
Internal function to batch mint amounts of tokens with the given IDs
Parameters
Name
Type
Description
to
address
The address that will own the minted token
ids
uint256[]
IDs of the tokens to be minted
values
uint256[]
Amounts of the tokens to be minted
data
bytes
Data forwarded to onERC1155Received if to is a contract receiver
_burn
Internal function to burn an amount of a token with the given ID
Parameters
Name
Type
Description
owner
address
Account which owns the token to be burnt
id
uint256
ID of the token to be burnt
value
uint256
Amount of the token to be burnt
_batchBurn
Internal function to batch burn an amounts of tokens with the given IDs