diff --git a/.env.local b/.env.local index 0768e79..2fe1b40 100644 --- a/.env.local +++ b/.env.local @@ -7,4 +7,4 @@ NEXT_PUBLIC_OAUTH_CLIENT_UUID=f1f02e3d-c193-4438-b5fb-a27ef2f3a268 NEXT_PUBLIC_OAUTH_CLIENT_REDIRECT_URI=http://localhost:3000/oauth/callback # Your sale contract address -NEXT_PUBLIC_SALE_CONTRACT_ADDRESS=0x897Cf7E2cAD4f716172CF82edE45eF7956B33Af0 +NEXT_PUBLIC_SALE_CONTRACT_ADDRESS=0x439A7E681A71B1F3297e2c1b9c35bf226Ee24809 \ No newline at end of file diff --git a/package.json b/package.json index c3a0e45..36a1330 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,8 @@ "format": "prettier --write ." }, "dependencies": { - "@echoxyz/sonar-core": "^0.11.0", - "@echoxyz/sonar-react": "^0.12.0", + "@echoxyz/sonar-core": "^0.13.0", + "@echoxyz/sonar-react": "^0.12.2", "@tanstack/react-query": "^5.90.12", "connectkit": "^1.9.1", "next": "^15.5.7", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fac8360..9ffacc0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,11 +12,11 @@ importers: .: dependencies: '@echoxyz/sonar-core': - specifier: ^0.11.0 - version: 0.11.0 + specifier: ^0.13.0 + version: 0.13.0 '@echoxyz/sonar-react': - specifier: ^0.12.0 - version: 0.12.0(react@18.3.1) + specifier: ^0.12.2 + version: 0.12.2(react@18.3.1) '@tanstack/react-query': specifier: ^5.90.12 version: 5.90.16(react@18.3.1) @@ -129,8 +129,12 @@ packages: resolution: {integrity: sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==} engines: {node: '>=6.9.0'} - '@babel/compat-data@7.28.5': - resolution: {integrity: sha512-6uFXyCayocRbqhZOB+6XcuZbkMNimwfVGFji8CTZnCzOHVGvDqzvitu1re2AU5LROliz7eQPhB8CpAMvnx9EjA==} + '@babel/code-frame@7.28.6': + resolution: {integrity: sha512-JYgintcMjRiCvS8mMECzaEn+m3PfoQiyqukOMCCVQtoJGYJw8j/8LBJEiqkHLkfwCcs74E3pbAUFNg7d9VNJ+Q==} + engines: {node: '>=6.9.0'} + + '@babel/compat-data@7.28.6': + resolution: {integrity: sha512-2lfu57JtzctfIrcGMz992hyLlByuzgIk58+hhGCxjKZ3rWI82NnVLjXcaTqkI2NvlcvOskZaiZ5kjUALo3Lpxg==} engines: {node: '>=6.9.0'} '@babel/core@7.28.5': @@ -141,12 +145,16 @@ packages: resolution: {integrity: sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ==} engines: {node: '>=6.9.0'} + '@babel/generator@7.28.6': + resolution: {integrity: sha512-lOoVRwADj8hjf7al89tvQ2a1lf53Z+7tiXMgpZJL3maQPDxh0DgLMN62B2MKUOFcoodBHLMbDM6WAbKgNy5Suw==} + engines: {node: '>=6.9.0'} + '@babel/helper-annotate-as-pure@7.27.3': resolution: {integrity: sha512-fXSwMQqitTGeHLBC08Eq5yXz2m37E4pJX1qAU1+2cNedz/ifv/bVXft90VeSav5nFO61EcNgwr0aJxbyPaWBPg==} engines: {node: '>=6.9.0'} - '@babel/helper-compilation-targets@7.27.2': - resolution: {integrity: sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==} + '@babel/helper-compilation-targets@7.28.6': + resolution: {integrity: sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==} engines: {node: '>=6.9.0'} '@babel/helper-globals@7.28.0': @@ -157,8 +165,12 @@ packages: resolution: {integrity: sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==} engines: {node: '>=6.9.0'} - '@babel/helper-module-transforms@7.28.3': - resolution: {integrity: sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw==} + '@babel/helper-module-imports@7.28.6': + resolution: {integrity: sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-transforms@7.28.6': + resolution: {integrity: sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 @@ -179,8 +191,8 @@ packages: resolution: {integrity: sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==} engines: {node: '>=6.9.0'} - '@babel/helpers@7.28.4': - resolution: {integrity: sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w==} + '@babel/helpers@7.28.6': + resolution: {integrity: sha512-xOBvwq86HHdB7WUDTfKfT/Vuxh7gElQ+Sfti2Cy6yIWNW05P8iUslOVcZ4/sKbE+/jQaukQAdz/gf3724kYdqw==} engines: {node: '>=6.9.0'} '@babel/parser@7.28.5': @@ -188,6 +200,11 @@ packages: engines: {node: '>=6.0.0'} hasBin: true + '@babel/parser@7.28.6': + resolution: {integrity: sha512-TeR9zWR18BvbfPmGbLampPMW+uW1NZnJlRuuHso8i87QZNq2JRF9i6RgxRqtEq+wQGsS19NNTWr2duhnE49mfQ==} + engines: {node: '>=6.0.0'} + hasBin: true + '@babel/plugin-syntax-jsx@7.27.1': resolution: {integrity: sha512-y8YTNIeKoyhGd9O0Jiyzyyqk8gdjnumGTQPsz0xOZOQ2RmkVJeZ1vmmfIvFEKqucBG6axJGBZDE/7iI5suUI/w==} engines: {node: '>=6.9.0'} @@ -202,14 +219,26 @@ packages: resolution: {integrity: sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==} engines: {node: '>=6.9.0'} + '@babel/template@7.28.6': + resolution: {integrity: sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==} + engines: {node: '>=6.9.0'} + '@babel/traverse@7.28.5': resolution: {integrity: sha512-TCCj4t55U90khlYkVV/0TfkJkAkUg3jZFA3Neb7unZT8CPok7iiRfaX0F+WnqWqt7OxhOn0uBKXCw4lbL8W0aQ==} engines: {node: '>=6.9.0'} + '@babel/traverse@7.28.6': + resolution: {integrity: sha512-fgWX62k02qtjqdSNTAGxmKYY/7FSL9WAS1o2Hu5+I5m9T0yxZzr4cnrfXQ/MX0rIifthCSs6FKTlzYbJcPtMNg==} + engines: {node: '>=6.9.0'} + '@babel/types@7.28.5': resolution: {integrity: sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA==} engines: {node: '>=6.9.0'} + '@babel/types@7.28.6': + resolution: {integrity: sha512-0ZrskXVEHSWIqZM/sQZ4EV3jZJXRkio/WCxaqKZP1g//CEWEPSfeZFcms4XeKBCHU0ZKnIkdJeU/kF+eRp5lBg==} + engines: {node: '>=6.9.0'} + '@base-org/account@2.4.0': resolution: {integrity: sha512-A4Umpi8B9/pqR78D1Yoze4xHyQaujioVRqqO3d6xuDFw9VRtjg6tK3bPlwE0aW+nVH/ntllCpPa2PbI8Rnjcug==} @@ -254,11 +283,11 @@ packages: resolution: {integrity: sha512-Vd/9EVDiu6PPJt9yAh6roZP6El1xHrdvIVGjyBsHR0RYwNHgL7FJPyIIW4fANJNG6FtyZfvlRPpFI4ZM/lubvw==} engines: {node: '>=18'} - '@echoxyz/sonar-core@0.11.0': - resolution: {integrity: sha512-BUSfwjGaP6WfQwJ6WV6QcaovzrW/otByOgcYM7Suxs75sxoCGEUDnnE/k6ikimK08GVsPYmQDWlXVX/E3eWl/w==} + '@echoxyz/sonar-core@0.13.0': + resolution: {integrity: sha512-JKNzkTxrihiwwnvLrF/Oe3GXkKxRwMlPTStbs41gZg7eWBJ0EfgzSLJMFNNjO+PRbgvTbStavoLvQ7BHx1ljuQ==} - '@echoxyz/sonar-react@0.12.0': - resolution: {integrity: sha512-YWUqqvcdzWg2HzTYjJALg76V+NWmqF5cAMqy/cNav7CPUz/U/HYrW934ms1indQiwy0PT15NCU2PWk03iNOx7A==} + '@echoxyz/sonar-react@0.12.2': + resolution: {integrity: sha512-iuQQrAFiNMsH+NRvaSQvGFsAiYJRQHTDYO774uENkJGsZPtP39JYRhqXw3PCY0cr4CzuCURu0fqaQx7aAl1Xrg==} peerDependencies: react: '>=18' @@ -2165,8 +2194,8 @@ packages: base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} - baseline-browser-mapping@2.9.5: - resolution: {integrity: sha512-D5vIoztZOq1XM54LUdttJVc96ggEsIfju2JBvht06pSzpckp3C7HReun67Bghzrtdsq9XdMGbSSB3v3GhMNmAA==} + baseline-browser-mapping@2.9.17: + resolution: {integrity: sha512-agD0MgJFUP/4nvjqzIB29zRPUuCF7Ge6mEv9s8dHrtYD7QWXRcx75rOADE/d5ah1NI+0vkDl0yorDd5U852IQQ==} hasBin: true bidi-js@1.0.3: @@ -2248,6 +2277,9 @@ packages: caniuse-lite@1.0.30001760: resolution: {integrity: sha512-7AAMPcueWELt1p3mi13HR/LHH0TJLT11cnwDJEs3xA4+CK/PLKeO9Kl1oru24htkyUKtkGCvAx4ohB0Ttry8Dw==} + caniuse-lite@1.0.30001765: + resolution: {integrity: sha512-LWcNtSyZrakjECqmpP4qdg0MMGdN368D7X8XvvAqOcqMv0RxnlqVKZl2V6/mBR68oYMxOZPLw/gO7DuisMHUvQ==} + chai@5.3.3: resolution: {integrity: sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==} engines: {node: '>=18'} @@ -2510,8 +2542,8 @@ packages: resolution: {integrity: sha512-dS5cbA9rA2VR4Ybuvhg6jvdmp46ubLn3E+px8cG/35aEDNclrqoCjg6mt0HYZ/M+OoESS3jSkCrqk1kWAEhWAw==} engines: {bun: '>=1', deno: '>=2', node: '>=16'} - electron-to-chromium@1.5.267: - resolution: {integrity: sha512-0Drusm6MVRXSOJpGbaSVgcQsuB4hEkMpHXaVstcPmhu5LIedxs1xNK/nIxmQIU/RPC0+1/o0AVZfBTkTNJOdUw==} + electron-to-chromium@1.5.277: + resolution: {integrity: sha512-wKXFZw4erWmmOz5N/grBoJ2XrNJGDFMu2+W5ACHza5rHtvsqrK4gb6rnLC7XxKB9WlJ+RmyQatuEXmtm86xbnw==} emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -2744,6 +2776,9 @@ packages: eventemitter3@5.0.1: resolution: {integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==} + eventemitter3@5.0.4: + resolution: {integrity: sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==} + events@3.3.0: resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} engines: {node: '>=0.8.x'} @@ -3812,8 +3847,8 @@ packages: preact@10.24.2: resolution: {integrity: sha512-1cSoF0aCC8uaARATfrlz4VCBqE8LwZwRfLgkxJOQwAlQt6ayTmi0D9OF7nXid1POI5SZidFuG9CnlXbDfLqY/Q==} - preact@10.28.0: - resolution: {integrity: sha512-rytDAoiXr3+t6OIP3WGlDd0ouCUG1iCWzkcY3++Nreuoi17y6T5i/zRhe6uYfoVcxq6YU+sBtJouuRDsq8vvqA==} + preact@10.28.2: + resolution: {integrity: sha512-lbteaWGzGHdlIuiJ0l2Jq454m6kcpI1zNje6d8MlGAFlYvP2GO4ibnat7P74Esfz4sPTdM6UxtTwh/d3pwM9JA==} prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} @@ -4448,8 +4483,8 @@ packages: uploadthing: optional: true - update-browserslist-db@1.2.2: - resolution: {integrity: sha512-E85pfNzMQ9jpKkA7+TJAi4TJN+tBCuWh5rUcS/sv6cFi+1q9LYDwDI5dpUL0u/73EElyQ8d3TEaeW4sPedBqYA==} + update-browserslist-db@1.2.3: + resolution: {integrity: sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' @@ -4832,19 +4867,25 @@ snapshots: js-tokens: 4.0.0 picocolors: 1.1.1 - '@babel/compat-data@7.28.5': {} + '@babel/code-frame@7.28.6': + dependencies: + '@babel/helper-validator-identifier': 7.28.5 + js-tokens: 4.0.0 + picocolors: 1.1.1 + + '@babel/compat-data@7.28.6': {} '@babel/core@7.28.5': dependencies: - '@babel/code-frame': 7.27.1 - '@babel/generator': 7.28.5 - '@babel/helper-compilation-targets': 7.27.2 - '@babel/helper-module-transforms': 7.28.3(@babel/core@7.28.5) - '@babel/helpers': 7.28.4 - '@babel/parser': 7.28.5 - '@babel/template': 7.27.2 - '@babel/traverse': 7.28.5(supports-color@5.5.0) - '@babel/types': 7.28.5 + '@babel/code-frame': 7.28.6 + '@babel/generator': 7.28.6 + '@babel/helper-compilation-targets': 7.28.6 + '@babel/helper-module-transforms': 7.28.6(@babel/core@7.28.5) + '@babel/helpers': 7.28.6 + '@babel/parser': 7.28.6 + '@babel/template': 7.28.6 + '@babel/traverse': 7.28.6 + '@babel/types': 7.28.6 '@jridgewell/remapping': 2.3.5 convert-source-map: 2.0.0 debug: 4.4.3(supports-color@5.5.0) @@ -4862,13 +4903,21 @@ snapshots: '@jridgewell/trace-mapping': 0.3.31 jsesc: 3.1.0 + '@babel/generator@7.28.6': + dependencies: + '@babel/parser': 7.28.6 + '@babel/types': 7.28.6 + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + jsesc: 3.1.0 + '@babel/helper-annotate-as-pure@7.27.3': dependencies: '@babel/types': 7.28.5 - '@babel/helper-compilation-targets@7.27.2': + '@babel/helper-compilation-targets@7.28.6': dependencies: - '@babel/compat-data': 7.28.5 + '@babel/compat-data': 7.28.6 '@babel/helper-validator-option': 7.27.1 browserslist: 4.28.1 lru-cache: 5.1.1 @@ -4883,12 +4932,19 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/helper-module-transforms@7.28.3(@babel/core@7.28.5)': + '@babel/helper-module-imports@7.28.6': + dependencies: + '@babel/traverse': 7.28.6 + '@babel/types': 7.28.6 + transitivePeerDependencies: + - supports-color + + '@babel/helper-module-transforms@7.28.6(@babel/core@7.28.5)': dependencies: '@babel/core': 7.28.5 - '@babel/helper-module-imports': 7.27.1(supports-color@5.5.0) + '@babel/helper-module-imports': 7.28.6 '@babel/helper-validator-identifier': 7.28.5 - '@babel/traverse': 7.28.5(supports-color@5.5.0) + '@babel/traverse': 7.28.6 transitivePeerDependencies: - supports-color @@ -4900,15 +4956,19 @@ snapshots: '@babel/helper-validator-option@7.27.1': {} - '@babel/helpers@7.28.4': + '@babel/helpers@7.28.6': dependencies: - '@babel/template': 7.27.2 - '@babel/types': 7.28.5 + '@babel/template': 7.28.6 + '@babel/types': 7.28.6 '@babel/parser@7.28.5': dependencies: '@babel/types': 7.28.5 + '@babel/parser@7.28.6': + dependencies: + '@babel/types': 7.28.6 + '@babel/plugin-syntax-jsx@7.27.1(@babel/core@7.28.5)': dependencies: '@babel/core': 7.28.5 @@ -4922,6 +4982,12 @@ snapshots: '@babel/parser': 7.28.5 '@babel/types': 7.28.5 + '@babel/template@7.28.6': + dependencies: + '@babel/code-frame': 7.28.6 + '@babel/parser': 7.28.6 + '@babel/types': 7.28.6 + '@babel/traverse@7.28.5(supports-color@5.5.0)': dependencies: '@babel/code-frame': 7.27.1 @@ -4934,11 +5000,28 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/traverse@7.28.6': + dependencies: + '@babel/code-frame': 7.28.6 + '@babel/generator': 7.28.6 + '@babel/helper-globals': 7.28.0 + '@babel/parser': 7.28.6 + '@babel/template': 7.28.6 + '@babel/types': 7.28.6 + debug: 4.4.3(supports-color@5.5.0) + transitivePeerDependencies: + - supports-color + '@babel/types@7.28.5': dependencies: '@babel/helper-string-parser': 7.27.1 '@babel/helper-validator-identifier': 7.28.5 + '@babel/types@7.28.6': + dependencies: + '@babel/helper-string-parser': 7.27.1 + '@babel/helper-validator-identifier': 7.28.5 + '@base-org/account@2.4.0(@types/react@18.3.27)(bufferutil@4.0.9)(fastestsmallesttextencoderdecoder@1.0.22)(react@18.3.1)(typescript@5.9.3)(use-sync-external-store@1.4.0(react@18.3.1))(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)': dependencies: '@coinbase/cdp-sdk': 1.38.5(bufferutil@4.0.9)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) @@ -4994,9 +5077,9 @@ snapshots: clsx: 1.2.1 eth-block-tracker: 7.1.0 eth-json-rpc-filters: 6.0.1 - eventemitter3: 5.0.1 + eventemitter3: 5.0.4 keccak: 3.0.4 - preact: 10.28.0 + preact: 10.28.2 sha.js: 2.4.12 transitivePeerDependencies: - supports-color @@ -5043,11 +5126,11 @@ snapshots: '@csstools/css-tokenizer@3.0.4': {} - '@echoxyz/sonar-core@0.11.0': {} + '@echoxyz/sonar-core@0.13.0': {} - '@echoxyz/sonar-react@0.12.0(react@18.3.1)': + '@echoxyz/sonar-react@0.12.2(react@18.3.1)': dependencies: - '@echoxyz/sonar-core': 0.11.0 + '@echoxyz/sonar-core': 0.13.0 react: 18.3.1 '@ecies/ciphers@0.2.5(@noble/ciphers@1.3.0)': @@ -7717,7 +7800,7 @@ snapshots: base64-js@1.5.1: {} - baseline-browser-mapping@2.9.5: {} + baseline-browser-mapping@2.9.17: {} bidi-js@1.0.3: dependencies: @@ -7750,11 +7833,11 @@ snapshots: browserslist@4.28.1: dependencies: - baseline-browser-mapping: 2.9.5 - caniuse-lite: 1.0.30001760 - electron-to-chromium: 1.5.267 + baseline-browser-mapping: 2.9.17 + caniuse-lite: 1.0.30001765 + electron-to-chromium: 1.5.277 node-releases: 2.0.27 - update-browserslist-db: 1.2.2(browserslist@4.28.1) + update-browserslist-db: 1.2.3(browserslist@4.28.1) bs58@4.0.1: dependencies: @@ -7805,6 +7888,8 @@ snapshots: caniuse-lite@1.0.30001760: {} + caniuse-lite@1.0.30001765: {} + chai@5.3.3: dependencies: assertion-error: 2.0.1 @@ -8052,7 +8137,7 @@ snapshots: '@noble/curves': 1.9.7 '@noble/hashes': 1.8.0 - electron-to-chromium@1.5.267: {} + electron-to-chromium@1.5.277: {} emoji-regex@8.0.0: {} @@ -8493,6 +8578,8 @@ snapshots: eventemitter3@5.0.1: {} + eventemitter3@5.0.4: {} + events@3.3.0: {} expect-type@1.2.2: {} @@ -9552,7 +9639,7 @@ snapshots: preact@10.24.2: {} - preact@10.28.0: {} + preact@10.28.2: {} prelude-ls@1.2.1: {} @@ -10281,7 +10368,7 @@ snapshots: optionalDependencies: idb-keyval: 6.2.2 - update-browserslist-db@1.2.2(browserslist@4.28.1): + update-browserslist-db@1.2.3(browserslist@4.28.1): dependencies: browserslist: 4.28.1 escalade: 3.2.0 diff --git a/src/app/ExampleSaleABI.ts b/src/app/ExampleSaleABI.ts index cc21161..0a96343 100644 --- a/src/app/ExampleSaleABI.ts +++ b/src/app/ExampleSaleABI.ts @@ -1,603 +1,343 @@ export const examplSaleABI = [ { + type: "constructor", inputs: [ { - components: [ - { - internalType: "bytes16", - name: "saleUUID", - type: "bytes16", - }, - { - internalType: "address", - name: "purchasePermitSigner", - type: "address", - }, - ], - internalType: "struct ExampleSale.Init", name: "init", type: "tuple", + internalType: "struct ExampleSale.Init", + components: [ + { name: "saleUUID", type: "bytes16", internalType: "bytes16" }, + { name: "purchasePermitSigner", type: "address", internalType: "address" }, + ], }, ], stateMutability: "nonpayable", - type: "constructor", }, { + type: "function", + name: "DEFAULT_ADMIN_ROLE", inputs: [], - name: "AccessControlBadConfirmation", - type: "error", + outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], + stateMutability: "view", }, { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "bytes32", - name: "neededRole", - type: "bytes32", - }, - ], - name: "AccessControlUnauthorizedAccount", - type: "error", + type: "function", + name: "MAX_ADDRESSES_PER_ENTITY", + inputs: [], + outputs: [{ name: "", type: "uint8", internalType: "uint8" }], + stateMutability: "view", }, { - inputs: [ - { - internalType: "address", - name: "addr", - type: "address", - }, - { - internalType: "bytes16", - name: "got", - type: "bytes16", - }, - { - internalType: "bytes16", - name: "existing", - type: "bytes16", - }, - ], - name: "AddressTiedToAnotherEntity", - type: "error", + type: "function", + name: "PURCHASE_PERMIT_SIGNER_ROLE", + inputs: [], + outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], + stateMutability: "view", }, { - inputs: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - { - internalType: "uint256", - name: "minAmount", - type: "uint256", - }, - ], - name: "AmountBelowMinimum", - type: "error", + type: "function", + name: "amountByAddress", + inputs: [{ name: "", type: "address", internalType: "address" }], + outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + stateMutability: "view", }, { - inputs: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxAmount", - type: "uint256", - }, - ], - name: "AmountExceedsMaximum", - type: "error", + type: "function", + name: "amountByEntity", + inputs: [{ name: "", type: "bytes16", internalType: "bytes16" }], + outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + stateMutability: "view", }, { - inputs: [], - name: "ECDSAInvalidSignature", - type: "error", + type: "function", + name: "entityByAddress", + inputs: [{ name: "addr", type: "address", internalType: "address" }], + outputs: [{ name: "", type: "bytes16", internalType: "bytes16" }], + stateMutability: "view", }, { - inputs: [ - { - internalType: "uint256", - name: "length", - type: "uint256", - }, - ], - name: "ECDSAInvalidSignatureLength", - type: "error", + type: "function", + name: "entityIDByAddress", + inputs: [{ name: "", type: "address", internalType: "address" }], + outputs: [{ name: "", type: "bytes16", internalType: "bytes16" }], + stateMutability: "view", }, { - inputs: [ - { - internalType: "bytes32", - name: "s", - type: "bytes32", - }, - ], - name: "ECDSAInvalidSignatureS", - type: "error", + type: "function", + name: "getEntityAddressCount", + inputs: [{ name: "entityID", type: "bytes16", internalType: "bytes16" }], + outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + stateMutability: "view", }, { - inputs: [], - name: "PurchasePermitExpired", - type: "error", + type: "function", + name: "getEntityAddresses", + inputs: [{ name: "entityID", type: "bytes16", internalType: "bytes16" }], + outputs: [{ name: "", type: "address[]", internalType: "address[]" }], + stateMutability: "view", }, { - inputs: [ - { - internalType: "bytes16", - name: "got", - type: "bytes16", - }, + type: "function", + name: "getEntityPurchaseBreakdown", + inputs: [{ name: "entityID", type: "bytes16", internalType: "bytes16" }], + outputs: [ { - internalType: "bytes16", - name: "want", - type: "bytes16", + name: "purchases", + type: "tuple[]", + internalType: "struct ExampleSale.AddressPurchase[]", + components: [ + { name: "addr", type: "address", internalType: "address" }, + { name: "amount", type: "uint256", internalType: "uint256" }, + ], }, ], - name: "PurchasePermitSaleUUIDMismatch", - type: "error", + stateMutability: "view", }, { - inputs: [ - { - internalType: "address", - name: "got", - type: "address", - }, - { - internalType: "address", - name: "want", - type: "address", - }, - ], - name: "PurchasePermitSenderMismatch", - type: "error", + type: "function", + name: "getRoleAdmin", + inputs: [{ name: "role", type: "bytes32", internalType: "bytes32" }], + outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], + stateMutability: "view", }, { + type: "function", + name: "getRoleMember", inputs: [ - { - internalType: "address", - name: "signer", - type: "address", - }, + { name: "role", type: "bytes32", internalType: "bytes32" }, + { name: "index", type: "uint256", internalType: "uint256" }, ], - name: "PurchasePermitUnauthorizedSigner", - type: "error", + outputs: [{ name: "", type: "address", internalType: "address" }], + stateMutability: "view", }, { - inputs: [], - name: "ZeroAddress", - type: "error", + type: "function", + name: "getRoleMemberCount", + inputs: [{ name: "role", type: "bytes32", internalType: "bytes32" }], + outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + stateMutability: "view", }, { - inputs: [], - name: "ZeroEntityID", - type: "error", + type: "function", + name: "grantRole", + inputs: [ + { name: "role", type: "bytes32", internalType: "bytes32" }, + { name: "account", type: "address", internalType: "address" }, + ], + outputs: [], + stateMutability: "nonpayable", }, { - anonymous: false, + type: "function", + name: "hasRole", inputs: [ - { - indexed: true, - internalType: "address", - name: "wallet", - type: "address", - }, - { - indexed: true, - internalType: "bytes16", - name: "entityID", - type: "bytes16", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "totalAmount", - type: "uint256", - }, + { name: "role", type: "bytes32", internalType: "bytes32" }, + { name: "account", type: "address", internalType: "address" }, ], - name: "Purchased", - type: "event", + outputs: [{ name: "", type: "bool", internalType: "bool" }], + stateMutability: "view", }, { - anonymous: false, + type: "function", + name: "purchase", inputs: [ + { name: "amount", type: "uint256", internalType: "uint256" }, { - indexed: true, - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - { - indexed: true, - internalType: "bytes32", - name: "previousAdminRole", - type: "bytes32", - }, - { - indexed: true, - internalType: "bytes32", - name: "newAdminRole", - type: "bytes32", + name: "purchasePermit", + type: "tuple", + internalType: "struct PurchasePermitV3", + components: [ + { name: "saleSpecificEntityID", type: "bytes16", internalType: "bytes16" }, + { name: "saleUUID", type: "bytes16", internalType: "bytes16" }, + { name: "wallet", type: "address", internalType: "address" }, + { name: "expiresAt", type: "uint64", internalType: "uint64" }, + { name: "minAmount", type: "uint256", internalType: "uint256" }, + { name: "maxAmount", type: "uint256", internalType: "uint256" }, + { name: "minPrice", type: "uint64", internalType: "uint64" }, + { name: "maxPrice", type: "uint64", internalType: "uint64" }, + { name: "opensAt", type: "uint64", internalType: "uint64" }, + { name: "closesAt", type: "uint64", internalType: "uint64" }, + { name: "payload", type: "bytes", internalType: "bytes" }, + ], }, + { name: "purchasePermitSignature", type: "bytes", internalType: "bytes" }, ], - name: "RoleAdminChanged", - type: "event", + outputs: [], + stateMutability: "nonpayable", }, { - anonymous: false, + type: "function", + name: "renounceRole", inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, + { name: "role", type: "bytes32", internalType: "bytes32" }, + { name: "callerConfirmation", type: "address", internalType: "address" }, ], - name: "RoleGranted", - type: "event", + outputs: [], + stateMutability: "nonpayable", }, { - anonymous: false, + type: "function", + name: "reset", + inputs: [{ name: "entityID", type: "bytes16", internalType: "bytes16" }], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "revokeRole", inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, + { name: "role", type: "bytes32", internalType: "bytes32" }, + { name: "account", type: "address", internalType: "address" }, ], - name: "RoleRevoked", - type: "event", + outputs: [], + stateMutability: "nonpayable", }, { + type: "function", + name: "saleUUID", inputs: [], - name: "DEFAULT_ADMIN_ROLE", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], + outputs: [{ name: "", type: "bytes16", internalType: "bytes16" }], stateMutability: "view", - type: "function", }, { - inputs: [], - name: "PURCHASE_PERMIT_SIGNER_ROLE", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", type: "function", + name: "supportsInterface", + inputs: [{ name: "interfaceId", type: "bytes4", internalType: "bytes4" }], + outputs: [{ name: "", type: "bool", internalType: "bool" }], + stateMutability: "view", }, { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "amountByAddress", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", + type: "event", + name: "EntityReset", + inputs: [{ name: "entityID", type: "bytes16", indexed: true, internalType: "bytes16" }], + anonymous: false, }, { + type: "event", + name: "Purchased", inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, + { name: "addr", type: "address", indexed: true, internalType: "address" }, + { name: "entityID", type: "bytes16", indexed: true, internalType: "bytes16" }, + { name: "amount", type: "uint256", indexed: false, internalType: "uint256" }, + { name: "totalAmount", type: "uint256", indexed: false, internalType: "uint256" }, ], - name: "entityIDByAddress", - outputs: [ - { - internalType: "bytes16", - name: "", - type: "bytes16", - }, - ], - stateMutability: "view", - type: "function", + anonymous: false, }, { + type: "event", + name: "RoleAdminChanged", inputs: [ - { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - ], - name: "getRoleAdmin", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, + { name: "role", type: "bytes32", indexed: true, internalType: "bytes32" }, + { name: "previousAdminRole", type: "bytes32", indexed: true, internalType: "bytes32" }, + { name: "newAdminRole", type: "bytes32", indexed: true, internalType: "bytes32" }, ], - stateMutability: "view", - type: "function", + anonymous: false, }, { + type: "event", + name: "RoleGranted", inputs: [ - { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - { - internalType: "uint256", - name: "index", - type: "uint256", - }, - ], - name: "getRoleMember", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, + { name: "role", type: "bytes32", indexed: true, internalType: "bytes32" }, + { name: "account", type: "address", indexed: true, internalType: "address" }, + { name: "sender", type: "address", indexed: true, internalType: "address" }, ], - stateMutability: "view", - type: "function", + anonymous: false, }, { + type: "event", + name: "RoleRevoked", inputs: [ - { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - ], - name: "getRoleMemberCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, + { name: "role", type: "bytes32", indexed: true, internalType: "bytes32" }, + { name: "account", type: "address", indexed: true, internalType: "address" }, + { name: "sender", type: "address", indexed: true, internalType: "address" }, ], - stateMutability: "view", - type: "function", + anonymous: false, }, + { type: "error", name: "AccessControlBadConfirmation", inputs: [] }, { + type: "error", + name: "AccessControlUnauthorizedAccount", inputs: [ - { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - { - internalType: "address", - name: "account", - type: "address", - }, + { name: "account", type: "address", internalType: "address" }, + { name: "neededRole", type: "bytes32", internalType: "bytes32" }, ], - name: "grantRole", - outputs: [], - stateMutability: "nonpayable", - type: "function", }, { + type: "error", + name: "AddressTiedToAnotherEntity", inputs: [ - { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - { - internalType: "address", - name: "account", - type: "address", - }, + { name: "addr", type: "address", internalType: "address" }, + { name: "got", type: "bytes16", internalType: "bytes16" }, + { name: "existing", type: "bytes16", internalType: "bytes16" }, ], - name: "hasRole", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", }, { + type: "error", + name: "AmountBelowMinimum", inputs: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - { - components: [ - { - internalType: "bytes16", - name: "entityID", - type: "bytes16", - }, - { - internalType: "bytes16", - name: "saleUUID", - type: "bytes16", - }, - { - internalType: "address", - name: "wallet", - type: "address", - }, - { - internalType: "uint64", - name: "expiresAt", - type: "uint64", - }, - { - internalType: "uint256", - name: "minAmount", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxAmount", - type: "uint256", - }, - { - internalType: "uint64", - name: "minPrice", - type: "uint64", - }, - { - internalType: "uint64", - name: "maxPrice", - type: "uint64", - }, - { - internalType: "bytes", - name: "payload", - type: "bytes", - }, - ], - internalType: "struct PurchasePermitV2", - name: "purchasePermit", - type: "tuple", - }, - { - internalType: "bytes", - name: "purchasePermitSignature", - type: "bytes", - }, + { name: "amount", type: "uint256", internalType: "uint256" }, + { name: "minAmount", type: "uint256", internalType: "uint256" }, ], - name: "purchase", - outputs: [], - stateMutability: "nonpayable", - type: "function", }, { + type: "error", + name: "AmountExceedsMaximum", inputs: [ - { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - { - internalType: "address", - name: "callerConfirmation", - type: "address", - }, + { name: "amount", type: "uint256", internalType: "uint256" }, + { name: "maxAmount", type: "uint256", internalType: "uint256" }, ], - name: "renounceRole", - outputs: [], - stateMutability: "nonpayable", - type: "function", }, + { type: "error", name: "ECDSAInvalidSignature", inputs: [] }, { - inputs: [], - name: "reset", - outputs: [], - stateMutability: "nonpayable", - type: "function", + type: "error", + name: "ECDSAInvalidSignatureLength", + inputs: [{ name: "length", type: "uint256", internalType: "uint256" }], + }, + { + type: "error", + name: "ECDSAInvalidSignatureS", + inputs: [{ name: "s", type: "bytes32", internalType: "bytes32" }], }, { + type: "error", + name: "PurchaseOutsideAllowedWindow", inputs: [ - { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - { - internalType: "address", - name: "account", - type: "address", - }, + { name: "opensAt", type: "uint64", internalType: "uint64" }, + { name: "closesAt", type: "uint64", internalType: "uint64" }, + { name: "currentTime", type: "uint256", internalType: "uint256" }, ], - name: "revokeRole", - outputs: [], - stateMutability: "nonpayable", - type: "function", }, + { type: "error", name: "PurchasePermitExpired", inputs: [] }, { - inputs: [], - name: "saleUUID", - outputs: [ - { - internalType: "bytes16", - name: "", - type: "bytes16", - }, + type: "error", + name: "PurchasePermitSaleUUIDMismatch", + inputs: [ + { name: "got", type: "bytes16", internalType: "bytes16" }, + { name: "want", type: "bytes16", internalType: "bytes16" }, ], - stateMutability: "view", - type: "function", }, { + type: "error", + name: "PurchasePermitSenderMismatch", inputs: [ - { - internalType: "bytes4", - name: "interfaceId", - type: "bytes4", - }, + { name: "got", type: "address", internalType: "address" }, + { name: "want", type: "address", internalType: "address" }, ], - name: "supportsInterface", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, + }, + { + type: "error", + name: "PurchasePermitUnauthorizedSigner", + inputs: [{ name: "signer", type: "address", internalType: "address" }], + }, + { + type: "error", + name: "TooManyAddressesForEntity", + inputs: [ + { name: "entityID", type: "bytes16", internalType: "bytes16" }, + { name: "max", type: "uint256", internalType: "uint256" }, ], - stateMutability: "view", - type: "function", }, + { type: "error", name: "ZeroAddress", inputs: [] }, + { type: "error", name: "ZeroEntityID", inputs: [] }, ] as const; diff --git a/src/app/components/sale/PurchaseCard.tsx b/src/app/components/sale/PurchaseCard.tsx index ce3001d..9b2c057 100644 --- a/src/app/components/sale/PurchaseCard.tsx +++ b/src/app/components/sale/PurchaseCard.tsx @@ -39,11 +39,11 @@ function readinessConfig( return warningConfig("The connected wallet is not eligible for this sale. Connect a different wallet."); case PrePurchaseFailureReason.MAX_WALLETS_USED: return warningConfig( - "Maximum number of wallets reached — This entity can’t use the connected wallet. Use a previous wallet." + "Maximum number of wallets reached — This entity can't use the connected wallet. Use a previous wallet." ); - case PrePurchaseFailureReason.NO_RESERVED_ALLOCATION: + case PrePurchaseFailureReason.WALLET_NOT_LINKED: return warningConfig( - "No reserved allocation — The connected wallet doesn't have a reserved spot for this sale. Connect a different wallet." + "Wallet not linked — The connected wallet is not linked to your entity. Please link it first." ); case PrePurchaseFailureReason.SALE_NOT_ACTIVE: return errorConfig("The sale is not currently active."); diff --git a/src/app/hooks/use-sale-contract.ts b/src/app/hooks/use-sale-contract.ts index a106146..f692485 100644 --- a/src/app/hooks/use-sale-contract.ts +++ b/src/app/hooks/use-sale-contract.ts @@ -1,4 +1,4 @@ -import { BasicPermitV2, GeneratePurchasePermitResponse } from "@echoxyz/sonar-core"; +import { BasicPermitV3, GeneratePurchasePermitResponse } from "@echoxyz/sonar-core"; import { useCallback, useEffect, useState } from "react"; import { useReadContract, useWriteContract, useWaitForTransactionReceipt } from "wagmi"; import { saleContract } from "@/lib/config"; @@ -22,10 +22,10 @@ export const useSaleContract = (walletAddress: `0x${string}`) => { const commitWithPermit = useCallback( async ({ purchasePermitResp, amount }: { purchasePermitResp: GeneratePurchasePermitResponse; amount: bigint }) => { - if (!("MinAmount" in purchasePermitResp.PermitJSON)) { - throw new Error("Invalid purchase permit response"); + if (!("OpensAt" in purchasePermitResp.PermitJSON)) { + throw new Error("Invalid purchase permit response - expected V3 permit"); } - const permit = purchasePermitResp.PermitJSON as BasicPermitV2; + const permit = purchasePermitResp.PermitJSON as BasicPermitV3; const { request } = await simulateContract(config, { address: saleContract, @@ -34,7 +34,7 @@ export const useSaleContract = (walletAddress: `0x${string}`) => { args: [ amount, { - entityID: permit.SaleSpecificEntityID, + saleSpecificEntityID: permit.SaleSpecificEntityID, saleUUID: permit.SaleUUID, wallet: permit.Wallet, expiresAt: BigInt(permit.ExpiresAt), @@ -42,6 +42,8 @@ export const useSaleContract = (walletAddress: `0x${string}`) => { maxAmount: BigInt(permit.MaxAmount), minPrice: BigInt(permit.MinPrice), maxPrice: BigInt(permit.MaxPrice), + opensAt: BigInt(permit.OpensAt), + closesAt: BigInt(permit.ClosesAt), payload: permit.Payload, }, purchasePermitResp.Signature,