Skip to main content

ERC721HolderUpgradeable

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}.

Methods

onERC721Received

function onERC721Received(address, address, uint256, bytes) external nonpayable returns (bytes4)

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

Parameters

NameTypeDescription
_0addressundefined
_1addressundefined
_2uint256undefined
_3bytesundefined

Returns

NameTypeDescription
_0bytes4undefined

Events

Initialized

event Initialized(uint8 version)

Parameters

NameTypeDescription
versionuint8undefined