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

ERC721Holder

Inherits: IERC721Receiver

Implementation of the {IERC721Receiver} interface. Accepts all token transfers. Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}.

Functions

onERC721Received

See IERC721Receiver-onERC721Received. Always returns IERC721Receiver.onERC721Received.selector.

function onERC721Received(address, address, uint256, bytes memory) public virtual returns (bytes4);