EN PRENANT EN COMPTE LES ELEMENTS SUIVANTS : .parameters (tuple) : { "offerer":…
- User
EN PRENANT EN COMPTE LES ELEMENTS SUIVANTS :
.parameters (tuple) : { "offerer": "0xB0077B904F9f5C9009FD2b90d2643Cf9E1632AB4", "zone": "0x0000000000000000000000000000000000000000", "offer": [ { "itemType": 2, "token": "0xb99dc2f1ba4e9f152c1aadaac62c185b7305e019", "identifierOrCriteria": "0", "startAmount": "1", "endAmount": "1" } ], "consideration": [ { "itemType": 0, "token": "0x0000000000000000000000000000000000000000", "identifierOrCriteria": "0", "startAmount": "99999000000000000", "endAmount": "99999000000000000", "recipient": "0xB0077B904F9f5C9009FD2b90d2643Cf9E1632AB4" }, { "itemType": 0, "token": "0x0000000000000000000000000000000000000000", "identifierOrCriteria": "0", "startAmount": "1000000000000", "endAmount": "1000000000000", "recipient": "0x0000a26b00c1F0DF003000390027140000fAa719" } ], "orderType": 0, "startTime": "0", "endTime": "2147483647", "zoneHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "salt": "5548959782521613843", "conduitKey": "0x0000000000000000000000000000000000000000000000000000000000000000", "totalOriginalConsiderationItems": 2 }
.numerator (uint120) : "1"
.denominator (uint120) : "1"
.signature (bytes) : 0x81faafa0588877544ba535f3470a3d80213b70956259b02efd9025bb0164c077607de41291f8421d72242fb677a7e9af9b5c64384314418dc9a1d8b8be6d3dd41b
.extraData (bytes) : 0x
fulfillerConduitKey (bytes32) : 0x0000000000000000000000000000000000000000000000000000000000000000
recipient (address) : 0xB0077B904F9f5C9009FD2b90d2643Cf9E1632AB4
orderHash (bytes32) : 0x0ade80b2f069af37d2f4fdc8a359bcc2e88a434c5b0a2e18903b1b809e6ab1e2
UTILISE CE SCRIPT POUR VOIR SI LA SIGNATURE EST VALIDE OU NON. REMPLACE LES DONNEES PAR CELLES QUE J'AI EN HAUT.
(async () => { if (!window.ethereum) { alert("Veuillez installer MetaMask !"); return; }
// Charger ethers.js via CDN (jsDelivr UMD) if (typeof ethers === "undefined") { await new Promise((res, rej) => { const s = document.createElement("script"); s.src = "https://cdn.jsdelivr.net/npm/ethers@5.7.2/dist/ethers.umd.min.js"; s.onload = res; s.onerror = rej; document.head.appendChild(s); }); }
const provider = new ethers.providers.Web3Provider(window.ethereum); await provider.send("eth_requestAccounts", []);
// Définition du domaine (chainId 1 = mainnet) const domain = { name: 'Seaport', version: '1.5', chainId: 1, verifyingContract: "0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC" };
// Types simplifiés pour OrderParameters (extrait utile) const types = { OrderParameters: [ { 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: "totalOriginalConsiderationItems", 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" } ] };
- Assistant
- User
Signature invalide ! Adresse récupérée : 0x6B6cDCfFf755A5e14075F340a299E02063F6C228
- Assistant
- User
COMMENT FAIRE POUR AVOIR LA BONNE SIGNATURE ?
- Assistant
- User
Digest calculé : 0x4d6dc8f92baeb0aa4b9056cbcecf2342eec8e70ad6cb125334463216004d4521 Order hash initial : 0x0ade80b2f069af37d2f4fdc8a359bcc2e88a434c5b0a2e18903b1b809e6ab1e2 Adresse récupérée depuis signature : 0x6B6cDCfFf755A5e14075F340a299E02063F6C228 Offerer attendu : 0xB0077B904F9f5C9009FD2b90d2643Cf9E1632AB4
- Assistant