ERC721ReceiverMock
ERC721ReceiverMock
Error
enum Error {
NONE,
REVERT_WITH_MESSAGE,
REVERT_WITHOUT_MESSAGE,
PANIC
}
_retval
bytes4 _retval
_error
enum ERC721ReceiverMock.Error _error
Received
event Received(address operator, address from, uint256 tokenId, bytes data)
constructor
constructor(bytes4 retval, enum ERC721ReceiverMock.Error error) public
onERC721Received
function onERC721Received(address operator, address from, uint256 tokenId, bytes data) public returns (bytes4)
_Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} by `operator` from `from`, this function is called.
It must return its Solidity selector to confirm the token transfer. If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`._