IERC1155Facet

IERC1155Facet

ERC1155Base__ArrayLengthMismatch

error ERC1155Base__ArrayLengthMismatch()

ERC1155Base__BalanceQueryZeroAddress

error ERC1155Base__BalanceQueryZeroAddress()

ERC1155Base__NotOwnerOrApproved

error ERC1155Base__NotOwnerOrApproved()

ERC1155Base__SelfApproval

error ERC1155Base__SelfApproval()

ERC1155Base__BurnExceedsBalance

error ERC1155Base__BurnExceedsBalance()

ERC1155Base__BurnFromZeroAddress

error ERC1155Base__BurnFromZeroAddress()

ERC1155Base__ERC1155ReceiverRejected

ERC1155Base__ERC1155ReceiverNotImplemented

ERC1155Base__MintToZeroAddress

ERC1155Base__TransferExceedsBalance

ERC1155Base__TransferToZeroAddress

balanceOf

query the balance of given token held by given address

Parameters

Name
Type
Description

account

address

address to query

id

uint256

token to query

Return Values

Name
Type
Description

[0]

uint256

token balance

balanceOfBatch

query the balances of given tokens held by given addresses

Parameters

Name
Type
Description

accounts

address[]

addresss to query

ids

uint256[]

tokens to query

Return Values

Name
Type
Description

[0]

uint256[]

token balances

isApprovedForAll

query approval status of given operator with respect to given address

Parameters

Name
Type
Description

account

address

address to query for approval granted

operator

address

address to query for approval received

Return Values

Name
Type
Description

[0]

bool

whether operator is approved to spend tokens held by account

setApprovalForAll

grant approval to or revoke approval from given operator to spend held tokens

Parameters

Name
Type
Description

operator

address

address whose approval status to update

status

bool

whether operator should be considered approved

safeTransferFrom

transfer tokens between given addresses, checking for ERC1155Receiver implementation if applicable

Parameters

Name
Type
Description

from

address

sender of tokens

to

address

receiver of tokens

id

uint256

token ID

amount

uint256

quantity of tokens to transfer

data

bytes

data payload

safeBatchTransferFrom

transfer batch of tokens between given addresses, checking for ERC1155Receiver implementation if applicable

Parameters

Name
Type
Description

from

address

sender of tokens

to

address

receiver of tokens

ids

uint256[]

list of token IDs

amounts

uint256[]

list of quantities of tokens to transfer

data

bytes

data payload

totalSupply

query total minted supply of given token

Parameters

Name
Type
Description

id

uint256

token id to query

Return Values

Name
Type
Description

[0]

uint256

token supply

Was this helpful?