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

ERC721ReceiverMock

Inherits: IERC721Receiver

State Variables

_retval

bytes4 private immutable _retval;

_error

RevertType private immutable _error;

Functions

constructor

constructor(bytes4 retval, RevertType error);

onERC721Received

function onERC721Received(address operator, address from, uint256 tokenId, bytes memory data) public returns (bytes4);

Events

Received

event Received(address operator, address from, uint256 tokenId, bytes data, uint256 gas);

Errors

CustomError

error CustomError(bytes4);

Enums

RevertType

enum RevertType {
    None,
    RevertWithoutMessage,
    RevertWithMessage,
    RevertWithCustomError,
    Panic
}