Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webjs can not validate eip712 message. #1

Open
tapan-cn opened this issue Apr 1, 2023 · 0 comments
Open

webjs can not validate eip712 message. #1

tapan-cn opened this issue Apr 1, 2023 · 0 comments

Comments

@tapan-cn
Copy link

tapan-cn commented Apr 1, 2023

{ "signatureKind": "eip712", "domain": { "name": "Seaport", "version": "1.4", "chainId": 5, "verifyingContract": "0x00000000000001ad428e4906ae43d8f9852d0dd6" }, "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" } ] }, "value": { "kind": "single-token", "offerer": "0x0000000000000000000000000000000000000000", //valid address "zone": "0x0000000000000000000000000000000000000000", "offer": [ { "itemType": 2, "token": "0x7b925fab8eb61de43d881ff2d1348b0eaec16312", "identifierOrCriteria": "100", "startAmount": "1", "endAmount": "1" } ], "consideration": [ { "itemType": 0, "token": "0x0000000000000000000000000000000000000000", "identifierOrCriteria": "0", "startAmount": "100000000000000000", "endAmount": "100000000000000000", "recipient": "0x0000000000000000000000000000000000000000" } ], "orderType": 0, "startTime": 1680205476, "endTime": 1682797535, "zoneHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "salt": "1620201585711624573437293732192447910951507", "conduitKey": "0x0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000", "counter": "0", "signature": "0x0000000000000000000000000000000000000000000000000000000000000000" } }

I mannually added domain types and primary type which js library detects automatically (OrderComponents)
message like above is not able sign by library which part nft listing api from reservoir

{
"orders": [
{
"id": 2409,
"orderId": "0x260c77ce5ef562d92c7f7c19a74e165b10f936ecebd3f2bbedfeaf79fb806c61",
"orderbook": "opensea",
"status": "failed",
"statusReason": "Request was rejected by OpenSea. error=['Invalid order signature']",
"createdAt": "2023-04-01T20:13:21.808Z",
"updatedAt": "2023-04-01T20:13:22.255Z"
}
],
"continuation": null
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant