I'm trying to get my onERC721Received
function to revert with a super obvious require
statement failure but it seems to go through and transfer the ERC721.
I've tried other things like comparing the operator
or from
address to msg.sender
and trying both !=
and ==
just to try to get it to revert and nothing seems to work.
contract Reject is IERC721Receiver {
function onERC721Received(address operator, address from, uint256 tokenId, bytes memory) public override returns(bytes4) {
require(true == false, "true not false, duh");
return bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"));
}
}
This function should definitely be able to revert, right?