Hi Community,
@seaport devs
I have been stuck in an issue. I have been using Opensea Seaport contracts for my NFT marketplace 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}
Can anyone help me out. #support #smart-contracts #seaport
Here is my offchain order script :
const domain = {
name: 'Consideration',
version: '1.4',
chainId: '11155111',
verifyingContract: '0x5F50C441A658C4cD604870e00968Db8418A04Fa4',
};
const types = {
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 message = {
offerer: '0x8c8e240C723F5F850c6fdfD04a1B08598DaF6B53',
zone: '0x0000000000000000000000000000000000000000',
offer: [
{
itemType: 2,
token: '0x6af5BD422A4C4399C9297C68b9AC57924DF10bB2',
identifierOrCriteria: 1,
startAmount: 1,
endAmount: 1
},
],
consideration: [
{
itemType: 0,
token: '0x0000000000000000000000000000000000000000',
identifierOrCriteria: 0,
startAmount: '400000000000000',
endAmount: '400000000000000',
recipient: '0x8c8e240C723F5F850c6fdfD04a1B08598DaF6B53',
}
],
orderType: 0,
startTime: 1661850138,
endTime: 1961850138,
zoneHash: '0x0000000000000000000000000000000000000000000000000000000000000000',
salt: '959087765255511',
conduitKey: '0x8c8e240C723F5F850c6fdfD04a1B08598DaF6B53000000000000000000000000',
counter: 0
};
primaryType: 'OrderComponents';
const data = {
domain,
types,
message,
};
const signature = await wallet._signTypedData(domain, types, message);
console.log('Signature:', signature);
}
I think my onchain and offchain signature mismatches. Please help me out.