Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

IERC1155Errors

Standard ERC-1155 Errors Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens.

Errors

ERC1155InsufficientBalance

Indicates an error related to the current balance of a sender. Used in transfers.

error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);

Parameters

NameTypeDescription
senderaddressAddress whose tokens are being transferred.
balanceuint256Current balance for the interacting account.
neededuint256Minimum amount required to perform a transfer.
tokenIduint256Identifier number of a token.

ERC1155InvalidSender

Indicates a failure with the token sender. Used in transfers.

error ERC1155InvalidSender(address sender);

Parameters

NameTypeDescription
senderaddressAddress whose tokens are being transferred.

ERC1155InvalidReceiver

Indicates a failure with the token receiver. Used in transfers.

error ERC1155InvalidReceiver(address receiver);

Parameters

NameTypeDescription
receiveraddressAddress to which tokens are being transferred.

ERC1155MissingApprovalForAll

Indicates a failure with the operator’s approval. Used in transfers.

error ERC1155MissingApprovalForAll(address operator, address owner);

Parameters

NameTypeDescription
operatoraddressAddress that may be allowed to operate on tokens without being their owner.
owneraddressAddress of the current owner of a token.

ERC1155InvalidApprover

Indicates a failure with the approver of a token to be approved. Used in approvals.

error ERC1155InvalidApprover(address approver);

Parameters

NameTypeDescription
approveraddressAddress initiating an approval operation.

ERC1155InvalidOperator

Indicates a failure with the operator to be approved. Used in approvals.

error ERC1155InvalidOperator(address operator);

Parameters

NameTypeDescription
operatoraddressAddress that may be allowed to operate on tokens without being their owner.

ERC1155InvalidArrayLength

Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. Used in batch transfers.

error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);

Parameters

NameTypeDescription
idsLengthuint256Length of the array of token identifiers
valuesLengthuint256Length of the array of token amounts