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

IERC721Errors

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

Errors

ERC721InvalidOwner

Indicates that an address can't be an owner. For example, address(0) is a forbidden owner in ERC-20. Used in balance queries.

error ERC721InvalidOwner(address owner);

Parameters

NameTypeDescription
owneraddressAddress of the current owner of a token.

ERC721NonexistentToken

Indicates a tokenId whose owner is the zero address.

error ERC721NonexistentToken(uint256 tokenId);

Parameters

NameTypeDescription
tokenIduint256Identifier number of a token.

ERC721IncorrectOwner

Indicates an error related to the ownership over a particular token. Used in transfers.

error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);

Parameters

NameTypeDescription
senderaddressAddress whose tokens are being transferred.
tokenIduint256Identifier number of a token.
owneraddressAddress of the current owner of a token.

ERC721InvalidSender

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

error ERC721InvalidSender(address sender);

Parameters

NameTypeDescription
senderaddressAddress whose tokens are being transferred.

ERC721InvalidReceiver

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

error ERC721InvalidReceiver(address receiver);

Parameters

NameTypeDescription
receiveraddressAddress to which tokens are being transferred.

ERC721InsufficientApproval

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

error ERC721InsufficientApproval(address operator, uint256 tokenId);

Parameters

NameTypeDescription
operatoraddressAddress that may be allowed to operate on tokens without being their owner.
tokenIduint256Identifier number of a token.

ERC721InvalidApprover

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

error ERC721InvalidApprover(address approver);

Parameters

NameTypeDescription
approveraddressAddress initiating an approval operation.

ERC721InvalidOperator

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

error ERC721InvalidOperator(address operator);

Parameters

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