1

Hello I'm trying to call the function fulfillBasicOrder of the Seaport Contract and I keep getting that it has failed without any further informations. Does someone know what I might do wrong ? This is my function in my contract:

function fulfill() public {
      address seaportContract = 0x00000000006c3852cbEf3e08E8dF289169EdE581;
      emit DataOrder(dataOrder);
      (bool success, bytes memory result) = seaportContract.call(abi.encodeWithSignature("fulfillBasicOrder(address,uint256,uint256,address,address,address,uint256,uint256,uint8,uint256,uint256,bytes32,uint256,bytes32,bytes32,uint256,tuple[],bytes)", dataOrder));
      require(success, "call to Seaport contract failed");
  }

The dataOrder is: 0xfb0f3ee1000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a9ad778a79000000000000000000000000000192ae5441d992f5351f4da1033beac0d60ea2f4f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f8f08655cb546ec2177dd9e44f5524f1a590badc000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000063fd242700000000000000000000000000000000000000000000000000000000642200170000000000000000000000000000000000000000000000000000000000000000360c6ebe00000000000000000000000000000000000000000f8e1c8b752c34740000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000da475abf0000000000000000000000000000000a26b00c1f0df003000390027140000faa7190000000000000000000000000000000000000000000000000000000000000041d74c626a1a7e9981452259f6b9bf3677913f050324da187ac178a0d6a6067495255c59c854310761b935a3903cd655c921fcdc1721424c0c4f3b68b66df6da6b1c00000000000000000000000000000000000000000000000000000000000000

1 Answer 1

0

It looks like dataOrder already includes the function selector.

The selector is a 4-bytes element at the start of calldata with the information of the function to call. dataOrder's selector is 0xfb0f3ee1 which should be the right one for fulfillBasicOrder.

When using abi.encodeWithSignature(...) you add an additional selector, which messes things up.

Basically try the following:

      (bool success, bytes memory result) = seaportContract.call(dataOrder);
3
  • Ive tried it and I still have a failed transaction :/ goerli.etherscan.io/tx/… , the problem is that its hard to see whats going on as there a not much informations, do you think you might help me on Discord, Ive sent you a request :)
    – MM1
    Mar 1, 2023 at 23:56
  • Now you're sending only the selector. Use all the dataOrder you posted in your question
    – 0xSanson
    Mar 2, 2023 at 17:52
  • @MM1 if you are using hardhat you might try installing hardhat-tracer and do a --fulltrace on your call. it will show you how all the call()s are executed. If you don't have hardhat then use debug.traceTransaction() , but it will be a little bit harder to process the results
    – Nulik
    Mar 2, 2023 at 21:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.