ProjectOpenSea/seaport

Seaport basic order fulfillment failed or not verifying signature

umeraqeel786 opened this issue · 1 comments

Hi @seaport devs I need your help.

I have been stuck in an issue. I have been using Opensea Seaport contracts order settlement. All stuff is done except signature verification

I have created offchain order signature when I pass the signature onchain with order parameters for order fulfillment It give me this error

fulfillBasicOrder errored: Returned error: {"jsonrpc":"2.0","error":"execution reverted","id":6198412666664724}

Further, I m giving below my onchain tuple and onchain script please help me out where is the issue.

OnChain tuple :

["0x0000000000000000000000000000000000000000", 0, 400000000000000, "0x8c8e240C723F5F850c6fdfD04a1B08598DaF6B53", "0x0000000000000000000000000000000000000000", "0xB781b1CA50D95A79C87020ADA9796Debc8Fe020E", 1, 1, 0, 1661850138, 1761850138, "0x0000000000000000000000000000000000000000000000000000000000000000", 94959087765255511, "0x8c8e240C723F5F850c6fdfD04a1B08598DaF6B53000000000000000000000000", "0x8c8e240C723F5F850c6fdfD04a1B08598DaF6B53000000000000000000000000", 1, [[200000000000000,"0x0000a26b00c1F0DF003000390027140000fAa719"]], "0x0f93a29990a44ebfd3154676cc969dcac44b6c07ae57465b2a753f20851994b177835e42c3badbe531fb2d7402844e5183577c6c1509b3b596f62ae0255d2ded1b"] 

And Offchain signature script is :

const msgParams = {
      domain: {
        name: 'Consideration',
        version: '1.4',
        chainId: chainId.toString(),
        verifyingContract: '0x9eD85E6753C1C13B7694c0387678825C38b72e23',

      },
      message: {
        offerer: '0x8c8e240C723F5F850c6fdfD04a1B08598DaF6B53',
        offer: [
          {
            itemType: 2,
            token: '0xB781b1CA50D95A79C87020ADA9796Debc8Fe020E',
            identifierOrCriteria: 1,
            startAmount: 1,
            endAmount: 1
          },
        ],
        consideration: [
          {
            itemType: 0,
            token: '0x0000000000000000000000000000000000000000',
            identifierOrCriteria: 0,
            startAmount: 400000000000000,
            endAmount: 400000000000000,
            recipient: '0x8c8e240C723F5F850c6fdfD04a1B08598DaF6B53',
          },
          {
            itemType: 0,
            token: '0x0000000000000000000000000000000000000000',
            identifierOrCriteria: 0,
            startAmount: 200000000000000,
            endAmount: 200000000000000,
            recipient: '0x0000a26b00c1F0DF003000390027140000fAa719',
          }
        ],
        startTime: 1661850138,
        endTime: 1761850138,
        orderType: 0,
        zone: '0xae0198cC74268133F179533bbDCc3f03e78d6E55',
        zoneHash: '0x0000000000000000000000000000000000000000000000000000000000000000',
        salt: '94959087765255511',
        conduitKey: '0x8c8e240C723F5F850c6fdfD04a1B08598DaF6B53000000000000000000000000',
        counter: 0
      },
      primaryType: 'OrderComponents',
      types: {
        EIP712Domain: [
          { name: 'name', type: 'string' },
          { name: 'version', type: 'string' },
          { name: 'chainId', type: 'uint256' },
          { name: 'verifyingContract', type: 'address' },
        ],
        OrderComponents: [
          { name: "offerer", type: "address" },
          { name: "zone", type: "address" },
          { name: "offer", type: "OfferItem[]" },
          { name: "consideration", type: "ConsiderationItem[]" },
          { name: "orderType", type: "uint8" },
          { name: "startTime", type: "uint256" },
          { name: "endTime", type: "uint256" },
          { name: "zoneHash", type: "bytes32" },
          { name: "salt", type: "uint256" },
          { name: "conduitKey", type: "bytes32" },
          { name: "counter", type: "uint256" },
        ],
        OfferItem: [
          { name: "itemType", type: "uint8" },
          { name: "token", type: "address" },
          { name: "identifierOrCriteria", type: "uint256" },
          { name: "startAmount", type: "uint256" },
          { name: "endAmount", type: "uint256" },
        ],
        ConsiderationItem: [
          { name: "itemType", type: "uint8" },
          { name: "token", type: "address" },
          { name: "identifierOrCriteria", type: "uint256" },
          { name: "startAmount", type: "uint256" },
          { name: "endAmount", type: "uint256" },
          { name: "recipient", type: "address" },
        ],
      },
    };

const data = {
        domain,
        types,
        message,
    };

 const signature = await wallet._signTypedData(domain, types, message);

I have solved this issue by changing name in my offchain script.