From 5196b064fed4bb96b483c91858062066459c2042 Mon Sep 17 00:00:00 2001 From: Matthew Bunday Date: Wed, 14 Feb 2024 08:38:08 -0500 Subject: [PATCH 01/26] Update tests --- package.json | 11 +- pnpm-lock.yaml | 871 +++++------------- src/_test/config.ts | 2 +- src/hooks/L1/useSimulateDepositERC20.test.ts | 1 + src/hooks/L1/useSimulateDepositETH.test.ts | 1 + ...seSimulateFinalizeWithdrawalTransaction.ts | 6 +- .../L1/useWriteProveWithdrawalTransaction.ts | 4 +- src/hooks/L2/useSimulateWithdrawERC20.test.ts | 1 + src/hooks/L2/useSimulateWithdrawETH.test.ts | 1 + 9 files changed, 234 insertions(+), 664 deletions(-) diff --git a/package.json b/package.json index 921c914..f4cd8fa 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "@types/use-sync-external-store": "^0.0.3", "@viem/anvil": "^0.0.7", "@vitest/coverage-v8": "^1.2.2", - "@wagmi/cli": "beta", + "@wagmi/cli": "^2.1.1", "dprint": "^0.42.5", "ethers": "^5.7.0", "happy-dom": "^12.10.3", @@ -65,7 +65,8 @@ "typescript": "5.0.4", "vitest": "^1.2.2", "@testing-library/react-hooks": "^8.0.1", - "@tanstack/react-query": ">=5.0.0" + "@tanstack/react-query": ">=5.0.0", + "@wagmi/connectors": "^4.1.14" }, "scripts": { "build": "pnpm run clean && pnpm run build:cjs && pnpm run build:esm && pnpm run build:types", @@ -99,11 +100,11 @@ }, "peerDependencies": { "@tanstack/react-query": ">=5.0.0", - "@wagmi/core": "beta", + "@wagmi/core": "^2.6.5", "op-viem": "1.3.1-alpha", "typescript": ">=5.0.4", - "viem": "beta", - "wagmi": "beta" + "viem": "^2.7.9", + "wagmi": "^2.5.7" }, "peerDependenciesMeta": { "typescript": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index da5fb4d..9ccba8d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,19 +13,19 @@ importers: dependencies: '@eth-optimism/contracts-ts': specifier: ^0.15.0 - version: 0.15.0(@wagmi/core@2.0.0-beta.5)(typescript@5.0.4)(wagmi@2.0.0-beta.5) + version: 0.15.0(@wagmi/core@2.6.5)(typescript@5.0.4)(wagmi@2.5.7) '@wagmi/core': - specifier: beta - version: 2.0.0-beta.5(@types/react@18.2.38)(react@18.2.0)(typescript@5.0.4)(viem@2.0.0-beta.6) + specifier: ^2.6.5 + version: 2.6.5(@types/react@18.2.38)(react@18.2.0)(typescript@5.0.4)(viem@2.7.9) op-viem: specifier: 1.3.1-alpha - version: 1.3.1-alpha(@wagmi/core@2.0.0-beta.5)(typescript@5.0.4)(viem@2.0.0-beta.6)(wagmi@2.0.0-beta.5) + version: 1.3.1-alpha(@wagmi/core@2.6.5)(typescript@5.0.4)(viem@2.7.9)(wagmi@2.5.7) viem: - specifier: beta - version: 2.0.0-beta.6(typescript@5.0.4)(zod@3.22.4) + specifier: ^2.7.9 + version: 2.7.9(typescript@5.0.4)(zod@3.22.4) wagmi: - specifier: beta - version: 2.0.0-beta.5(@tanstack/react-query@5.8.6)(@types/react@18.2.38)(react-native@0.72.7)(react@18.2.0)(typescript@5.0.4)(viem@2.0.0-beta.6) + specifier: ^2.5.7 + version: 2.5.7(@tanstack/react-query@5.8.6)(@types/react@18.2.38)(react-dom@18.2.0)(react-native@0.72.7)(react@18.2.0)(typescript@5.0.4)(viem@2.7.9) devDependencies: '@biomejs/biome': specifier: 1.0.0 @@ -67,8 +67,11 @@ importers: specifier: ^1.2.2 version: 1.2.2(vitest@1.2.2) '@wagmi/cli': - specifier: beta - version: 2.0.0-beta.5(typescript@5.0.4) + specifier: ^2.1.1 + version: 2.1.1(typescript@5.0.4) + '@wagmi/connectors': + specifier: ^4.1.14 + version: 4.1.14(@types/react@18.2.38)(@wagmi/core@2.6.5)(react-dom@18.2.0)(react-native@0.72.7)(react@18.2.0)(typescript@5.0.4)(viem@2.7.9) dprint: specifier: ^0.42.5 version: 0.42.5 @@ -168,10 +171,6 @@ packages: /@adraffy/ens-normalize@1.10.0: resolution: {integrity: sha512-nA9XHtlAkYfJxY7bce8DcN7eKxWWCWkU+1GR9d+U6MbNpfwQp8TI7vqOsBsMcHoT4mBu2kypKoSKnghEzOOq5Q==} - dev: false - - /@adraffy/ens-normalize@1.9.4: - resolution: {integrity: sha512-UK0bHA7hh9cR39V+4gl2/NnBBjoXIxkuWAPCaY4X7fbH4L/azIi7ilWOCjMUYfpJgraLUAqkRi2BqrjME8Rynw==} /@algolia/autocomplete-core@1.9.3(@algolia/client-search@4.20.0)(algoliasearch@4.20.0)(search-insights@2.11.0): resolution: {integrity: sha512-009HdfugtGCdC4JdXUbVJClA0q0zh24yyePn+KUGk3rP7j8FEe/m5Yo/z65gn6nP/cM39PxpzqKrL7A6fP6PPw==} @@ -452,7 +451,7 @@ packages: resolution: {integrity: sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.23.4 + '@babel/types': 7.23.9 /@babel/helper-module-transforms@7.23.3(@babel/core@7.23.3): resolution: {integrity: sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==} @@ -1613,14 +1612,6 @@ packages: transitivePeerDependencies: - supports-color - /@babel/types@7.23.4: - resolution: {integrity: sha512-7uIFwVYpoplT5jp/kVv6EF93VaJ8H+Yn5IczYiaAi98ajzjfoZfslet/e0sLh+wVBjb2qqIut1b0S26VSafsSQ==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-string-parser': 7.23.4 - '@babel/helper-validator-identifier': 7.22.20 - to-fast-properties: 2.0.0 - /@babel/types@7.23.9: resolution: {integrity: sha512-dQjSq/7HaSjRM43FFGnv5keM2HsxpmyV1PfaSVm0nzzjwwTmjOe6J4bC8e3+pTEIgHaHj+1ZlLThRJ2auc/w1Q==} engines: {node: '>=6.9.0'} @@ -1904,11 +1895,9 @@ packages: prettier: 2.8.8 dev: true - /@coinbase/wallet-sdk@3.9.0-canary.2: - resolution: {integrity: sha512-zwNvFwHPbXgk0Mccnvt5wfvDarrfTcx0+vZqKWtukkv/vWGI83nEYVDJjTfXx7reJwJdHwT6CQUKUjZ7ARIhYA==} - engines: {node: '>= 10.0.0'} + /@coinbase/wallet-sdk@3.9.1: + resolution: {integrity: sha512-cGUE8wm1/cMI8irRMVOqbFWYcnNugqCtuy2lnnHfgloBg+GRLs9RsrkOUDMdv/StfUeeKhCDyYudsXXvcL1xIA==} dependencies: - bind-decorator: 1.0.11 bn.js: 5.2.1 buffer: 6.0.3 clsx: 1.2.1 @@ -1917,11 +1906,9 @@ packages: eventemitter3: 5.0.1 keccak: 3.0.4 preact: 10.19.2 - rxjs: 6.6.7 sha.js: 2.4.11 transitivePeerDependencies: - supports-color - dev: false /@docsearch/css@3.5.2: resolution: {integrity: sha512-SPiDHaWKQZpwR2siD0KQUwlStvIAnEyK6tAE2h2Wuoq8ue9skzhlyVQ1ddzOxX6khULnAALDiR/isSF3bnuciA==} @@ -2039,7 +2026,6 @@ packages: find-root: 1.1.0 source-map: 0.5.7 stylis: 4.2.0 - dev: false /@emotion/cache@11.11.0: resolution: {integrity: sha512-P34z9ssTCBi3e9EI1ZsWpNHcfY1r09ZO0rZbRO2ob3ZQMnFI35jB536qoXbkdesr5EUhYi22anuEJuyxifaqAQ==} @@ -2049,21 +2035,17 @@ packages: '@emotion/utils': 1.2.1 '@emotion/weak-memoize': 0.3.1 stylis: 4.2.0 - dev: false /@emotion/hash@0.9.1: resolution: {integrity: sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ==} - dev: false /@emotion/is-prop-valid@1.2.1: resolution: {integrity: sha512-61Mf7Ufx4aDxx1xlDeOm8aFFigGHE4z+0sKCa+IHCeZKiyP9RLD0Mmx7m8b9/Cf37f7NAvQOOJAbQQGVr5uERw==} dependencies: '@emotion/memoize': 0.8.1 - dev: false /@emotion/memoize@0.8.1: resolution: {integrity: sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==} - dev: false /@emotion/react@11.11.1(@types/react@18.2.38)(react@18.2.0): resolution: {integrity: sha512-5mlW1DquU5HaxjLkfkGN1GA/fvVGdyHURRiX/0FHl2cfIfRxSOfmxEH5YS43edp0OldZrZ+dkBKbngxcNCdZvA==} @@ -2084,7 +2066,6 @@ packages: '@types/react': 18.2.38 hoist-non-react-statics: 3.3.2 react: 18.2.0 - dev: false /@emotion/serialize@1.1.2: resolution: {integrity: sha512-zR6a/fkFP4EAcCMQtLOhIgpprZOwNmCldtpaISpvz348+DP4Mz8ZoKaGGCQpbzepNIUWbq4w6hNZkwDyKoS+HA==} @@ -2094,11 +2075,9 @@ packages: '@emotion/unitless': 0.8.1 '@emotion/utils': 1.2.1 csstype: 3.1.3 - dev: false /@emotion/sheet@1.2.2: resolution: {integrity: sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA==} - dev: false /@emotion/styled@11.11.0(@emotion/react@11.11.1)(@types/react@18.2.38)(react@18.2.0): resolution: {integrity: sha512-hM5Nnvu9P3midq5aaXj4I+lnSfNi7Pmd4EWk1fOZ3pxookaQTNew6bp4JaCBYM4HVFZF9g7UjJmsUmC2JlxOng==} @@ -2119,11 +2098,9 @@ packages: '@emotion/utils': 1.2.1 '@types/react': 18.2.38 react: 18.2.0 - dev: false /@emotion/unitless@0.8.1: resolution: {integrity: sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ==} - dev: false /@emotion/use-insertion-effect-with-fallbacks@1.0.1(react@18.2.0): resolution: {integrity: sha512-jT/qyKZ9rzLErtrjGgdkMBn2OP8wl0G3sQlBb3YPryvKHsjvINUhVaPFfP+fpBcOkmrVOVEEHQFJ7nbj2TH2gw==} @@ -2131,24 +2108,12 @@ packages: react: '>=16.8.0' dependencies: react: 18.2.0 - dev: false /@emotion/utils@1.2.1: resolution: {integrity: sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg==} - dev: false /@emotion/weak-memoize@0.3.1: resolution: {integrity: sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==} - dev: false - - /@esbuild/android-arm64@0.16.17: - resolution: {integrity: sha512-MIGl6p5sc3RDTLLkYL1MyL8BMRN4tLMRCn+yRJJmEDvYZ2M7tmAf80hx1kbNEUX2KJ50RRtxZ4JHLvCfuB6kBg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [android] - requiresBuild: true - dev: true - optional: true /@esbuild/android-arm64@0.19.7: resolution: {integrity: sha512-YEDcw5IT7hW3sFKZBkCAQaOCJQLONVcD4bOyTXMZz5fr66pTHnAet46XAtbXAkJRfIn2YVhdC6R9g4xa27jQ1w==} @@ -2159,15 +2124,6 @@ packages: dev: true optional: true - /@esbuild/android-arm@0.16.17: - resolution: {integrity: sha512-N9x1CMXVhtWEAMS7pNNONyA14f71VPQN9Cnavj1XQh6T7bskqiLLrSca4O0Vr8Wdcga943eThxnVp3JLnBMYtw==} - engines: {node: '>=12'} - cpu: [arm] - os: [android] - requiresBuild: true - dev: true - optional: true - /@esbuild/android-arm@0.19.7: resolution: {integrity: sha512-YGSPnndkcLo4PmVl2tKatEn+0mlVMr3yEpOOT0BeMria87PhvoJb5dg5f5Ft9fbCVgtAz4pWMzZVgSEGpDAlww==} engines: {node: '>=12'} @@ -2177,15 +2133,6 @@ packages: dev: true optional: true - /@esbuild/android-x64@0.16.17: - resolution: {integrity: sha512-a3kTv3m0Ghh4z1DaFEuEDfz3OLONKuFvI4Xqczqx4BqLyuFaFkuaG4j2MtA6fuWEFeC5x9IvqnX7drmRq/fyAQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [android] - requiresBuild: true - dev: true - optional: true - /@esbuild/android-x64@0.19.7: resolution: {integrity: sha512-jhINx8DEjz68cChFvM72YzrqfwJuFbfvSxZAk4bebpngGfNNRm+zRl4rtT9oAX6N9b6gBcFaJHFew5Blf6CvUw==} engines: {node: '>=12'} @@ -2195,15 +2142,6 @@ packages: dev: true optional: true - /@esbuild/darwin-arm64@0.16.17: - resolution: {integrity: sha512-/2agbUEfmxWHi9ARTX6OQ/KgXnOWfsNlTeLcoV7HSuSTv63E4DqtAc+2XqGw1KHxKMHGZgbVCZge7HXWX9Vn+w==} - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - /@esbuild/darwin-arm64@0.19.7: resolution: {integrity: sha512-dr81gbmWN//3ZnBIm6YNCl4p3pjnabg1/ZVOgz2fJoUO1a3mq9WQ/1iuEluMs7mCL+Zwv7AY5e3g1hjXqQZ9Iw==} engines: {node: '>=12'} @@ -2213,15 +2151,6 @@ packages: dev: true optional: true - /@esbuild/darwin-x64@0.16.17: - resolution: {integrity: sha512-2By45OBHulkd9Svy5IOCZt376Aa2oOkiE9QWUK9fe6Tb+WDr8hXL3dpqi+DeLiMed8tVXspzsTAvd0jUl96wmg==} - engines: {node: '>=12'} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - /@esbuild/darwin-x64@0.19.7: resolution: {integrity: sha512-Lc0q5HouGlzQEwLkgEKnWcSazqr9l9OdV2HhVasWJzLKeOt0PLhHaUHuzb8s/UIya38DJDoUm74GToZ6Wc7NGQ==} engines: {node: '>=12'} @@ -2231,15 +2160,6 @@ packages: dev: true optional: true - /@esbuild/freebsd-arm64@0.16.17: - resolution: {integrity: sha512-mt+cxZe1tVx489VTb4mBAOo2aKSnJ33L9fr25JXpqQqzbUIw/yzIzi+NHwAXK2qYV1lEFp4OoVeThGjUbmWmdw==} - engines: {node: '>=12'} - cpu: [arm64] - os: [freebsd] - requiresBuild: true - dev: true - optional: true - /@esbuild/freebsd-arm64@0.19.7: resolution: {integrity: sha512-+y2YsUr0CxDFF7GWiegWjGtTUF6gac2zFasfFkRJPkMAuMy9O7+2EH550VlqVdpEEchWMynkdhC9ZjtnMiHImQ==} engines: {node: '>=12'} @@ -2249,15 +2169,6 @@ packages: dev: true optional: true - /@esbuild/freebsd-x64@0.16.17: - resolution: {integrity: sha512-8ScTdNJl5idAKjH8zGAsN7RuWcyHG3BAvMNpKOBaqqR7EbUhhVHOqXRdL7oZvz8WNHL2pr5+eIT5c65kA6NHug==} - engines: {node: '>=12'} - cpu: [x64] - os: [freebsd] - requiresBuild: true - dev: true - optional: true - /@esbuild/freebsd-x64@0.19.7: resolution: {integrity: sha512-CdXOxIbIzPJmJhrpmJTLx+o35NoiKBIgOvmvT+jeSadYiWJn0vFKsl+0bSG/5lwjNHoIDEyMYc/GAPR9jxusTA==} engines: {node: '>=12'} @@ -2267,15 +2178,6 @@ packages: dev: true optional: true - /@esbuild/linux-arm64@0.16.17: - resolution: {integrity: sha512-7S8gJnSlqKGVJunnMCrXHU9Q8Q/tQIxk/xL8BqAP64wchPCTzuM6W3Ra8cIa1HIflAvDnNOt2jaL17vaW+1V0g==} - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - /@esbuild/linux-arm64@0.19.7: resolution: {integrity: sha512-inHqdOVCkUhHNvuQPT1oCB7cWz9qQ/Cz46xmVe0b7UXcuIJU3166aqSunsqkgSGMtUCWOZw3+KMwI6otINuC9g==} engines: {node: '>=12'} @@ -2285,15 +2187,6 @@ packages: dev: true optional: true - /@esbuild/linux-arm@0.16.17: - resolution: {integrity: sha512-iihzrWbD4gIT7j3caMzKb/RsFFHCwqqbrbH9SqUSRrdXkXaygSZCZg1FybsZz57Ju7N/SHEgPyaR0LZ8Zbe9gQ==} - engines: {node: '>=12'} - cpu: [arm] - os: [linux] - requiresBuild: true - dev: true - optional: true - /@esbuild/linux-arm@0.19.7: resolution: {integrity: sha512-Y+SCmWxsJOdQtjcBxoacn/pGW9HDZpwsoof0ttL+2vGcHokFlfqV666JpfLCSP2xLxFpF1lj7T3Ox3sr95YXww==} engines: {node: '>=12'} @@ -2303,15 +2196,6 @@ packages: dev: true optional: true - /@esbuild/linux-ia32@0.16.17: - resolution: {integrity: sha512-kiX69+wcPAdgl3Lonh1VI7MBr16nktEvOfViszBSxygRQqSpzv7BffMKRPMFwzeJGPxcio0pdD3kYQGpqQ2SSg==} - engines: {node: '>=12'} - cpu: [ia32] - os: [linux] - requiresBuild: true - dev: true - optional: true - /@esbuild/linux-ia32@0.19.7: resolution: {integrity: sha512-2BbiL7nLS5ZO96bxTQkdO0euGZIUQEUXMTrqLxKUmk/Y5pmrWU84f+CMJpM8+EHaBPfFSPnomEaQiG/+Gmh61g==} engines: {node: '>=12'} @@ -2321,15 +2205,6 @@ packages: dev: true optional: true - /@esbuild/linux-loong64@0.16.17: - resolution: {integrity: sha512-dTzNnQwembNDhd654cA4QhbS9uDdXC3TKqMJjgOWsC0yNCbpzfWoXdZvp0mY7HU6nzk5E0zpRGGx3qoQg8T2DQ==} - engines: {node: '>=12'} - cpu: [loong64] - os: [linux] - requiresBuild: true - dev: true - optional: true - /@esbuild/linux-loong64@0.19.7: resolution: {integrity: sha512-BVFQla72KXv3yyTFCQXF7MORvpTo4uTA8FVFgmwVrqbB/4DsBFWilUm1i2Oq6zN36DOZKSVUTb16jbjedhfSHw==} engines: {node: '>=12'} @@ -2339,15 +2214,6 @@ packages: dev: true optional: true - /@esbuild/linux-mips64el@0.16.17: - resolution: {integrity: sha512-ezbDkp2nDl0PfIUn0CsQ30kxfcLTlcx4Foz2kYv8qdC6ia2oX5Q3E/8m6lq84Dj/6b0FrkgD582fJMIfHhJfSw==} - engines: {node: '>=12'} - cpu: [mips64el] - os: [linux] - requiresBuild: true - dev: true - optional: true - /@esbuild/linux-mips64el@0.19.7: resolution: {integrity: sha512-DzAYckIaK+pS31Q/rGpvUKu7M+5/t+jI+cdleDgUwbU7KdG2eC3SUbZHlo6Q4P1CfVKZ1lUERRFP8+q0ob9i2w==} engines: {node: '>=12'} @@ -2357,15 +2223,6 @@ packages: dev: true optional: true - /@esbuild/linux-ppc64@0.16.17: - resolution: {integrity: sha512-dzS678gYD1lJsW73zrFhDApLVdM3cUF2MvAa1D8K8KtcSKdLBPP4zZSLy6LFZ0jYqQdQ29bjAHJDgz0rVbLB3g==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [linux] - requiresBuild: true - dev: true - optional: true - /@esbuild/linux-ppc64@0.19.7: resolution: {integrity: sha512-JQ1p0SmUteNdUaaiRtyS59GkkfTW0Edo+e0O2sihnY4FoZLz5glpWUQEKMSzMhA430ctkylkS7+vn8ziuhUugQ==} engines: {node: '>=12'} @@ -2375,15 +2232,6 @@ packages: dev: true optional: true - /@esbuild/linux-riscv64@0.16.17: - resolution: {integrity: sha512-ylNlVsxuFjZK8DQtNUwiMskh6nT0vI7kYl/4fZgV1llP5d6+HIeL/vmmm3jpuoo8+NuXjQVZxmKuhDApK0/cKw==} - engines: {node: '>=12'} - cpu: [riscv64] - os: [linux] - requiresBuild: true - dev: true - optional: true - /@esbuild/linux-riscv64@0.19.7: resolution: {integrity: sha512-xGwVJ7eGhkprY/nB7L7MXysHduqjpzUl40+XoYDGC4UPLbnG+gsyS1wQPJ9lFPcxYAaDXbdRXd1ACs9AE9lxuw==} engines: {node: '>=12'} @@ -2393,15 +2241,6 @@ packages: dev: true optional: true - /@esbuild/linux-s390x@0.16.17: - resolution: {integrity: sha512-gzy7nUTO4UA4oZ2wAMXPNBGTzZFP7mss3aKR2hH+/4UUkCOyqmjXiKpzGrY2TlEUhbbejzXVKKGazYcQTZWA/w==} - engines: {node: '>=12'} - cpu: [s390x] - os: [linux] - requiresBuild: true - dev: true - optional: true - /@esbuild/linux-s390x@0.19.7: resolution: {integrity: sha512-U8Rhki5PVU0L0nvk+E8FjkV8r4Lh4hVEb9duR6Zl21eIEYEwXz8RScj4LZWA2i3V70V4UHVgiqMpszXvG0Yqhg==} engines: {node: '>=12'} @@ -2411,15 +2250,6 @@ packages: dev: true optional: true - /@esbuild/linux-x64@0.16.17: - resolution: {integrity: sha512-mdPjPxfnmoqhgpiEArqi4egmBAMYvaObgn4poorpUaqmvzzbvqbowRllQ+ZgzGVMGKaPkqUmPDOOFQRUFDmeUw==} - engines: {node: '>=12'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - /@esbuild/linux-x64@0.19.7: resolution: {integrity: sha512-ZYZopyLhm4mcoZXjFt25itRlocKlcazDVkB4AhioiL9hOWhDldU9n38g62fhOI4Pth6vp+Mrd5rFKxD0/S+7aQ==} engines: {node: '>=12'} @@ -2429,15 +2259,6 @@ packages: dev: true optional: true - /@esbuild/netbsd-x64@0.16.17: - resolution: {integrity: sha512-/PzmzD/zyAeTUsduZa32bn0ORug+Jd1EGGAUJvqfeixoEISYpGnAezN6lnJoskauoai0Jrs+XSyvDhppCPoKOA==} - engines: {node: '>=12'} - cpu: [x64] - os: [netbsd] - requiresBuild: true - dev: true - optional: true - /@esbuild/netbsd-x64@0.19.7: resolution: {integrity: sha512-/yfjlsYmT1O3cum3J6cmGG16Fd5tqKMcg5D+sBYLaOQExheAJhqr8xOAEIuLo8JYkevmjM5zFD9rVs3VBcsjtQ==} engines: {node: '>=12'} @@ -2447,15 +2268,6 @@ packages: dev: true optional: true - /@esbuild/openbsd-x64@0.16.17: - resolution: {integrity: sha512-2yaWJhvxGEz2RiftSk0UObqJa/b+rIAjnODJgv2GbGGpRwAfpgzyrg1WLK8rqA24mfZa9GvpjLcBBg8JHkoodg==} - engines: {node: '>=12'} - cpu: [x64] - os: [openbsd] - requiresBuild: true - dev: true - optional: true - /@esbuild/openbsd-x64@0.19.7: resolution: {integrity: sha512-MYDFyV0EW1cTP46IgUJ38OnEY5TaXxjoDmwiTXPjezahQgZd+j3T55Ht8/Q9YXBM0+T9HJygrSRGV5QNF/YVDQ==} engines: {node: '>=12'} @@ -2465,15 +2277,6 @@ packages: dev: true optional: true - /@esbuild/sunos-x64@0.16.17: - resolution: {integrity: sha512-xtVUiev38tN0R3g8VhRfN7Zl42YCJvyBhRKw1RJjwE1d2emWTVToPLNEQj/5Qxc6lVFATDiy6LjVHYhIPrLxzw==} - engines: {node: '>=12'} - cpu: [x64] - os: [sunos] - requiresBuild: true - dev: true - optional: true - /@esbuild/sunos-x64@0.19.7: resolution: {integrity: sha512-JcPvgzf2NN/y6X3UUSqP6jSS06V0DZAV/8q0PjsZyGSXsIGcG110XsdmuWiHM+pno7/mJF6fjH5/vhUz/vA9fw==} engines: {node: '>=12'} @@ -2483,15 +2286,6 @@ packages: dev: true optional: true - /@esbuild/win32-arm64@0.16.17: - resolution: {integrity: sha512-ga8+JqBDHY4b6fQAmOgtJJue36scANy4l/rL97W+0wYmijhxKetzZdKOJI7olaBaMhWt8Pac2McJdZLxXWUEQw==} - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: true - optional: true - /@esbuild/win32-arm64@0.19.7: resolution: {integrity: sha512-ZA0KSYti5w5toax5FpmfcAgu3ZNJxYSRm0AW/Dao5up0YV1hDVof1NvwLomjEN+3/GMtaWDI+CIyJOMTRSTdMw==} engines: {node: '>=12'} @@ -2501,15 +2295,6 @@ packages: dev: true optional: true - /@esbuild/win32-ia32@0.16.17: - resolution: {integrity: sha512-WnsKaf46uSSF/sZhwnqE4L/F89AYNMiD4YtEcYekBt9Q7nj0DiId2XH2Ng2PHM54qi5oPrQ8luuzGszqi/veig==} - engines: {node: '>=12'} - cpu: [ia32] - os: [win32] - requiresBuild: true - dev: true - optional: true - /@esbuild/win32-ia32@0.19.7: resolution: {integrity: sha512-CTOnijBKc5Jpk6/W9hQMMvJnsSYRYgveN6O75DTACCY18RA2nqka8dTZR+x/JqXCRiKk84+5+bRKXUSbbwsS0A==} engines: {node: '>=12'} @@ -2519,15 +2304,6 @@ packages: dev: true optional: true - /@esbuild/win32-x64@0.16.17: - resolution: {integrity: sha512-y+EHuSchhL7FjHgvQL/0fnnFmO4T1bhvWANX6gcnqTjtnKWbTvUMCpGnv2+t+31d7RzyEAYAd4u2fnIhHL6N/Q==} - engines: {node: '>=12'} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: true - optional: true - /@esbuild/win32-x64@0.19.7: resolution: {integrity: sha512-gRaP2sk6hc98N734luX4VpF318l3w+ofrtTu9j5L8EQXF+FzQKV6alCOHMVoJJHvVK/mGbwBXfOL1HETQu9IGQ==} engines: {node: '>=12'} @@ -2542,7 +2318,7 @@ packages: requiresBuild: true dev: true - /@eth-optimism/contracts-ts@0.15.0(@wagmi/core@2.0.0-beta.5)(typescript@5.0.4)(wagmi@2.0.0-beta.5): + /@eth-optimism/contracts-ts@0.15.0(@wagmi/core@2.6.5)(typescript@5.0.4)(wagmi@2.5.7): resolution: {integrity: sha512-qga3xsj+NhnxjY96TWktKAmc2DSYrdy0E+lVkS3NZ/b5w898IisoMj/Xvv3KoovBJmnk+/ENNnMX7kk+fwQdtA==} peerDependencies: '@wagmi/core': '>1.0.0' @@ -2554,11 +2330,11 @@ packages: optional: true dependencies: '@testing-library/react': 14.1.2(react-dom@18.2.0)(react@18.2.0) - '@wagmi/core': 2.0.0-beta.5(@types/react@18.2.38)(react@18.2.0)(typescript@5.0.4)(viem@2.0.0-beta.6) + '@wagmi/core': 2.6.5(@types/react@18.2.38)(react@18.2.0)(typescript@5.0.4)(viem@2.7.9) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) viem: 1.19.9(typescript@5.0.4) - wagmi: 2.0.0-beta.5(@tanstack/react-query@5.8.6)(@types/react@18.2.38)(react-native@0.72.7)(react@18.2.0)(typescript@5.0.4)(viem@2.0.0-beta.6) + wagmi: 2.5.7(@tanstack/react-query@5.8.6)(@types/react@18.2.38)(react-dom@18.2.0)(react-native@0.72.7)(react@18.2.0)(typescript@5.0.4)(viem@2.7.9) transitivePeerDependencies: - bufferutil - typescript @@ -2676,7 +2452,6 @@ packages: dependencies: '@ethereumjs/util': 8.1.0 crc-32: 1.2.2 - dev: false /@ethereumjs/rlp@4.0.1: resolution: {integrity: sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw==} @@ -2691,7 +2466,6 @@ packages: '@ethereumjs/rlp': 4.0.1 '@ethereumjs/util': 8.1.0 ethereum-cryptography: 2.1.2 - dev: false /@ethereumjs/util@8.1.0: resolution: {integrity: sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA==} @@ -3026,7 +2800,6 @@ packages: /@ioredis/commands@1.2.0: resolution: {integrity: sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg==} - dev: false /@isaacs/cliui@8.0.2: resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} @@ -3139,19 +2912,13 @@ packages: '@jridgewell/resolve-uri': 3.1.1 '@jridgewell/sourcemap-codec': 1.4.15 - /@ledgerhq/connect-kit-loader@1.1.2: - resolution: {integrity: sha512-mscwGroSJQrCTjtNGBu+18FQbZYA4+q6Tyx6K7CXHl6AwgZKbWfZYdgP2F+fyZcRUdGRsMX8QtvU61VcGGtO1A==} - dev: false - /@lit-labs/ssr-dom-shim@1.1.2: resolution: {integrity: sha512-jnOD+/+dSrfTWYfSXBXlo5l5f0q1UuJo3tkbMDCYA2lKUYq79jaxqtGEvnRoh049nt1vdo1+45RinipU6FGY2g==} - dev: false /@lit/reactive-element@1.6.3: resolution: {integrity: sha512-QuTgnG52Poic7uM1AN5yJ09QMe0O28e10XzSvWDz02TJiiKee4stsiownEIadWm8nYzyDAyT+gKzUoZmiWQtsQ==} dependencies: '@lit-labs/ssr-dom-shim': 1.1.2 - dev: false /@manypkg/find-root@1.1.0: resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} @@ -3182,7 +2949,6 @@ packages: '@metamask/utils': 5.0.2 transitivePeerDependencies: - supports-color - dev: false /@metamask/json-rpc-engine@7.3.0: resolution: {integrity: sha512-93cOdqnpt0P9uU/aC65GZulaDh6qNFEm8IFXHbI4lisK7oebU2SLarJUBZPebjko7hzwmfV1M1h7FQAlyRkVLg==} @@ -3193,7 +2959,6 @@ packages: '@metamask/utils': 8.2.1 transitivePeerDependencies: - supports-color - dev: false /@metamask/object-multiplex@1.3.0: resolution: {integrity: sha512-czcQeVYdSNtabd+NcYQnrM69MciiJyd1qvKH8WM2Id3C0ZiUUX5Xa/MK+/VUk633DBhVOwdNzAKIQ33lGyA+eQ==} @@ -3202,13 +2967,11 @@ packages: end-of-stream: 1.4.4 once: 1.4.0 readable-stream: 2.3.8 - dev: false /@metamask/onboarding@1.0.1: resolution: {integrity: sha512-FqHhAsCI+Vacx2qa5mAFcWNSrTcVGMNjzxVgaX8ECSny/BJ9/vgXP9V7WF/8vb9DltPeQkxr+Fnfmm6GHfmdTQ==} dependencies: bowser: 2.11.0 - dev: false /@metamask/post-message-stream@6.2.0: resolution: {integrity: sha512-WunZ0bruClF862mvbKQGETn5SM0XKGmocPMQR1Ew6sYix9/FDzeoZnoI8RkXk01E+70FCdxhTE/r8kk5SFOuTw==} @@ -3218,7 +2981,6 @@ packages: readable-stream: 2.3.3 transitivePeerDependencies: - supports-color - dev: false /@metamask/providers@10.2.1: resolution: {integrity: sha512-p2TXw2a1Nb8czntDGfeIYQnk4LLVbd5vlcb3GY//lylYlKdSqp+uUTegCvxiFblRDOT68jsY8Ib1VEEzVUOolA==} @@ -3236,7 +2998,6 @@ packages: json-rpc-middleware-stream: 4.2.3 pump: 3.0.0 webextension-polyfill-ts: 0.25.0 - dev: false /@metamask/rpc-errors@6.1.0: resolution: {integrity: sha512-JQElKxai26FpDyRKO/yH732wI+BV90i1u6pOuDOpdADSbppB2g1pPh3AGST1zkZqEE9eIKIUw8UdBQ4rp3VTSg==} @@ -3246,47 +3007,45 @@ packages: fast-safe-stringify: 2.1.1 transitivePeerDependencies: - supports-color - dev: false /@metamask/safe-event-emitter@2.0.0: resolution: {integrity: sha512-/kSXhY692qiV1MXu6EeOZvg5nECLclxNXcKCxJ3cXQgYuRymRHpdx/t7JXfsK+JLjwA1e1c1/SBrlQYpusC29Q==} - dev: false /@metamask/safe-event-emitter@3.0.0: resolution: {integrity: sha512-j6Z47VOmVyGMlnKXZmL0fyvWfEYtKWCA9yGZkU3FCsGZUT5lHGmvaV9JA5F2Y+010y7+ROtR3WMXIkvl/nVzqQ==} engines: {node: '>=12.0.0'} - dev: false - /@metamask/sdk-communication-layer@0.8.0: - resolution: {integrity: sha512-p0xpqJn35vLzHlaCC16GGotTaWDJ7bhYMZuBs0/b8hoIsT7WZ+cKdsKA7gkxIRuoKzsN7txaYn+45lrdL3YjFw==} + /@metamask/sdk-communication-layer@0.14.3: + resolution: {integrity: sha512-yjSbj8y7fFbQXv2HBzUX6D9C8BimkCYP6BDV7hdw53W8b/GlYCtXVxUFajQ9tuO1xPTRjR/xt/dkdr2aCi6WGw==} dependencies: + bufferutil: 4.0.8 cross-fetch: 3.1.8 date-fns: 2.30.0 eciesjs: 0.3.18 eventemitter2: 6.4.9 - socket.io-client: 4.7.2 + socket.io-client: 4.7.2(bufferutil@4.0.8)(utf-8-validate@6.0.3) + utf-8-validate: 6.0.3 uuid: 8.3.2 transitivePeerDependencies: - - bufferutil - encoding - supports-color - - utf-8-validate - dev: false - /@metamask/sdk-install-modal-web@0.7.0(@types/react@18.2.38): - resolution: {integrity: sha512-R4iMn3KEGZ1rM52PBX3ZTLK8UKxkYIus0aqtKWy5At/OUe6/VhEtyJY7Eqv9rw9f/0uVPAxSjns3dJVT/ehg9Q==} + /@metamask/sdk-install-modal-web@0.14.1(@types/react@18.2.38)(react-native@0.72.7): + resolution: {integrity: sha512-emT8HKbnfVwGhPxyUfMja6DWzvtJvDEBQxqCVx93H0HsyrrOzOC43iGCAosslw6o5h7gOfRKLqWmK8V7jQAS2Q==} dependencies: '@emotion/react': 11.11.1(@types/react@18.2.38)(react@18.2.0) '@emotion/styled': 11.11.0(@emotion/react@11.11.1)(@types/react@18.2.38)(react@18.2.0) + i18next: 22.5.1 qr-code-styling: 1.6.0-rc.1 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + react-i18next: 13.5.0(i18next@22.5.1)(react-dom@18.2.0)(react-native@0.72.7)(react@18.2.0) transitivePeerDependencies: - '@types/react' - dev: false + - react-native - /@metamask/sdk@0.8.0(@types/react@18.2.38)(react-native@0.72.7)(react@18.2.0): - resolution: {integrity: sha512-DcsLlOcEmYhJLWQgeVYELzsBXIxhmh4JQxwwJitlAXZU5P4qFvsgVgy5aEUoffC4xg6zHgorVEBEg/XMncJcwA==} + /@metamask/sdk@0.14.3(@types/react@18.2.38)(react-dom@18.2.0)(react-native@0.72.7)(react@18.2.0): + resolution: {integrity: sha512-BYLs//nY2wioVSih78gOQI6sLIYY3vWkwVqXGYUgkBV+bi49bv+9S0m+hZ2cwiRaxfMYtKs0KvhAQ8weiYwDrg==} peerDependencies: react: ^18.2.0 react-native: '*' @@ -3299,8 +3058,8 @@ packages: '@metamask/onboarding': 1.0.1 '@metamask/post-message-stream': 6.2.0 '@metamask/providers': 10.2.1 - '@metamask/sdk-communication-layer': 0.8.0 - '@metamask/sdk-install-modal-web': 0.7.0(@types/react@18.2.38) + '@metamask/sdk-communication-layer': 0.14.3 + '@metamask/sdk-install-modal-web': 0.14.1(@types/react@18.2.38)(react-native@0.72.7) '@react-native-async-storage/async-storage': 1.19.8(react-native@0.72.7) '@types/dom-screen-wake-lock': 1.0.3 bowser: 2.11.0 @@ -3309,23 +3068,28 @@ packages: eth-rpc-errors: 4.0.3 eventemitter2: 6.4.9 extension-port-stream: 2.1.1 + i18next: 22.5.1 + i18next-browser-languagedetector: 7.2.0 obj-multiplex: 1.0.0 pump: 3.0.0 - qrcode-terminal: 0.12.0 + qrcode-terminal-nooctal: 0.12.1 react: 18.2.0 + react-i18next: 13.5.0(i18next@22.5.1)(react-dom@18.2.0)(react-native@0.72.7)(react@18.2.0) react-native: 0.72.7(@babel/core@7.23.3)(@babel/preset-env@7.23.3)(react@18.2.0) react-native-webview: 11.26.1(react-native@0.72.7)(react@18.2.0) readable-stream: 2.3.8 - socket.io-client: 4.7.2 + rollup-plugin-visualizer: 5.12.0 + socket.io-client: 4.7.2(bufferutil@4.0.8)(utf-8-validate@6.0.3) util: 0.12.5 uuid: 8.3.2 transitivePeerDependencies: - '@types/react' - bufferutil - encoding + - react-dom + - rollup - supports-color - utf-8-validate - dev: false /@metamask/utils@5.0.2: resolution: {integrity: sha512-yfmE79bRQtnMzarnKfX7AEJBwFTxvTyw3nBQlu/5rmGXrjAeAMltoGxO62TFurxrQAFMNa/fEjIHNvungZp0+g==} @@ -3338,7 +3102,6 @@ packages: superstruct: 1.0.3 transitivePeerDependencies: - supports-color - dev: false /@metamask/utils@8.2.1: resolution: {integrity: sha512-dlnpow8r0YHDDL1xKCEwUoTGOAo9icdv+gaJG0EbgDnkD/BDqW2eH1XMtm9i7rPaiHWo/aLtcrh9WBhkCq/viw==} @@ -3354,7 +3117,6 @@ packages: superstruct: 1.0.3 transitivePeerDependencies: - supports-color - dev: false /@motionone/animation@10.16.3: resolution: {integrity: sha512-QUGWpLbMFLhyqKlngjZhjtxM8IqiJQjLK0DF+XOF6od9nhSvlaeEpOY/UMCRVcZn/9Tr2rZO22EkuCIjYdI74g==} @@ -3363,7 +3125,6 @@ packages: '@motionone/types': 10.16.3 '@motionone/utils': 10.16.3 tslib: 2.6.2 - dev: false /@motionone/dom@10.16.4: resolution: {integrity: sha512-HPHlVo/030qpRj9R8fgY50KTN4Ko30moWRTA3L3imrsRBmob93cTYmodln49HYFbQm01lFF7X523OkKY0DX6UA==} @@ -3374,14 +3135,12 @@ packages: '@motionone/utils': 10.16.3 hey-listen: 1.0.8 tslib: 2.6.2 - dev: false /@motionone/easing@10.16.3: resolution: {integrity: sha512-HWTMZbTmZojzwEuKT/xCdvoMPXjYSyQvuVM6jmM0yoGU6BWzsmYMeB4bn38UFf618fJCNtP9XeC/zxtKWfbr0w==} dependencies: '@motionone/utils': 10.16.3 tslib: 2.6.2 - dev: false /@motionone/generators@10.16.4: resolution: {integrity: sha512-geFZ3w0Rm0ZXXpctWsSf3REGywmLLujEjxPYpBR0j+ymYwof0xbV6S5kGqqsDKgyWKVWpUInqQYvQfL6fRbXeg==} @@ -3389,18 +3148,15 @@ packages: '@motionone/types': 10.16.3 '@motionone/utils': 10.16.3 tslib: 2.6.2 - dev: false /@motionone/svelte@10.16.4: resolution: {integrity: sha512-zRVqk20lD1xqe+yEDZhMYgftsuHc25+9JSo+r0a0OWUJFocjSV9D/+UGhX4xgJsuwB9acPzXLr20w40VnY2PQA==} dependencies: '@motionone/dom': 10.16.4 tslib: 2.6.2 - dev: false /@motionone/types@10.16.3: resolution: {integrity: sha512-W4jkEGFifDq73DlaZs3HUfamV2t1wM35zN/zX7Q79LfZ2sc6C0R1baUHZmqc/K5F3vSw3PavgQ6HyHLd/MXcWg==} - dev: false /@motionone/utils@10.16.3: resolution: {integrity: sha512-WNWDksJIxQkaI9p9Z9z0+K27xdqISGNFy1SsWVGaiedTHq0iaT6iZujby8fT/ZnZxj1EOaxJtSfUPCFNU5CRoA==} @@ -3408,14 +3164,13 @@ packages: '@motionone/types': 10.16.3 hey-listen: 1.0.8 tslib: 2.6.2 - dev: false /@motionone/vue@10.16.4: resolution: {integrity: sha512-z10PF9JV6SbjFq+/rYabM+8CVlMokgl8RFGvieSGNTmrkQanfHn+15XBrhG3BgUfvmTeSeyShfOHpG0i9zEdcg==} + deprecated: Motion One for Vue is deprecated. Use Oku Motion instead https://oku-ui.com/motion dependencies: '@motionone/dom': 10.16.4 tslib: 2.6.2 - dev: false /@next/env@14.1.0: resolution: {integrity: sha512-Py8zIo+02ht82brwwhTg36iogzFqGLPXlRGKQw5s+qP/kMNc4MAyDeEwBKDijk6zTIbegEgu8Qy7C1LboslQAw==} @@ -3547,7 +3302,6 @@ packages: cpu: [arm64] os: [android] requiresBuild: true - dev: false optional: true /@parcel/watcher-darwin-arm64@2.3.0: @@ -3556,7 +3310,6 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true - dev: false optional: true /@parcel/watcher-darwin-x64@2.3.0: @@ -3565,7 +3318,6 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true - dev: false optional: true /@parcel/watcher-freebsd-x64@2.3.0: @@ -3574,7 +3326,6 @@ packages: cpu: [x64] os: [freebsd] requiresBuild: true - dev: false optional: true /@parcel/watcher-linux-arm-glibc@2.3.0: @@ -3583,7 +3334,6 @@ packages: cpu: [arm] os: [linux] requiresBuild: true - dev: false optional: true /@parcel/watcher-linux-arm64-glibc@2.3.0: @@ -3592,7 +3342,6 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true - dev: false optional: true /@parcel/watcher-linux-arm64-musl@2.3.0: @@ -3601,7 +3350,6 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true - dev: false optional: true /@parcel/watcher-linux-x64-glibc@2.3.0: @@ -3610,7 +3358,6 @@ packages: cpu: [x64] os: [linux] requiresBuild: true - dev: false optional: true /@parcel/watcher-linux-x64-musl@2.3.0: @@ -3619,7 +3366,6 @@ packages: cpu: [x64] os: [linux] requiresBuild: true - dev: false optional: true /@parcel/watcher-wasm@2.3.0: @@ -3629,7 +3375,6 @@ packages: is-glob: 4.0.3 micromatch: 4.0.5 napi-wasm: 1.1.0 - dev: false bundledDependencies: - napi-wasm @@ -3639,7 +3384,6 @@ packages: cpu: [arm64] os: [win32] requiresBuild: true - dev: false optional: true /@parcel/watcher-win32-ia32@2.3.0: @@ -3648,7 +3392,6 @@ packages: cpu: [ia32] os: [win32] requiresBuild: true - dev: false optional: true /@parcel/watcher-win32-x64@2.3.0: @@ -3657,7 +3400,6 @@ packages: cpu: [x64] os: [win32] requiresBuild: true - dev: false optional: true /@parcel/watcher@2.3.0: @@ -3681,7 +3423,6 @@ packages: '@parcel/watcher-win32-arm64': 2.3.0 '@parcel/watcher-win32-ia32': 2.3.0 '@parcel/watcher-win32-x64': 2.3.0 - dev: false /@pkgjs/parseargs@0.11.0: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} @@ -3697,7 +3438,6 @@ packages: dependencies: merge-options: 3.0.4 react-native: 0.72.7(@babel/core@7.23.3)(@babel/preset-env@7.23.3)(react@18.2.0) - dev: false /@react-native-community/cli-clean@11.3.10: resolution: {integrity: sha512-g6QjW+DSqoWRHzmIQW3AH22k1AnynWuOdy2YPwYEGgPddTeXZtJphIpEVwDOiC0L4mZv2VmiX33/cGNUwO0cIA==} @@ -4004,8 +3744,8 @@ packages: dev: true optional: true - /@safe-global/safe-apps-provider@0.18.0(typescript@5.0.4): - resolution: {integrity: sha512-C6xN+rRfDn1ShF2Om08h1htuK6M6CttUdahCOSiNVdzGqW5d0nv2RHSO1IntvdQnyd5tBMo31Fy+7XrCve7ORA==} + /@safe-global/safe-apps-provider@0.18.1(typescript@5.0.4): + resolution: {integrity: sha512-V4a05A3EgJcriqtDoJklDz1BOinWhC6P0hjUSxshA4KOZM7rGPCTto/usXs09zr1vvL28evl/NldSTv97j2bmg==} dependencies: '@safe-global/safe-apps-sdk': 8.1.0(typescript@5.0.4) events: 3.3.0 @@ -4014,7 +3754,6 @@ packages: - typescript - utf-8-validate - zod - dev: false /@safe-global/safe-apps-sdk@8.1.0(typescript@5.0.4): resolution: {integrity: sha512-XJbEPuaVc7b9n23MqlF6c+ToYIS3f7P2Sel8f3cSBQ9WORE4xrSuvhMpK9fDSFqJ7by/brc+rmJR/5HViRr0/w==} @@ -4026,12 +3765,10 @@ packages: - typescript - utf-8-validate - zod - dev: false /@safe-global/safe-gateway-typescript-sdk@3.13.2: resolution: {integrity: sha512-kGlJecJHBzGrGTq/yhLANh56t+Zur6Ubpt+/w03ARX1poDb4TM8vKU3iV8tuYpk359PPWp+Qvjnqb9oW2YQcYw==} engines: {node: '>=16'} - dev: false /@scure/base@1.1.3: resolution: {integrity: sha512-/+SgoRjLq7Xlf0CWuLHq2LUZeL/w65kfzAPG5NH9pcmBhs+nunQTn4gvdwgMTIXnt9b2C/1SeL2XiysZEyIC9Q==} @@ -4082,21 +3819,17 @@ packages: /@socket.io/component-emitter@3.1.0: resolution: {integrity: sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==} - dev: false /@stablelib/aead@1.0.1: resolution: {integrity: sha512-q39ik6sxGHewqtO0nP4BuSe3db5G1fEJE8ukvngS2gLkBXyy6E7pLubhbYgnkDFv6V8cWaxcE4Xn0t6LWcJkyg==} - dev: false /@stablelib/binary@1.0.1: resolution: {integrity: sha512-ClJWvmL6UBM/wjkvv/7m5VP3GMr9t0osr4yVgLZsLCOz4hGN9gIAFEqnJ0TsSMAN+n840nf2cHZnA5/KFqHC7Q==} dependencies: '@stablelib/int': 1.0.1 - dev: false /@stablelib/bytes@1.0.1: resolution: {integrity: sha512-Kre4Y4kdwuqL8BR2E9hV/R5sOrUj6NanZaZis0V6lX5yzqC3hBuVSDXUIBqQv/sCpmuWRiHLwqiT1pqqjuBXoQ==} - dev: false /@stablelib/chacha20poly1305@1.0.1: resolution: {integrity: sha512-MmViqnqHd1ymwjOQfghRKw2R/jMIGT3wySN7cthjXCBdO+qErNPUBnRzqNpnvIwg7JBCg3LdeCZZO4de/yEhVA==} @@ -4107,18 +3840,15 @@ packages: '@stablelib/constant-time': 1.0.1 '@stablelib/poly1305': 1.0.1 '@stablelib/wipe': 1.0.1 - dev: false /@stablelib/chacha@1.0.1: resolution: {integrity: sha512-Pmlrswzr0pBzDofdFuVe1q7KdsHKhhU24e8gkEwnTGOmlC7PADzLVxGdn2PoNVBBabdg0l/IfLKg6sHAbTQugg==} dependencies: '@stablelib/binary': 1.0.1 '@stablelib/wipe': 1.0.1 - dev: false /@stablelib/constant-time@1.0.1: resolution: {integrity: sha512-tNOs3uD0vSJcK6z1fvef4Y+buN7DXhzHDPqRLSXUel1UfqMB1PWNsnnAezrKfEwTLpN0cGH2p9NNjs6IqeD0eg==} - dev: false /@stablelib/ed25519@1.0.3: resolution: {integrity: sha512-puIMWaX9QlRsbhxfDc5i+mNPMY+0TmQEskunY1rZEBPi1acBCVQAhnsk/1Hk50DGPtVsZtAWQg4NHGlVaO9Hqg==} @@ -4126,11 +3856,9 @@ packages: '@stablelib/random': 1.0.2 '@stablelib/sha512': 1.0.1 '@stablelib/wipe': 1.0.1 - dev: false /@stablelib/hash@1.0.1: resolution: {integrity: sha512-eTPJc/stDkdtOcrNMZ6mcMK1e6yBbqRBaNW55XA1jU8w/7QdnCF0CmMmOD1m7VSkBR44PWrMHU2l6r8YEQHMgg==} - dev: false /@stablelib/hkdf@1.0.1: resolution: {integrity: sha512-SBEHYE16ZXlHuaW5RcGk533YlBj4grMeg5TooN80W3NpcHRtLZLLXvKyX0qcRFxf+BGDobJLnwkvgEwHIDBR6g==} @@ -4138,7 +3866,6 @@ packages: '@stablelib/hash': 1.0.1 '@stablelib/hmac': 1.0.1 '@stablelib/wipe': 1.0.1 - dev: false /@stablelib/hmac@1.0.1: resolution: {integrity: sha512-V2APD9NSnhVpV/QMYgCVMIYKiYG6LSqw1S65wxVoirhU/51ACio6D4yDVSwMzuTJXWZoVHbDdINioBwKy5kVmA==} @@ -4146,31 +3873,26 @@ packages: '@stablelib/constant-time': 1.0.1 '@stablelib/hash': 1.0.1 '@stablelib/wipe': 1.0.1 - dev: false /@stablelib/int@1.0.1: resolution: {integrity: sha512-byr69X/sDtDiIjIV6m4roLVWnNNlRGzsvxw+agj8CIEazqWGOQp2dTYgQhtyVXV9wpO6WyXRQUzLV/JRNumT2w==} - dev: false /@stablelib/keyagreement@1.0.1: resolution: {integrity: sha512-VKL6xBwgJnI6l1jKrBAfn265cspaWBPAPEc62VBQrWHLqVgNRE09gQ/AnOEyKUWrrqfD+xSQ3u42gJjLDdMDQg==} dependencies: '@stablelib/bytes': 1.0.1 - dev: false /@stablelib/poly1305@1.0.1: resolution: {integrity: sha512-1HlG3oTSuQDOhSnLwJRKeTRSAdFNVB/1djy2ZbS35rBSJ/PFqx9cf9qatinWghC2UbfOYD8AcrtbUQl8WoxabA==} dependencies: '@stablelib/constant-time': 1.0.1 '@stablelib/wipe': 1.0.1 - dev: false /@stablelib/random@1.0.2: resolution: {integrity: sha512-rIsE83Xpb7clHPVRlBj8qNe5L8ISQOzjghYQm/dZ7VaM2KHYwMW5adjQjrzTZCchFnNCNhkwtnOBa9HTMJCI8w==} dependencies: '@stablelib/binary': 1.0.1 '@stablelib/wipe': 1.0.1 - dev: false /@stablelib/sha256@1.0.1: resolution: {integrity: sha512-GIIH3e6KH+91FqGV42Kcj71Uefd/QEe7Dy42sBTeqppXV95ggCcxLTk39bEr+lZfJmp+ghsR07J++ORkRELsBQ==} @@ -4178,7 +3900,6 @@ packages: '@stablelib/binary': 1.0.1 '@stablelib/hash': 1.0.1 '@stablelib/wipe': 1.0.1 - dev: false /@stablelib/sha512@1.0.1: resolution: {integrity: sha512-13gl/iawHV9zvDKciLo1fQ8Bgn2Pvf7OV6amaRVKiq3pjQ3UmEpXxWiAfV8tYjUpeZroBxtyrwtdooQT/i3hzw==} @@ -4186,11 +3907,9 @@ packages: '@stablelib/binary': 1.0.1 '@stablelib/hash': 1.0.1 '@stablelib/wipe': 1.0.1 - dev: false /@stablelib/wipe@1.0.1: resolution: {integrity: sha512-WfqfX/eXGiAd3RJe4VU2snh/ZPwtSjLG4ynQ/vYzvghTh7dHFcI1wl+nrkWG6lGhukOxOsUHfv8dUXr58D0ayg==} - dev: false /@stablelib/x25519@1.0.3: resolution: {integrity: sha512-KnTbKmUhPhHavzobclVJQG5kuivH+qDLpe84iRqX3CLrKp881cF160JvXJ+hjn1aMyCwYOKeIZefIH/P5cJoRw==} @@ -4198,7 +3917,6 @@ packages: '@stablelib/keyagreement': 1.0.1 '@stablelib/random': 1.0.2 '@stablelib/wipe': 1.0.1 - dev: false /@swc/helpers@0.5.2: resolution: {integrity: sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==} @@ -4283,17 +4001,14 @@ packages: dependencies: '@types/filesystem': 0.0.35 '@types/har-format': 1.2.15 - dev: false /@types/debug@4.1.12: resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} dependencies: '@types/ms': 0.7.34 - dev: false /@types/dom-screen-wake-lock@1.0.3: resolution: {integrity: sha512-3Iten7X3Zgwvk6kh6/NRdwN7WbZ760YgFCsF5AxDifltUQzW1RaW+WRmcVtgwFzLjaNu64H+0MPJ13yRa8g3Dw==} - dev: false /@types/estree@1.0.5: resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} @@ -4303,15 +4018,12 @@ packages: resolution: {integrity: sha512-1eKvCaIBdrD2mmMgy5dwh564rVvfEhZTWVQQGRNn0Nt4ZEnJ0C8oSUCzvMKRA4lGde5oEVo+q2MrTTbV/GHDCQ==} dependencies: '@types/filewriter': 0.0.32 - dev: false /@types/filewriter@0.0.32: resolution: {integrity: sha512-Kpi2GXQyYJdjL8mFclL1eDgihn1SIzorMZjD94kdPZh9E4VxGOeyjPxi5LpsM4Zku7P0reqegZTt2GxhmA9VBg==} - dev: false /@types/har-format@1.2.15: resolution: {integrity: sha512-RpQH4rXLuvTXKR0zqHq3go0RVXYv/YVqv4TnPH95VbwUxZdQlK1EtcMvQvMpDngHbt13Csh9Z4qT9AbkiQH5BA==} - dev: false /@types/is-ci@3.0.4: resolution: {integrity: sha512-AkCYCmwlXeuH89DagDCzvCAyltI2v9lh3U3DqSg/GrBYoReAaWwxfXCqMx9UV5MajLZ4ZFwZzV4cABGIxk2XRw==} @@ -4353,7 +4065,6 @@ packages: /@types/ms@0.7.34: resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==} - dev: false /@types/node@12.20.55: resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} @@ -4370,7 +4081,6 @@ packages: /@types/parse-json@4.0.2: resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==} - dev: false /@types/prop-types@15.7.11: resolution: {integrity: sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==} @@ -4394,7 +4104,6 @@ packages: resolution: {integrity: sha512-hHxJU6PAEUn0TP4S/ZOzuTUvJWuZ6eIKeNKb5RBpODvSl6hp1Wrw4s7ATY50rklRCScUDpHzVA/DQdSjJ3UoYQ==} dependencies: '@types/node': 20.10.0 - dev: false /@types/semver@7.5.6: resolution: {integrity: sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==} @@ -4405,7 +4114,6 @@ packages: /@types/trusted-types@2.0.7: resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==} - dev: false /@types/use-sync-external-store@0.0.3: resolution: {integrity: sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA==} @@ -4754,60 +4462,59 @@ packages: - vue dev: true - /@wagmi/cli@2.0.0-beta.5(typescript@5.0.4): - resolution: {integrity: sha512-fa+B53/MlMEcpIGcs5YPWqB5CNegLR/LHYIaYFAfuM8AxJaOwy/Kl5Pl91sCGj9ABoB+tg2SHrtBHLcKQ4lH4Q==} + /@wagmi/cli@2.1.1(typescript@5.0.4): + resolution: {integrity: sha512-AzE/CrltZAMUP/Qknb27n50Stc34TBSbGOszhcPEVQVxZUG5pVHw3vOpcJdBtHo7Y2FW7uvo4DGZCMKhs7IXAw==} hasBin: true peerDependencies: - typescript: '>=5' + typescript: '>=5.0.4' peerDependenciesMeta: typescript: optional: true dependencies: abitype: 0.9.10(typescript@5.0.4)(zod@3.22.4) - bundle-require: 3.1.2(esbuild@0.16.17) + bundle-require: 4.0.2(esbuild@0.19.7) cac: 6.7.14 change-case: 4.1.2 chokidar: 3.5.3 dedent: 0.7.0 dotenv: 16.3.1 dotenv-expand: 10.0.0 - esbuild: 0.16.17 - execa: 6.1.0 + esbuild: 0.19.7 + execa: 8.0.1 find-up: 6.3.0 - fs-extra: 10.1.0 + fs-extra: 11.2.0 globby: 13.2.2 ora: 6.3.1 pathe: 1.1.1 picocolors: 1.0.0 prettier: 3.1.0 typescript: 5.0.4 - viem: 2.0.0-beta.6(typescript@5.0.4)(zod@3.22.4) + viem: 2.7.9(typescript@5.0.4)(zod@3.22.4) zod: 3.22.4 transitivePeerDependencies: - bufferutil - utf-8-validate dev: true - /@wagmi/connectors@4.0.0-beta.5(@types/react@18.2.38)(@wagmi/core@2.0.0-beta.5)(react-native@0.72.7)(react@18.2.0)(typescript@5.0.4)(viem@2.0.0-beta.6): - resolution: {integrity: sha512-0852OKh1DFYRg77AsgXtgYHKfcGseJWt5XY0bVbElZc3LM0NIlEcBkSPmsj1wQbNSrMUhX+vcDgsXpsMYU1lnQ==} + /@wagmi/connectors@4.1.14(@types/react@18.2.38)(@wagmi/core@2.6.5)(react-dom@18.2.0)(react-native@0.72.7)(react@18.2.0)(typescript@5.0.4)(viem@2.7.9): + resolution: {integrity: sha512-e8I89FsNBtzhIilU3nqmgMR9xvSgCfmkWLz9iCKBTqyitbK5EJU7WTEtjjYFm1v2J//JeAwaA2XEKtG9BLR9jQ==} peerDependencies: - '@wagmi/core': 2.0.0-beta.5 + '@wagmi/core': 2.6.5 typescript: '>=5.0.4' - viem: 2.0.0-beta.6 + viem: 2.x peerDependenciesMeta: typescript: optional: true dependencies: - '@coinbase/wallet-sdk': 3.9.0-canary.2 - '@ledgerhq/connect-kit-loader': 1.1.2 - '@metamask/sdk': 0.8.0(@types/react@18.2.38)(react-native@0.72.7)(react@18.2.0) - '@safe-global/safe-apps-provider': 0.18.0(typescript@5.0.4) + '@coinbase/wallet-sdk': 3.9.1 + '@metamask/sdk': 0.14.3(@types/react@18.2.38)(react-dom@18.2.0)(react-native@0.72.7)(react@18.2.0) + '@safe-global/safe-apps-provider': 0.18.1(typescript@5.0.4) '@safe-global/safe-apps-sdk': 8.1.0(typescript@5.0.4) - '@wagmi/core': 2.0.0-beta.5(@types/react@18.2.38)(react@18.2.0)(typescript@5.0.4)(viem@2.0.0-beta.6) - '@walletconnect/ethereum-provider': 2.10.5(@types/react@18.2.38)(react@18.2.0) + '@wagmi/core': 2.6.5(@types/react@18.2.38)(react@18.2.0)(typescript@5.0.4)(viem@2.7.9) + '@walletconnect/ethereum-provider': 2.11.1(@types/react@18.2.38)(react@18.2.0) '@walletconnect/modal': 2.6.2(@types/react@18.2.38)(react@18.2.0) typescript: 5.0.4 - viem: 2.0.0-beta.6(typescript@5.0.4)(zod@3.22.4) + viem: 2.7.9(typescript@5.0.4)(zod@3.22.4) transitivePeerDependencies: - '@azure/app-configuration' - '@azure/cosmos' @@ -4825,18 +4532,19 @@ packages: - bufferutil - encoding - react + - react-dom - react-native + - rollup - supports-color - utf-8-validate - zod - dev: false - /@wagmi/core@2.0.0-beta.5(@types/react@18.2.38)(react@18.2.0)(typescript@5.0.4)(viem@2.0.0-beta.6): - resolution: {integrity: sha512-up+JrK6LNgiCyguIUZGUnkSjdHB0Z59TAE3F7XD4Dgu1M5Ra7yjk4smCNlLDGwfAG7hykyodyPTHxHVufW6E3Q==} + /@wagmi/core@2.6.5(@types/react@18.2.38)(react@18.2.0)(typescript@5.0.4)(viem@2.7.9): + resolution: {integrity: sha512-DLyrc0o+dx05oIhBJuxnS7ekS5e6rB5mytlqPme+Km7aLdeBdcfYB4yJyYCyWoi93OLa7M5sbflTttz3o56bKw==} peerDependencies: '@tanstack/query-core': '>=5.0.0' typescript: '>=5.0.4' - viem: 2.0.0-beta.6 + viem: 2.x peerDependenciesMeta: '@tanstack/query-core': optional: true @@ -4846,8 +4554,8 @@ packages: eventemitter3: 5.0.1 mipd: 0.0.5(typescript@5.0.4) typescript: 5.0.4 - viem: 2.0.0-beta.6(typescript@5.0.4)(zod@3.22.4) - zustand: 4.4.6(@types/react@18.2.38)(react@18.2.0) + viem: 2.7.9(typescript@5.0.4)(zod@3.22.4) + zustand: 4.4.1(@types/react@18.2.38)(react@18.2.0) transitivePeerDependencies: - '@types/react' - bufferutil @@ -4855,10 +4563,9 @@ packages: - react - utf-8-validate - zod - dev: false - /@walletconnect/core@2.10.5: - resolution: {integrity: sha512-QnGHkA05KzJrtqExPqXm/TsstM1uTDI8tQT0x86/DuR6LdiYEntzSpVjnv7kKK6Mo9UxlXfud431dNRfOW5uJg==} + /@walletconnect/core@2.11.1: + resolution: {integrity: sha512-T57Vd7YdbHPsy3tthBuwrhaZNafN0+PqjISFRNeJy/bsKdXxpJg2hGSARuOTpCO7V6VcaatqlaSMuG3DrnG5rA==} dependencies: '@walletconnect/heartbeat': 1.2.1 '@walletconnect/jsonrpc-provider': 1.0.13 @@ -4871,9 +4578,10 @@ packages: '@walletconnect/relay-auth': 1.0.4 '@walletconnect/safe-json': 1.0.2 '@walletconnect/time': 1.0.2 - '@walletconnect/types': 2.10.5 - '@walletconnect/utils': 2.10.5 + '@walletconnect/types': 2.11.1 + '@walletconnect/utils': 2.11.1 events: 3.3.0 + isomorphic-unfetch: 3.1.0 lodash.isequal: 4.5.0 uint8arrays: 3.1.1 transitivePeerDependencies: @@ -4890,28 +4598,27 @@ packages: - '@upstash/redis' - '@vercel/kv' - bufferutil + - encoding - supports-color - utf-8-validate - dev: false /@walletconnect/environment@1.0.1: resolution: {integrity: sha512-T426LLZtHj8e8rYnKfzsw1aG6+M0BT1ZxayMdv/p8yM0MU+eJDISqNY3/bccxRr4LrF9csq02Rhqt08Ibl0VRg==} dependencies: tslib: 1.14.1 - dev: false - /@walletconnect/ethereum-provider@2.10.5(@types/react@18.2.38)(react@18.2.0): - resolution: {integrity: sha512-Pihi2M03cRkWEiGetRUiO2A506YTj/Bbbxp+Ct7t5N5SccoeuhrzsEt30pA7I0XAiOnAeKp79OKmXHRhXfRmhg==} + /@walletconnect/ethereum-provider@2.11.1(@types/react@18.2.38)(react@18.2.0): + resolution: {integrity: sha512-UfQH0ho24aa2M1xYmanbJv2ggQPebKmQytp2j20QEvURJ2R0v7YKWZ+0PfwOs6o6cuGw6gGxy/0WQXQRZSAsfg==} dependencies: '@walletconnect/jsonrpc-http-connection': 1.0.7 '@walletconnect/jsonrpc-provider': 1.0.13 '@walletconnect/jsonrpc-types': 1.0.3 '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/modal': 2.6.2(@types/react@18.2.38)(react@18.2.0) - '@walletconnect/sign-client': 2.10.5 - '@walletconnect/types': 2.10.5 - '@walletconnect/universal-provider': 2.10.5 - '@walletconnect/utils': 2.10.5 + '@walletconnect/sign-client': 2.11.1 + '@walletconnect/types': 2.11.1 + '@walletconnect/universal-provider': 2.11.1 + '@walletconnect/utils': 2.11.1 events: 3.3.0 transitivePeerDependencies: - '@azure/app-configuration' @@ -4932,14 +4639,12 @@ packages: - react - supports-color - utf-8-validate - dev: false /@walletconnect/events@1.0.1: resolution: {integrity: sha512-NPTqaoi0oPBVNuLv7qPaJazmGHs5JGyO8eEAk5VGKmJzDR7AHzD4k6ilox5kxk1iwiOnFopBOOMLs86Oa76HpQ==} dependencies: keyvaluestorage-interface: 1.0.0 tslib: 1.14.1 - dev: false /@walletconnect/heartbeat@1.2.1: resolution: {integrity: sha512-yVzws616xsDLJxuG/28FqtZ5rzrTA4gUjdEMTbWB5Y8V1XHRmqq4efAxCw5ie7WjbXFSUyBHaWlMR+2/CpQC5Q==} @@ -4947,7 +4652,6 @@ packages: '@walletconnect/events': 1.0.1 '@walletconnect/time': 1.0.2 tslib: 1.14.1 - dev: false /@walletconnect/jsonrpc-http-connection@1.0.7: resolution: {integrity: sha512-qlfh8fCfu8LOM9JRR9KE0s0wxP6ZG9/Jom8M0qsoIQeKF3Ni0FyV4V1qy/cc7nfI46SLQLSl4tgWSfLiE1swyQ==} @@ -4958,7 +4662,6 @@ packages: tslib: 1.14.1 transitivePeerDependencies: - encoding - dev: false /@walletconnect/jsonrpc-provider@1.0.13: resolution: {integrity: sha512-K73EpThqHnSR26gOyNEL+acEex3P7VWZe6KE12ZwKzAt2H4e5gldZHbjsu2QR9cLeJ8AXuO7kEMOIcRv1QEc7g==} @@ -4966,14 +4669,12 @@ packages: '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/safe-json': 1.0.2 tslib: 1.14.1 - dev: false /@walletconnect/jsonrpc-types@1.0.3: resolution: {integrity: sha512-iIQ8hboBl3o5ufmJ8cuduGad0CQm3ZlsHtujv9Eu16xq89q+BG7Nh5VLxxUgmtpnrePgFkTwXirCTkwJH1v+Yw==} dependencies: keyvaluestorage-interface: 1.0.0 tslib: 1.14.1 - dev: false /@walletconnect/jsonrpc-utils@1.0.8: resolution: {integrity: sha512-vdeb03bD8VzJUL6ZtzRYsFMq1eZQcM3EAzT0a3st59dyLfJ0wq+tKMpmGH7HlB7waD858UWgfIcudbPFsbzVdw==} @@ -4981,7 +4682,6 @@ packages: '@walletconnect/environment': 1.0.1 '@walletconnect/jsonrpc-types': 1.0.3 tslib: 1.14.1 - dev: false /@walletconnect/jsonrpc-ws-connection@1.0.14: resolution: {integrity: sha512-Jsl6fC55AYcbkNVkwNM6Jo+ufsuCQRqViOQ8ZBPH9pRREHH9welbBiszuTLqEJiQcO/6XfFDl6bzCJIkrEi8XA==} @@ -4993,7 +4693,6 @@ packages: transitivePeerDependencies: - bufferutil - utf-8-validate - dev: false /@walletconnect/keyvaluestorage@1.1.1: resolution: {integrity: sha512-V7ZQq2+mSxAq7MrRqDxanTzu2RcElfK1PfNYiaVnJgJ7Q7G7hTVwF8voIBx92qsRyGHZihrwNPHuZd1aKkd0rA==} @@ -5019,14 +4718,12 @@ packages: - '@upstash/redis' - '@vercel/kv' - supports-color - dev: false /@walletconnect/logger@2.0.1: resolution: {integrity: sha512-SsTKdsgWm+oDTBeNE/zHxxr5eJfZmE9/5yp/Ku+zJtcTAjELb3DXueWkDXmE9h8uHIbJzIb5wj5lPdzyrjT6hQ==} dependencies: pino: 7.11.0 tslib: 1.14.1 - dev: false /@walletconnect/modal-core@2.6.2(@types/react@18.2.38)(react@18.2.0): resolution: {integrity: sha512-cv8ibvdOJQv2B+nyxP9IIFdxvQznMz8OOr/oR/AaUZym4hjXNL/l1a2UlSQBXrVjo3xxbouMxLb3kBsHoYP2CA==} @@ -5035,7 +4732,6 @@ packages: transitivePeerDependencies: - '@types/react' - react - dev: false /@walletconnect/modal-ui@2.6.2(@types/react@18.2.38)(react@18.2.0): resolution: {integrity: sha512-rbdstM1HPGvr7jprQkyPggX7rP4XiCG85ZA+zWBEX0dVQg8PpAgRUqpeub4xQKDgY7pY/xLRXSiCVdWGqvG2HA==} @@ -5047,7 +4743,6 @@ packages: transitivePeerDependencies: - '@types/react' - react - dev: false /@walletconnect/modal@2.6.2(@types/react@18.2.38)(react@18.2.0): resolution: {integrity: sha512-eFopgKi8AjKf/0U4SemvcYw9zlLpx9njVN8sf6DAkowC2Md0gPU/UNEbH1Wwj407pEKnEds98pKWib1NN1ACoA==} @@ -5057,14 +4752,12 @@ packages: transitivePeerDependencies: - '@types/react' - react - dev: false /@walletconnect/relay-api@1.0.9: resolution: {integrity: sha512-Q3+rylJOqRkO1D9Su0DPE3mmznbAalYapJ9qmzDgK28mYF9alcP3UwG/og5V7l7CFOqzCLi7B8BvcBUrpDj0Rg==} dependencies: '@walletconnect/jsonrpc-types': 1.0.3 tslib: 1.14.1 - dev: false /@walletconnect/relay-auth@1.0.4: resolution: {integrity: sha512-kKJcS6+WxYq5kshpPaxGHdwf5y98ZwbfuS4EE/NkQzqrDFm5Cj+dP8LofzWvjrrLkZq7Afy7WrQMXdLy8Sx7HQ==} @@ -5075,25 +4768,23 @@ packages: '@walletconnect/time': 1.0.2 tslib: 1.14.1 uint8arrays: 3.1.1 - dev: false /@walletconnect/safe-json@1.0.2: resolution: {integrity: sha512-Ogb7I27kZ3LPC3ibn8ldyUr5544t3/STow9+lzz7Sfo808YD7SBWk7SAsdBFlYgP2zDRy2hS3sKRcuSRM0OTmA==} dependencies: tslib: 1.14.1 - dev: false - /@walletconnect/sign-client@2.10.5: - resolution: {integrity: sha512-HEYsoeGC6fGplQy0NIZSRNHgOwZwQ892UWG1Ahkcasf2R35QaBgnTVQkSCisl1PAAOKXZG7yB1YDoAAZBF+g5Q==} + /@walletconnect/sign-client@2.11.1: + resolution: {integrity: sha512-s3oKSx6/F5X2WmkV1jfJImBFACf9Km5HpTb+n5q+mobJVpUQw/clvoVyIrNNppLhm1V1S/ylHXh0qCrDppDpCA==} dependencies: - '@walletconnect/core': 2.10.5 + '@walletconnect/core': 2.11.1 '@walletconnect/events': 1.0.1 '@walletconnect/heartbeat': 1.2.1 '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/logger': 2.0.1 '@walletconnect/time': 1.0.2 - '@walletconnect/types': 2.10.5 - '@walletconnect/utils': 2.10.5 + '@walletconnect/types': 2.11.1 + '@walletconnect/utils': 2.11.1 events: 3.3.0 transitivePeerDependencies: - '@azure/app-configuration' @@ -5109,18 +4800,17 @@ packages: - '@upstash/redis' - '@vercel/kv' - bufferutil + - encoding - supports-color - utf-8-validate - dev: false /@walletconnect/time@1.0.2: resolution: {integrity: sha512-uzdd9woDcJ1AaBZRhqy5rNC9laqWGErfc4dxA9a87mPdKOgWMD85mcFo9dIYIts/Jwocfwn07EC6EzclKubk/g==} dependencies: tslib: 1.14.1 - dev: false - /@walletconnect/types@2.10.5: - resolution: {integrity: sha512-N8xaN7/Kob93rKxKDaT6oy6symgIkAwyLqq0/dLJEhXfv7S/gyNvDka4SosjVVTc4oTvE1+OmxNIR8pB1DuwJw==} + /@walletconnect/types@2.11.1: + resolution: {integrity: sha512-UbdbX+d6MOK0AXKxt5imV3KvAcLVpZUHylaRDIP5ffwVylM/p4DHnKppil1Qq5N+IGDr3RsUwLGFkKjqsQYRKw==} dependencies: '@walletconnect/events': 1.0.1 '@walletconnect/heartbeat': 1.2.1 @@ -5142,19 +4832,18 @@ packages: - '@upstash/redis' - '@vercel/kv' - supports-color - dev: false - /@walletconnect/universal-provider@2.10.5: - resolution: {integrity: sha512-sQOvjrGF6za7+6zv7KI9eQz2gzRbS19j7U1z+JwIWdn4VBJmriaTjVHDz/R1liwKcS4sUiUthDC6WmQvjukjZQ==} + /@walletconnect/universal-provider@2.11.1: + resolution: {integrity: sha512-BJvPYByIfbBYF4x8mqDV79ebQX0tD54pp8itsqrHWn0qKZeJyIH8sQ69yY0GnbJrzoFS3ZLULdC0yDxWDeuRGw==} dependencies: '@walletconnect/jsonrpc-http-connection': 1.0.7 '@walletconnect/jsonrpc-provider': 1.0.13 '@walletconnect/jsonrpc-types': 1.0.3 '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/logger': 2.0.1 - '@walletconnect/sign-client': 2.10.5 - '@walletconnect/types': 2.10.5 - '@walletconnect/utils': 2.10.5 + '@walletconnect/sign-client': 2.11.1 + '@walletconnect/types': 2.11.1 + '@walletconnect/utils': 2.11.1 events: 3.3.0 transitivePeerDependencies: - '@azure/app-configuration' @@ -5173,10 +4862,9 @@ packages: - encoding - supports-color - utf-8-validate - dev: false - /@walletconnect/utils@2.10.5: - resolution: {integrity: sha512-3yeclD9/AlPEIHBqBVzrHUO/KRAEIXVK0ViIQ5oUH+zT3TpdsDGDiW1Z0TsAQ1EiYoiiz8dOQzd80a3eZVwnrg==} + /@walletconnect/utils@2.11.1: + resolution: {integrity: sha512-wRFDHN86dZ05mCET1H3912odIeQa8j7cZKxl1FlWRpV2YsILj9HCYSX6Uq2brwO02Kv2vryke44G1r8XI/LViA==} dependencies: '@stablelib/chacha20poly1305': 1.0.1 '@stablelib/hkdf': 1.0.1 @@ -5186,7 +4874,7 @@ packages: '@walletconnect/relay-api': 1.0.9 '@walletconnect/safe-json': 1.0.2 '@walletconnect/time': 1.0.2 - '@walletconnect/types': 2.10.5 + '@walletconnect/types': 2.11.1 '@walletconnect/window-getters': 1.0.1 '@walletconnect/window-metadata': 1.0.1 detect-browser: 5.3.0 @@ -5206,23 +4894,20 @@ packages: - '@upstash/redis' - '@vercel/kv' - supports-color - dev: false /@walletconnect/window-getters@1.0.1: resolution: {integrity: sha512-vHp+HqzGxORPAN8gY03qnbTMnhqIwjeRJNOMOAzePRg4xVEEE2WvYsI9G2NMjOknA8hnuYbU3/hwLcKbjhc8+Q==} dependencies: tslib: 1.14.1 - dev: false /@walletconnect/window-metadata@1.0.1: resolution: {integrity: sha512-9koTqyGrM2cqFRW517BPY/iEtUDx2r1+Pwwu5m7sJ7ka79wi3EyqhqcICk/yDmv6jAS1rjKgTKXlEhanYjijcA==} dependencies: '@walletconnect/window-getters': 1.0.1 tslib: 1.14.1 - dev: false - /abitype@0.10.0(typescript@5.0.4)(zod@3.22.4): - resolution: {integrity: sha512-QvMHEUzgI9nPj9TWtUGnS2scas80/qaL5PBxGdwWhhvzqXfOph+IEiiiWrzuisu3U3JgDQVruW9oLbJoQ3oZ3A==} + /abitype@0.9.10(typescript@5.0.4)(zod@3.22.4): + resolution: {integrity: sha512-FIS7U4n7qwAT58KibwYig5iFG4K61rbhAqaQh/UWj8v1Y8mjX3F8TC9gd8cz9yT1TYel9f8nS5NO5kZp2RW0jQ==} peerDependencies: typescript: '>=5.0.4' zod: ^3 >=3.22.0 @@ -5234,12 +4919,13 @@ packages: dependencies: typescript: 5.0.4 zod: 3.22.4 + dev: true - /abitype@0.9.10(typescript@5.0.4)(zod@3.22.4): - resolution: {integrity: sha512-FIS7U4n7qwAT58KibwYig5iFG4K61rbhAqaQh/UWj8v1Y8mjX3F8TC9gd8cz9yT1TYel9f8nS5NO5kZp2RW0jQ==} + /abitype@0.9.8(typescript@5.0.4): + resolution: {integrity: sha512-puLifILdm+8sjyss4S+fsUN09obiT1g2YW6CtcQF+QDzxR0euzgEB29MZujC6zMk2a6SVmtttq1fc6+YFA7WYQ==} peerDependencies: typescript: '>=5.0.4' - zod: ^3 >=3.22.0 + zod: ^3 >=3.19.1 peerDependenciesMeta: typescript: optional: true @@ -5247,14 +4933,12 @@ packages: optional: true dependencies: typescript: 5.0.4 - zod: 3.22.4 - dev: true - /abitype@0.9.8(typescript@5.0.4): - resolution: {integrity: sha512-puLifILdm+8sjyss4S+fsUN09obiT1g2YW6CtcQF+QDzxR0euzgEB29MZujC6zMk2a6SVmtttq1fc6+YFA7WYQ==} + /abitype@1.0.0(typescript@5.0.4)(zod@3.22.4): + resolution: {integrity: sha512-NMeMah//6bJ56H5XRj8QCV4AwuW6hB6zqz2LnhhLdcWVQOsXki6/Pn3APeqxCma62nXIcmZWdu1DlHWS74umVQ==} peerDependencies: typescript: '>=5.0.4' - zod: ^3 >=3.19.1 + zod: ^3 >=3.22.0 peerDependenciesMeta: typescript: optional: true @@ -5262,7 +4946,7 @@ packages: optional: true dependencies: typescript: 5.0.4 - dev: false + zod: 3.22.4 /abort-controller@3.0.0: resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} @@ -5379,7 +5063,6 @@ packages: /arch@2.2.0: resolution: {integrity: sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==} - dev: false /arg@5.0.2: resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==} @@ -5458,7 +5141,6 @@ packages: resolution: {integrity: sha512-Hs4R+4SPgamu6rSGW8C7cV9gaWUKEHykfzCCvIRuaVv636Ju10ZdeUbvb4TBEW0INuq2DHZqXbK4Nd3yG4RaRw==} dependencies: tslib: 2.6.2 - dev: false /async@3.2.5: resolution: {integrity: sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==} @@ -5501,7 +5183,6 @@ packages: '@babel/runtime': 7.23.4 cosmiconfig: 7.1.0 resolve: 1.22.8 - dev: false /babel-plugin-polyfill-corejs2@0.4.6(@babel/core@7.23.3): resolution: {integrity: sha512-jhHiWVZIlnPbEUKSSNb9YoWcQGdlTLq7z1GHL4AjFxaoOUMuuEVJ+Y4pAaQUGOGk93YsVCKPbqbfw3m0SM6H8Q==} @@ -5605,10 +5286,6 @@ packages: resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} engines: {node: '>=8'} - /bind-decorator@1.0.11: - resolution: {integrity: sha512-yzkH0uog6Vv/vQ9+rhSKxecnqGUZHYncg7qS7voz3Q76+TAi1SGiOKk2mlOvusQnFz9Dc4BC/NMkeXu11YgjJg==} - dev: false - /bl@4.1.0: resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} dependencies: @@ -5636,7 +5313,6 @@ packages: /bowser@2.11.0: resolution: {integrity: sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==} - dev: false /brace-expansion@1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} @@ -5705,20 +5381,19 @@ packages: requiresBuild: true dependencies: node-gyp-build: 4.7.1 - dev: true /bufio@1.2.1: resolution: {integrity: sha512-9oR3zNdupcg/Ge2sSHQF3GX+kmvL/fTPvD0nd5AGLq8SjUYnTz+SlFjK/GXidndbZtIj+pVKXiWeR9w6e9wKCA==} engines: {node: '>=14.0.0'} dev: true - /bundle-require@3.1.2(esbuild@0.16.17): - resolution: {integrity: sha512-Of6l6JBAxiyQ5axFxUM6dYeP/W7X2Sozeo/4EYB9sJhL+dqL7TKjg+shwxp6jlu/6ZSERfsYtIpSJ1/x3XkAEA==} + /bundle-require@4.0.2(esbuild@0.19.7): + resolution: {integrity: sha512-jwzPOChofl67PSTW2SGubV9HBQAhhR2i6nskiOThauo9dzwDUgOWQScFVaJkjEfYX+UXiD+LEx8EblQMc2wIag==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} peerDependencies: - esbuild: '>=0.13' + esbuild: '>=0.17' dependencies: - esbuild: 0.16.17 + esbuild: 0.19.7 load-tsconfig: 0.2.5 dev: true @@ -5764,7 +5439,6 @@ packages: /callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} - dev: false /camel-case@4.1.2: resolution: {integrity: sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==} @@ -5895,7 +5569,6 @@ packages: resolution: {integrity: sha512-AS7n5NSc0OQVMV9v6wt3ByujNIrne0/cTjiC2MYqhvao57VNfiuVksTSr2p17nVOhEr2KtqiAkGwHcgMC/qUuQ==} dependencies: consola: 3.2.3 - dev: false /cli-cursor@3.1.0: resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} @@ -5925,7 +5598,6 @@ packages: arch: 2.2.0 execa: 5.1.1 is-wsl: 2.2.0 - dev: false /cliui@6.0.0: resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==} @@ -5957,12 +5629,10 @@ packages: /clsx@1.2.1: resolution: {integrity: sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==} engines: {node: '>=6'} - dev: false /cluster-key-slot@1.1.2: resolution: {integrity: sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA==} engines: {node: '>=0.10.0'} - dev: false /color-convert@1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} @@ -6046,7 +5716,6 @@ packages: /consola@3.2.3: resolution: {integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==} engines: {node: ^14.18.0 || >=16.10.0} - dev: false /constant-case@3.0.4: resolution: {integrity: sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ==} @@ -6058,14 +5727,12 @@ packages: /convert-source-map@1.9.0: resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} - dev: false /convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} /cookie-es@1.0.0: resolution: {integrity: sha512-mWYvfOLrfEc996hlKcdABeIiPHUPC6DM2QYZdGGOvhOTbA3tjm2eBwqlJpoFdjC89NI4Qt6h0Pu06Mp+1Pj5OQ==} - dev: false /core-js-compat@3.33.3: resolution: {integrity: sha512-cNzGqFsh3Ot+529GIXacjTJ7kegdt5fPXxCBVS1G0iaZpuo/tBz399ymceLJveQhFFZ8qThHiP3fzuoQjKN2ow==} @@ -6093,13 +5760,11 @@ packages: parse-json: 5.2.0 path-type: 4.0.0 yaml: 1.10.2 - dev: false /crc-32@1.2.2: resolution: {integrity: sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==} engines: {node: '>=0.8'} hasBin: true - dev: false /cross-fetch@3.1.8: resolution: {integrity: sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==} @@ -6107,7 +5772,6 @@ packages: node-fetch: 2.7.0 transitivePeerDependencies: - encoding - dev: false /cross-fetch@4.0.0: resolution: {integrity: sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==} @@ -6115,7 +5779,6 @@ packages: node-fetch: 2.7.0 transitivePeerDependencies: - encoding - dev: false /cross-spawn@5.1.0: resolution: {integrity: sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==} @@ -6184,7 +5847,6 @@ packages: engines: {node: '>=0.11'} dependencies: '@babel/runtime': 7.23.4 - dev: false /dateformat@4.6.3: resolution: {integrity: sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==} @@ -6229,7 +5891,6 @@ packages: /decode-uri-component@0.2.2: resolution: {integrity: sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==} engines: {node: '>=0.10'} - dev: false /dedent@0.7.0: resolution: {integrity: sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==} @@ -6282,6 +5943,10 @@ packages: gopd: 1.0.1 has-property-descriptors: 1.0.1 + /define-lazy-prop@2.0.0: + resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==} + engines: {node: '>=8'} + /define-properties@1.2.1: resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} engines: {node: '>= 0.4'} @@ -6292,7 +5957,6 @@ packages: /defu@6.1.3: resolution: {integrity: sha512-Vy2wmG3NTkmHNg/kzpuvHhkqeIx3ODWqasgCRbKtbXEN0G+HpEEv9BtJLp7ZG1CZloFaC41Ah3ZFbq7aqCqMeQ==} - dev: false /denodeify@1.2.1: resolution: {integrity: sha512-KNTihKNmQENUZeKu5fzfpzRqR5S2VMp4gl9RFHiWzj9DfvYQPMJ6XHKNaQxaGCXwPk6y9yme3aUoaiAe+KX+vg==} @@ -6300,7 +5964,6 @@ packages: /denque@2.1.0: resolution: {integrity: sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==} engines: {node: '>=0.10'} - dev: false /depd@2.0.0: resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} @@ -6315,7 +5978,6 @@ packages: /destr@2.0.2: resolution: {integrity: sha512-65AlobnZMiCET00KaFFjUefxDX0khFA/E4myqZ7a6Sq1yZtR8+FVIvilVX66vF2uobSumxooYZChiRPCKNqhmg==} - dev: false /destroy@1.2.0: resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} @@ -6323,7 +5985,6 @@ packages: /detect-browser@5.3.0: resolution: {integrity: sha512-53rsFbGdwMwlF7qvCt0ypLM5V5/Mbl0szB7GPN8y9NCcbknYOeVVXdrXEq+90IwAfrrzt6Hd+u2E2ntakICU8w==} - dev: false /detect-indent@6.1.0: resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} @@ -6334,7 +5995,6 @@ packages: resolution: {integrity: sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==} engines: {node: '>=0.10'} hasBin: true - dev: false /didyoumean@1.2.2: resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} @@ -6347,7 +6007,6 @@ packages: /dijkstrajs@1.0.3: resolution: {integrity: sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==} - dev: false /dir-glob@3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} @@ -6406,7 +6065,6 @@ packages: inherits: 2.0.4 readable-stream: 3.6.2 stream-shift: 1.0.1 - dev: false /eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} @@ -6418,7 +6076,6 @@ packages: '@types/secp256k1': 4.0.6 futoin-hkdf: 1.5.3 secp256k1: 5.0.0 - dev: false /ee-first@1.1.1: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} @@ -6446,7 +6103,6 @@ packages: /encode-utf8@1.0.3: resolution: {integrity: sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw==} - dev: false /encodeurl@1.0.2: resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} @@ -6463,24 +6119,22 @@ packages: dependencies: once: 1.4.0 - /engine.io-client@6.5.3: + /engine.io-client@6.5.3(bufferutil@4.0.8)(utf-8-validate@6.0.3): resolution: {integrity: sha512-9Z0qLB0NIisTRt1DZ/8U2k12RJn8yls/nXMZLn+/N8hANT3TcYjKFKcwbw5zFQiN4NTde3TSY9zb79e1ij6j9Q==} dependencies: '@socket.io/component-emitter': 3.1.0 debug: 4.3.4 engine.io-parser: 5.2.1 - ws: 8.11.0 + ws: 8.11.0(bufferutil@4.0.8)(utf-8-validate@6.0.3) xmlhttprequest-ssl: 2.0.0 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate - dev: false /engine.io-parser@5.2.1: resolution: {integrity: sha512-9JktcM3u18nU9N2Lz3bWeBgxVgOKpw7yhRaoxQA3FUDZzzw+9WlA6p4G4u0RixNkg14fH7EfEc/RhpurtiROTQ==} engines: {node: '>=10.0.0'} - dev: false /enquirer@2.4.1: resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} @@ -6599,36 +6253,6 @@ packages: is-symbol: 1.0.4 dev: true - /esbuild@0.16.17: - resolution: {integrity: sha512-G8LEkV0XzDMNwXKgM0Jwu3nY3lSTwSGY6XbxM9cr9+s0T/qSV1q1JVPBGzm3dcjhCic9+emZDmMffkwgPeOeLg==} - engines: {node: '>=12'} - hasBin: true - requiresBuild: true - optionalDependencies: - '@esbuild/android-arm': 0.16.17 - '@esbuild/android-arm64': 0.16.17 - '@esbuild/android-x64': 0.16.17 - '@esbuild/darwin-arm64': 0.16.17 - '@esbuild/darwin-x64': 0.16.17 - '@esbuild/freebsd-arm64': 0.16.17 - '@esbuild/freebsd-x64': 0.16.17 - '@esbuild/linux-arm': 0.16.17 - '@esbuild/linux-arm64': 0.16.17 - '@esbuild/linux-ia32': 0.16.17 - '@esbuild/linux-loong64': 0.16.17 - '@esbuild/linux-mips64el': 0.16.17 - '@esbuild/linux-ppc64': 0.16.17 - '@esbuild/linux-riscv64': 0.16.17 - '@esbuild/linux-s390x': 0.16.17 - '@esbuild/linux-x64': 0.16.17 - '@esbuild/netbsd-x64': 0.16.17 - '@esbuild/openbsd-x64': 0.16.17 - '@esbuild/sunos-x64': 0.16.17 - '@esbuild/win32-arm64': 0.16.17 - '@esbuild/win32-ia32': 0.16.17 - '@esbuild/win32-x64': 0.16.17 - dev: true - /esbuild@0.19.7: resolution: {integrity: sha512-6brbTZVqxhqgbpqBR5MzErImcpA0SQdoKOkcWK/U30HtQxnokIpG3TX2r0IJqbFUzqLjhU/zC1S5ndgakObVCQ==} engines: {node: '>=12'} @@ -6677,7 +6301,6 @@ packages: /escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} - dev: false /esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} @@ -6713,7 +6336,6 @@ packages: pify: 3.0.0 transitivePeerDependencies: - supports-color - dev: false /eth-json-rpc-filters@6.0.1: resolution: {integrity: sha512-ITJTvqoCw6OVMLs7pI8f4gG92n/St6x80ACtHodeS+IXmO0w+t1T5OOzfSt7KLSMLRkVUoexV7tztLgDxg+iig==} @@ -6724,20 +6346,17 @@ packages: eth-query: 2.1.2 json-rpc-engine: 6.1.0 pify: 5.0.0 - dev: false /eth-query@2.1.2: resolution: {integrity: sha512-srES0ZcvwkR/wd5OQBRA1bIJMww1skfGS0s8wlwK3/oNP4+wnds60krvu5R1QbpRQjMmpG5OMIWro5s7gvDPsA==} dependencies: json-rpc-random-id: 1.0.1 xtend: 4.0.2 - dev: false /eth-rpc-errors@4.0.3: resolution: {integrity: sha512-Z3ymjopaoft7JDoxZcEb3pwdGh7yiYMhOwm2doUt6ASXlMavpNlK6Cre0+IMl2VSGyEU9rkiperQhp5iRxn5Pg==} dependencies: fast-safe-stringify: 2.1.1 - dev: false /ethereum-bloom-filters@1.0.10: resolution: {integrity: sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA==} @@ -6805,7 +6424,6 @@ packages: /eventemitter2@6.4.9: resolution: {integrity: sha512-JEPTiaOt9f04oa6NOkc4aH+nVp5I3wEjpHbIPqfgCdD5v5bUzy7xQqwcVO2aDQgOWhI28da57HksMrzK9HlRxg==} - dev: false /eventemitter3@4.0.7: resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} @@ -6813,7 +6431,6 @@ packages: /eventemitter3@5.0.1: resolution: {integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==} - dev: false /events@3.3.0: resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} @@ -6833,21 +6450,6 @@ packages: signal-exit: 3.0.7 strip-final-newline: 2.0.0 - /execa@6.1.0: - resolution: {integrity: sha512-QVWlX2e50heYJcCPG0iWtf8r0xjEYfz/OYLGDYH+IyjWezzPNxz63qNFOu0l4YftGWuizFVZHHs8PrLU5p2IDA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - cross-spawn: 7.0.3 - get-stream: 6.0.1 - human-signals: 3.0.1 - is-stream: 3.0.0 - merge-stream: 2.0.0 - npm-run-path: 5.1.0 - onetime: 6.0.0 - signal-exit: 3.0.7 - strip-final-newline: 3.0.0 - dev: true - /execa@7.2.0: resolution: {integrity: sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==} engines: {node: ^14.18.0 || ^16.14.0 || >=18.0.0} @@ -6887,7 +6489,6 @@ packages: engines: {node: '>=12.0.0'} dependencies: webextension-polyfill: 0.10.0 - dev: false /external-editor@3.1.0: resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} @@ -6904,7 +6505,6 @@ packages: /fast-deep-equal@2.0.1: resolution: {integrity: sha512-bCK/2Z4zLidyB4ReuIsvALH6w31YfAQDmXMqMx6FyfHqvBxtjC0eRumeSu4Bs3XtXwpyIywtSTrVT99BxY1f9w==} - dev: false /fast-glob@3.3.2: resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} @@ -6920,7 +6520,6 @@ packages: /fast-redact@3.3.0: resolution: {integrity: sha512-6T5V1QK1u4oF+ATxs1lWUmlEk6P2T9HqJG3e2DnHOdVgZy2rFJBoEnrIedcTXlkAHU/zKC+7KETJ+KGGKwxgMQ==} engines: {node: '>=6'} - dev: false /fast-safe-stringify@2.1.1: resolution: {integrity: sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==} @@ -6951,7 +6550,6 @@ packages: /filter-obj@1.1.0: resolution: {integrity: sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==} engines: {node: '>=0.10.0'} - dev: false /finalhandler@1.1.2: resolution: {integrity: sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==} @@ -6977,7 +6575,6 @@ packages: /find-root@1.1.0: resolution: {integrity: sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==} - dev: false /find-up@3.0.0: resolution: {integrity: sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==} @@ -7058,9 +6655,9 @@ packages: resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} engines: {node: '>= 0.6'} - /fs-extra@10.1.0: - resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} - engines: {node: '>=12'} + /fs-extra@11.2.0: + resolution: {integrity: sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==} + engines: {node: '>=14.14'} dependencies: graceful-fs: 4.2.11 jsonfile: 6.1.0 @@ -7113,7 +6710,6 @@ packages: /futoin-hkdf@1.5.3: resolution: {integrity: sha512-SewY5KdMpaoCeh7jachEWFsh1nNlaDjNHZXWqL5IGwtpEYHTgkr2+AMCgNwKWkcc0wpSYrZfR7he4WdmHFtDxQ==} engines: {node: '>=8'} - dev: false /gensync@1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} @@ -7137,7 +6733,6 @@ packages: /get-port-please@3.1.1: resolution: {integrity: sha512-3UBAyM3u4ZBVYDsxOQfJDxEa6XTbpBDrOjp4mf7ExFRt5BKs/QywQQiJsh2B+hxcZLSapWqCRvElUe8DnKcFHA==} - dev: false /get-port@6.1.2: resolution: {integrity: sha512-BrGGraKm2uPqurfGVj/z97/zv8dPleC6x9JBNRTrDNtCkkRF4rPwrQXFgL7+I+q8QSdU4ntLQX2D7KIxSy8nGw==} @@ -7264,7 +6859,6 @@ packages: ufo: 1.3.2 uncrypto: 0.1.3 unenv: 1.8.0 - dev: false /handlebars@4.7.8: resolution: {integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==} @@ -7364,7 +6958,6 @@ packages: /hey-listen@1.0.8: resolution: {integrity: sha512-COpmrF2NOg4TBWUJ5UVyaCU2A88wEMkUPK4hNqyCkqHbxT92BbvfjoSozkAIIm6XhicGlJHhFdullInrdhwU8Q==} - dev: false /hmac-drbg@1.0.1: resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==} @@ -7377,7 +6970,6 @@ packages: resolution: {integrity: sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==} dependencies: react-is: 16.13.1 - dev: false /hosted-git-info@2.8.9: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} @@ -7387,6 +6979,11 @@ packages: resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} dev: true + /html-parse-stringify@3.0.1: + resolution: {integrity: sha512-KknJ50kTInJ7qIScF3jeaFRpMpE8/lfiTdzf/twXyPBLAGrLRTmkz3AdTnKeh40X8k9L2fdYwEp/42WGXIRGcg==} + dependencies: + void-elements: 3.1.0 + /http-errors@2.0.0: resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} engines: {node: '>= 0.8'} @@ -7411,7 +7008,6 @@ packages: /http-shutdown@1.2.2: resolution: {integrity: sha512-S9wWkJ/VSY9/k4qcjG318bqJNruzE4HySUhFYknwmu6LBP97KLLfwNf+n4V1BHurvFNkSKLFnK/RsuUnRTf9Vw==} engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} - dev: false /human-id@1.0.2: resolution: {integrity: sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw==} @@ -7421,11 +7017,6 @@ packages: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} - /human-signals@3.0.1: - resolution: {integrity: sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ==} - engines: {node: '>=12.20.0'} - dev: true - /human-signals@4.3.1: resolution: {integrity: sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==} engines: {node: '>=14.18.0'} @@ -7436,6 +7027,16 @@ packages: engines: {node: '>=16.17.0'} dev: true + /i18next-browser-languagedetector@7.2.0: + resolution: {integrity: sha512-U00DbDtFIYD3wkWsr2aVGfXGAj2TgnELzOX9qv8bT0aJtvPV9CRO77h+vgmHFBMe7LAxdwvT/7VkCWGya6L3tA==} + dependencies: + '@babel/runtime': 7.23.4 + + /i18next@22.5.1: + resolution: {integrity: sha512-8TGPgM3pAD+VRsMtUMNknRz3kzqwp/gPALrWMsDnmC1mKqJwpWyooQRLMcbTwq8z8YwSmuj+ZYvc+xCuEpkssA==} + dependencies: + '@babel/runtime': 7.23.4 + /iconv-lite@0.4.24: resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} engines: {node: '>=0.10.0'} @@ -7452,7 +7053,6 @@ packages: /idb-keyval@6.2.1: resolution: {integrity: sha512-8Sb3veuYCyrZL+VBt9LJfZjLUPWVvqn8tG28VqYNFCo43KHcKuq+b4EiXGeuaLAQWL2YmyDgMp2aSpH9JHsEQg==} - dev: false /ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} @@ -7482,7 +7082,6 @@ packages: dependencies: parent-module: 1.0.1 resolve-from: 4.0.0 - dev: false /imurmurhash@0.1.4: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} @@ -7530,14 +7129,12 @@ packages: standard-as-callback: 2.1.0 transitivePeerDependencies: - supports-color - dev: false /ip@1.1.8: resolution: {integrity: sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==} /iron-webcrypto@1.0.0: resolution: {integrity: sha512-anOK1Mktt8U1Xi7fCM3RELTuYbnFikQY5VtrDj7kPgpejV7d43tWKhzgioO0zpkazLEL/j/iayRqnJhrGfqUsg==} - dev: false /is-arguments@1.1.1: resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} @@ -7604,7 +7201,6 @@ packages: resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==} engines: {node: '>=8'} hasBin: true - dev: false /is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} @@ -7623,7 +7219,6 @@ packages: engines: {node: '>= 0.4'} dependencies: has-tostringtag: 1.0.0 - dev: false /is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} @@ -7671,7 +7266,6 @@ packages: /is-plain-obj@2.1.0: resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} engines: {node: '>=8'} - dev: false /is-plain-object@2.0.4: resolution: {integrity: sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==} @@ -7766,7 +7360,6 @@ packages: engines: {node: '>=8'} dependencies: is-docker: 2.2.1 - dev: false /isarray@1.0.0: resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} @@ -7781,6 +7374,14 @@ packages: resolution: {integrity: sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==} engines: {node: '>=0.10.0'} + /isomorphic-unfetch@3.1.0: + resolution: {integrity: sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q==} + dependencies: + node-fetch: 2.7.0 + unfetch: 4.2.0 + transitivePeerDependencies: + - encoding + /isows@1.0.3(ws@8.13.0): resolution: {integrity: sha512-2cKei4vlmg2cxEjm3wVSqn8pcoRF/LX/wpifuuNquFO4SQmPwarClT+SUCA2lt+l581tTeZIPIZuIDo2jWN1fg==} peerDependencies: @@ -8000,7 +7601,6 @@ packages: dependencies: '@metamask/safe-event-emitter': 2.0.0 eth-rpc-errors: 4.0.3 - dev: false /json-rpc-middleware-stream@4.2.3: resolution: {integrity: sha512-4iFb0yffm5vo3eFKDbQgke9o17XBcLQ2c3sONrXSbcOLzP8LTojqo8hRGVgtJShhm5q4ZDSNq039fAx9o65E1w==} @@ -8009,11 +7609,9 @@ packages: '@metamask/safe-event-emitter': 3.0.0 json-rpc-engine: 6.1.0 readable-stream: 2.3.8 - dev: false /json-rpc-random-id@1.0.1: resolution: {integrity: sha512-RJ9YYNCkhVDBuP4zN5BBtYAzEl03yq/jIIsyif0JY9qyJuQQZNeDK7anAPKKlyEtLSj2s8h6hNh2F8zO5q7ScA==} - dev: false /json5@2.2.3: resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} @@ -8044,11 +7642,9 @@ packages: node-addon-api: 2.0.2 node-gyp-build: 4.7.1 readable-stream: 3.6.2 - dev: false /keyvaluestorage-interface@1.0.0: resolution: {integrity: sha512-8t6Q3TclQ4uZynJY9IGr2+SsIGwK9JHcO6ootkHCGA0CrQCRy+VkouYNO2xicET6b9al7QKzpebNow+gkpCL8g==} - dev: false /kind-of@6.0.3: resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} @@ -8101,7 +7697,6 @@ packages: ufo: 1.3.2 untun: 0.1.2 uqr: 0.1.2 - dev: false /lit-element@3.3.3: resolution: {integrity: sha512-XbeRxmTHubXENkV4h8RIPyr8lXc+Ff28rkcQzw3G6up2xg5E8Zu1IgOWIwBLEQsu3cOVFqdYwiVi0hv0SlpqUA==} @@ -8109,13 +7704,11 @@ packages: '@lit-labs/ssr-dom-shim': 1.1.2 '@lit/reactive-element': 1.6.3 lit-html: 2.8.0 - dev: false /lit-html@2.8.0: resolution: {integrity: sha512-o9t+MQM3P4y7M7yNzqAyjp7z+mQGa4NS4CxiyLqFPyFWyc4O+nodLrkrxSaCTrla6M5YOLaT3RpbbqjszB5g3Q==} dependencies: '@types/trusted-types': 2.0.7 - dev: false /lit@2.8.0: resolution: {integrity: sha512-4Sc3OFX9QHOJaHbmTMk28SYgVxLN3ePDjg7hofEft2zWlehFL3LiAuapWc4U/kYwMYJSh2hTCPZ6/LIC7ii0MA==} @@ -8123,7 +7716,6 @@ packages: '@lit/reactive-element': 1.6.3 lit-element: 3.3.3 lit-html: 2.8.0 - dev: false /load-tsconfig@0.2.5: resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==} @@ -8179,15 +7771,12 @@ packages: /lodash.defaults@4.2.0: resolution: {integrity: sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==} - dev: false /lodash.isarguments@3.1.0: resolution: {integrity: sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg==} - dev: false /lodash.isequal@4.5.0: resolution: {integrity: sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==} - dev: false /lodash.startcase@4.4.0: resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} @@ -8354,7 +7943,6 @@ packages: engines: {node: '>=10'} dependencies: is-plain-obj: 2.1.0 - dev: false /merge-stream@2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} @@ -8698,7 +8286,6 @@ packages: resolution: {integrity: sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==} engines: {node: '>=10.0.0'} hasBin: true - dev: false /mimic-fn@2.1.0: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} @@ -8767,7 +8354,6 @@ packages: - bufferutil - utf-8-validate - zod - dev: false /mixme@0.5.10: resolution: {integrity: sha512-5H76ANWinB1H3twpJ6JY8uvAtpmFvHNArpilJAjXRKXSDDLPIMoZArw5SH0q9z+lLs8IrMw7Q2VWpWimFKFT1Q==} @@ -8797,12 +8383,10 @@ packages: '@motionone/types': 10.16.3 '@motionone/utils': 10.16.3 '@motionone/vue': 10.16.4 - dev: false /mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} - dev: false /ms@2.0.0: resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} @@ -8815,7 +8399,6 @@ packages: /multiformats@9.9.0: resolution: {integrity: sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg==} - dev: false /mz@2.7.0: resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} @@ -8832,7 +8415,6 @@ packages: /napi-wasm@1.1.0: resolution: {integrity: sha512-lHwIAJbmLSjF9VDRm9GoVOy9AGp3aIvkjv+Kvz9h16QR3uSVYH78PNQUnT2U4X53mhlnV2M7wrhibQ3GHicDmg==} - dev: false /negotiator@0.6.3: resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} @@ -8896,15 +8478,12 @@ packages: /node-addon-api@2.0.2: resolution: {integrity: sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==} - dev: false /node-addon-api@5.1.0: resolution: {integrity: sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==} - dev: false /node-addon-api@7.0.0: resolution: {integrity: sha512-vgbBJTS4m5/KkE16t5Ly0WW9hz46swAstv0hYYwMtbG7AznRhNyfLRe8HZAiWIpcHzoO7HxhLuBQj9rJ/Ho0ZA==} - dev: false /node-dir@0.1.17: resolution: {integrity: sha512-tmPX422rYgofd4epzrNoOXiE8XFZYOcCq1vD7MAXCDO+O+zndlA2ztdKKMa+EeuBG5tHETpr4ml4RGgpqDCCAg==} @@ -8914,7 +8493,6 @@ packages: /node-fetch-native@1.4.1: resolution: {integrity: sha512-NsXBU0UgBxo2rQLOeWNZqS3fvflWePMECr8CoSWoSTqCqGbVVsvl9vZu1HfQicYN0g5piV9Gh8RTEvo/uP752w==} - dev: false /node-fetch@2.7.0: resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} @@ -8930,7 +8508,6 @@ packages: /node-forge@1.3.1: resolution: {integrity: sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==} engines: {node: '>= 6.13.0'} - dev: false /node-gyp-build@4.7.1: resolution: {integrity: sha512-wTSrZ+8lsRRa3I3H8Xr65dLWSgCvY2l4AOnaeKdPA9TB/WYMPaTcrzf3rXvFoVvjKNVnu0CcWSx54qq9GKRUYg==} @@ -8998,7 +8575,6 @@ packages: end-of-stream: 1.4.4 once: 1.4.0 readable-stream: 2.3.8 - dev: false /object-assign@4.1.1: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} @@ -9038,11 +8614,9 @@ packages: destr: 2.0.2 node-fetch-native: 1.4.1 ufo: 1.3.2 - dev: false /on-exit-leak-free@0.2.0: resolution: {integrity: sha512-dqaz3u44QbRXQooZLTUKU41ZrzYrcvLISVgbrzbyCMxpmSLJvZ3ZamIJIZ29P6OhZIkNIQKosdeM6t1LYbA9hg==} - dev: false /on-exit-leak-free@2.1.2: resolution: {integrity: sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==} @@ -9083,7 +8657,7 @@ packages: mimic-fn: 4.0.0 dev: true - /op-viem@1.3.1-alpha(@wagmi/core@2.0.0-beta.5)(typescript@5.0.4)(viem@2.0.0-beta.6)(wagmi@2.0.0-beta.5): + /op-viem@1.3.1-alpha(@wagmi/core@2.6.5)(typescript@5.0.4)(viem@2.7.9)(wagmi@2.5.7): resolution: {integrity: sha512-I9mtT5TPC/l+m+ki6FBRZvkdc6WtCV703atOLaEkMJTebxViWAxia3JZO87fOPRexMT+yAZDnDhTy8fB9S9gtQ==} requiresBuild: true peerDependencies: @@ -9093,9 +8667,9 @@ packages: typescript: optional: true dependencies: - '@eth-optimism/contracts-ts': 0.15.0(@wagmi/core@2.0.0-beta.5)(typescript@5.0.4)(wagmi@2.0.0-beta.5) + '@eth-optimism/contracts-ts': 0.15.0(@wagmi/core@2.6.5)(typescript@5.0.4)(wagmi@2.5.7) typescript: 5.0.4 - viem: 2.0.0-beta.6(typescript@5.0.4)(zod@3.22.4) + viem: 2.7.9(typescript@5.0.4)(zod@3.22.4) transitivePeerDependencies: - '@wagmi/core' - bufferutil @@ -9110,6 +8684,14 @@ packages: dependencies: is-wsl: 1.1.0 + /open@8.4.2: + resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==} + engines: {node: '>=12'} + dependencies: + define-lazy-prop: 2.0.0 + is-docker: 2.2.1 + is-wsl: 2.2.0 + /ora@5.4.1: resolution: {integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==} engines: {node: '>=10'} @@ -9227,7 +8809,6 @@ packages: engines: {node: '>=6'} dependencies: callsites: 3.1.0 - dev: false /parse-json@4.0.0: resolution: {integrity: sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==} @@ -9326,7 +8907,6 @@ packages: /pify@3.0.0: resolution: {integrity: sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==} engines: {node: '>=4'} - dev: false /pify@4.0.1: resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} @@ -9335,14 +8915,12 @@ packages: /pify@5.0.0: resolution: {integrity: sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA==} engines: {node: '>=10'} - dev: false /pino-abstract-transport@0.5.0: resolution: {integrity: sha512-+KAgmVeqXYbTtU2FScx1XS3kNyfZ5TrXY07V96QnUSFqo2gAqlvmaxH67Lj7SWazqsMabf+58ctdTcBgnOLUOQ==} dependencies: duplexify: 4.1.2 split2: 4.2.0 - dev: false /pino-abstract-transport@1.1.0: resolution: {integrity: sha512-lsleG3/2a/JIWUtf9Q5gUNErBqwIu1tUKTT3dUzaf5DySw9ra1wcqKjJjLX1VTY64Wk1eEOYsVGSaGfCK85ekA==} @@ -9373,7 +8951,6 @@ packages: /pino-std-serializers@4.0.0: resolution: {integrity: sha512-cK0pekc1Kjy5w9V2/n+8MkZwusa6EyyxfeQCB799CQRhRt/CqYKiWs5adeu8Shve2ZNffvfC/7J64A2PJo1W/Q==} - dev: false /pino@7.11.0: resolution: {integrity: sha512-dMACeu63HtRLmCG8VKdy4cShCPKaYDR4youZqoSWLxl5Gu99HUw8bw75thbPv9Nip+H+QYX8o3ZJbTdVZZ2TVg==} @@ -9390,7 +8967,6 @@ packages: safe-stable-stringify: 2.4.3 sonic-boom: 2.8.0 thread-stream: 0.15.2 - dev: false /pirates@4.0.6: resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} @@ -9419,12 +8995,10 @@ packages: /pngjs@5.0.0: resolution: {integrity: sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==} engines: {node: '>=10.13.0'} - dev: false /pony-cause@2.1.10: resolution: {integrity: sha512-3IKLNXclQgkU++2fSi93sQ6BznFuxSLB11HdvZQ6JW/spahf/P1pAHBQEahr20rs0htZW0UDkM1HmA+nZkXKsw==} engines: {node: '>=12.0.0'} - dev: false /postcss-import@15.1.0(postcss@8.4.31): resolution: {integrity: sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==} @@ -9556,14 +9130,12 @@ packages: /process-nextick-args@1.0.7: resolution: {integrity: sha512-yN0WQmuCX63LP/TMvAg31nvT6m4vDqJEiiv2CAZqWOGNWutc9DfDk1NPYYmKUFmaVM2UwDowH4u5AHWYP/jxKw==} - dev: false /process-nextick-args@2.0.1: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} /process-warning@1.0.0: resolution: {integrity: sha512-du4wfLyj4yCZq1VupnVSZmRsPJsNuxoDQFdCFHLaYiEbFBD7QE0a+I4D7hOxrVnh78QE/YipFAj9lXHiXocV+Q==} - dev: false /process@0.11.10: resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} @@ -9591,7 +9163,6 @@ packages: /proxy-compare@2.5.1: resolution: {integrity: sha512-oyfc0Tx87Cpwva5ZXezSp5V9vht1c7dZBhvuV/y3ctkgMVUmiAGDVeeB0dKhGSyT0v1ZTEQYpe/RXlBVBNuCLA==} - dev: false /pseudomap@1.0.2: resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} @@ -9607,16 +9178,13 @@ packages: resolution: {integrity: sha512-ModRIiW6oUnsP18QzrRYZSc/CFKFKIdj7pUs57AEVH20ajlglRpN3HukjHk0UbNMTlKGuaYl7Gt6/O5Gg2NU2Q==} dependencies: qrcode-generator: 1.4.4 - dev: false /qrcode-generator@1.4.4: resolution: {integrity: sha512-HM7yY8O2ilqhmULxGMpcHSF1EhJJ9yBj8gvDEuZ6M+KGJ0YY2hKpnXvRD+hZPLrDVck3ExIGhmPtSdcjC+guuw==} - dev: false - /qrcode-terminal@0.12.0: - resolution: {integrity: sha512-EXtzRZmC+YGmGlDFbXKxQiMZNwCLEO6BANKXG4iCtSIM0yqc/pappSx3RIKr4r0uh5JsBckOXeKrB3Iz7mdQpQ==} + /qrcode-terminal-nooctal@0.12.1: + resolution: {integrity: sha512-jy/kkD0iIMDjTucB+5T6KBsnirlhegDH47vHgrj5MejchSQmi/EAMM0xMFeePgV9CJkkAapNakpVUWYgHvtdKg==} hasBin: true - dev: false /qrcode@1.5.3: resolution: {integrity: sha512-puyri6ApkEHYiVl4CFzo1tDkAZ+ATcnbJrJ6RiBM1Fhctdn/ix9MTE3hRph33omisEbC/2fcfemsseiKgBPKZg==} @@ -9627,7 +9195,6 @@ packages: encode-utf8: 1.0.3 pngjs: 5.0.0 yargs: 15.4.1 - dev: false /query-string@7.1.3: resolution: {integrity: sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg==} @@ -9637,7 +9204,6 @@ packages: filter-obj: 1.1.0 split-on-first: 1.1.0 strict-uri-encode: 2.0.0 - dev: false /queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} @@ -9650,7 +9216,6 @@ packages: /quick-format-unescaped@4.0.4: resolution: {integrity: sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==} - dev: false /quick-lru@4.0.1: resolution: {integrity: sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==} @@ -9659,7 +9224,6 @@ packages: /radix3@1.1.0: resolution: {integrity: sha512-pNsHDxbGORSvuSScqNJ+3Km6QAVqk8CfsCBIEoDgpqLrkD2f3QM4I7d1ozJJ172OmIcoUcerZaNWqtLkRXTV3A==} - dev: false /randombytes@2.1.0: resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} @@ -9699,6 +9263,26 @@ packages: react: 18.2.0 dev: true + /react-i18next@13.5.0(i18next@22.5.1)(react-dom@18.2.0)(react-native@0.72.7)(react@18.2.0): + resolution: {integrity: sha512-CFJ5NDGJ2MUyBohEHxljOq/39NQ972rh1ajnadG9BjTk+UXbHLq4z5DKEbEQBDoIhUmmbuS/fIMJKo6VOax1HA==} + peerDependencies: + i18next: '>= 23.2.3' + react: '>= 16.8.0' + react-dom: '*' + react-native: '*' + peerDependenciesMeta: + react-dom: + optional: true + react-native: + optional: true + dependencies: + '@babel/runtime': 7.23.4 + html-parse-stringify: 3.0.1 + i18next: 22.5.1 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + react-native: 0.72.7(@babel/core@7.23.3)(@babel/preset-env@7.23.3)(react@18.2.0) + /react-is@16.13.1: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} @@ -9718,7 +9302,6 @@ packages: invariant: 2.2.4 react: 18.2.0 react-native: 0.72.7(@babel/core@7.23.3)(@babel/preset-env@7.23.3)(react@18.2.0) - dev: false /react-native@0.72.7(@babel/core@7.23.3)(@babel/preset-env@7.23.3)(react@18.2.0): resolution: {integrity: sha512-dqVFojOO9rOvyFbbM3/v9/GJR355OSuBhEY4NQlMIRc2w0Xch5MT/2uPoq3+OvJ+5h7a8LFAco3fucSffG0FbA==} @@ -9836,7 +9419,6 @@ packages: safe-buffer: 5.1.2 string_decoder: 1.0.3 util-deprecate: 1.0.2 - dev: false /readable-stream@2.3.8: resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} @@ -9880,7 +9462,6 @@ packages: /real-require@0.1.0: resolution: {integrity: sha512-r/H9MzAWtrv8aSVjPCMFpDMl5q66GqtmmRkRjpHTsp4zBAa+snZyiQNlMONiUmEJcsnaw0wCauJ2GWODr/aFkg==} engines: {node: '>= 12.13.0'} - dev: false /recast@0.21.5: resolution: {integrity: sha512-hjMmLaUXAm1hIuTqOdeYObMslq/q+Xff6QE3Y2P+uoHAg2nmVlLBps2hzh1UJDdMtDTMXOFewK6ky51JQIeECg==} @@ -9902,14 +9483,12 @@ packages: /redis-errors@1.2.0: resolution: {integrity: sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w==} engines: {node: '>=4'} - dev: false /redis-parser@3.0.0: resolution: {integrity: sha512-DJnGAeenTdpMEH6uAJRK/uiyEIH9WVsUmoLwzudwGJUwZPp80PDBWPHXSAGNPwNvIXAbe7MSUB1zQFugFml66A==} engines: {node: '>=4'} dependencies: redis-errors: 1.2.0 - dev: false /regenerate-unicode-properties@10.1.1: resolution: {integrity: sha512-X007RyZLsCJVVrjgEFVpLUTZwyOZk3oiL75ZcuYjlIWd6rNJtOjkBwQc5AsRrpbKVkxN6sklw/k/9m2jJYOf8Q==} @@ -9974,7 +9553,6 @@ packages: /resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} - dev: false /resolve-from@5.0.0: resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} @@ -10036,6 +9614,21 @@ packages: bn.js: 5.2.1 dev: true + /rollup-plugin-visualizer@5.12.0: + resolution: {integrity: sha512-8/NU9jXcHRs7Nnj07PF2o4gjxmm9lXIrZ8r175bT9dK8qoLlvKTwRMArRCMgpMGlq8CTLugRvEmyMeMXIU2pNQ==} + engines: {node: '>=14'} + hasBin: true + peerDependencies: + rollup: 2.x || 3.x || 4.x + peerDependenciesMeta: + rollup: + optional: true + dependencies: + open: 8.4.2 + picomatch: 2.3.1 + source-map: 0.7.4 + yargs: 17.7.2 + /rollup@4.5.2: resolution: {integrity: sha512-CRK1uoROBfkcqrZKyaFcqCcZWNsvJ6yVYZkqTlRocZhO2s5yER6Z3f/QaYtO8RGyloPnmhwgzuPQpNGeK210xQ==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} @@ -10062,13 +9655,6 @@ packages: queue-microtask: 1.2.3 dev: true - /rxjs@6.6.7: - resolution: {integrity: sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==} - engines: {npm: '>=2.0.0'} - dependencies: - tslib: 1.14.1 - dev: false - /safe-array-concat@1.0.1: resolution: {integrity: sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==} engines: {node: '>=0.4'} @@ -10096,7 +9682,6 @@ packages: /safe-stable-stringify@2.4.3: resolution: {integrity: sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==} engines: {node: '>=10'} - dev: false /safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} @@ -10128,7 +9713,6 @@ packages: elliptic: 6.5.4 node-addon-api: 5.1.0 node-gyp-build: 4.7.1 - dev: false /secure-json-parse@2.7.0: resolution: {integrity: sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==} @@ -10221,7 +9805,6 @@ packages: dependencies: inherits: 2.0.4 safe-buffer: 5.2.1 - dev: false /shallow-clone@3.0.1: resolution: {integrity: sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==} @@ -10344,19 +9927,18 @@ packages: tslib: 2.6.2 dev: true - /socket.io-client@4.7.2: + /socket.io-client@4.7.2(bufferutil@4.0.8)(utf-8-validate@6.0.3): resolution: {integrity: sha512-vtA0uD4ibrYD793SOIAwlo8cj6haOeMHrGvwPxJsxH7CeIksqJ+3Zc06RvWTIFgiSqx4A3sOnTXpfAEE2Zyz6w==} engines: {node: '>=10.0.0'} dependencies: '@socket.io/component-emitter': 3.1.0 debug: 4.3.4 - engine.io-client: 6.5.3 + engine.io-client: 6.5.3(bufferutil@4.0.8)(utf-8-validate@6.0.3) socket.io-parser: 4.2.4 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate - dev: false /socket.io-parser@4.2.4: resolution: {integrity: sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==} @@ -10366,13 +9948,11 @@ packages: debug: 4.3.4 transitivePeerDependencies: - supports-color - dev: false /sonic-boom@2.8.0: resolution: {integrity: sha512-kuonw1YOYYNOve5iHdSahXPOK49GqwA+LZhI6Wz/l0rP57iKyXXIHaRagOBHAPmGwJC6od2Z9zgvZ5loSgMlVg==} dependencies: atomic-sleep: 1.0.0 - dev: false /sonic-boom@3.7.0: resolution: {integrity: sha512-IudtNvSqA/ObjN97tfgNmOKyDOs4dNcg4cUUsHDebqsgb8wGBBwb31LIgShNO8fye0dFI52X1+tFoKKI6Rq1Gg==} @@ -10434,7 +10014,6 @@ packages: /split-on-first@1.1.0: resolution: {integrity: sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==} engines: {node: '>=6'} - dev: false /split2@4.2.0: resolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==} @@ -10464,7 +10043,6 @@ packages: /standard-as-callback@2.1.0: resolution: {integrity: sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A==} - dev: false /statuses@1.5.0: resolution: {integrity: sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==} @@ -10492,7 +10070,6 @@ packages: /stream-shift@1.0.1: resolution: {integrity: sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==} - dev: false /stream-transform@2.1.3: resolution: {integrity: sha512-9GHUiM5hMiCi6Y03jD2ARC1ettBXkQBoQAe7nJsPknnI0ow10aXjTnew8QtYQmLjzn974BnmWEAJgCY6ZP1DeQ==} @@ -10508,7 +10085,6 @@ packages: /strict-uri-encode@2.0.0: resolution: {integrity: sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==} engines: {node: '>=4'} - dev: false /string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} @@ -10556,7 +10132,6 @@ packages: resolution: {integrity: sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==} dependencies: safe-buffer: 5.1.2 - dev: false /string_decoder@1.1.1: resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} @@ -10649,7 +10224,6 @@ packages: /stylis@4.2.0: resolution: {integrity: sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==} - dev: false /sucrase@3.34.0: resolution: {integrity: sha512-70/LQEZ07TEcxiU2dz51FKaE6hCTWC6vr7FOk3Gr0U60C3shtAN+H+BFr9XlYe5xqf3RA8nrc+VIwzCfnxuXJw==} @@ -10671,7 +10245,6 @@ packages: /superstruct@1.0.3: resolution: {integrity: sha512-8iTn3oSS8nRGn+C2pgXSKPI3jmpm6FExNazNpjvqS6ZUJQCej3PUXEKM8NjHBOs54ExM+LPW/FBRhymrdcCiSg==} engines: {node: '>=14.0.0'} - dev: false /supports-color@5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} @@ -10777,7 +10350,6 @@ packages: resolution: {integrity: sha512-UkEhKIg2pD+fjkHQKyJO3yoIvAP3N6RlNFt2dUhcS1FGvCD1cQa1M/PGknCLFIyZdtJOWQjejp7bdNqmN7zwdA==} dependencies: real-require: 0.1.0 - dev: false /throat@5.0.0: resolution: {integrity: sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA==} @@ -10845,7 +10417,6 @@ packages: /tslib@1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} - dev: false /tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} @@ -10977,7 +10548,6 @@ packages: resolution: {integrity: sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==} dependencies: multiformats: 9.9.0 - dev: false /unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} @@ -10990,7 +10560,6 @@ packages: /uncrypto@0.1.3: resolution: {integrity: sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q==} - dev: false /undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} @@ -11003,7 +10572,9 @@ packages: mime: 3.0.0 node-fetch-native: 1.4.1 pathe: 1.1.1 - dev: false + + /unfetch@4.2.0: + resolution: {integrity: sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA==} /unicode-canonical-property-names-ecmascript@2.0.0: resolution: {integrity: sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==} @@ -11092,7 +10663,6 @@ packages: ufo: 1.3.2 transitivePeerDependencies: - supports-color - dev: false /untun@0.1.2: resolution: {integrity: sha512-wLAMWvxfqyTiBODA1lg3IXHQtjggYLeTK7RnSfqtOXixWJ3bAa2kK/HHmOOg19upteqO3muLvN6O/icbyQY33Q==} @@ -11101,7 +10671,6 @@ packages: citty: 0.1.5 consola: 3.2.3 pathe: 1.1.1 - dev: false /update-browserslist-db@1.0.13(browserslist@4.22.1): resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} @@ -11127,7 +10696,6 @@ packages: /uqr@0.1.2: resolution: {integrity: sha512-MJu7ypHq6QasgF5YRTjqscSzQp/W11zoUk6kvmlH+fmWEs63Y0Eib13hYFwAzagRJcVY8WVnlV+eBDUGMJ5IbA==} - dev: false /use-sync-external-store@1.2.0(react@18.2.0): resolution: {integrity: sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==} @@ -11142,7 +10710,6 @@ packages: requiresBuild: true dependencies: node-gyp-build: 4.7.1 - dev: true /utf8@3.0.0: resolution: {integrity: sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==} @@ -11159,7 +10726,6 @@ packages: is-generator-function: 1.0.10 is-typed-array: 1.1.12 which-typed-array: 1.1.13 - dev: false /utils-merge@1.0.1: resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} @@ -11168,7 +10734,6 @@ packages: /uuid@8.3.2: resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} hasBin: true - dev: false /v8-to-istanbul@9.2.0: resolution: {integrity: sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==} @@ -11202,7 +10767,6 @@ packages: proxy-compare: 2.5.1 react: 18.2.0 use-sync-external-store: 1.2.0(react@18.2.0) - dev: false /vary@1.1.2: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} @@ -11229,22 +10793,21 @@ packages: - bufferutil - utf-8-validate - zod - dev: false - /viem@2.0.0-beta.6(typescript@5.0.4)(zod@3.22.4): - resolution: {integrity: sha512-HpRP1r30PwfWVYg2/GKy7BUPruxCxj60RVi49Mdz9QakRGTFXmlT75jMX04EjmCTMAkYUrLB9j+2S2N/fHAhsA==} + /viem@2.7.9(typescript@5.0.4)(zod@3.22.4): + resolution: {integrity: sha512-iDfc8TwaZFp1K95zlsxYh6Cs0OWCt35Tqs8uYgXKSxtz7w075mZ0H5SJ8zSyJGoEaticVDhtdmRRX6TtcW9EeQ==} peerDependencies: typescript: '>=5.0.4' peerDependenciesMeta: typescript: optional: true dependencies: - '@adraffy/ens-normalize': 1.9.4 + '@adraffy/ens-normalize': 1.10.0 '@noble/curves': 1.2.0 '@noble/hashes': 1.3.2 '@scure/bip32': 1.3.2 '@scure/bip39': 1.2.1 - abitype: 0.10.0(typescript@5.0.4)(zod@3.22.4) + abitype: 1.0.0(typescript@5.0.4)(zod@3.22.4) isows: 1.0.3(ws@8.13.0) typescript: 5.0.4 ws: 8.13.0 @@ -11424,6 +10987,10 @@ packages: /vlq@1.0.1: resolution: {integrity: sha512-gQpnTgkubC6hQgdIcRdYGDSDc+SaujOdyesZQMv6JlfQee/9Mp0Qhnys6WxDWvQnL5WZdT7o2Ul187aSt0Rq+w==} + /void-elements@3.1.0: + resolution: {integrity: sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w==} + engines: {node: '>=0.10.0'} + /vscode-oniguruma@1.7.0: resolution: {integrity: sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==} dev: true @@ -11479,24 +11046,24 @@ packages: typescript: 5.0.4 dev: true - /wagmi@2.0.0-beta.5(@tanstack/react-query@5.8.6)(@types/react@18.2.38)(react-native@0.72.7)(react@18.2.0)(typescript@5.0.4)(viem@2.0.0-beta.6): - resolution: {integrity: sha512-AnIRQi7/od0rMaP9P98aJtuEhnOVtZkICvoCXSZHtADjyRVYl1Wj9ZLg32w1KqmW8/iQFRlLyy3N/BnnqJQvTQ==} + /wagmi@2.5.7(@tanstack/react-query@5.8.6)(@types/react@18.2.38)(react-dom@18.2.0)(react-native@0.72.7)(react@18.2.0)(typescript@5.0.4)(viem@2.7.9): + resolution: {integrity: sha512-xSuteMXFKvra4xDddqZbZv/gQlcg3X+To5AoZW7WoAm0iVlF8/vEGpQzCWy6KZs2z1szxPrr0YnH3Zr1Qj4E/A==} peerDependencies: '@tanstack/react-query': '>=5.0.0' react: '>=18' typescript: '>=5.0.4' - viem: 2.0.0-beta.6 + viem: 2.x peerDependenciesMeta: typescript: optional: true dependencies: '@tanstack/react-query': 5.8.6(react-dom@18.2.0)(react-native@0.72.7)(react@18.2.0) - '@wagmi/connectors': 4.0.0-beta.5(@types/react@18.2.38)(@wagmi/core@2.0.0-beta.5)(react-native@0.72.7)(react@18.2.0)(typescript@5.0.4)(viem@2.0.0-beta.6) - '@wagmi/core': 2.0.0-beta.5(@types/react@18.2.38)(react@18.2.0)(typescript@5.0.4)(viem@2.0.0-beta.6) + '@wagmi/connectors': 4.1.14(@types/react@18.2.38)(@wagmi/core@2.6.5)(react-dom@18.2.0)(react-native@0.72.7)(react@18.2.0)(typescript@5.0.4)(viem@2.7.9) + '@wagmi/core': 2.6.5(@types/react@18.2.38)(react@18.2.0)(typescript@5.0.4)(viem@2.7.9) react: 18.2.0 typescript: 5.0.4 use-sync-external-store: 1.2.0(react@18.2.0) - viem: 2.0.0-beta.6(typescript@5.0.4)(zod@3.22.4) + viem: 2.7.9(typescript@5.0.4)(zod@3.22.4) transitivePeerDependencies: - '@azure/app-configuration' - '@azure/cosmos' @@ -11515,7 +11082,9 @@ packages: - bufferutil - encoding - immer + - react-dom - react-native + - rollup - supports-color - utf-8-validate - zod @@ -11550,15 +11119,12 @@ packages: deprecated: This project has moved to @types/webextension-polyfill dependencies: webextension-polyfill: 0.7.0 - dev: false /webextension-polyfill@0.10.0: resolution: {integrity: sha512-c5s35LgVa5tFaHhrZDnr3FpQpjj1BB+RXhLTYUxGqBVN460HkbM8TBtEqdXWbpTKfzwCcjAZVF7zXCYSKtcp9g==} - dev: false /webextension-polyfill@0.7.0: resolution: {integrity: sha512-su48BkMLxqzTTvPSE1eWxKToPS2Tv5DLGxKexLEVpwFd6Po6N8hhSLIvG6acPAg7qERoEaDL+Y5HQJeJeml5Aw==} - dev: false /webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} @@ -11727,7 +11293,7 @@ packages: utf-8-validate: optional: true - /ws@8.11.0: + /ws@8.11.0(bufferutil@4.0.8)(utf-8-validate@6.0.3): resolution: {integrity: sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==} engines: {node: '>=10.0.0'} peerDependencies: @@ -11738,7 +11304,9 @@ packages: optional: true utf-8-validate: optional: true - dev: false + dependencies: + bufferutil: 4.0.8 + utf-8-validate: 6.0.3 /ws@8.13.0: resolution: {integrity: sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==} @@ -11768,7 +11336,6 @@ packages: /xmlhttprequest-ssl@2.0.0: resolution: {integrity: sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A==} engines: {node: '>=0.4.0'} - dev: false /xtend@4.0.2: resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} @@ -11794,7 +11361,6 @@ packages: /yaml@1.10.2: resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} engines: {node: '>= 6'} - dev: false /yaml@2.3.4: resolution: {integrity: sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==} @@ -11851,8 +11417,8 @@ packages: /zod@3.22.4: resolution: {integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==} - /zustand@4.4.6(@types/react@18.2.38)(react@18.2.0): - resolution: {integrity: sha512-Rb16eW55gqL4W2XZpJh0fnrATxYEG3Apl2gfHTyDSE965x/zxslTikpNch0JgNjJA9zK6gEFW8Fl6d1rTZaqgg==} + /zustand@4.4.1(@types/react@18.2.38)(react@18.2.0): + resolution: {integrity: sha512-QCPfstAS4EBiTQzlaGP1gmorkh/UL1Leaj2tdj+zZCZ/9bm0WS7sI2wnfD5lpOszFqWJ1DcPnGoY8RDL61uokw==} engines: {node: '>=12.7.0'} peerDependencies: '@types/react': '>=16.8' @@ -11869,4 +11435,3 @@ packages: '@types/react': 18.2.38 react: 18.2.0 use-sync-external-store: 1.2.0(react@18.2.0) - dev: false diff --git a/src/_test/config.ts b/src/_test/config.ts index 2936ce1..20801a0 100644 --- a/src/_test/config.ts +++ b/src/_test/config.ts @@ -1,4 +1,4 @@ -import { mock } from '@wagmi/core/internal' +import { mock } from '@wagmi/connectors' import { base as viem_base, mainnet as viem_mainnet } from 'viem/chains' import { createConfig, http } from 'wagmi' import { base as opWagmiBase } from '../constants/chains/base.js' diff --git a/src/hooks/L1/useSimulateDepositERC20.test.ts b/src/hooks/L1/useSimulateDepositERC20.test.ts index c3ff7be..7013840 100644 --- a/src/hooks/L1/useSimulateDepositERC20.test.ts +++ b/src/hooks/L1/useSimulateDepositERC20.test.ts @@ -23,6 +23,7 @@ test('useSimulateDepositERC20', async () => { expect(result.current).toMatchInlineSnapshot(` { "data": { + "chainId": 1, "request": { "__mode": "prepared", "abi": [ diff --git a/src/hooks/L1/useSimulateDepositETH.test.ts b/src/hooks/L1/useSimulateDepositETH.test.ts index 051ea5a..535118f 100644 --- a/src/hooks/L1/useSimulateDepositETH.test.ts +++ b/src/hooks/L1/useSimulateDepositETH.test.ts @@ -20,6 +20,7 @@ test('useSimulateDepositETH', async () => { expect(result.current).toMatchInlineSnapshot(` { "data": { + "chainId": 1, "request": { "__mode": "prepared", "abi": [ diff --git a/src/hooks/L1/useSimulateFinalizeWithdrawalTransaction.ts b/src/hooks/L1/useSimulateFinalizeWithdrawalTransaction.ts index 626ea4b..c2b3a99 100644 --- a/src/hooks/L1/useSimulateFinalizeWithdrawalTransaction.ts +++ b/src/hooks/L1/useSimulateFinalizeWithdrawalTransaction.ts @@ -53,8 +53,8 @@ export function useSimulateFinalizeWithdrawalTransaction< } const account = useAccount(rest) - const l1PublicClient = usePublicClient({ chainId: l2Chain.l1ChainId }) - const l2PublicClient = usePublicClient({ chainId: l2ChainId }) + const l1PublicClient = usePublicClient({ chainId: l2Chain.l1ChainId })! + const l2PublicClient = usePublicClient({ chainId: l2ChainId })! const l1Addresses = opConfig.l2chains[l2ChainId].l1Addresses const query = { @@ -86,7 +86,7 @@ export function useSimulateFinalizeWithdrawalTransaction< }), } - const enabled = Boolean(account.address) && (queryOverride?.enabled ?? true) + const enabled = Boolean(account.address) && (queryOverride?.enabled ?? true) && !!l1PublicClient && !!l2PublicClient return { ...useQuery({ ...query, queryKeyHashFn: hashFn, enabled }), queryKey: query.queryKey, diff --git a/src/hooks/L1/useWriteProveWithdrawalTransaction.ts b/src/hooks/L1/useWriteProveWithdrawalTransaction.ts index ba87f11..1ea2fc3 100644 --- a/src/hooks/L1/useWriteProveWithdrawalTransaction.ts +++ b/src/hooks/L1/useWriteProveWithdrawalTransaction.ts @@ -60,8 +60,8 @@ async function writeMutation( { l1ChainId, l2ChainId, args, ...rest }: ProveWithdrawalTransactionMutationParameters, ) { const walletClient = await getWalletClient(config, { chainId: l1ChainId }) - const l1PublicClient = getPublicClient(config, { chainId: l1ChainId }) - const l2PublicClient = getPublicClient(config, { chainId: l2ChainId }) + const l1PublicClient = await getPublicClient(config, { chainId: l1ChainId })! + const l2PublicClient = await getPublicClient(config, { chainId: l2ChainId })! const l1Addresses = config.l2chains[l2ChainId].l1Addresses const withdrawalMessages = await getWithdrawalMessages(l2PublicClient, { diff --git a/src/hooks/L2/useSimulateWithdrawERC20.test.ts b/src/hooks/L2/useSimulateWithdrawERC20.test.ts index b472c3f..3ea4037 100644 --- a/src/hooks/L2/useSimulateWithdrawERC20.test.ts +++ b/src/hooks/L2/useSimulateWithdrawERC20.test.ts @@ -21,6 +21,7 @@ test('useSimulateWithdrawERC20', async () => { expect(result.current).toMatchInlineSnapshot(` { "data": { + "chainId": 8453, "request": { "__mode": "prepared", "abi": [ diff --git a/src/hooks/L2/useSimulateWithdrawETH.test.ts b/src/hooks/L2/useSimulateWithdrawETH.test.ts index af1cda6..16a9dc0 100644 --- a/src/hooks/L2/useSimulateWithdrawETH.test.ts +++ b/src/hooks/L2/useSimulateWithdrawETH.test.ts @@ -20,6 +20,7 @@ test('useSimulateWithdrawETH', async () => { expect(result.current).toMatchInlineSnapshot(` { "data": { + "chainId": 8453, "request": { "__mode": "prepared", "abi": [ From bd5f8608526544488da794ebbd389479d7e1206e Mon Sep 17 00:00:00 2001 From: Matthew Bunday Date: Wed, 14 Feb 2024 08:46:23 -0500 Subject: [PATCH 02/26] Fix type errors --- src/hooks/L1/useProveWithdrawalArgs.ts | 2 +- src/hooks/L1/useSimulateProveWithdrawalTransaction.ts | 7 ++++--- src/hooks/L1/useWriteDepositETH.ts | 4 ++-- src/hooks/L1/useWriteFinalizeWithdrawalTransaction.ts | 4 ++-- src/util/getStateTrieProof.ts | 4 ++-- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/hooks/L1/useProveWithdrawalArgs.ts b/src/hooks/L1/useProveWithdrawalArgs.ts index 348d1b5..dc3eeed 100644 --- a/src/hooks/L1/useProveWithdrawalArgs.ts +++ b/src/hooks/L1/useProveWithdrawalArgs.ts @@ -27,7 +27,7 @@ export function useProveWithdrawalArgs({ throw new Error('L2 chain not configured') } - const l2PublicClient = usePublicClient({ chainId: l2Chain.chainId }) + const l2PublicClient = usePublicClient({ chainId: l2Chain.chainId })! const { data: blockNumberOfLatestL2OutputProposal } = useBlockNumberOfLatestL2OutputProposal({ config: opConfig, diff --git a/src/hooks/L1/useSimulateProveWithdrawalTransaction.ts b/src/hooks/L1/useSimulateProveWithdrawalTransaction.ts index 7e9cf8f..7af6ace 100644 --- a/src/hooks/L1/useSimulateProveWithdrawalTransaction.ts +++ b/src/hooks/L1/useSimulateProveWithdrawalTransaction.ts @@ -56,8 +56,8 @@ export function useSimulateProveWithdrawalTransaction< } const account = useAccount(rest) - const l1PublicClient = usePublicClient({ chainId: l2Chain.l1ChainId }) - const l2PublicClient = usePublicClient({ chainId: l2ChainId }) + const l1PublicClient = usePublicClient({ chainId: l2Chain.l1ChainId })! + const l2PublicClient = usePublicClient({ chainId: l2ChainId })! const l1Addresses = opConfig.l2chains[l2ChainId].l1Addresses const query = { @@ -103,7 +103,8 @@ export function useSimulateProveWithdrawalTransaction< }), } - const enabled = Boolean(account.address) && (queryOverride?.enabled ?? true) + const enabled = Boolean(account.address) && (queryOverride?.enabled ?? true) && Boolean(l1PublicClient) + && Boolean(l2PublicClient) return { ...useQuery({ ...query, queryKeyHashFn: hashFn, enabled }), queryKey: query.queryKey, diff --git a/src/hooks/L1/useWriteDepositETH.ts b/src/hooks/L1/useWriteDepositETH.ts index bd2ab39..81688e0 100644 --- a/src/hooks/L1/useWriteDepositETH.ts +++ b/src/hooks/L1/useWriteDepositETH.ts @@ -47,8 +47,8 @@ async function writeMutation( { l1ChainId, l2ChainId, args, ...rest }: DepositETHMutationParameters, ) { const walletClient = await getWalletClient(config, { chainId: l1ChainId }) - const l1PublicClient = getPublicClient(config, { chainId: l1ChainId }) - const l2PublicClient = getPublicClient(config, { chainId: l2ChainId }) + const l1PublicClient = await getPublicClient(config, { chainId: l1ChainId })! + const l2PublicClient = await getPublicClient(config, { chainId: l2ChainId })! const l1Addresses = config.l2chains[l2ChainId].l1Addresses const l2GasLimit = args.gasLimit diff --git a/src/hooks/L1/useWriteFinalizeWithdrawalTransaction.ts b/src/hooks/L1/useWriteFinalizeWithdrawalTransaction.ts index c9d4b2f..5048caa 100644 --- a/src/hooks/L1/useWriteFinalizeWithdrawalTransaction.ts +++ b/src/hooks/L1/useWriteFinalizeWithdrawalTransaction.ts @@ -57,8 +57,8 @@ async function writeMutation( { l1ChainId, l2ChainId, args, ...rest }: FinalizeWithdrawalTransactionMutationParameters, ) { const walletClient = await getWalletClient(config, { chainId: l1ChainId }) - const l1PublicClient = getPublicClient(config, { chainId: l1ChainId }) - const l2PublicClient = getPublicClient(config, { chainId: l2ChainId }) + const l1PublicClient = await getPublicClient(config, { chainId: l1ChainId })! + const l2PublicClient = await getPublicClient(config, { chainId: l2ChainId })! const l1Addresses = config.l2chains[l2ChainId].l1Addresses const withdrawalMessages = await getWithdrawalMessages(l2PublicClient, { diff --git a/src/util/getStateTrieProof.ts b/src/util/getStateTrieProof.ts index 7a71154..1e2886b 100644 --- a/src/util/getStateTrieProof.ts +++ b/src/util/getStateTrieProof.ts @@ -25,7 +25,7 @@ export async function makeStateTrieProof( } export function useMakeStateTrieProof( - client: PublicClient, + client: PublicClient | undefined, blockNumber: bigint | undefined, address: `0x${string}`, slot: `0x${string}` | undefined, @@ -33,7 +33,7 @@ export function useMakeStateTrieProof( const [proof, setProof] = useState(undefined) useEffect(() => { - if (!blockNumber || !slot) { + if (!blockNumber || !slot || !client) { return undefined } From 4c86edc6875faa84804863f561b035ec6931b5df Mon Sep 17 00:00:00 2001 From: Matthew Bunday Date: Wed, 14 Feb 2024 08:48:01 -0500 Subject: [PATCH 03/26] Bump to first major release --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f4cd8fa..ec10275 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "type": "git", "url": "https://github.com/base-org/op-wagmi.git" }, - "version": "0.2.3", + "version": "1.0.0", "type": "module", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", From 6ad627d81ccbcc408e11df9220ee1c42f36c7859 Mon Sep 17 00:00:00 2001 From: Matthew Bunday Date: Wed, 14 Feb 2024 08:49:43 -0500 Subject: [PATCH 04/26] Lint use of boolean coercion --- src/hooks/L1/useSimulateFinalizeWithdrawalTransaction.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hooks/L1/useSimulateFinalizeWithdrawalTransaction.ts b/src/hooks/L1/useSimulateFinalizeWithdrawalTransaction.ts index c2b3a99..9aaaa28 100644 --- a/src/hooks/L1/useSimulateFinalizeWithdrawalTransaction.ts +++ b/src/hooks/L1/useSimulateFinalizeWithdrawalTransaction.ts @@ -86,7 +86,8 @@ export function useSimulateFinalizeWithdrawalTransaction< }), } - const enabled = Boolean(account.address) && (queryOverride?.enabled ?? true) && !!l1PublicClient && !!l2PublicClient + const enabled = Boolean(account.address) && (queryOverride?.enabled ?? true) && Boolean(l1PublicClient) + && Boolean(l2PublicClient) return { ...useQuery({ ...query, queryKeyHashFn: hashFn, enabled }), queryKey: query.queryKey, From 34520391a35d029560ad781a25df9b09c8e8847e Mon Sep 17 00:00:00 2001 From: Matthew Bunday Date: Wed, 14 Feb 2024 11:12:09 -0500 Subject: [PATCH 05/26] Update peer dependency specification --- package.json | 6 +++--- pnpm-lock.yaml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index ec10275..cdae153 100644 --- a/package.json +++ b/package.json @@ -100,11 +100,11 @@ }, "peerDependencies": { "@tanstack/react-query": ">=5.0.0", - "@wagmi/core": "^2.6.5", + "@wagmi/core": "^2.x", "op-viem": "1.3.1-alpha", "typescript": ">=5.0.4", - "viem": "^2.7.9", - "wagmi": "^2.5.7" + "viem": "^2.x", + "wagmi": "^2.x" }, "peerDependenciesMeta": { "typescript": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9ccba8d..9c3eb58 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -15,16 +15,16 @@ importers: specifier: ^0.15.0 version: 0.15.0(@wagmi/core@2.6.5)(typescript@5.0.4)(wagmi@2.5.7) '@wagmi/core': - specifier: ^2.6.5 + specifier: ^2.x version: 2.6.5(@types/react@18.2.38)(react@18.2.0)(typescript@5.0.4)(viem@2.7.9) op-viem: specifier: 1.3.1-alpha version: 1.3.1-alpha(@wagmi/core@2.6.5)(typescript@5.0.4)(viem@2.7.9)(wagmi@2.5.7) viem: - specifier: ^2.7.9 + specifier: ^2.x version: 2.7.9(typescript@5.0.4)(zod@3.22.4) wagmi: - specifier: ^2.5.7 + specifier: ^2.x version: 2.5.7(@tanstack/react-query@5.8.6)(@types/react@18.2.38)(react-dom@18.2.0)(react-native@0.72.7)(react@18.2.0)(typescript@5.0.4)(viem@2.7.9) devDependencies: '@biomejs/biome': From f9b8a96628c5cb97505f6b100abc1dc1d415a02d Mon Sep 17 00:00:00 2001 From: Matthew Bunday Date: Thu, 15 Feb 2024 08:45:00 -0500 Subject: [PATCH 06/26] Rewrite useWriteFinalizeWithdrawalTransaction.ts to use Viem config --- .../useWriteFinalizeWithdrawalTransaction.ts | 45 +++++++++++-------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/src/hooks/L1/useWriteFinalizeWithdrawalTransaction.ts b/src/hooks/L1/useWriteFinalizeWithdrawalTransaction.ts index 5048caa..a2baaf5 100644 --- a/src/hooks/L1/useWriteFinalizeWithdrawalTransaction.ts +++ b/src/hooks/L1/useWriteFinalizeWithdrawalTransaction.ts @@ -5,20 +5,18 @@ import { simulateFinalizeWithdrawalTransaction, writeFinalizeWithdrawalTranasction, } from 'op-viem/actions' -import type { Hash } from 'viem' -import { type Config } from 'wagmi' +import type { Chain, ChainContract, Hash } from 'viem' +import { type Config, useConfig } from 'wagmi' import { getPublicClient, getWalletClient } from 'wagmi/actions' -import type { OpConfig } from '../../types/OpConfig.js' import type { UseWriteOPActionBaseParameters } from '../../types/UseWriteOPActionBaseParameters.js' import type { UseWriteOPActionBaseReturnType } from '../../types/UseWriteOPActionBaseReturnType.js' import type { WriteOPContractBaseParameters } from '../../types/WriteOPContractBaseParameters.js' -import { useOpConfig } from '../useOpConfig.js' const ABI = optimismPortalABI const FUNCTION = 'finalizeWithdrawalTransaction' export type WriteFinalizeWithdrawalTransactionParameters< - config extends Config = OpConfig, + config extends Config = Config, chainId extends config['chains'][number]['id'] = number, > = WriteOPContractBaseParameters & { args: { @@ -27,10 +25,10 @@ export type WriteFinalizeWithdrawalTransactionParameters< l2ChainId: number } -export type UseWriteFinalizeWithdrawalTransactionParameters = +export type UseWriteFinalizeWithdrawalTransactionParameters = UseWriteOPActionBaseParameters -export type UseWriteFinalizeWithdrawalTransactionReturnType = +export type UseWriteFinalizeWithdrawalTransactionReturnType = & Omit< UseWriteOPActionBaseReturnType, 'write' | 'writeAsync' @@ -48,18 +46,24 @@ export type UseWriteFinalizeWithdrawalTransactionReturnType['writeAsync'] } -type FinalizeWithdrawalTransactionMutationParameters = WriteFinalizeWithdrawalTransactionParameters & { +type FinalizeWithdrawalTransactionMutationParameters = { l1ChainId: number -} + l2Chain: Chain +} & WriteFinalizeWithdrawalTransactionParameters async function writeMutation( - config: OpConfig, - { l1ChainId, l2ChainId, args, ...rest }: FinalizeWithdrawalTransactionMutationParameters, + config: Config, + { l1ChainId, l2Chain, args, ...rest }: FinalizeWithdrawalTransactionMutationParameters, ) { const walletClient = await getWalletClient(config, { chainId: l1ChainId }) const l1PublicClient = await getPublicClient(config, { chainId: l1ChainId })! - const l2PublicClient = await getPublicClient(config, { chainId: l2ChainId })! - const l1Addresses = config.l2chains[l2ChainId].l1Addresses + const l2PublicClient = await getPublicClient(config, { chainId: l2Chain.id })! + const portal: ChainContract | undefined = l2Chain?.contracts?.portal + ?.[l1ChainId as keyof typeof l2Chain.contracts.portal] + + if (!portal) { + throw new Error(`Portal contract to chainId ${l1ChainId} not configured for chain ${l2Chain.name}`) + } const withdrawalMessages = await getWithdrawalMessages(l2PublicClient, { hash: args.withdrawalTxHash, @@ -68,13 +72,13 @@ async function writeMutation( await simulateFinalizeWithdrawalTransaction(l1PublicClient, { withdrawal: withdrawalMessages.messages[0], account: walletClient.account.address, - ...l1Addresses, + portal, ...rest, }) return writeFinalizeWithdrawalTranasction(walletClient, { args: { withdrawal: withdrawalMessages.messages[0] }, account: walletClient.account.address, - ...l1Addresses, + portal, ...rest, }) } @@ -84,20 +88,23 @@ async function writeMutation( * @param parameters - {@link UseWriteFinalizeWithdrawalTransactionParameters} * @returns wagmi [useWriteContract return type](https://alpha.wagmi.sh/react/api/hooks/useWrtieContract#return-type). {@link UseWriteFinalizeWithdrawalTransactionReturnType} */ -export function useWriteFinalizeWithdrawalTransaction( +export function useWriteFinalizeWithdrawalTransaction( args: UseWriteFinalizeWithdrawalTransactionParameters = {}, ): UseWriteFinalizeWithdrawalTransactionReturnType { - const opConfig = useOpConfig(args) + const config = useConfig(args) const mutation = { mutationFn({ l2ChainId, args, ...rest }: WriteFinalizeWithdrawalTransactionParameters) { - const l2Chain = opConfig.l2chains[l2ChainId] + const l2Chain = config.chains.find((chain) => chain.id === l2ChainId) if (!l2Chain) { throw new Error('L2 chain not configured') } + if (!l2Chain.sourceId) { + throw new Error(`Chain ${l2Chain.name} does not have a source chain, is it an L2 chain?`) + } - return writeMutation(opConfig, { args, l1ChainId: l2Chain.l1ChainId, l2ChainId: l2ChainId, ...rest }) + return writeMutation(config, { args, l1ChainId: l2Chain.sourceId, l2Chain, l2ChainId: l2Chain.id, ...rest }) }, mutationKey: ['writeContract'], } From 106e032a6da78756fe19c94a809073f5023214a3 Mon Sep 17 00:00:00 2001 From: Matthew Bunday Date: Thu, 15 Feb 2024 09:04:01 -0500 Subject: [PATCH 07/26] Refactor useWriteDepositETH --- .../useBlockNumberOfLatestL2OutputProposal.ts | 1 - src/hooks/L1/useGetL2OutputIndexAfter.ts | 1 - src/hooks/L1/useSimulateDepositERC20.ts | 8 +-- src/hooks/L1/useSimulateDepositETH.ts | 8 +-- ...seSimulateFinalizeWithdrawalTransaction.ts | 8 +-- .../useSimulateProveWithdrawalTransaction.ts | 8 +-- src/hooks/L1/useWriteDepositERC20.ts | 10 ++-- src/hooks/L1/useWriteDepositETH.ts | 51 +++++++++++++------ .../useWriteFinalizeWithdrawalTransaction.ts | 11 ++-- .../L1/useWriteProveWithdrawalTransaction.ts | 10 ++-- src/hooks/L2/useSimulateWithdrawERC20.ts | 8 +-- src/hooks/L2/useSimulateWithdrawETH.ts | 8 +-- src/hooks/L2/useWriteWithdrawERC20.ts | 10 ++-- src/hooks/L2/useWriteWithdrawETH.ts | 8 +-- src/hooks/useOpConfig.ts | 4 +- .../UseSimulateOPActionBaseParameters.ts | 4 +- .../UseSimulateOPActionBaseReturnType.ts | 4 +- src/types/UseWriteOPActionBaseParameters.ts | 4 +- src/types/UseWriteOPActionBaseReturnType.ts | 4 +- src/types/WriteOPContractBaseParameters.ts | 4 +- 20 files changed, 99 insertions(+), 75 deletions(-) diff --git a/src/hooks/L1/useBlockNumberOfLatestL2OutputProposal.ts b/src/hooks/L1/useBlockNumberOfLatestL2OutputProposal.ts index 8f53057..be789a1 100644 --- a/src/hooks/L1/useBlockNumberOfLatestL2OutputProposal.ts +++ b/src/hooks/L1/useBlockNumberOfLatestL2OutputProposal.ts @@ -1,7 +1,6 @@ import { l2OutputOracleABI } from '@eth-optimism/contracts-ts' import type { Abi } from 'viem' import { useConfig, useReadContract, type UseReadContractParameters, type UseReadContractReturnType } from 'wagmi' -import type { OpConfig } from '../../types/OpConfig.js' export function useBlockNumberOfLatestL2OutputProposal( { l2ChainId, config, ...rest }: { l2ChainId: number; config?: OpConfig } & UseReadContractParameters, diff --git a/src/hooks/L1/useGetL2OutputIndexAfter.ts b/src/hooks/L1/useGetL2OutputIndexAfter.ts index 8ec912a..2bbcf83 100644 --- a/src/hooks/L1/useGetL2OutputIndexAfter.ts +++ b/src/hooks/L1/useGetL2OutputIndexAfter.ts @@ -1,6 +1,5 @@ import { l2OutputOracleABI } from '@eth-optimism/contracts-ts' import { useConfig, useReadContract, type UseReadContractParameters, type UseReadContractReturnType } from 'wagmi' -import type { OpConfig } from '../../types/OpConfig.js' export function useGetL2OutputIndexAfter( { l2ChainId, blockNumber, config, ...rest }: { diff --git a/src/hooks/L1/useSimulateDepositERC20.ts b/src/hooks/L1/useSimulateDepositERC20.ts index 5a1168b..4453d63 100644 --- a/src/hooks/L1/useSimulateDepositERC20.ts +++ b/src/hooks/L1/useSimulateDepositERC20.ts @@ -3,7 +3,7 @@ import { l1StandardBridgeABI } from '@eth-optimism/contracts-ts' import { type SimulateDepositERC20Parameters } from 'op-viem/actions' import { type Config, useAccount, useSimulateContract, type UseSimulateContractParameters } from 'wagmi' -import type { OpConfig } from '../../types/OpConfig.js' + import type { UseSimulateOPActionBaseParameters } from '../../types/UseSimulateOPActionBaseParameters.js' import type { UseSimulateOPActionBaseReturnType } from '../../types/UseSimulateOPActionBaseReturnType.js' import { useOpConfig } from '../useOpConfig.js' @@ -12,7 +12,7 @@ const ABI = l1StandardBridgeABI const FUNCTION = 'depositERC20To' export type UseSimulateDepositERC20Parameters< - config extends Config = OpConfig, + config extends Config = Config, chainId extends config['chains'][number]['id'] | undefined = undefined, > = & UseSimulateOPActionBaseParameters @@ -21,7 +21,7 @@ export type UseSimulateDepositERC20Parameters< & { l2ChainId: number } export type UseSimulateDepositERC20ReturnType< - config extends Config = OpConfig, + config extends Config = Config, chainId extends config['chains'][number]['id'] | undefined = undefined, > = UseSimulateOPActionBaseReturnType @@ -31,7 +31,7 @@ export type UseSimulateDepositERC20ReturnType< * @returns wagmi [useSimulateContract return type](https://alpha.wagmi.sh/react/api/hooks/useSimulateContract#return-type). {@link UseSimulateDepositERC20ReturnType} */ export function useSimulateDepositERC20< - config extends Config = OpConfig, + config extends Config = Config, chainId extends config['chains'][number]['id'] | undefined = undefined, >( { args, l2ChainId, query, ...rest }: UseSimulateDepositERC20Parameters, diff --git a/src/hooks/L1/useSimulateDepositETH.ts b/src/hooks/L1/useSimulateDepositETH.ts index ac7212b..f906eb1 100644 --- a/src/hooks/L1/useSimulateDepositETH.ts +++ b/src/hooks/L1/useSimulateDepositETH.ts @@ -3,7 +3,7 @@ import { optimismPortalABI } from '@eth-optimism/contracts-ts' import { type SimulateDepositETHParameters } from 'op-viem/actions' import { type Config, useAccount, useEstimateGas, useSimulateContract, type UseSimulateContractParameters } from 'wagmi' -import type { OpConfig } from '../../types/OpConfig.js' + import type { UseSimulateOPActionBaseParameters } from '../../types/UseSimulateOPActionBaseParameters.js' import type { UseSimulateOPActionBaseReturnType } from '../../types/UseSimulateOPActionBaseReturnType.js' import { useOpConfig } from '../useOpConfig.js' @@ -12,7 +12,7 @@ const ABI = optimismPortalABI const FUNCTION = 'depositTransaction' export type UseSimulateDepositETHParameters< - config extends Config = OpConfig, + config extends Config = Config, chainId extends config['chains'][number]['id'] | undefined = undefined, > = & UseSimulateOPActionBaseParameters @@ -21,7 +21,7 @@ export type UseSimulateDepositETHParameters< & { l2ChainId: number } export type UseSimulateDepositETHReturnType< - config extends Config = OpConfig, + config extends Config = Config, chainId extends config['chains'][number]['id'] | undefined = undefined, > = UseSimulateOPActionBaseReturnType @@ -31,7 +31,7 @@ export type UseSimulateDepositETHReturnType< * @returns wagmi [useSimulateContract return type](https://alpha.wagmi.sh/react/api/hooks/useSimulateContract#return-type). {@link UseSimulateDepositETHReturnType} */ export function useSimulateDepositETH< - config extends Config = OpConfig, + config extends Config = Config, chainId extends config['chains'][number]['id'] | undefined = undefined, >( { args, l2ChainId, query, ...rest }: UseSimulateDepositETHParameters, diff --git a/src/hooks/L1/useSimulateFinalizeWithdrawalTransaction.ts b/src/hooks/L1/useSimulateFinalizeWithdrawalTransaction.ts index 9aaaa28..baa078a 100644 --- a/src/hooks/L1/useSimulateFinalizeWithdrawalTransaction.ts +++ b/src/hooks/L1/useSimulateFinalizeWithdrawalTransaction.ts @@ -6,7 +6,7 @@ import { getWithdrawalMessages, simulateFinalizeWithdrawalTransaction } from 'op import { type Hash } from 'viem' import { type Config, useAccount, usePublicClient } from 'wagmi' import { hashFn, simulateContractQueryKey } from 'wagmi/query' -import type { OpConfig } from '../../types/OpConfig.js' + import type { UseSimulateOPActionBaseParameters } from '../../types/UseSimulateOPActionBaseParameters.js' import type { UseSimulateOPActionBaseReturnType } from '../../types/UseSimulateOPActionBaseReturnType.js' import { useOpConfig } from '../useOpConfig.js' @@ -15,7 +15,7 @@ const ABI = optimismPortalABI const FUNCTION = 'finalizeWithdrawalTransaction' export type UseSimulateFinalizeWithdrawalTransactionParameters< - config extends Config = OpConfig, + config extends Config = Config, chainId extends config['chains'][number]['id'] | undefined = undefined, > = & UseSimulateOPActionBaseParameters @@ -27,7 +27,7 @@ export type UseSimulateFinalizeWithdrawalTransactionParameters< } export type UseSimulateFinalizeWithdrawalTransactionReturnType< - config extends Config = OpConfig, + config extends Config = Config, chainId extends config['chains'][number]['id'] | undefined = undefined, > = UseSimulateOPActionBaseReturnType @@ -37,7 +37,7 @@ export type UseSimulateFinalizeWithdrawalTransactionReturnType< * @returns wagmi [useSimulateContract return type](https://alpha.wagmi.sh/react/api/hooks/useSimulateContract#return-type). {@link UseSimulateFinalizeWithdrawalTransactionReturnType} */ export function useSimulateFinalizeWithdrawalTransaction< - config extends Config = OpConfig, + config extends Config = Config, chainId extends config['chains'][number]['id'] | undefined = undefined, >( { args, l2ChainId, query: queryOverride, ...rest }: UseSimulateFinalizeWithdrawalTransactionParameters< diff --git a/src/hooks/L1/useSimulateProveWithdrawalTransaction.ts b/src/hooks/L1/useSimulateProveWithdrawalTransaction.ts index 7af6ace..c660aff 100644 --- a/src/hooks/L1/useSimulateProveWithdrawalTransaction.ts +++ b/src/hooks/L1/useSimulateProveWithdrawalTransaction.ts @@ -12,7 +12,7 @@ import { import { type Hash } from 'viem' import { type Config, useAccount, usePublicClient } from 'wagmi' import { hashFn, simulateContractQueryKey } from 'wagmi/query' -import type { OpConfig } from '../../types/OpConfig.js' + import type { UseSimulateOPActionBaseParameters } from '../../types/UseSimulateOPActionBaseParameters.js' import type { UseSimulateOPActionBaseReturnType } from '../../types/UseSimulateOPActionBaseReturnType.js' import { useOpConfig } from '../useOpConfig.js' @@ -21,7 +21,7 @@ const ABI = optimismPortalABI const FUNCTION = 'proveWithdrawalTransaction' export type UseSimulateProveWithdrawalTransactionParameters< - config extends Config = OpConfig, + config extends Config = Config, chainId extends config['chains'][number]['id'] | undefined = undefined, > = & UseSimulateOPActionBaseParameters @@ -33,7 +33,7 @@ export type UseSimulateProveWithdrawalTransactionParameters< } export type UseSimulateProveWithdrawalTransactionReturnType< - config extends Config = OpConfig, + config extends Config = Config, chainId extends config['chains'][number]['id'] | undefined = undefined, > = UseSimulateOPActionBaseReturnType @@ -43,7 +43,7 @@ export type UseSimulateProveWithdrawalTransactionReturnType< * @returns wagmi [useSimulateContract return type](https://alpha.wagmi.sh/react/api/hooks/useSimulateContract#return-type). {@link UseSimulateProveWithdrawalTransactionReturnType} */ export function useSimulateProveWithdrawalTransaction< - config extends Config = OpConfig, + config extends Config = Config, chainId extends config['chains'][number]['id'] | undefined = undefined, >( { args, l2ChainId, query: queryOverride, ...rest }: UseSimulateProveWithdrawalTransactionParameters, diff --git a/src/hooks/L1/useWriteDepositERC20.ts b/src/hooks/L1/useWriteDepositERC20.ts index 83e728c..49cf1d5 100644 --- a/src/hooks/L1/useWriteDepositERC20.ts +++ b/src/hooks/L1/useWriteDepositERC20.ts @@ -4,7 +4,7 @@ import { type WriteDepositERC20Parameters as WriteDepositERC20ActionParameters } import type { ContractFunctionArgs } from 'viem' import { useAccount, useWriteContract } from 'wagmi' import type { WriteContractVariables } from 'wagmi/query' -import type { OpConfig } from '../../types/OpConfig.js' + import type { UseWriteOPActionBaseParameters } from '../../types/UseWriteOPActionBaseParameters.js' import type { UseWriteOPActionBaseReturnType } from '../../types/UseWriteOPActionBaseReturnType.js' import type { WriteOPContractBaseParameters } from '../../types/WriteOPContractBaseParameters.js' @@ -14,7 +14,7 @@ const ABI = l1StandardBridgeABI const FUNCTION = 'depositERC20To' export type WriteDepositERC20Parameters< - config extends Config = OpConfig, + config extends Config = Config, chainId extends config['chains'][number]['id'] = number, > = & WriteOPContractBaseParameters @@ -22,10 +22,10 @@ export type WriteDepositERC20Parameters< & { args: Omit['args'], 'minGasLimit'> & { minGasLimit?: number } } & { l2ChainId: number } -export type UseWriteDepositERC20Parameters = +export type UseWriteDepositERC20Parameters = UseWriteOPActionBaseParameters -export type UseWriteDepositERC20ReturnType = +export type UseWriteDepositERC20ReturnType = & Omit, 'write' | 'writeAsync'> & { writeDepositERC20: UseWriteOPActionBaseReturnType['write'] @@ -41,7 +41,7 @@ export type UseWriteDepositERC20ReturnType( +export function useWriteDepositERC20( args: UseWriteDepositERC20Parameters = {}, ): UseWriteDepositERC20ReturnType { const config = useOpConfig(args) diff --git a/src/hooks/L1/useWriteDepositETH.ts b/src/hooks/L1/useWriteDepositETH.ts index 81688e0..9133136 100644 --- a/src/hooks/L1/useWriteDepositETH.ts +++ b/src/hooks/L1/useWriteDepositETH.ts @@ -6,17 +6,22 @@ import { writeDepositETH, type WriteDepositETHParameters as WriteDepositETHActionParameters, } from 'op-viem/actions' -import type { OpConfig } from '../../types/OpConfig.js' +import type { Chain, ChainContract } from 'viem' +import { useConfig } from 'wagmi' +import { + L2ChainMissingSourceChainMessage, + L2ChainNotConfiguredMessage, + PortalContractNotConfiguredMessage, +} from '../../constants/errorMessages.js' import type { UseWriteOPActionBaseParameters } from '../../types/UseWriteOPActionBaseParameters.js' import type { UseWriteOPActionBaseReturnType } from '../../types/UseWriteOPActionBaseReturnType.js' import type { WriteOPContractBaseParameters } from '../../types/WriteOPContractBaseParameters.js' -import { useOpConfig } from '../useOpConfig.js' const ABI = optimismPortalABI const FUNCTION = 'depositTransaction' export type WriteDepositETHParameters< - config extends Config = OpConfig, + config extends Config = Config, chainId extends config['chains'][number]['id'] = number, > = & WriteOPContractBaseParameters @@ -24,10 +29,10 @@ export type WriteDepositETHParameters< & { args: Omit['args'], 'gasLimit'> & { gasLimit?: number } } & { l2ChainId: number } -export type UseWriteDepositETHParameters = +export type UseWriteDepositETHParameters = UseWriteOPActionBaseParameters -export type UseWriteDepositETHReturnType = +export type UseWriteDepositETHReturnType = & Omit, 'write' | 'writeAsync'> & { writeDepositETH: UseWriteOPActionBaseReturnType['write'] @@ -40,16 +45,23 @@ export type UseWriteDepositETHReturnType( +export function useWriteDepositETH( args: UseWriteDepositETHParameters = {}, ): UseWriteDepositETHReturnType { - const opConfig = useOpConfig(args) + const config = useConfig(args) const mutation = { mutationFn({ l2ChainId, args, ...rest }: WriteDepositETHParameters) { - const l2Chain = opConfig.l2chains[l2ChainId] + const l2Chain = config.chains.find((chain) => chain.id === l2ChainId) if (!l2Chain) { - throw new Error('L2 chain not configured') + throw new Error(L2ChainNotConfiguredMessage(l2ChainId)) + } + if (!l2Chain.sourceId) { + throw new Error(L2ChainMissingSourceChainMessage(l2Chain.name)) } - return writeMutation(opConfig, { args, l1ChainId: l2Chain.l1ChainId, l2ChainId: l2ChainId, ...rest }) + return writeMutation(config, { + args, + l1ChainId: l2Chain.sourceId, + l2ChainId: l2ChainId, + l2Chain: l2Chain, + ...rest, + }) }, mutationKey: ['writeContract'], } diff --git a/src/hooks/L1/useWriteFinalizeWithdrawalTransaction.ts b/src/hooks/L1/useWriteFinalizeWithdrawalTransaction.ts index a2baaf5..1838b3e 100644 --- a/src/hooks/L1/useWriteFinalizeWithdrawalTransaction.ts +++ b/src/hooks/L1/useWriteFinalizeWithdrawalTransaction.ts @@ -8,6 +8,11 @@ import { import type { Chain, ChainContract, Hash } from 'viem' import { type Config, useConfig } from 'wagmi' import { getPublicClient, getWalletClient } from 'wagmi/actions' +import { + L2ChainMissingSourceChainMessage, + L2ChainNotConfiguredMessage, + PortalContractNotConfiguredMessage, +} from '../../constants/errorMessages.js' import type { UseWriteOPActionBaseParameters } from '../../types/UseWriteOPActionBaseParameters.js' import type { UseWriteOPActionBaseReturnType } from '../../types/UseWriteOPActionBaseReturnType.js' import type { WriteOPContractBaseParameters } from '../../types/WriteOPContractBaseParameters.js' @@ -62,7 +67,7 @@ async function writeMutation( ?.[l1ChainId as keyof typeof l2Chain.contracts.portal] if (!portal) { - throw new Error(`Portal contract to chainId ${l1ChainId} not configured for chain ${l2Chain.name}`) + throw new Error(PortalContractNotConfiguredMessage(l1ChainId, l2Chain.name)) } const withdrawalMessages = await getWithdrawalMessages(l2PublicClient, { @@ -98,10 +103,10 @@ export function useWriteFinalizeWithdrawalTransaction chain.id === l2ChainId) if (!l2Chain) { - throw new Error('L2 chain not configured') + throw new Error(L2ChainNotConfiguredMessage(l2ChainId)) } if (!l2Chain.sourceId) { - throw new Error(`Chain ${l2Chain.name} does not have a source chain, is it an L2 chain?`) + throw new Error(L2ChainMissingSourceChainMessage(l2Chain.name)) } return writeMutation(config, { args, l1ChainId: l2Chain.sourceId, l2Chain, l2ChainId: l2Chain.id, ...rest }) diff --git a/src/hooks/L1/useWriteProveWithdrawalTransaction.ts b/src/hooks/L1/useWriteProveWithdrawalTransaction.ts index 1ea2fc3..6f75703 100644 --- a/src/hooks/L1/useWriteProveWithdrawalTransaction.ts +++ b/src/hooks/L1/useWriteProveWithdrawalTransaction.ts @@ -11,7 +11,7 @@ import { import type { Hash } from 'viem' import { type Config } from 'wagmi' import { getPublicClient, getWalletClient } from 'wagmi/actions' -import type { OpConfig } from '../../types/OpConfig.js' + import type { UseWriteOPActionBaseParameters } from '../../types/UseWriteOPActionBaseParameters.js' import type { UseWriteOPActionBaseReturnType } from '../../types/UseWriteOPActionBaseReturnType.js' import type { WriteOPContractBaseParameters } from '../../types/WriteOPContractBaseParameters.js' @@ -21,7 +21,7 @@ const ABI = optimismPortalABI const FUNCTION = 'proveWithdrawalTransaction' export type WriteProveWithdrawalTransactionParameters< - config extends Config = OpConfig, + config extends Config = Config, chainId extends config['chains'][number]['id'] = number, > = WriteOPContractBaseParameters & { args: { @@ -30,10 +30,10 @@ export type WriteProveWithdrawalTransactionParameters< l2ChainId: number } -export type UseWriteProveWithdrawalTransactionParameters = +export type UseWriteProveWithdrawalTransactionParameters = UseWriteOPActionBaseParameters -export type UseWriteProveWithdrawalTransactionReturnType = +export type UseWriteProveWithdrawalTransactionReturnType = & Omit< UseWriteOPActionBaseReturnType, 'write' | 'writeAsync' @@ -101,7 +101,7 @@ async function writeMutation( * @param parameters - {@link UseWriteProveWithdrawalTransactionParameters} * @returns wagmi [useWriteContract return type](https://alpha.wagmi.sh/react/api/hooks/useWrtieContract#return-type). {@link UseWriteProveWithdrawalTransactionReturnType} */ -export function useWriteProveWithdrawalTransaction( +export function useWriteProveWithdrawalTransaction( args: UseWriteProveWithdrawalTransactionParameters = {}, ): UseWriteProveWithdrawalTransactionReturnType { const opConfig = useOpConfig(args) diff --git a/src/hooks/L2/useSimulateWithdrawERC20.ts b/src/hooks/L2/useSimulateWithdrawERC20.ts index ae5e55d..99e077d 100644 --- a/src/hooks/L2/useSimulateWithdrawERC20.ts +++ b/src/hooks/L2/useSimulateWithdrawERC20.ts @@ -4,7 +4,7 @@ import { l2StandardBridgeABI } from '@eth-optimism/contracts-ts' import type { Config } from '@wagmi/core' import { type SimulateWithdrawERC20Parameters } from 'op-viem/actions' import { useAccount, useSimulateContract, type UseSimulateContractParameters } from 'wagmi' -import type { OpConfig } from '../../types/OpConfig.js' + import type { UseSimulateOPActionBaseParameters } from '../../types/UseSimulateOPActionBaseParameters.js' import type { UseSimulateOPActionBaseReturnType } from '../../types/UseSimulateOPActionBaseReturnType.js' import { useOpConfig } from '../useOpConfig.js' @@ -13,7 +13,7 @@ const ABI = l2StandardBridgeABI const FUNCTION = 'withdrawTo' export type UseSimulateWithdrawERC20Parameters< - config extends Config = OpConfig, + config extends Config = Config, chainId extends config['chains'][number]['id'] | undefined = undefined, > = & UseSimulateOPActionBaseParameters @@ -22,7 +22,7 @@ export type UseSimulateWithdrawERC20Parameters< & { chainId: number } export type UseSimulateWithdrawERC20ReturnType< - config extends Config = OpConfig, + config extends Config = Config, chainId extends config['chains'][number]['id'] | undefined = undefined, > = UseSimulateOPActionBaseReturnType @@ -32,7 +32,7 @@ export type UseSimulateWithdrawERC20ReturnType< * @returns wagmi [useSimulateContract return type](https://alpha.wagmi.sh/react/api/hooks/useSimulateContract#return-type). {@link UseSimulateWithdrawERC20ReturnType} */ export function useSimulateWithdrawERC20< - config extends Config = OpConfig, + config extends Config = Config, chainId extends config['chains'][number]['id'] | undefined = undefined, >( { args, chainId, query, ...rest }: UseSimulateWithdrawERC20Parameters, diff --git a/src/hooks/L2/useSimulateWithdrawETH.ts b/src/hooks/L2/useSimulateWithdrawETH.ts index 9fb371d..8c4dcd5 100644 --- a/src/hooks/L2/useSimulateWithdrawETH.ts +++ b/src/hooks/L2/useSimulateWithdrawETH.ts @@ -4,7 +4,7 @@ import { l2StandardBridgeABI } from '@eth-optimism/contracts-ts' import type { Config } from '@wagmi/core' import { type SimulateWithdrawETHParameters } from 'op-viem/actions' import { useAccount, useSimulateContract, type UseSimulateContractParameters } from 'wagmi' -import type { OpConfig } from '../../types/OpConfig.js' + import type { UseSimulateOPActionBaseParameters } from '../../types/UseSimulateOPActionBaseParameters.js' import type { UseSimulateOPActionBaseReturnType } from '../../types/UseSimulateOPActionBaseReturnType.js' import { useOpConfig } from '../useOpConfig.js' @@ -14,7 +14,7 @@ const FUNCTION = 'withdrawTo' export const OVM_ETH = '0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000' export type UseSimulateWithdrawETHParameters< - config extends Config = OpConfig, + config extends Config = Config, chainId extends config['chains'][number]['id'] | undefined = undefined, > = & UseSimulateOPActionBaseParameters @@ -23,7 +23,7 @@ export type UseSimulateWithdrawETHParameters< & { chainId: number } export type UseSimulateWithdrawETHReturnType< - config extends Config = OpConfig, + config extends Config = Config, chainId extends config['chains'][number]['id'] | undefined = undefined, > = UseSimulateOPActionBaseReturnType @@ -33,7 +33,7 @@ export type UseSimulateWithdrawETHReturnType< * @returns wagmi [useSimulateContract return type](https://alpha.wagmi.sh/react/api/hooks/useSimulateContract#return-type). {@link UseSimulateWithdrawETHReturnType} */ export function useSimulateWithdrawETH< - config extends Config = OpConfig, + config extends Config = Config, chainId extends config['chains'][number]['id'] | undefined = undefined, >( { args, chainId, query, ...rest }: UseSimulateWithdrawETHParameters, diff --git a/src/hooks/L2/useWriteWithdrawERC20.ts b/src/hooks/L2/useWriteWithdrawERC20.ts index baae4e3..ede21c3 100644 --- a/src/hooks/L2/useWriteWithdrawERC20.ts +++ b/src/hooks/L2/useWriteWithdrawERC20.ts @@ -4,7 +4,7 @@ import { type WriteWithdrawERC20Parameters as WriteWithdrawERC20ActionParameters import type { ContractFunctionArgs } from 'viem' import { useWriteContract } from 'wagmi' import type { WriteContractVariables } from 'wagmi/query' -import type { OpConfig } from '../../types/OpConfig.js' + import type { UseWriteOPActionBaseParameters } from '../../types/UseWriteOPActionBaseParameters.js' import type { UseWriteOPActionBaseReturnType } from '../../types/UseWriteOPActionBaseReturnType.js' import type { WriteOPContractBaseParameters } from '../../types/WriteOPContractBaseParameters.js' @@ -14,7 +14,7 @@ const ABI = l2StandardBridgeABI const FUNCTION = 'withdrawTo' export type WriteWithdrawERC20Parameters< - config extends Config = OpConfig, + config extends Config = Config, chainId extends config['chains'][number]['id'] = number, > = & WriteOPContractBaseParameters @@ -22,10 +22,10 @@ export type WriteWithdrawERC20Parameters< & { args: Omit['args'], 'minGasLimit'> & { minGasLimit?: number } } & { chainId: number } -export type UseWriteWithdrawERC20Parameters = +export type UseWriteWithdrawERC20Parameters = UseWriteOPActionBaseParameters -export type UseWriteWithdrawERC20ReturnType = +export type UseWriteWithdrawERC20ReturnType = & Omit, 'write' | 'writeAsync'> & { writeWithdrawERC20: UseWriteOPActionBaseReturnType['write'] @@ -41,7 +41,7 @@ export type UseWriteWithdrawERC20ReturnType( +export function useWriteWithdrawERC20( args: UseWriteWithdrawERC20Parameters = {}, ): UseWriteWithdrawERC20ReturnType { const config = useOpConfig(args) diff --git a/src/hooks/L2/useWriteWithdrawETH.ts b/src/hooks/L2/useWriteWithdrawETH.ts index 4c860ef..622e806 100644 --- a/src/hooks/L2/useWriteWithdrawETH.ts +++ b/src/hooks/L2/useWriteWithdrawETH.ts @@ -4,7 +4,7 @@ import { type WriteWithdrawETHParameters as WriteWithdrawETHActionParameters } f import type { ContractFunctionArgs } from 'viem' import { useAccount, useWriteContract } from 'wagmi' import type { WriteContractVariables } from 'wagmi/query' -import type { OpConfig } from '../../types/OpConfig.js' + import type { UseWriteOPActionBaseParameters } from '../../types/UseWriteOPActionBaseParameters.js' import type { UseWriteOPActionBaseReturnType } from '../../types/UseWriteOPActionBaseReturnType.js' import type { WriteOPContractBaseParameters } from '../../types/WriteOPContractBaseParameters.js' @@ -15,7 +15,7 @@ const ABI = l2StandardBridgeABI const FUNCTION = 'withdrawTo' export type WriteWithdrawETHParameters< - config extends Config = OpConfig, + config extends Config = Config, chainId extends config['chains'][number]['id'] = number, > = & WriteOPContractBaseParameters @@ -23,7 +23,7 @@ export type WriteWithdrawETHParameters< & { args: Omit['args'], 'minGasLimit'> & { minGasLimit?: number } } & { chainId: number } -export type UseWriteWithdrawETHParameters = +export type UseWriteWithdrawETHParameters = UseWriteOPActionBaseParameters export type UseWriteWithdrawETHReturnType = @@ -42,7 +42,7 @@ export type UseWriteWithdrawETHReturnType( +export function useWriteWithdrawETH( args: UseWriteWithdrawETHParameters = {}, ): UseWriteWithdrawETHReturnType { const config = useOpConfig(args) diff --git a/src/hooks/useOpConfig.ts b/src/hooks/useOpConfig.ts index 5d8aead..580d5f0 100644 --- a/src/hooks/useOpConfig.ts +++ b/src/hooks/useOpConfig.ts @@ -9,9 +9,9 @@ import { zora } from '../constants/chains/zora.js' import { zoraGoerli } from '../constants/chains/zoraGoerli.js' import { type OpConfig } from '../types/OpConfig.js' -export type UseConfigParameters = ConfigParameter +export type UseConfigParameters = ConfigParameter -export type ConfigParameter = { +export type ConfigParameter = { config?: OpConfig | config | undefined } diff --git a/src/types/UseSimulateOPActionBaseParameters.ts b/src/types/UseSimulateOPActionBaseParameters.ts index 72f7dfe..6f979c8 100644 --- a/src/types/UseSimulateOPActionBaseParameters.ts +++ b/src/types/UseSimulateOPActionBaseParameters.ts @@ -2,7 +2,7 @@ import type { Abi, ContractFunctionArgs, ContractFunctionName } from 'viem' import type { Config, UseSimulateContractParameters } from 'wagmi' import type { SimulateContractData } from 'wagmi/query' import type { ConfigParameter } from '../hooks/useOpConfig.js' -import type { OpConfig } from './OpConfig.js' + export type UseSimulateOPActionBaseParameters< abi extends Abi | readonly unknown[] = Abi, @@ -10,7 +10,7 @@ export type UseSimulateOPActionBaseParameters< abi, 'nonpayable' | 'payable' > = ContractFunctionName, - config extends Config = OpConfig, + config extends Config = Config, chainId extends config['chains'][number]['id'] | undefined = undefined, selectData = SimulateContractData< abi, diff --git a/src/types/UseSimulateOPActionBaseReturnType.ts b/src/types/UseSimulateOPActionBaseReturnType.ts index 0b6ac31..87a900b 100644 --- a/src/types/UseSimulateOPActionBaseReturnType.ts +++ b/src/types/UseSimulateOPActionBaseReturnType.ts @@ -1,7 +1,7 @@ import type { Abi, ContractFunctionArgs, ContractFunctionName } from 'viem' import type { Config, UseSimulateContractReturnType } from 'wagmi' import type { SimulateContractData } from 'wagmi/query' -import type { OpConfig } from './OpConfig.js' + export type UseSimulateOPActionBaseReturnType< abi extends Abi | readonly unknown[] = Abi, @@ -9,7 +9,7 @@ export type UseSimulateOPActionBaseReturnType< abi, 'nonpayable' | 'payable' > = ContractFunctionName, - config extends Config = OpConfig, + config extends Config = Config, chainId extends config['chains'][number]['id'] | undefined = undefined, selectData = SimulateContractData< abi, diff --git a/src/types/UseWriteOPActionBaseParameters.ts b/src/types/UseWriteOPActionBaseParameters.ts index 313defd..1c162ab 100644 --- a/src/types/UseWriteOPActionBaseParameters.ts +++ b/src/types/UseWriteOPActionBaseParameters.ts @@ -1,7 +1,7 @@ import type { Config, UseWriteContractParameters } from 'wagmi' -import type { OpConfig } from './OpConfig.js' + export type UseWriteOPActionBaseParameters< - config extends Config = OpConfig, + config extends Config = Config, context = unknown, > = UseWriteContractParameters diff --git a/src/types/UseWriteOPActionBaseReturnType.ts b/src/types/UseWriteOPActionBaseReturnType.ts index d1e735f..0c83bfe 100644 --- a/src/types/UseWriteOPActionBaseReturnType.ts +++ b/src/types/UseWriteOPActionBaseReturnType.ts @@ -3,11 +3,11 @@ import type { WriteContractErrorType, WriteContractReturnType } from '@wagmi/cor import type { Abi } from 'viem' import type { Config, UseWriteContractReturnType } from 'wagmi' import type { WriteContractData, WriteContractVariables } from 'wagmi/query' -import type { OpConfig } from './OpConfig.js' + export type UseWriteOPActionBaseReturnType< args, - config extends Config = OpConfig, + config extends Config = Config, context = unknown, > = & Omit, 'writeContract' | 'writeContractAsync'> diff --git a/src/types/WriteOPContractBaseParameters.ts b/src/types/WriteOPContractBaseParameters.ts index a19cd07..7822327 100644 --- a/src/types/WriteOPContractBaseParameters.ts +++ b/src/types/WriteOPContractBaseParameters.ts @@ -1,12 +1,12 @@ import type { Abi, ContractFunctionArgs, ContractFunctionName } from 'viem' import type { Config } from 'wagmi' import type { WriteContractVariables } from 'wagmi/query' -import type { OpConfig } from './OpConfig.js' + export type WriteOPContractBaseParameters< abi extends Abi | readonly unknown[], functionName extends ContractFunctionName, - config extends Config = OpConfig, + config extends Config = Config, chainId extends config['chains'][number]['id'] = number, allFunctionNames = ContractFunctionName, > = Omit< From 117c8736ca2b3e45333e16134cdeed209caaacc1 Mon Sep 17 00:00:00 2001 From: Matthew Bunday Date: Thu, 15 Feb 2024 10:37:18 -0500 Subject: [PATCH 08/26] Check point, huge refactor --- src/_test/config.ts | 33 +++++++---------- src/constants/chains/base.ts | 21 ++++++----- .../useBlockNumberOfLatestL2OutputProposal.ts | 13 +++---- src/hooks/L1/useGetL2OutputIndexAfter.ts | 14 +++---- src/hooks/L1/useProveWithdrawalArgs.ts | 37 ++++++++++--------- src/hooks/L1/useSimulateDepositERC20.ts | 16 ++++---- src/hooks/L1/useSimulateDepositETH.ts | 23 +++++++----- ...ulateFinalizeWithdrawalTransaction.test.ts | 20 ---------- ...seSimulateFinalizeWithdrawalTransaction.ts | 20 +++++----- .../useSimulateProveWithdrawalTransaction.ts | 25 ++++++------- src/hooks/L1/useWriteDepositERC20.ts | 28 ++++++-------- src/hooks/L1/useWriteDepositETH.ts | 28 +++----------- .../L1/useWriteProveWithdrawalTransaction.ts | 33 ++++++++--------- src/hooks/L2/useSimulateWithdrawERC20.ts | 16 ++++---- src/hooks/L2/useSimulateWithdrawETH.ts | 16 ++++---- src/hooks/L2/useWriteWithdrawERC20.ts | 28 ++++++-------- src/hooks/L2/useWriteWithdrawETH.ts | 29 ++++++--------- src/hooks/useOpConfig.ts | 33 ----------------- .../UseSimulateOPActionBaseParameters.ts | 6 +-- .../UseSimulateOPActionBaseReturnType.ts | 1 - src/types/UseWriteOPActionBaseParameters.ts | 1 - src/types/UseWriteOPActionBaseReturnType.ts | 1 - src/types/WriteOPContractBaseParameters.ts | 1 - 23 files changed, 171 insertions(+), 272 deletions(-) delete mode 100644 src/hooks/useOpConfig.ts diff --git a/src/_test/config.ts b/src/_test/config.ts index 20801a0..853bcb7 100644 --- a/src/_test/config.ts +++ b/src/_test/config.ts @@ -1,8 +1,7 @@ import { mock } from '@wagmi/connectors' -import { base as viem_base, mainnet as viem_mainnet } from 'viem/chains' -import { createConfig, http } from 'wagmi' +import { mainnet as viem_mainnet } from 'viem/chains' +import { type Config, createConfig, http } from 'wagmi' import { base as opWagmiBase } from '../constants/chains/base.js' -import { type OpConfig } from '../types/OpConfig.js' import { accounts } from './constants.js' import { getRpcUrls } from './utils.js' @@ -18,7 +17,7 @@ const mainnet = { } const base = { - ...viem_base, + ...opWagmiBase, ...getRpcUrls({ port: 8546 }), // fork: { // blockNumber: process.env.VITE_OPTIMISM_FORK_BLOCK_NUMBER @@ -28,25 +27,19 @@ const base = { // }, } -export const config: OpConfig = { - l2chains: { - [opWagmiBase.chainId]: opWagmiBase, +export const config = createConfig({ + chains: [mainnet, base], + connectors: [mock({ accounts })], + pollingInterval: 100, + storage: null, + transports: { + [base.id]: http(), + [mainnet.id]: http(), }, - - ...createConfig({ - chains: [mainnet, base], - connectors: [mock({ accounts })], - pollingInterval: 100, - storage: null, - transports: { - [base.id]: http(), - [mainnet.id]: http(), - }, - }), -} +}) // Hacky way to mock a connected wallet -export const connectedConfig: OpConfig = { +export const connectedConfig: Config = { ...config, state: { chainId: 1, diff --git a/src/constants/chains/base.ts b/src/constants/chains/base.ts index 9861fd9..82f5349 100644 --- a/src/constants/chains/base.ts +++ b/src/constants/chains/base.ts @@ -1,12 +1,15 @@ import { baseAddresses } from 'op-viem/chains' -import type { L2Chain } from '../../types/OpConfig.js' +import { base as viem_base, type Chain, mainnet } from 'viem/chains' -export const base: L2Chain = { - chainId: 8453, - l1ChainId: 1, - l1Addresses: baseAddresses, - l2Addresses: { - l2L1MessagePasserAddress: { address: '0x4200000000000000000000000000000000000016', chainId: 8453 }, - l2StandardBridge: { address: '0x4200000000000000000000000000000000000010', chainId: 8453 }, +export const base: Chain = { + ...viem_base, + contracts: { + ...viem_base.contracts, + l1StandardBridge: { + [mainnet.id]: { + address: baseAddresses.l1StandardBridge.address, + blockCreated: baseAddresses.l1StandardBridge.blockCreated, + }, + }, }, -} as const +} diff --git a/src/hooks/L1/useBlockNumberOfLatestL2OutputProposal.ts b/src/hooks/L1/useBlockNumberOfLatestL2OutputProposal.ts index be789a1..483ee5e 100644 --- a/src/hooks/L1/useBlockNumberOfLatestL2OutputProposal.ts +++ b/src/hooks/L1/useBlockNumberOfLatestL2OutputProposal.ts @@ -1,20 +1,19 @@ import { l2OutputOracleABI } from '@eth-optimism/contracts-ts' import type { Abi } from 'viem' import { useConfig, useReadContract, type UseReadContractParameters, type UseReadContractReturnType } from 'wagmi' +import { validateL2Chain, validateL2OutputOracleContract } from '../../util/validateChains.js' export function useBlockNumberOfLatestL2OutputProposal( - { l2ChainId, config, ...rest }: { l2ChainId: number; config?: OpConfig } & UseReadContractParameters, + { l2ChainId, ...rest }: { l2ChainId: number } & UseReadContractParameters, ) { - const opConfig = useConfig({ config }) - const l2Chain = opConfig.l2chains[l2ChainId] + const config = useConfig(rest) - if (!l2Chain) { - throw new Error('L2 chain not configured') - } + const { l2Chain, l1ChainId } = validateL2Chain(config, l2ChainId) + const l2OutputOracle = validateL2OutputOracleContract(l1ChainId, l2Chain).address const result = useReadContract({ abi: l2OutputOracleABI, - address: l2Chain.l1Addresses.l2OutputOracle.address, + address: l2OutputOracle, functionName: 'latestBlockNumber', args: [], ...rest, diff --git a/src/hooks/L1/useGetL2OutputIndexAfter.ts b/src/hooks/L1/useGetL2OutputIndexAfter.ts index 2bbcf83..e71a161 100644 --- a/src/hooks/L1/useGetL2OutputIndexAfter.ts +++ b/src/hooks/L1/useGetL2OutputIndexAfter.ts @@ -1,23 +1,21 @@ import { l2OutputOracleABI } from '@eth-optimism/contracts-ts' import { useConfig, useReadContract, type UseReadContractParameters, type UseReadContractReturnType } from 'wagmi' +import { validateL2Chain, validateL2OutputOracleContract } from '../../util/validateChains.js' export function useGetL2OutputIndexAfter( - { l2ChainId, blockNumber, config, ...rest }: { + { l2ChainId, blockNumber, ...rest }: { blockNumber?: bigint l2ChainId: number - config?: OpConfig } & UseReadContractParameters, ) { - const opConfig = useConfig({ config }) - const l2Chain = opConfig.l2chains[l2ChainId] + const config = useConfig(rest) - if (!l2Chain) { - throw new Error('L2 chain not configured') - } + const { l2Chain, l1ChainId } = validateL2Chain(config, l2ChainId) + const l2OutputOracle = validateL2OutputOracleContract(l1ChainId, l2Chain).address const result = useReadContract({ abi: l2OutputOracleABI, - address: l2Chain.l1Addresses.l2OutputOracle.address, + address: l2OutputOracle, functionName: 'getL2OutputIndexAfter', args: [blockNumber || 0n], query: { diff --git a/src/hooks/L1/useProveWithdrawalArgs.ts b/src/hooks/L1/useProveWithdrawalArgs.ts index dc3eeed..cf5e9a6 100644 --- a/src/hooks/L1/useProveWithdrawalArgs.ts +++ b/src/hooks/L1/useProveWithdrawalArgs.ts @@ -1,61 +1,62 @@ import { l2OutputOracleABI } from '@eth-optimism/contracts-ts' import { useMemo } from 'react' import { type Hash, pad } from 'viem' -import { type Config, useBlock, usePublicClient, useReadContract, useWaitForTransactionReceipt } from 'wagmi' +import { useBlock, useConfig, usePublicClient, useReadContract, useWaitForTransactionReceipt } from 'wagmi' import type { BedrockCrossChainMessageProof } from '../../types/BedrockCrossChainMessageProof.js' import { getMessageSlot } from '../../util/getMessageSlot.js' import { useMakeStateTrieProof } from '../../util/getStateTrieProof.js' import { getWithdrawalMessage } from '../../util/getWithdrawalMessage.js' import { hashWithdrawal } from '../../util/hashWithdrawal.js' -import { useOpConfig } from '../useOpConfig.js' + +import { + validateL2Chain, + validateL2OutputOracleContract, + validatel2ToL1MessagePasserContract, +} from '../../util/validateChains.js' import { useBlockNumberOfLatestL2OutputProposal } from './useBlockNumberOfLatestL2OutputProposal.js' import { useGetL2OutputIndexAfter } from './useGetL2OutputIndexAfter.js' export function useProveWithdrawalArgs({ l2ChainId, - config, withdrawalTxHash, }: { withdrawalTxHash: Hash l2ChainId: number - config?: Config }) { - const opConfig = useOpConfig({ config }) - const l2Chain = opConfig.l2chains[l2ChainId] - - if (!l2Chain) { - throw new Error('L2 chain not configured') - } + const config = useConfig() + const { l1ChainId, l2Chain } = validateL2Chain(config, l2ChainId) + const l2OutputOracle = validateL2OutputOracleContract(l1ChainId, l2Chain).address + const l2ToL1MessagePasser = validatel2ToL1MessagePasserContract(l2Chain).address - const l2PublicClient = usePublicClient({ chainId: l2Chain.chainId })! + const l2PublicClient = usePublicClient({ chainId: l2Chain.id })! const { data: blockNumberOfLatestL2OutputProposal } = useBlockNumberOfLatestL2OutputProposal({ - config: opConfig, + config, l2ChainId: l2ChainId, }) const { data: withdrawalOutputIndex } = useGetL2OutputIndexAfter({ blockNumber: blockNumberOfLatestL2OutputProposal, l2ChainId, - config: opConfig, + config, }) const { data: proposal } = useReadContract({ abi: l2OutputOracleABI, - address: l2Chain.l1Addresses.l2OutputOracle.address, + address: l2OutputOracle, functionName: 'getL2Output', }) const { data: withdrawalReceipt } = useWaitForTransactionReceipt({ hash: withdrawalTxHash, - chainId: l2Chain.chainId, + chainId: l2Chain.id, }) const withdrawalMessage = useMemo(() => { if (!withdrawalReceipt) { return undefined } - return getWithdrawalMessage(withdrawalReceipt, l2Chain.l2Addresses.l2L1MessagePasserAddress.address) + return getWithdrawalMessage(withdrawalReceipt, l2ToL1MessagePasser) }, [withdrawalReceipt, l2Chain]) const messageBedrockOutput = useMemo(() => { @@ -87,12 +88,12 @@ export function useProveWithdrawalArgs({ const stateTrieProof = useMakeStateTrieProof( l2PublicClient, blockNumberOfLatestL2OutputProposal, - l2Chain.l2Addresses.l2L1MessagePasserAddress.address, + l2ToL1MessagePasser, messageSlot, ) const { data: block } = useBlock({ - chainId: l2Chain.chainId, + chainId: l2Chain.id, blockNumber: blockNumberOfLatestL2OutputProposal, }) diff --git a/src/hooks/L1/useSimulateDepositERC20.ts b/src/hooks/L1/useSimulateDepositERC20.ts index 4453d63..068b4af 100644 --- a/src/hooks/L1/useSimulateDepositERC20.ts +++ b/src/hooks/L1/useSimulateDepositERC20.ts @@ -2,11 +2,11 @@ import { l1StandardBridgeABI } from '@eth-optimism/contracts-ts' import { type SimulateDepositERC20Parameters } from 'op-viem/actions' -import { type Config, useAccount, useSimulateContract, type UseSimulateContractParameters } from 'wagmi' +import { type Config, useAccount, useConfig, useSimulateContract, type UseSimulateContractParameters } from 'wagmi' import type { UseSimulateOPActionBaseParameters } from '../../types/UseSimulateOPActionBaseParameters.js' import type { UseSimulateOPActionBaseReturnType } from '../../types/UseSimulateOPActionBaseReturnType.js' -import { useOpConfig } from '../useOpConfig.js' +import { validatel1StandardBridgeContract, validateL2Chain } from '../../util/validateChains.js' const ABI = l1StandardBridgeABI const FUNCTION = 'depositERC20To' @@ -36,20 +36,18 @@ export function useSimulateDepositERC20< >( { args, l2ChainId, query, ...rest }: UseSimulateDepositERC20Parameters, ): UseSimulateDepositERC20ReturnType { - const opConfig = useOpConfig(rest) - const l2Chain = opConfig.l2chains[l2ChainId] + const config = useConfig(rest) const account = useAccount(rest) - if (!l2Chain) { - throw new Error('L2 chain not configured') - } + const { l2Chain, l1ChainId } = validateL2Chain(config, l2ChainId) + const l1StandardBridge = validatel1StandardBridgeContract(l1ChainId, l2Chain).address return useSimulateContract({ - address: l2Chain.l1Addresses.l1StandardBridge.address, + address: l1StandardBridge, abi: ABI, functionName: FUNCTION, args: [args.l1Token, args.l2Token, args.to, args.amount, args.minGasLimit ?? 0, args.extraData ?? '0x'], - chainId: l2Chain.l1ChainId, + chainId: l1ChainId, query: query as UseSimulateContractParameters['query'], account: account.address, ...rest, diff --git a/src/hooks/L1/useSimulateDepositETH.ts b/src/hooks/L1/useSimulateDepositETH.ts index f906eb1..5be1841 100644 --- a/src/hooks/L1/useSimulateDepositETH.ts +++ b/src/hooks/L1/useSimulateDepositETH.ts @@ -2,11 +2,18 @@ import { optimismPortalABI } from '@eth-optimism/contracts-ts' import { type SimulateDepositETHParameters } from 'op-viem/actions' -import { type Config, useAccount, useEstimateGas, useSimulateContract, type UseSimulateContractParameters } from 'wagmi' +import { + type Config, + useAccount, + useConfig, + useEstimateGas, + useSimulateContract, + type UseSimulateContractParameters, +} from 'wagmi' import type { UseSimulateOPActionBaseParameters } from '../../types/UseSimulateOPActionBaseParameters.js' import type { UseSimulateOPActionBaseReturnType } from '../../types/UseSimulateOPActionBaseReturnType.js' -import { useOpConfig } from '../useOpConfig.js' +import { validateL2Chain, validatePortalContract } from '../../util/validateChains.js' const ABI = optimismPortalABI const FUNCTION = 'depositTransaction' @@ -36,13 +43,11 @@ export function useSimulateDepositETH< >( { args, l2ChainId, query, ...rest }: UseSimulateDepositETHParameters, ): UseSimulateDepositETHReturnType { - const opConfig = useOpConfig(rest) - const l2Chain = opConfig.l2chains[l2ChainId] + const config = useConfig(rest) const account = useAccount(rest) - if (!l2Chain) { - throw new Error('L2 chain not configured') - } + const { l2Chain, l1ChainId } = validateL2Chain(config, l2ChainId) + const portal = validatePortalContract(l1ChainId, l2Chain) const { data: l2GasEstimate } = useEstimateGas({ chainId: l2ChainId, @@ -54,11 +59,11 @@ export function useSimulateDepositETH< const enabled = Boolean(args.gasLimit || l2GasEstimate) && (query?.enabled ?? true) return useSimulateContract({ - address: l2Chain.l1Addresses.portal.address, + address: portal.address, abi: ABI, functionName: FUNCTION, args: [args.to, args.amount, BigInt(args.gasLimit ?? l2GasEstimate ?? 0), false, args.data ?? '0x'], - chainId: l2Chain.l1ChainId, + chainId: l1ChainId, value: args.amount, query: { ...query, enabled } as UseSimulateContractParameters['query'], account: account.address, diff --git a/src/hooks/L1/useSimulateFinalizeWithdrawalTransaction.test.ts b/src/hooks/L1/useSimulateFinalizeWithdrawalTransaction.test.ts index 00ae1f5..d157b7b 100644 --- a/src/hooks/L1/useSimulateFinalizeWithdrawalTransaction.test.ts +++ b/src/hooks/L1/useSimulateFinalizeWithdrawalTransaction.test.ts @@ -84,26 +84,6 @@ test('useSimulateFinalizeWithdrawalTransaction', async () => { ], "dataSuffix": undefined, "functionName": "finalizeWithdrawalTransaction", - "l1CrossDomainMessenger": { - "address": "0x866E82a600A1414e583f7F13623F1aC5d58b0Afa", - "blockCreated": 17482143, - "chainId": 1, - }, - "l1Erc721Bridge": { - "address": "0x608d94945A64503E642E6370Ec598e519a2C1E53", - "blockCreated": 17482143, - "chainId": 1, - }, - "l1StandardBridge": { - "address": "0x3154Cf16ccdb4C6d922629664174b904d80F2C35", - "blockCreated": 17482143, - "chainId": 1, - }, - "l2OutputOracle": { - "address": "0x56315b90c40730925ec5485cf004d835058518A0", - "blockCreated": 17482143, - "chainId": 1, - }, }, "result": undefined, }, diff --git a/src/hooks/L1/useSimulateFinalizeWithdrawalTransaction.ts b/src/hooks/L1/useSimulateFinalizeWithdrawalTransaction.ts index baa078a..9c309c1 100644 --- a/src/hooks/L1/useSimulateFinalizeWithdrawalTransaction.ts +++ b/src/hooks/L1/useSimulateFinalizeWithdrawalTransaction.ts @@ -4,12 +4,12 @@ import { optimismPortalABI } from '@eth-optimism/contracts-ts' import { useQuery } from '@tanstack/react-query' import { getWithdrawalMessages, simulateFinalizeWithdrawalTransaction } from 'op-viem/actions' import { type Hash } from 'viem' -import { type Config, useAccount, usePublicClient } from 'wagmi' +import { type Config, useAccount, useConfig, usePublicClient } from 'wagmi' import { hashFn, simulateContractQueryKey } from 'wagmi/query' import type { UseSimulateOPActionBaseParameters } from '../../types/UseSimulateOPActionBaseParameters.js' import type { UseSimulateOPActionBaseReturnType } from '../../types/UseSimulateOPActionBaseReturnType.js' -import { useOpConfig } from '../useOpConfig.js' +import { validateL2Chain, validatePortalContract } from '../../util/validateChains.js' const ABI = optimismPortalABI const FUNCTION = 'finalizeWithdrawalTransaction' @@ -45,17 +45,15 @@ export function useSimulateFinalizeWithdrawalTransaction< chainId >, ): UseSimulateFinalizeWithdrawalTransactionReturnType { - const opConfig = useOpConfig(rest) - const l2Chain = opConfig.l2chains[l2ChainId] + const config = useConfig(rest) - if (!l2Chain) { - throw new Error('L2 chain not configured') - } + const { l2Chain, l1ChainId } = validateL2Chain(config, l2ChainId) const account = useAccount(rest) - const l1PublicClient = usePublicClient({ chainId: l2Chain.l1ChainId })! + const l1PublicClient = usePublicClient({ chainId: l1ChainId })! const l2PublicClient = usePublicClient({ chainId: l2ChainId })! - const l1Addresses = opConfig.l2chains[l2ChainId].l1Addresses + + const portal = validatePortalContract(l1ChainId, l2Chain).address const query = { async queryFn() { @@ -66,7 +64,7 @@ export function useSimulateFinalizeWithdrawalTransaction< return simulateFinalizeWithdrawalTransaction(l1PublicClient, { withdrawal: withdrawalMessages.messages[0], account: account.address, - ...l1Addresses, + portal, }) }, ...queryOverride, @@ -81,7 +79,7 @@ export function useSimulateFinalizeWithdrawalTransaction< ...args, }, account: account.address, - chainId: l2Chain.l1ChainId, + chainId: l1ChainId, action: 'finalizeWithdrawalTransaction', }), } diff --git a/src/hooks/L1/useSimulateProveWithdrawalTransaction.ts b/src/hooks/L1/useSimulateProveWithdrawalTransaction.ts index c660aff..cf30430 100644 --- a/src/hooks/L1/useSimulateProveWithdrawalTransaction.ts +++ b/src/hooks/L1/useSimulateProveWithdrawalTransaction.ts @@ -10,12 +10,12 @@ import { simulateProveWithdrawalTransaction, } from 'op-viem/actions' import { type Hash } from 'viem' -import { type Config, useAccount, usePublicClient } from 'wagmi' +import { type Config, useAccount, useConfig, usePublicClient } from 'wagmi' import { hashFn, simulateContractQueryKey } from 'wagmi/query' import type { UseSimulateOPActionBaseParameters } from '../../types/UseSimulateOPActionBaseParameters.js' import type { UseSimulateOPActionBaseReturnType } from '../../types/UseSimulateOPActionBaseReturnType.js' -import { useOpConfig } from '../useOpConfig.js' +import { validateL2Chain, validateL2OutputOracleContract, validatePortalContract } from '../../util/validateChains.js' const ABI = optimismPortalABI const FUNCTION = 'proveWithdrawalTransaction' @@ -48,17 +48,16 @@ export function useSimulateProveWithdrawalTransaction< >( { args, l2ChainId, query: queryOverride, ...rest }: UseSimulateProveWithdrawalTransactionParameters, ): UseSimulateProveWithdrawalTransactionReturnType { - const opConfig = useOpConfig(rest) - const l2Chain = opConfig.l2chains[l2ChainId] + const config = useConfig(rest) - if (!l2Chain) { - throw new Error('L2 chain not configured') - } + const { l2Chain, l1ChainId } = validateL2Chain(config, l2ChainId) const account = useAccount(rest) - const l1PublicClient = usePublicClient({ chainId: l2Chain.l1ChainId })! + const l1PublicClient = usePublicClient({ chainId: l1ChainId })! const l2PublicClient = usePublicClient({ chainId: l2ChainId })! - const l1Addresses = opConfig.l2chains[l2ChainId].l1Addresses + + const l2OutputOracle = validateL2OutputOracleContract(l1ChainId, l2Chain).address + const portal = validatePortalContract(l1ChainId, l2Chain).address const query = { async queryFn() { @@ -67,12 +66,12 @@ export function useSimulateProveWithdrawalTransaction< }) const { l2BlockNumber } = await getLatestProposedL2BlockNumber(l1PublicClient, { - ...l1Addresses, + l2OutputOracle, }) const output = await getOutputForL2Block(l1PublicClient, { l2BlockNumber, - ...l1Addresses, + l2OutputOracle, }) const simulateProveWithdrawalTransactionArgs = await getProveWithdrawalTransactionArgs(l2PublicClient, { @@ -83,7 +82,7 @@ export function useSimulateProveWithdrawalTransaction< return simulateProveWithdrawalTransaction(l1PublicClient, { args: simulateProveWithdrawalTransactionArgs, account: account.address, - ...l1Addresses, + portal, }) }, ...queryOverride, @@ -98,7 +97,7 @@ export function useSimulateProveWithdrawalTransaction< ...args, }, account: account.address, - chainId: l2Chain.l1ChainId, + chainId: l1ChainId, action: 'proveWithdrawalTransaction', }), } diff --git a/src/hooks/L1/useWriteDepositERC20.ts b/src/hooks/L1/useWriteDepositERC20.ts index 49cf1d5..89c5061 100644 --- a/src/hooks/L1/useWriteDepositERC20.ts +++ b/src/hooks/L1/useWriteDepositERC20.ts @@ -2,13 +2,13 @@ import { l1StandardBridgeABI } from '@eth-optimism/contracts-ts' import { type Config } from '@wagmi/core' import { type WriteDepositERC20Parameters as WriteDepositERC20ActionParameters } from 'op-viem/actions' import type { ContractFunctionArgs } from 'viem' -import { useAccount, useWriteContract } from 'wagmi' +import { useAccount, useConfig, useWriteContract } from 'wagmi' import type { WriteContractVariables } from 'wagmi/query' import type { UseWriteOPActionBaseParameters } from '../../types/UseWriteOPActionBaseParameters.js' import type { UseWriteOPActionBaseReturnType } from '../../types/UseWriteOPActionBaseReturnType.js' import type { WriteOPContractBaseParameters } from '../../types/WriteOPContractBaseParameters.js' -import { useOpConfig } from '../useOpConfig.js' +import { validatel1StandardBridgeContract, validateL2Chain } from '../../util/validateChains.js' const ABI = l1StandardBridgeABI const FUNCTION = 'depositERC20To' @@ -44,7 +44,7 @@ export type UseWriteDepositERC20ReturnType( args: UseWriteDepositERC20Parameters = {}, ): UseWriteDepositERC20ReturnType { - const config = useOpConfig(args) + const config = useConfig(args) const { writeContract, writeContractAsync, ...writeReturn } = useWriteContract(args) const account = useAccount(args) @@ -52,16 +52,13 @@ export function useWriteDepositERC20 { - const l2Chain = config.l2chains[l2ChainId] - - if (!l2Chain) { - throw new Error('L2 chain not configured') - } + const { l2Chain, l1ChainId } = validateL2Chain(config, l2ChainId) + const l1StandardBridge = validatel1StandardBridgeContract(l1ChainId, l2Chain).address return writeContract( { - chainId: l2Chain.l1ChainId, - address: l2Chain.l1Addresses.l1StandardBridge.address, + chainId: l2Chain.id, + address: l1StandardBridge, abi: ABI, functionName: FUNCTION, args: [args.l1Token, args.l2Token, args.to, args.amount, args.minGasLimit ?? 0, args.extraData ?? '0x'], @@ -82,15 +79,12 @@ export function useWriteDepositERC20 { - const l2Chain = config.l2chains[l2ChainId] - - if (!l2Chain) { - throw new Error('L2 chain not configured') - } + const { l2Chain, l1ChainId } = validateL2Chain(config, l2ChainId) + const l1StandardBridge = validatel1StandardBridgeContract(l1ChainId, l2Chain).address return writeContractAsync({ - chainId: l2Chain.l1ChainId, - address: l2Chain.l1Addresses.l1StandardBridge.address, + chainId: l2Chain.id, + address: l1StandardBridge, abi: ABI, functionName: FUNCTION, args: [args.l1Token, args.l2Token, args.to, args.amount, args.minGasLimit ?? 0, args.extraData ?? '0x'], diff --git a/src/hooks/L1/useWriteDepositETH.ts b/src/hooks/L1/useWriteDepositETH.ts index 9133136..d3a45f5 100644 --- a/src/hooks/L1/useWriteDepositETH.ts +++ b/src/hooks/L1/useWriteDepositETH.ts @@ -6,16 +6,12 @@ import { writeDepositETH, type WriteDepositETHParameters as WriteDepositETHActionParameters, } from 'op-viem/actions' -import type { Chain, ChainContract } from 'viem' +import type { Chain } from 'viem' import { useConfig } from 'wagmi' -import { - L2ChainMissingSourceChainMessage, - L2ChainNotConfiguredMessage, - PortalContractNotConfiguredMessage, -} from '../../constants/errorMessages.js' import type { UseWriteOPActionBaseParameters } from '../../types/UseWriteOPActionBaseParameters.js' import type { UseWriteOPActionBaseReturnType } from '../../types/UseWriteOPActionBaseReturnType.js' import type { WriteOPContractBaseParameters } from '../../types/WriteOPContractBaseParameters.js' +import { validateL2Chain, validatePortalContract } from '../../util/validateChains.js' const ABI = optimismPortalABI const FUNCTION = 'depositTransaction' @@ -56,12 +52,7 @@ async function writeMutation( const l1PublicClient = await getPublicClient(config, { chainId: l1ChainId })! const l2PublicClient = await getPublicClient(config, { chainId: l2ChainId })! - const portal: ChainContract | undefined = l2Chain?.contracts?.portal - ?.[l1ChainId as keyof typeof l2Chain.contracts.portal] - - if (!portal) { - throw new Error(PortalContractNotConfiguredMessage(l1ChainId, l2Chain.name)) - } + const portal = validatePortalContract(l1ChainId, l2Chain).address const l2GasLimit = args.gasLimit ?? Number( @@ -99,20 +90,13 @@ export function useWriteDepositETH chain.id === l2ChainId) - - if (!l2Chain) { - throw new Error(L2ChainNotConfiguredMessage(l2ChainId)) - } - if (!l2Chain.sourceId) { - throw new Error(L2ChainMissingSourceChainMessage(l2Chain.name)) - } + const { l2Chain, l1ChainId } = validateL2Chain(config, l2ChainId) return writeMutation(config, { args, - l1ChainId: l2Chain.sourceId, + l1ChainId, l2ChainId: l2ChainId, - l2Chain: l2Chain, + l2Chain, ...rest, }) }, diff --git a/src/hooks/L1/useWriteProveWithdrawalTransaction.ts b/src/hooks/L1/useWriteProveWithdrawalTransaction.ts index 6f75703..8c59747 100644 --- a/src/hooks/L1/useWriteProveWithdrawalTransaction.ts +++ b/src/hooks/L1/useWriteProveWithdrawalTransaction.ts @@ -8,14 +8,14 @@ import { simulateProveWithdrawalTransaction, writeProveWithdrawalTransaction, } from 'op-viem/actions' -import type { Hash } from 'viem' -import { type Config } from 'wagmi' +import type { Chain, Hash } from 'viem' +import { type Config, useConfig } from 'wagmi' import { getPublicClient, getWalletClient } from 'wagmi/actions' import type { UseWriteOPActionBaseParameters } from '../../types/UseWriteOPActionBaseParameters.js' import type { UseWriteOPActionBaseReturnType } from '../../types/UseWriteOPActionBaseReturnType.js' import type { WriteOPContractBaseParameters } from '../../types/WriteOPContractBaseParameters.js' -import { useOpConfig } from '../useOpConfig.js' +import { validateL2Chain, validateL2OutputOracleContract, validatePortalContract } from '../../util/validateChains.js' const ABI = optimismPortalABI const FUNCTION = 'proveWithdrawalTransaction' @@ -53,28 +53,31 @@ export type UseWriteProveWithdrawalTransactionReturnType( args: UseWriteProveWithdrawalTransactionParameters = {}, ): UseWriteProveWithdrawalTransactionReturnType { - const opConfig = useOpConfig(args) + const config = useConfig(args) const mutation = { mutationFn({ l2ChainId, args, ...rest }: WriteProveWithdrawalTransactionParameters) { - const l2Chain = opConfig.l2chains[l2ChainId] - - if (!l2Chain) { - throw new Error('L2 chain not configured') - } + const { l1ChainId, l2Chain } = validateL2Chain(config, l2ChainId) - return writeMutation(opConfig, { args, l1ChainId: l2Chain.l1ChainId, l2ChainId: l2ChainId, ...rest }) + return writeMutation(config, { args, l1ChainId, l2Chain, l2ChainId: l2ChainId, ...rest }) }, mutationKey: ['writeContract'], } diff --git a/src/hooks/L2/useSimulateWithdrawERC20.ts b/src/hooks/L2/useSimulateWithdrawERC20.ts index 99e077d..3b51e22 100644 --- a/src/hooks/L2/useSimulateWithdrawERC20.ts +++ b/src/hooks/L2/useSimulateWithdrawERC20.ts @@ -3,11 +3,11 @@ import { l2StandardBridgeABI } from '@eth-optimism/contracts-ts' import type { Config } from '@wagmi/core' import { type SimulateWithdrawERC20Parameters } from 'op-viem/actions' -import { useAccount, useSimulateContract, type UseSimulateContractParameters } from 'wagmi' +import { useAccount, useConfig, useSimulateContract, type UseSimulateContractParameters } from 'wagmi' import type { UseSimulateOPActionBaseParameters } from '../../types/UseSimulateOPActionBaseParameters.js' import type { UseSimulateOPActionBaseReturnType } from '../../types/UseSimulateOPActionBaseReturnType.js' -import { useOpConfig } from '../useOpConfig.js' +import { validateL2Chain, validateL2StandardBridgeContract } from '../../util/validateChains.js' const ABI = l2StandardBridgeABI const FUNCTION = 'withdrawTo' @@ -37,18 +37,16 @@ export function useSimulateWithdrawERC20< >( { args, chainId, query, ...rest }: UseSimulateWithdrawERC20Parameters, ): UseSimulateWithdrawERC20ReturnType { - const opConfig = useOpConfig(rest) - const l2Chain = opConfig.l2chains[chainId] + const config = useConfig(rest) const account = useAccount(rest) - if (!l2Chain) { - throw new Error('L2 chain not configured') - } + const { l2Chain } = validateL2Chain(config, chainId) + const l2StandardBridge = validateL2StandardBridgeContract(l2Chain).address return useSimulateContract({ - address: l2Chain.l2Addresses.l2StandardBridge.address, + address: l2StandardBridge, abi: ABI, - chainId: l2Chain.chainId, + chainId: l2Chain.id, functionName: FUNCTION, args: [args.l2Token, args.to, args.amount, args.minGasLimit ?? 0, args.extraData ?? '0x'], query: query as UseSimulateContractParameters['query'], diff --git a/src/hooks/L2/useSimulateWithdrawETH.ts b/src/hooks/L2/useSimulateWithdrawETH.ts index 8c4dcd5..516deb7 100644 --- a/src/hooks/L2/useSimulateWithdrawETH.ts +++ b/src/hooks/L2/useSimulateWithdrawETH.ts @@ -3,11 +3,11 @@ import { l2StandardBridgeABI } from '@eth-optimism/contracts-ts' import type { Config } from '@wagmi/core' import { type SimulateWithdrawETHParameters } from 'op-viem/actions' -import { useAccount, useSimulateContract, type UseSimulateContractParameters } from 'wagmi' +import { useAccount, useConfig, useSimulateContract, type UseSimulateContractParameters } from 'wagmi' import type { UseSimulateOPActionBaseParameters } from '../../types/UseSimulateOPActionBaseParameters.js' import type { UseSimulateOPActionBaseReturnType } from '../../types/UseSimulateOPActionBaseReturnType.js' -import { useOpConfig } from '../useOpConfig.js' +import { validateL2Chain, validateL2StandardBridgeContract } from '../../util/validateChains.js' const ABI = l2StandardBridgeABI const FUNCTION = 'withdrawTo' @@ -38,19 +38,17 @@ export function useSimulateWithdrawETH< >( { args, chainId, query, ...rest }: UseSimulateWithdrawETHParameters, ): UseSimulateWithdrawETHReturnType { - const opConfig = useOpConfig(rest) - const l2Chain = opConfig.l2chains[chainId] + const config = useConfig(rest) const account = useAccount(rest) - if (!l2Chain) { - throw new Error('L2 chain not configured') - } + const { l2Chain } = validateL2Chain(config, chainId) + const l2StandardBridge = validateL2StandardBridgeContract(l2Chain).address return useSimulateContract({ - address: l2Chain.l2Addresses.l2StandardBridge.address, + address: l2StandardBridge, abi: ABI, functionName: FUNCTION, - chainId: l2Chain.chainId, + chainId: l2Chain.id, args: [OVM_ETH, args.to, args.amount, args.minGasLimit ?? 0, args.extraData ?? '0x'], value: args.amount, query: query as UseSimulateContractParameters['query'], diff --git a/src/hooks/L2/useWriteWithdrawERC20.ts b/src/hooks/L2/useWriteWithdrawERC20.ts index ede21c3..ac285f3 100644 --- a/src/hooks/L2/useWriteWithdrawERC20.ts +++ b/src/hooks/L2/useWriteWithdrawERC20.ts @@ -2,13 +2,13 @@ import { l2StandardBridgeABI } from '@eth-optimism/contracts-ts' import { type Config } from '@wagmi/core' import { type WriteWithdrawERC20Parameters as WriteWithdrawERC20ActionParameters } from 'op-viem/actions' import type { ContractFunctionArgs } from 'viem' -import { useWriteContract } from 'wagmi' +import { useConfig, useWriteContract } from 'wagmi' import type { WriteContractVariables } from 'wagmi/query' import type { UseWriteOPActionBaseParameters } from '../../types/UseWriteOPActionBaseParameters.js' import type { UseWriteOPActionBaseReturnType } from '../../types/UseWriteOPActionBaseReturnType.js' import type { WriteOPContractBaseParameters } from '../../types/WriteOPContractBaseParameters.js' -import { useOpConfig } from '../useOpConfig.js' +import { validateL2Chain, validateL2StandardBridgeContract } from '../../util/validateChains.js' const ABI = l2StandardBridgeABI const FUNCTION = 'withdrawTo' @@ -44,22 +44,19 @@ export type UseWriteWithdrawERC20ReturnType( args: UseWriteWithdrawERC20Parameters = {}, ): UseWriteWithdrawERC20ReturnType { - const config = useOpConfig(args) + const config = useConfig(args) const { writeContract, writeContractAsync, ...writeReturn } = useWriteContract(args) const writeWithdrawERC20: UseWriteWithdrawERC20ReturnType['writeWithdrawERC20'] = ( { chainId, args, ...rest }, options, ) => { - const l2Chain = config.l2chains[chainId] - - if (!l2Chain) { - throw new Error('L2 chain not configured') - } + const { l2Chain } = validateL2Chain(config, chainId) + const l2StandardBridge = validateL2StandardBridgeContract(l2Chain).address return writeContract({ - chainId: l2Chain.chainId, - address: l2Chain.l2Addresses.l2StandardBridge.address, + chainId: l2Chain.id, + address: l2StandardBridge, abi: ABI, functionName: FUNCTION, args: [args.l2Token, args.to, args.amount, args.minGasLimit ?? 0, args.extraData || '0x'], @@ -77,15 +74,12 @@ export function useWriteWithdrawERC20 { - const l2Chain = config.l2chains[chainId] - - if (!l2Chain) { - throw new Error('L2 chain not configured') - } + const { l2Chain } = validateL2Chain(config, chainId) + const l2StandardBridge = validateL2StandardBridgeContract(l2Chain).address return writeContractAsync({ - chainId: l2Chain.chainId, - address: l2Chain.l2Addresses.l2StandardBridge.address, + chainId: l2Chain.id, + address: l2StandardBridge, abi: ABI, functionName: FUNCTION, args: [args.l2Token, args.to, args.amount, args.minGasLimit ?? 0, args.extraData || '0x'], diff --git a/src/hooks/L2/useWriteWithdrawETH.ts b/src/hooks/L2/useWriteWithdrawETH.ts index 622e806..ed49027 100644 --- a/src/hooks/L2/useWriteWithdrawETH.ts +++ b/src/hooks/L2/useWriteWithdrawETH.ts @@ -2,13 +2,14 @@ import { l2StandardBridgeABI } from '@eth-optimism/contracts-ts' import { type Config } from '@wagmi/core' import { type WriteWithdrawETHParameters as WriteWithdrawETHActionParameters } from 'op-viem/actions' import type { ContractFunctionArgs } from 'viem' -import { useAccount, useWriteContract } from 'wagmi' +import { useAccount, useConfig, useWriteContract } from 'wagmi' import type { WriteContractVariables } from 'wagmi/query' import type { UseWriteOPActionBaseParameters } from '../../types/UseWriteOPActionBaseParameters.js' import type { UseWriteOPActionBaseReturnType } from '../../types/UseWriteOPActionBaseReturnType.js' import type { WriteOPContractBaseParameters } from '../../types/WriteOPContractBaseParameters.js' -import { useOpConfig } from '../useOpConfig.js' + +import { validateL2Chain, validateL2StandardBridgeContract } from '../../util/validateChains.js' import { OVM_ETH } from './useSimulateWithdrawETH.js' const ABI = l2StandardBridgeABI @@ -45,7 +46,7 @@ export type UseWriteWithdrawETHReturnType( args: UseWriteWithdrawETHParameters = {}, ): UseWriteWithdrawETHReturnType { - const config = useOpConfig(args) + const config = useConfig(args) const { writeContract, writeContractAsync, ...writeReturn } = useWriteContract(args) const account = useAccount(args) @@ -53,15 +54,12 @@ export function useWriteWithdrawETH { - const l2Chain = config.l2chains[chainId] - - if (!l2Chain) { - throw new Error('L2 chain not configured') - } + const { l2Chain } = validateL2Chain(config, chainId) + const l2StandardBridge = validateL2StandardBridgeContract(l2Chain).address return writeContract({ - chainId: l2Chain.chainId, - address: l2Chain.l2Addresses.l2StandardBridge.address, + chainId: l2Chain.id, + address: l2StandardBridge, abi: ABI, functionName: FUNCTION, args: [OVM_ETH, args.to, args.amount, args.minGasLimit ?? 0, args.extraData ?? '0x'], @@ -81,15 +79,12 @@ export function useWriteWithdrawETH { - const l2Chain = config.l2chains[chainId] - - if (!l2Chain) { - throw new Error('L2 chain not configured') - } + const { l2Chain } = validateL2Chain(config, chainId) + const l2StandardBridge = validateL2StandardBridgeContract(l2Chain).address return writeContractAsync({ - chainId: l2Chain.chainId, - address: l2Chain.l2Addresses.l2StandardBridge.address, + chainId: l2Chain.id, + address: l2StandardBridge, abi: ABI, functionName: FUNCTION, args: [OVM_ETH, args.to, args.amount, args.minGasLimit ?? 0, args.extraData ?? '0x'], diff --git a/src/hooks/useOpConfig.ts b/src/hooks/useOpConfig.ts deleted file mode 100644 index 580d5f0..0000000 --- a/src/hooks/useOpConfig.ts +++ /dev/null @@ -1,33 +0,0 @@ -'use client' - -import { type Config, useConfig } from 'wagmi' -import { base } from '../constants/chains/base.js' -import { baseGoerli } from '../constants/chains/baseGoerli.js' -import { optimism } from '../constants/chains/optimism.js' -import { optimismGoerli } from '../constants/chains/optimismGoerli.js' -import { zora } from '../constants/chains/zora.js' -import { zoraGoerli } from '../constants/chains/zoraGoerli.js' -import { type OpConfig } from '../types/OpConfig.js' - -export type UseConfigParameters = ConfigParameter - -export type ConfigParameter = { - config?: OpConfig | config | undefined -} - -export type UseConfigReturnType = config - -const chains = { 8453: base, 84531: baseGoerli, 420: optimismGoerli, 10: optimism, 7777777: zora, 999: zoraGoerli } - -export function useOpConfig( - parameters: UseConfigParameters = {}, -): UseConfigReturnType { - const config: UseConfigReturnType = { - ...useConfig(parameters), - l2chains: { ...chains, ...(parameters?.config as OpConfig)?.l2chains }, - } - - // TODO: Return a better error here - if (!config) throw new Error('No Wagmi Context provider found') - return config as UseConfigReturnType -} diff --git a/src/types/UseSimulateOPActionBaseParameters.ts b/src/types/UseSimulateOPActionBaseParameters.ts index 6f979c8..1f89032 100644 --- a/src/types/UseSimulateOPActionBaseParameters.ts +++ b/src/types/UseSimulateOPActionBaseParameters.ts @@ -1,8 +1,6 @@ import type { Abi, ContractFunctionArgs, ContractFunctionName } from 'viem' import type { Config, UseSimulateContractParameters } from 'wagmi' import type { SimulateContractData } from 'wagmi/query' -import type { ConfigParameter } from '../hooks/useOpConfig.js' - export type UseSimulateOPActionBaseParameters< abi extends Abi | readonly unknown[] = Abi, @@ -40,4 +38,6 @@ export type UseSimulateOPActionBaseParameters< | 'chainId' | 'config' > - & ConfigParameter + & { + config?: Config + } diff --git a/src/types/UseSimulateOPActionBaseReturnType.ts b/src/types/UseSimulateOPActionBaseReturnType.ts index 87a900b..c2e66c3 100644 --- a/src/types/UseSimulateOPActionBaseReturnType.ts +++ b/src/types/UseSimulateOPActionBaseReturnType.ts @@ -2,7 +2,6 @@ import type { Abi, ContractFunctionArgs, ContractFunctionName } from 'viem' import type { Config, UseSimulateContractReturnType } from 'wagmi' import type { SimulateContractData } from 'wagmi/query' - export type UseSimulateOPActionBaseReturnType< abi extends Abi | readonly unknown[] = Abi, functionName extends ContractFunctionName< diff --git a/src/types/UseWriteOPActionBaseParameters.ts b/src/types/UseWriteOPActionBaseParameters.ts index 1c162ab..ffd2696 100644 --- a/src/types/UseWriteOPActionBaseParameters.ts +++ b/src/types/UseWriteOPActionBaseParameters.ts @@ -1,6 +1,5 @@ import type { Config, UseWriteContractParameters } from 'wagmi' - export type UseWriteOPActionBaseParameters< config extends Config = Config, context = unknown, diff --git a/src/types/UseWriteOPActionBaseReturnType.ts b/src/types/UseWriteOPActionBaseReturnType.ts index 0c83bfe..d19d961 100644 --- a/src/types/UseWriteOPActionBaseReturnType.ts +++ b/src/types/UseWriteOPActionBaseReturnType.ts @@ -4,7 +4,6 @@ import type { Abi } from 'viem' import type { Config, UseWriteContractReturnType } from 'wagmi' import type { WriteContractData, WriteContractVariables } from 'wagmi/query' - export type UseWriteOPActionBaseReturnType< args, config extends Config = Config, diff --git a/src/types/WriteOPContractBaseParameters.ts b/src/types/WriteOPContractBaseParameters.ts index 7822327..e9773a1 100644 --- a/src/types/WriteOPContractBaseParameters.ts +++ b/src/types/WriteOPContractBaseParameters.ts @@ -2,7 +2,6 @@ import type { Abi, ContractFunctionArgs, ContractFunctionName } from 'viem' import type { Config } from 'wagmi' import type { WriteContractVariables } from 'wagmi/query' - export type WriteOPContractBaseParameters< abi extends Abi | readonly unknown[], functionName extends ContractFunctionName, From 218da87d3f05de31bfd178741b36548ff60170e7 Mon Sep 17 00:00:00 2001 From: Matthew Bunday Date: Thu, 15 Feb 2024 10:42:13 -0500 Subject: [PATCH 09/26] Add validateChains util --- src/constants/errorMessages.ts | 15 +++++++ src/util/validateChains.ts | 77 ++++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 src/constants/errorMessages.ts create mode 100644 src/util/validateChains.ts diff --git a/src/constants/errorMessages.ts b/src/constants/errorMessages.ts new file mode 100644 index 0000000..5388f5d --- /dev/null +++ b/src/constants/errorMessages.ts @@ -0,0 +1,15 @@ +export function L2ChainNotConfiguredMessage(l2ChainId: number) { + return `L2 chain with id '${l2ChainId}' is not configured, make sure to add it to your chains array. https://wagmi.sh/core/api/createConfig` +} + +export function L2ChainMissingSourceChainMessage(l2ChainName: string) { + return `Chain ${l2ChainName} does not have a source chain, is it an L2 chain?` +} + +export function PortalContractNotConfiguredMessage(l1ChainId: number, l2ChainName: string) { + return `Portal contract to chainId ${l1ChainId} not configured for chain ${l2ChainName}` +} + +export function l2OutputOracleContractNotConfiguredMessage(l2ChainName: string) { + return `L2 output oracle contract not configured for chain ${l2ChainName}` +} diff --git a/src/util/validateChains.ts b/src/util/validateChains.ts new file mode 100644 index 0000000..62daa9b --- /dev/null +++ b/src/util/validateChains.ts @@ -0,0 +1,77 @@ +import type { Chain, ChainContract } from 'viem' +import type { Config } from 'wagmi' +import { + L2ChainMissingSourceChainMessage, + L2ChainNotConfiguredMessage, + l2OutputOracleContractNotConfiguredMessage, + PortalContractNotConfiguredMessage, +} from '../constants/errorMessages.js' + +export function validateL2Chain(config: Config, l2ChainId: number) { + const l2Chain = config.chains.find((chain) => chain.id === l2ChainId) + + if (!l2Chain) { + throw new Error(L2ChainNotConfiguredMessage(l2ChainId)) + } + if (!l2Chain.sourceId) { + throw new Error(L2ChainMissingSourceChainMessage(l2Chain.name)) + } + + return { l2Chain, l1ChainId: l2Chain.sourceId } +} + +export function validatePortalContract(l1ChainId: number, l2Chain: Chain) { + const portal: ChainContract | undefined = l2Chain?.contracts?.portal + ?.[l1ChainId as keyof typeof l2Chain.contracts.portal] + + if (!portal) { + throw new Error(PortalContractNotConfiguredMessage(l1ChainId, l2Chain.name)) + } + + return portal as ChainContract +} + +export function validateL2OutputOracleContract(l1ChainId: number, l2Chain: Chain) { + const l2OutputOracle: ChainContract | undefined = l2Chain?.contracts?.l2OutputOracle + ?.[l1ChainId as keyof typeof l2Chain.contracts.portal] + + if (!l2OutputOracle) { + throw new Error(l2OutputOracleContractNotConfiguredMessage(l2Chain.name)) + } + + return l2OutputOracle as ChainContract +} + +export function validatel2ToL1MessagePasserContract(l2Chain: Chain) { + const l2ToL1MessagePasser = l2Chain?.contracts?.l2ToL1MessagePasser as + | ChainContract + | undefined + + if (!l2ToL1MessagePasser) { + throw new Error(`L2 to L1 message passer contract not configured for chain ${l2Chain.name}`) + } + + return l2ToL1MessagePasser as ChainContract +} + +export function validatel1StandardBridgeContract(l1ChainId: number, l2Chain: Chain) { + const l1StandardBridge: ChainContract | undefined = l2Chain?.contracts?.l1StandardBridge + ?.[l1ChainId as keyof typeof l2Chain.contracts.l1StandardBridge] + + if (!l1StandardBridge) { + // FIXME: Link to documentation for this + throw new Error(`L1 standard bridge contract not configured for chain ${l2Chain.name}`) + } + + return l1StandardBridge as ChainContract +} + +export function validateL2StandardBridgeContract(l2Chain: Chain) { + const l2StandardBridge = l2Chain?.contracts?.l2StandardBridge as ChainContract | undefined + + if (!l2StandardBridge) { + throw new Error(`L2 standard bridge contract not configured for chain ${l2Chain.name}`) + } + + return l2StandardBridge as ChainContract +} From 56e8d510b9f3964c0f3c828ec54ed9afc571f2ec Mon Sep 17 00:00:00 2001 From: Matthew Bunday Date: Thu, 15 Feb 2024 10:58:14 -0500 Subject: [PATCH 10/26] Fix useWriteDepositERC20 --- src/hooks/L1/useWriteDepositERC20.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/hooks/L1/useWriteDepositERC20.ts b/src/hooks/L1/useWriteDepositERC20.ts index 89c5061..feb940b 100644 --- a/src/hooks/L1/useWriteDepositERC20.ts +++ b/src/hooks/L1/useWriteDepositERC20.ts @@ -54,10 +54,11 @@ export function useWriteDepositERC20 { const { l2Chain, l1ChainId } = validateL2Chain(config, l2ChainId) const l1StandardBridge = validatel1StandardBridgeContract(l1ChainId, l2Chain).address + console.log('l1StandardBridge', l1StandardBridge) return writeContract( { - chainId: l2Chain.id, + chainId: l1ChainId, address: l1StandardBridge, abi: ABI, functionName: FUNCTION, @@ -81,9 +82,10 @@ export function useWriteDepositERC20 { const { l2Chain, l1ChainId } = validateL2Chain(config, l2ChainId) const l1StandardBridge = validatel1StandardBridgeContract(l1ChainId, l2Chain).address + console.log('l1StandardBridge', l1StandardBridge) return writeContractAsync({ - chainId: l2Chain.id, + chainId: l1ChainId, address: l1StandardBridge, abi: ABI, functionName: FUNCTION, From d09d79d9e32577304e8eb8b4f71ae3738c2428f6 Mon Sep 17 00:00:00 2001 From: Matthew Bunday Date: Thu, 15 Feb 2024 11:00:14 -0500 Subject: [PATCH 11/26] Remove goerli chains --- src/constants/chains/baseGoerli.ts | 12 ------------ src/constants/chains/optimismGoerli.ts | 12 ------------ src/constants/chains/zoraGoerli.ts | 12 ------------ 3 files changed, 36 deletions(-) delete mode 100644 src/constants/chains/baseGoerli.ts delete mode 100644 src/constants/chains/optimismGoerli.ts delete mode 100644 src/constants/chains/zoraGoerli.ts diff --git a/src/constants/chains/baseGoerli.ts b/src/constants/chains/baseGoerli.ts deleted file mode 100644 index f824233..0000000 --- a/src/constants/chains/baseGoerli.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { baseGoerliAddresses } from 'op-viem/chains' -import type { L2Chain } from '../../types/OpConfig.js' - -export const baseGoerli: L2Chain = { - chainId: 84531, - l1ChainId: 5, - l1Addresses: baseGoerliAddresses, - l2Addresses: { - l2L1MessagePasserAddress: { address: '0x4200000000000000000000000000000000000016', chainId: 84531 }, - l2StandardBridge: { address: '0x4200000000000000000000000000000000000010', chainId: 84531 }, - }, -} as const diff --git a/src/constants/chains/optimismGoerli.ts b/src/constants/chains/optimismGoerli.ts deleted file mode 100644 index f63159d..0000000 --- a/src/constants/chains/optimismGoerli.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { optimismGoerliAddresses } from 'op-viem/chains' -import type { L2Chain } from '../../types/OpConfig.js' - -export const optimismGoerli: L2Chain = { - chainId: 420, - l1ChainId: 5, - l1Addresses: optimismGoerliAddresses, - l2Addresses: { - l2L1MessagePasserAddress: { address: '0x4200000000000000000000000000000000000016', chainId: 420 }, - l2StandardBridge: { address: '0x4200000000000000000000000000000000000010', chainId: 420 }, - }, -} as const diff --git a/src/constants/chains/zoraGoerli.ts b/src/constants/chains/zoraGoerli.ts deleted file mode 100644 index 34c709b..0000000 --- a/src/constants/chains/zoraGoerli.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { zoraGoerliAddresses } from 'op-viem/chains' -import type { L2Chain } from '../../types/OpConfig.js' - -export const zoraGoerli: L2Chain = { - chainId: 999, - l1ChainId: 5, - l1Addresses: zoraGoerliAddresses, - l2Addresses: { - l2L1MessagePasserAddress: { address: '0x4200000000000000000000000000000000000016', chainId: 999 }, - l2StandardBridge: { address: '0x4200000000000000000000000000000000000010', chainId: 999 }, - }, -} as const From e2b9f04554e45bec9a53f88d6bda9f849ce6a417 Mon Sep 17 00:00:00 2001 From: Matthew Bunday Date: Thu, 15 Feb 2024 11:01:20 -0500 Subject: [PATCH 12/26] Update chain configs --- src/constants/chains/optimism.ts | 21 ++++++++++++--------- src/constants/chains/zora.ts | 21 ++++++++++++--------- 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/src/constants/chains/optimism.ts b/src/constants/chains/optimism.ts index 9f57e3e..1af639e 100644 --- a/src/constants/chains/optimism.ts +++ b/src/constants/chains/optimism.ts @@ -1,12 +1,15 @@ import { optimismAddresses } from 'op-viem/chains' -import type { L2Chain } from '../../types/OpConfig.js' +import { type Chain, mainnet, optimism as viem_optimism } from 'viem/chains' -export const optimism: L2Chain = { - chainId: 10, - l1ChainId: 1, - l1Addresses: optimismAddresses, - l2Addresses: { - l2L1MessagePasserAddress: { address: '0x4200000000000000000000000000000000000016', chainId: 10 }, - l2StandardBridge: { address: '0x4200000000000000000000000000000000000010', chainId: 10 }, +export const optimism: Chain = { + ...viem_optimism, + contracts: { + ...viem_optimism.contracts, + l1StandardBridge: { + [mainnet.id]: { + address: optimismAddresses.l1StandardBridge.address, + blockCreated: optimismAddresses.l1StandardBridge.blockCreated, + }, + }, }, -} as const +} diff --git a/src/constants/chains/zora.ts b/src/constants/chains/zora.ts index e440622..9e94213 100644 --- a/src/constants/chains/zora.ts +++ b/src/constants/chains/zora.ts @@ -1,12 +1,15 @@ import { zoraAddresses } from 'op-viem/chains' -import type { L2Chain } from '../../types/OpConfig.js' +import { type Chain, mainnet, zora as viem_zora } from 'viem/chains' -export const zora: L2Chain = { - chainId: 7777777, - l1ChainId: 1, - l1Addresses: zoraAddresses, - l2Addresses: { - l2L1MessagePasserAddress: { address: '0x4200000000000000000000000000000000000016', chainId: 7777777 }, - l2StandardBridge: { address: '0x4200000000000000000000000000000000000010', chainId: 7777777 }, +export const zora: Chain = { + ...viem_zora, + contracts: { + ...viem_zora.contracts, + l1StandardBridge: { + [mainnet.id]: { + address: zoraAddresses.l1StandardBridge.address, + blockCreated: zoraAddresses.l1StandardBridge.blockCreated, + }, + }, }, -} as const +} From 01956fe13d5f67d3b5a6d716f786893cfeda613d Mon Sep 17 00:00:00 2001 From: Matthew Bunday Date: Thu, 15 Feb 2024 12:11:16 -0500 Subject: [PATCH 13/26] Use validation in useWriteFinalizeWithdrawalTransaction --- .../useWriteFinalizeWithdrawalTransaction.ts | 26 ++++--------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/src/hooks/L1/useWriteFinalizeWithdrawalTransaction.ts b/src/hooks/L1/useWriteFinalizeWithdrawalTransaction.ts index 1838b3e..444f62f 100644 --- a/src/hooks/L1/useWriteFinalizeWithdrawalTransaction.ts +++ b/src/hooks/L1/useWriteFinalizeWithdrawalTransaction.ts @@ -5,17 +5,13 @@ import { simulateFinalizeWithdrawalTransaction, writeFinalizeWithdrawalTranasction, } from 'op-viem/actions' -import type { Chain, ChainContract, Hash } from 'viem' +import type { Chain, Hash } from 'viem' import { type Config, useConfig } from 'wagmi' import { getPublicClient, getWalletClient } from 'wagmi/actions' -import { - L2ChainMissingSourceChainMessage, - L2ChainNotConfiguredMessage, - PortalContractNotConfiguredMessage, -} from '../../constants/errorMessages.js' import type { UseWriteOPActionBaseParameters } from '../../types/UseWriteOPActionBaseParameters.js' import type { UseWriteOPActionBaseReturnType } from '../../types/UseWriteOPActionBaseReturnType.js' import type { WriteOPContractBaseParameters } from '../../types/WriteOPContractBaseParameters.js' +import { validateL2Chain, validatePortalContract } from '../../util/validateChains.js' const ABI = optimismPortalABI const FUNCTION = 'finalizeWithdrawalTransaction' @@ -63,12 +59,7 @@ async function writeMutation( const walletClient = await getWalletClient(config, { chainId: l1ChainId }) const l1PublicClient = await getPublicClient(config, { chainId: l1ChainId })! const l2PublicClient = await getPublicClient(config, { chainId: l2Chain.id })! - const portal: ChainContract | undefined = l2Chain?.contracts?.portal - ?.[l1ChainId as keyof typeof l2Chain.contracts.portal] - - if (!portal) { - throw new Error(PortalContractNotConfiguredMessage(l1ChainId, l2Chain.name)) - } + const portal = validatePortalContract(l1ChainId, l2Chain).address const withdrawalMessages = await getWithdrawalMessages(l2PublicClient, { hash: args.withdrawalTxHash, @@ -100,16 +91,9 @@ export function useWriteFinalizeWithdrawalTransaction chain.id === l2ChainId) - - if (!l2Chain) { - throw new Error(L2ChainNotConfiguredMessage(l2ChainId)) - } - if (!l2Chain.sourceId) { - throw new Error(L2ChainMissingSourceChainMessage(l2Chain.name)) - } + const { l2Chain, l1ChainId } = validateL2Chain(config, l2ChainId) - return writeMutation(config, { args, l1ChainId: l2Chain.sourceId, l2Chain, l2ChainId: l2Chain.id, ...rest }) + return writeMutation(config, { args, l1ChainId, l2Chain, l2ChainId: l2Chain.id, ...rest }) }, mutationKey: ['writeContract'], } From 4e377eeb3888fad070ce2c14136ca9075c6d843f Mon Sep 17 00:00:00 2001 From: Matthew Bunday Date: Thu, 15 Feb 2024 12:22:53 -0500 Subject: [PATCH 14/26] Update chain config example --- docs/docs/configuration.md | 93 ++++++++++++++++++-------------------- 1 file changed, 45 insertions(+), 48 deletions(-) diff --git a/docs/docs/configuration.md b/docs/docs/configuration.md index 8446cf7..2d52253 100644 --- a/docs/docs/configuration.md +++ b/docs/docs/configuration.md @@ -5,44 +5,44 @@ OP Wagmi currently ships with support for Base, Base Goerli, Optimism, Optimism ::: code-group ```ts [l2Chains.ts] -export const customL2Chains = { - 1230123: { - // Your L2 chain's ID - chainId: 1230123, - // The corresponding L1 chain ID - l1ChainId: 1, - // L1 OP Stack contract addresses for your chain - l1Addresses: { - portal: { - address: '0x...', - chainId: 1, - }, - l2OutputOracle: { - address: '0x...', - chainId: 1, - }, - l1StandardBridge: { - address: '0x...', - chainId: 1, - }, - l1CrossDomainMessenger: { - address: '0x...', - chainId: 1, - }, - l1Erc721Bridge: { - address: '0x...', - chainId: 1, +import { type Chain, mainnet } from 'viem/chains' + +export const exampleChain: Chain = { + id: 8453, + name: 'Base', + nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 }, + rpcUrls: { + default: { + http: ['https://mainnet.base.org'], + }, + }, + blockExplorers: { + default: { + name: 'Basescan', + url: 'https://basescan.org', + apiUrl: 'https://api.basescan.org/api', + }, + }, + contracts: { + l2OutputOracle: { + [mainnet.id]: { + address: '0x56315b90c40730925ec5485cf004d835058518A0', }, }, - // L2 OP Stack contract addresses for your chain - l2Addresses: { - l2L1MessagePasserAddress: { - address: '0x4200000000000000000000000000000000000016', - chainId: 1230123, + multicall3: { + address: '0xca11bde05977b3631167028862be2a173976ca11', + blockCreated: 5022, + }, + l1StandardBridge: { + [mainnet.id]: { + address: '0x4C36d2919e407f0Cc2Ee3c993ccF8ac26d9CE64e', + blockCreated: 17482143, }, - l2StandardBridge: { - address: '0x4200000000000000000000000000000000000010', - chainId: 1230123, + }, + portal: { + [mainnet.id]: { + address: '0x49048044D57e1C92A77f79988d21Fa8fAF74E97e', + blockCreated: 17482143, }, }, }, @@ -55,19 +55,16 @@ import { useConfig } from 'wagmi' import { customL2Chains } from './l2Chains' const { writeDepositETH } = useWriteDepositETH() -const config = useConfig() return ( @@ -77,14 +74,14 @@ return ( ```ts [config.ts] import { createConfig, http } from 'wagmi' import { mainnet, sepolia } from 'wagmi/chains' -import { customChain } from './chains' +import { exampleChain } from './chains' export const config = createConfig({ - chains: [mainnet, sepolia, customChain], + chains: [mainnet, sepolia, exampleChain], transports: { [mainnet.id]: http(), [sepolia.id]: http(), - [customChain.id]: http(), + [exampleChain.id]: http(), }, }) ``` From db02306cb160207628b9892483221063931804ed Mon Sep 17 00:00:00 2001 From: Matthew Bunday Date: Thu, 15 Feb 2024 12:27:28 -0500 Subject: [PATCH 15/26] Update error messages --- src/constants/errorMessages.ts | 16 ++++++++++++++-- src/util/validateChains.ts | 15 ++++++++++++--- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/src/constants/errorMessages.ts b/src/constants/errorMessages.ts index 5388f5d..0a77295 100644 --- a/src/constants/errorMessages.ts +++ b/src/constants/errorMessages.ts @@ -7,9 +7,21 @@ export function L2ChainMissingSourceChainMessage(l2ChainName: string) { } export function PortalContractNotConfiguredMessage(l1ChainId: number, l2ChainName: string) { - return `Portal contract to chainId ${l1ChainId} not configured for chain ${l2ChainName}` + return `Portal contract to chainId ${l1ChainId} not configured for chain ${l2ChainName}. https://www.opwagmi.sh/docs/configuration.html` } export function l2OutputOracleContractNotConfiguredMessage(l2ChainName: string) { - return `L2 output oracle contract not configured for chain ${l2ChainName}` + return `L2 output oracle contract not configured for chain ${l2ChainName}. https://www.opwagmi.sh/docs/configuration.html` +} + +export function l2ToL1MessagePasserContractNotConfiguredMessage(l2ChainName: string) { + return `L2 to L1 message passer contract not configured for chain ${l2ChainName}. https://www.opwagmi.sh/docs/configuration.html` +} + +export function l1StandardBridgeContractNotConfiguredMessage(l2ChainName: string) { + return `L1 standard bridge contract not configured for chain ${l2ChainName}. https://www.opwagmi.sh/docs/configuration.html` +} + +export function l2StandardBridgeContractNotConfiguredMessage(l2ChainName: string) { + return `L2 standard bridge contract not configured for chain ${l2ChainName}. https://www.opwagmi.sh/docs/configuration.html` } diff --git a/src/util/validateChains.ts b/src/util/validateChains.ts index 62daa9b..10bc82f 100644 --- a/src/util/validateChains.ts +++ b/src/util/validateChains.ts @@ -1,9 +1,12 @@ import type { Chain, ChainContract } from 'viem' import type { Config } from 'wagmi' import { + l1StandardBridgeContractNotConfiguredMessage, L2ChainMissingSourceChainMessage, L2ChainNotConfiguredMessage, l2OutputOracleContractNotConfiguredMessage, + l2StandardBridgeContractNotConfiguredMessage, + l2ToL1MessagePasserContractNotConfiguredMessage, PortalContractNotConfiguredMessage, } from '../constants/errorMessages.js' @@ -48,7 +51,9 @@ export function validatel2ToL1MessagePasserContract(l2Chain: Chain) { | undefined if (!l2ToL1MessagePasser) { - throw new Error(`L2 to L1 message passer contract not configured for chain ${l2Chain.name}`) + throw new Error( + l2ToL1MessagePasserContractNotConfiguredMessage(l2Chain.name), + ) } return l2ToL1MessagePasser as ChainContract @@ -60,7 +65,9 @@ export function validatel1StandardBridgeContract(l1ChainId: number, l2Chain: Cha if (!l1StandardBridge) { // FIXME: Link to documentation for this - throw new Error(`L1 standard bridge contract not configured for chain ${l2Chain.name}`) + throw new Error( + l1StandardBridgeContractNotConfiguredMessage(l2Chain.name), + ) } return l1StandardBridge as ChainContract @@ -70,7 +77,9 @@ export function validateL2StandardBridgeContract(l2Chain: Chain) { const l2StandardBridge = l2Chain?.contracts?.l2StandardBridge as ChainContract | undefined if (!l2StandardBridge) { - throw new Error(`L2 standard bridge contract not configured for chain ${l2Chain.name}`) + throw new Error( + l2StandardBridgeContractNotConfiguredMessage(l2Chain.name), + ) } return l2StandardBridge as ChainContract From efc948c31747e16f80ac4d05223cd1ef90216839 Mon Sep 17 00:00:00 2001 From: Matthew Bunday Date: Thu, 15 Feb 2024 12:34:47 -0500 Subject: [PATCH 16/26] Try allowing Anvil more time to startup --- src/_test/globalSetup.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/_test/globalSetup.ts b/src/_test/globalSetup.ts index 33c6d58..8e47723 100644 --- a/src/_test/globalSetup.ts +++ b/src/_test/globalSetup.ts @@ -40,6 +40,7 @@ export default async function() { // TODO: Figure out forking / archive node issues // forkBlockNumber, blockTime, + startTimeout: 20000, }, }) await startProxy({ @@ -49,6 +50,7 @@ export default async function() { // TODO: Figure out forking / archive node issues // forkBlockNumber: rollupForkBlockNumber, blockTime: rollupBlockTime, + startTimeout: 20000, }, }) } From c416e38ea5d043467e60b2cc7ce299023f9229d1 Mon Sep 17 00:00:00 2001 From: Matthew Bunday Date: Thu, 15 Feb 2024 12:42:53 -0500 Subject: [PATCH 17/26] Start in parallel, longer deadline --- src/_test/globalSetup.ts | 42 +++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/src/_test/globalSetup.ts b/src/_test/globalSetup.ts index 8e47723..99bf97b 100644 --- a/src/_test/globalSetup.ts +++ b/src/_test/globalSetup.ts @@ -33,24 +33,26 @@ export default async function() { // We still need to remember to reset the anvil instance between test files. This is generally // handled in `setup.ts` but may require additional resetting (e.g. via `afterAll`), in case of // any custom per-test adjustments that persist beyond `anvil_reset`. - await startProxy({ - port: 8545, - options: { - forkUrl, - // TODO: Figure out forking / archive node issues - // forkBlockNumber, - blockTime, - startTimeout: 20000, - }, - }) - await startProxy({ - port: 8546, - options: { - forkUrl: rollupForkUrl, - // TODO: Figure out forking / archive node issues - // forkBlockNumber: rollupForkBlockNumber, - blockTime: rollupBlockTime, - startTimeout: 20000, - }, - }) + await Promise.all([ + startProxy({ + port: 8545, + options: { + forkUrl, + // TODO: Figure out forking / archive node issues + // forkBlockNumber, + blockTime, + startTimeout: 30000, + }, + }), + startProxy({ + port: 8546, + options: { + forkUrl: rollupForkUrl, + // TODO: Figure out forking / archive node issues + // forkBlockNumber: rollupForkBlockNumber, + blockTime: rollupBlockTime, + startTimeout: 30000, + }, + }), + ]) } From 7374a1124a3b114cc396e7c3474077a9a907e955 Mon Sep 17 00:00:00 2001 From: Matthew Bunday Date: Thu, 15 Feb 2024 12:47:26 -0500 Subject: [PATCH 18/26] Fix vitest failed to terminate worker --- vitest.config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/vitest.config.ts b/vitest.config.ts index e748648..a6e4628 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -28,5 +28,6 @@ export default defineConfig({ globalSetup: ['./src/_test/globalSetup.ts'], setupFiles: ['./src/_test/setup.ts'], testTimeout: 100_000, + pool: 'forks', }, }) From 87fbf7a58f6da6959deed3e557cd3b36004f81e8 Mon Sep 17 00:00:00 2001 From: Matthew Bunday Date: Thu, 15 Feb 2024 13:02:50 -0500 Subject: [PATCH 19/26] Hopefully fix flaky tests --- src/hooks/L1/useWriteDepositERC20.test.ts | 6 ++++-- src/hooks/L1/useWriteDepositETH.test.ts | 7 ++++--- .../L1/useWriteFinalizeWithdrawalTransaction.test.ts | 6 ++++-- .../L1/useWriteProveWithdrawalTransaction.test.ts | 10 ++++++---- src/hooks/L2/useWriteWithdrawERC20.test.ts | 6 ++++-- src/hooks/L2/useWriteWithdrawETH.test.ts | 6 ++++-- 6 files changed, 26 insertions(+), 15 deletions(-) diff --git a/src/hooks/L1/useWriteDepositERC20.test.ts b/src/hooks/L1/useWriteDepositERC20.test.ts index 4202d9b..8f5d650 100644 --- a/src/hooks/L1/useWriteDepositERC20.test.ts +++ b/src/hooks/L1/useWriteDepositERC20.test.ts @@ -23,8 +23,10 @@ test('useWriteDepositERC20', async () => { }) await waitFor(() => { - expect(result.current.error).toBeNull() - expect(result.current.isSuccess).toBeTruthy() + Promise.all([ + expect(result.current.error).toBeNull(), + expect(result.current.isSuccess).toBeTruthy(), + ]) }) expect(result.current).toMatchInlineSnapshot(` diff --git a/src/hooks/L1/useWriteDepositETH.test.ts b/src/hooks/L1/useWriteDepositETH.test.ts index 832e8ca..9806c36 100644 --- a/src/hooks/L1/useWriteDepositETH.test.ts +++ b/src/hooks/L1/useWriteDepositETH.test.ts @@ -18,9 +18,10 @@ test('useWriteDepositETH', async () => { // since we didn't use the async wait for it to succeed await waitFor(() => { - // check for error first so if one happens we can see it in the test failure - expect(result.current.error).toBeNull() - expect(result.current.isSuccess).toBeTruthy() + Promise.all([ + expect(result.current.error).toBeNull(), + expect(result.current.isSuccess).toBeTruthy(), + ]) }) // now assert the result is what we expect diff --git a/src/hooks/L1/useWriteFinalizeWithdrawalTransaction.test.ts b/src/hooks/L1/useWriteFinalizeWithdrawalTransaction.test.ts index 6eb1069..c6ae1f1 100644 --- a/src/hooks/L1/useWriteFinalizeWithdrawalTransaction.test.ts +++ b/src/hooks/L1/useWriteFinalizeWithdrawalTransaction.test.ts @@ -18,8 +18,10 @@ test('useWriteFinalizeWithdrawalTransaction', async () => { }) await waitFor(() => { - expect(result.current.error).toBeNull() - expect(result.current.isSuccess).toBeTruthy() + Promise.all([ + expect(result.current.error).toBeNull(), + expect(result.current.isSuccess).toBeTruthy(), + ]) }) expect(result.current).toMatchInlineSnapshot(` diff --git a/src/hooks/L1/useWriteProveWithdrawalTransaction.test.ts b/src/hooks/L1/useWriteProveWithdrawalTransaction.test.ts index 2abc4e6..c0d4956 100644 --- a/src/hooks/L1/useWriteProveWithdrawalTransaction.test.ts +++ b/src/hooks/L1/useWriteProveWithdrawalTransaction.test.ts @@ -18,9 +18,11 @@ test('useWriteProveWithdrawalTransaction', async () => { }) await waitFor(() => { - expect(result.current.error).toBeNull() - // We're only checking that we're able to successfully call the contract. The snapshot - // will continue to change as blocks get procuded, and this check is sufficient. - expect(result.current.isSuccess).toBeTruthy() + Promise.all([ + expect(result.current.error).toBeNull(), + // We're only checking that we're able to successfully call the contract. The snapshot + // will continue to change as blocks get procuded, and this check is sufficient. + expect(result.current.isSuccess).toBeTruthy(), + ]) }) }, { retry: 3 }) diff --git a/src/hooks/L2/useWriteWithdrawERC20.test.ts b/src/hooks/L2/useWriteWithdrawERC20.test.ts index afce93b..97ae18f 100644 --- a/src/hooks/L2/useWriteWithdrawERC20.test.ts +++ b/src/hooks/L2/useWriteWithdrawERC20.test.ts @@ -28,8 +28,10 @@ test('useWriteWithdrawERC20', async () => { }) await waitFor(() => { - expect(result.current.useWriteWithdrawERC20.error).toBeNull() - expect(result.current.useWriteWithdrawERC20.isSuccess).toBeTruthy() + Promise.all([ + expect(result.current.useWriteWithdrawERC20.error).toBeNull(), + expect(result.current.useWriteWithdrawERC20.isSuccess).toBeTruthy(), + ]) }) expect(result.current.useWriteWithdrawERC20).toMatchInlineSnapshot(` diff --git a/src/hooks/L2/useWriteWithdrawETH.test.ts b/src/hooks/L2/useWriteWithdrawETH.test.ts index 8807d50..4e97bb8 100644 --- a/src/hooks/L2/useWriteWithdrawETH.test.ts +++ b/src/hooks/L2/useWriteWithdrawETH.test.ts @@ -27,8 +27,10 @@ test('useWriteWithdrawETH', async () => { }) await waitFor(() => { - expect(result.current.useWriteWithdrawETH.error).toBeNull() - expect(result.current.useWriteWithdrawETH.isSuccess).toBeTruthy() + Promise.all([ + expect(result.current.useWriteWithdrawETH.error).toBeNull(), + expect(result.current.useWriteWithdrawETH.isSuccess).toBeTruthy(), + ]) }) expect(result.current.useWriteWithdrawETH).toMatchInlineSnapshot(` From b83eeed60fcd31e432f410cf80785e40aa5ffed2 Mon Sep 17 00:00:00 2001 From: Matthew Bunday Date: Thu, 15 Feb 2024 13:07:47 -0500 Subject: [PATCH 20/26] Return the promises to await --- src/hooks/L1/useWriteDepositERC20.test.ts | 2 +- src/hooks/L1/useWriteDepositETH.test.ts | 2 +- src/hooks/L1/useWriteFinalizeWithdrawalTransaction.test.ts | 2 +- src/hooks/L1/useWriteProveWithdrawalTransaction.test.ts | 2 +- src/hooks/L2/useWriteWithdrawERC20.test.ts | 2 +- src/hooks/L2/useWriteWithdrawETH.test.ts | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/hooks/L1/useWriteDepositERC20.test.ts b/src/hooks/L1/useWriteDepositERC20.test.ts index 8f5d650..b7f02cd 100644 --- a/src/hooks/L1/useWriteDepositERC20.test.ts +++ b/src/hooks/L1/useWriteDepositERC20.test.ts @@ -23,7 +23,7 @@ test('useWriteDepositERC20', async () => { }) await waitFor(() => { - Promise.all([ + return Promise.all([ expect(result.current.error).toBeNull(), expect(result.current.isSuccess).toBeTruthy(), ]) diff --git a/src/hooks/L1/useWriteDepositETH.test.ts b/src/hooks/L1/useWriteDepositETH.test.ts index 9806c36..7c2091b 100644 --- a/src/hooks/L1/useWriteDepositETH.test.ts +++ b/src/hooks/L1/useWriteDepositETH.test.ts @@ -18,7 +18,7 @@ test('useWriteDepositETH', async () => { // since we didn't use the async wait for it to succeed await waitFor(() => { - Promise.all([ + return Promise.all([ expect(result.current.error).toBeNull(), expect(result.current.isSuccess).toBeTruthy(), ]) diff --git a/src/hooks/L1/useWriteFinalizeWithdrawalTransaction.test.ts b/src/hooks/L1/useWriteFinalizeWithdrawalTransaction.test.ts index c6ae1f1..fdf004b 100644 --- a/src/hooks/L1/useWriteFinalizeWithdrawalTransaction.test.ts +++ b/src/hooks/L1/useWriteFinalizeWithdrawalTransaction.test.ts @@ -18,7 +18,7 @@ test('useWriteFinalizeWithdrawalTransaction', async () => { }) await waitFor(() => { - Promise.all([ + return Promise.all([ expect(result.current.error).toBeNull(), expect(result.current.isSuccess).toBeTruthy(), ]) diff --git a/src/hooks/L1/useWriteProveWithdrawalTransaction.test.ts b/src/hooks/L1/useWriteProveWithdrawalTransaction.test.ts index c0d4956..a589280 100644 --- a/src/hooks/L1/useWriteProveWithdrawalTransaction.test.ts +++ b/src/hooks/L1/useWriteProveWithdrawalTransaction.test.ts @@ -18,7 +18,7 @@ test('useWriteProveWithdrawalTransaction', async () => { }) await waitFor(() => { - Promise.all([ + return Promise.all([ expect(result.current.error).toBeNull(), // We're only checking that we're able to successfully call the contract. The snapshot // will continue to change as blocks get procuded, and this check is sufficient. diff --git a/src/hooks/L2/useWriteWithdrawERC20.test.ts b/src/hooks/L2/useWriteWithdrawERC20.test.ts index 97ae18f..83afdcc 100644 --- a/src/hooks/L2/useWriteWithdrawERC20.test.ts +++ b/src/hooks/L2/useWriteWithdrawERC20.test.ts @@ -28,7 +28,7 @@ test('useWriteWithdrawERC20', async () => { }) await waitFor(() => { - Promise.all([ + return Promise.all([ expect(result.current.useWriteWithdrawERC20.error).toBeNull(), expect(result.current.useWriteWithdrawERC20.isSuccess).toBeTruthy(), ]) diff --git a/src/hooks/L2/useWriteWithdrawETH.test.ts b/src/hooks/L2/useWriteWithdrawETH.test.ts index 4e97bb8..36db0f8 100644 --- a/src/hooks/L2/useWriteWithdrawETH.test.ts +++ b/src/hooks/L2/useWriteWithdrawETH.test.ts @@ -27,7 +27,7 @@ test('useWriteWithdrawETH', async () => { }) await waitFor(() => { - Promise.all([ + return Promise.all([ expect(result.current.useWriteWithdrawETH.error).toBeNull(), expect(result.current.useWriteWithdrawETH.isSuccess).toBeTruthy(), ]) From 69f0c5894bdd20deedf9c41b2d462c84ffe24298 Mon Sep 17 00:00:00 2001 From: Matthew Bunday Date: Tue, 20 Feb 2024 08:29:09 -0500 Subject: [PATCH 21/26] Use viem 2.7.11 for l1StandardBridge support, update docs to reflect --- docs/docs/configuration.md | 88 +++++++++++++++++++------------------- package.json | 2 +- pnpm-lock.yaml | 44 +++++++++---------- 3 files changed, 67 insertions(+), 67 deletions(-) diff --git a/docs/docs/configuration.md b/docs/docs/configuration.md index 2d52253..e2ac56a 100644 --- a/docs/docs/configuration.md +++ b/docs/docs/configuration.md @@ -1,26 +1,63 @@ ## Configuration -OP Wagmi currently ships with support for Base, Base Goerli, Optimism, Optimism Goerli, Zora, and Zora Goerli. If you'd like to interact with other OP Stack chains, you can extend Wagmi's config to include a list of additional `l2Chains`. You'll also need to add the corresponding chain objects to your Wagmi config so OP Wagmi has access to RPC URLs etc. +OP Wagmi works out of the box with any OP Stack Viem chain definition as of Viem 2.7.11. You'll just need to add the corresponding chain objects to your Wagmi config as normal. You can also specify custom chains and pass them to Wagmi's config. ::: code-group +```tsx [app.tsx] +import { useWriteDepositETH } from 'op-wagmi' +import { useConfig } from 'wagmi' +import { customL2Chains } from './l2Chains' + +const { writeDepositETH } = useWriteDepositETH() + +return ( + +) +``` + +```ts [config.ts] +import { createConfig, http } from 'wagmi' +import { mainnet, sepolia } from 'wagmi/chains' +import { exampleChain } from './chains' + +export const config = createConfig({ + chains: [mainnet, sepolia, exampleChain], + transports: { + [mainnet.id]: http(), + [sepolia.id]: http(), + [exampleChain.id]: http(), + }, +}) +``` + ```ts [l2Chains.ts] import { type Chain, mainnet } from 'viem/chains' export const exampleChain: Chain = { - id: 8453, - name: 'Base', + id: 31415926, + name: 'ExampleChain', nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 }, rpcUrls: { default: { - http: ['https://mainnet.base.org'], + http: ['https://rpc.examplechain.org'], }, }, blockExplorers: { default: { - name: 'Basescan', - url: 'https://basescan.org', - apiUrl: 'https://api.basescan.org/api', + name: 'ExampleChain Scan', + url: 'https://examplechainscan.org', + apiUrl: 'https://api.examplechainscan.org/api', }, }, contracts: { @@ -49,41 +86,4 @@ export const exampleChain: Chain = { } ``` -```tsx [app.tsx] -import { useWriteDepositETH } from 'op-wagmi' -import { useConfig } from 'wagmi' -import { customL2Chains } from './l2Chains' - -const { writeDepositETH } = useWriteDepositETH() - -return ( - -) -``` - -```ts [config.ts] -import { createConfig, http } from 'wagmi' -import { mainnet, sepolia } from 'wagmi/chains' -import { exampleChain } from './chains' - -export const config = createConfig({ - chains: [mainnet, sepolia, exampleChain], - transports: { - [mainnet.id]: http(), - [sepolia.id]: http(), - [exampleChain.id]: http(), - }, -}) -``` - ::: diff --git a/package.json b/package.json index cdae153..7ed6737 100644 --- a/package.json +++ b/package.json @@ -103,7 +103,7 @@ "@wagmi/core": "^2.x", "op-viem": "1.3.1-alpha", "typescript": ">=5.0.4", - "viem": "^2.x", + "viem": "^2.7.11", "wagmi": "^2.x" }, "peerDependenciesMeta": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9c3eb58..98467a4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,16 +16,16 @@ importers: version: 0.15.0(@wagmi/core@2.6.5)(typescript@5.0.4)(wagmi@2.5.7) '@wagmi/core': specifier: ^2.x - version: 2.6.5(@types/react@18.2.38)(react@18.2.0)(typescript@5.0.4)(viem@2.7.9) + version: 2.6.5(@types/react@18.2.38)(react@18.2.0)(typescript@5.0.4)(viem@2.7.11) op-viem: specifier: 1.3.1-alpha - version: 1.3.1-alpha(@wagmi/core@2.6.5)(typescript@5.0.4)(viem@2.7.9)(wagmi@2.5.7) + version: 1.3.1-alpha(@wagmi/core@2.6.5)(typescript@5.0.4)(viem@2.7.11)(wagmi@2.5.7) viem: - specifier: ^2.x - version: 2.7.9(typescript@5.0.4)(zod@3.22.4) + specifier: ^2.7.11 + version: 2.7.11(typescript@5.0.4)(zod@3.22.4) wagmi: specifier: ^2.x - version: 2.5.7(@tanstack/react-query@5.8.6)(@types/react@18.2.38)(react-dom@18.2.0)(react-native@0.72.7)(react@18.2.0)(typescript@5.0.4)(viem@2.7.9) + version: 2.5.7(@tanstack/react-query@5.8.6)(@types/react@18.2.38)(react-dom@18.2.0)(react-native@0.72.7)(react@18.2.0)(typescript@5.0.4)(viem@2.7.11) devDependencies: '@biomejs/biome': specifier: 1.0.0 @@ -71,7 +71,7 @@ importers: version: 2.1.1(typescript@5.0.4) '@wagmi/connectors': specifier: ^4.1.14 - version: 4.1.14(@types/react@18.2.38)(@wagmi/core@2.6.5)(react-dom@18.2.0)(react-native@0.72.7)(react@18.2.0)(typescript@5.0.4)(viem@2.7.9) + version: 4.1.14(@types/react@18.2.38)(@wagmi/core@2.6.5)(react-dom@18.2.0)(react-native@0.72.7)(react@18.2.0)(typescript@5.0.4)(viem@2.7.11) dprint: specifier: ^0.42.5 version: 0.42.5 @@ -2330,11 +2330,11 @@ packages: optional: true dependencies: '@testing-library/react': 14.1.2(react-dom@18.2.0)(react@18.2.0) - '@wagmi/core': 2.6.5(@types/react@18.2.38)(react@18.2.0)(typescript@5.0.4)(viem@2.7.9) + '@wagmi/core': 2.6.5(@types/react@18.2.38)(react@18.2.0)(typescript@5.0.4)(viem@2.7.11) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) viem: 1.19.9(typescript@5.0.4) - wagmi: 2.5.7(@tanstack/react-query@5.8.6)(@types/react@18.2.38)(react-dom@18.2.0)(react-native@0.72.7)(react@18.2.0)(typescript@5.0.4)(viem@2.7.9) + wagmi: 2.5.7(@tanstack/react-query@5.8.6)(@types/react@18.2.38)(react-dom@18.2.0)(react-native@0.72.7)(react@18.2.0)(typescript@5.0.4)(viem@2.7.11) transitivePeerDependencies: - bufferutil - typescript @@ -4489,14 +4489,14 @@ packages: picocolors: 1.0.0 prettier: 3.1.0 typescript: 5.0.4 - viem: 2.7.9(typescript@5.0.4)(zod@3.22.4) + viem: 2.7.11(typescript@5.0.4)(zod@3.22.4) zod: 3.22.4 transitivePeerDependencies: - bufferutil - utf-8-validate dev: true - /@wagmi/connectors@4.1.14(@types/react@18.2.38)(@wagmi/core@2.6.5)(react-dom@18.2.0)(react-native@0.72.7)(react@18.2.0)(typescript@5.0.4)(viem@2.7.9): + /@wagmi/connectors@4.1.14(@types/react@18.2.38)(@wagmi/core@2.6.5)(react-dom@18.2.0)(react-native@0.72.7)(react@18.2.0)(typescript@5.0.4)(viem@2.7.11): resolution: {integrity: sha512-e8I89FsNBtzhIilU3nqmgMR9xvSgCfmkWLz9iCKBTqyitbK5EJU7WTEtjjYFm1v2J//JeAwaA2XEKtG9BLR9jQ==} peerDependencies: '@wagmi/core': 2.6.5 @@ -4510,11 +4510,11 @@ packages: '@metamask/sdk': 0.14.3(@types/react@18.2.38)(react-dom@18.2.0)(react-native@0.72.7)(react@18.2.0) '@safe-global/safe-apps-provider': 0.18.1(typescript@5.0.4) '@safe-global/safe-apps-sdk': 8.1.0(typescript@5.0.4) - '@wagmi/core': 2.6.5(@types/react@18.2.38)(react@18.2.0)(typescript@5.0.4)(viem@2.7.9) + '@wagmi/core': 2.6.5(@types/react@18.2.38)(react@18.2.0)(typescript@5.0.4)(viem@2.7.11) '@walletconnect/ethereum-provider': 2.11.1(@types/react@18.2.38)(react@18.2.0) '@walletconnect/modal': 2.6.2(@types/react@18.2.38)(react@18.2.0) typescript: 5.0.4 - viem: 2.7.9(typescript@5.0.4)(zod@3.22.4) + viem: 2.7.11(typescript@5.0.4)(zod@3.22.4) transitivePeerDependencies: - '@azure/app-configuration' - '@azure/cosmos' @@ -4539,7 +4539,7 @@ packages: - utf-8-validate - zod - /@wagmi/core@2.6.5(@types/react@18.2.38)(react@18.2.0)(typescript@5.0.4)(viem@2.7.9): + /@wagmi/core@2.6.5(@types/react@18.2.38)(react@18.2.0)(typescript@5.0.4)(viem@2.7.11): resolution: {integrity: sha512-DLyrc0o+dx05oIhBJuxnS7ekS5e6rB5mytlqPme+Km7aLdeBdcfYB4yJyYCyWoi93OLa7M5sbflTttz3o56bKw==} peerDependencies: '@tanstack/query-core': '>=5.0.0' @@ -4554,7 +4554,7 @@ packages: eventemitter3: 5.0.1 mipd: 0.0.5(typescript@5.0.4) typescript: 5.0.4 - viem: 2.7.9(typescript@5.0.4)(zod@3.22.4) + viem: 2.7.11(typescript@5.0.4)(zod@3.22.4) zustand: 4.4.1(@types/react@18.2.38)(react@18.2.0) transitivePeerDependencies: - '@types/react' @@ -8657,7 +8657,7 @@ packages: mimic-fn: 4.0.0 dev: true - /op-viem@1.3.1-alpha(@wagmi/core@2.6.5)(typescript@5.0.4)(viem@2.7.9)(wagmi@2.5.7): + /op-viem@1.3.1-alpha(@wagmi/core@2.6.5)(typescript@5.0.4)(viem@2.7.11)(wagmi@2.5.7): resolution: {integrity: sha512-I9mtT5TPC/l+m+ki6FBRZvkdc6WtCV703atOLaEkMJTebxViWAxia3JZO87fOPRexMT+yAZDnDhTy8fB9S9gtQ==} requiresBuild: true peerDependencies: @@ -8669,7 +8669,7 @@ packages: dependencies: '@eth-optimism/contracts-ts': 0.15.0(@wagmi/core@2.6.5)(typescript@5.0.4)(wagmi@2.5.7) typescript: 5.0.4 - viem: 2.7.9(typescript@5.0.4)(zod@3.22.4) + viem: 2.7.11(typescript@5.0.4)(zod@3.22.4) transitivePeerDependencies: - '@wagmi/core' - bufferutil @@ -10794,8 +10794,8 @@ packages: - utf-8-validate - zod - /viem@2.7.9(typescript@5.0.4)(zod@3.22.4): - resolution: {integrity: sha512-iDfc8TwaZFp1K95zlsxYh6Cs0OWCt35Tqs8uYgXKSxtz7w075mZ0H5SJ8zSyJGoEaticVDhtdmRRX6TtcW9EeQ==} + /viem@2.7.11(typescript@5.0.4)(zod@3.22.4): + resolution: {integrity: sha512-qlEPF9YOgPVqjTyom73TVAekAYrIe68megO07u55p7pKWgLt0i9KD6Mrmiw7pd7oHh86vIppcygwQMDNGX1YAw==} peerDependencies: typescript: '>=5.0.4' peerDependenciesMeta: @@ -11046,7 +11046,7 @@ packages: typescript: 5.0.4 dev: true - /wagmi@2.5.7(@tanstack/react-query@5.8.6)(@types/react@18.2.38)(react-dom@18.2.0)(react-native@0.72.7)(react@18.2.0)(typescript@5.0.4)(viem@2.7.9): + /wagmi@2.5.7(@tanstack/react-query@5.8.6)(@types/react@18.2.38)(react-dom@18.2.0)(react-native@0.72.7)(react@18.2.0)(typescript@5.0.4)(viem@2.7.11): resolution: {integrity: sha512-xSuteMXFKvra4xDddqZbZv/gQlcg3X+To5AoZW7WoAm0iVlF8/vEGpQzCWy6KZs2z1szxPrr0YnH3Zr1Qj4E/A==} peerDependencies: '@tanstack/react-query': '>=5.0.0' @@ -11058,12 +11058,12 @@ packages: optional: true dependencies: '@tanstack/react-query': 5.8.6(react-dom@18.2.0)(react-native@0.72.7)(react@18.2.0) - '@wagmi/connectors': 4.1.14(@types/react@18.2.38)(@wagmi/core@2.6.5)(react-dom@18.2.0)(react-native@0.72.7)(react@18.2.0)(typescript@5.0.4)(viem@2.7.9) - '@wagmi/core': 2.6.5(@types/react@18.2.38)(react@18.2.0)(typescript@5.0.4)(viem@2.7.9) + '@wagmi/connectors': 4.1.14(@types/react@18.2.38)(@wagmi/core@2.6.5)(react-dom@18.2.0)(react-native@0.72.7)(react@18.2.0)(typescript@5.0.4)(viem@2.7.11) + '@wagmi/core': 2.6.5(@types/react@18.2.38)(react@18.2.0)(typescript@5.0.4)(viem@2.7.11) react: 18.2.0 typescript: 5.0.4 use-sync-external-store: 1.2.0(react@18.2.0) - viem: 2.7.9(typescript@5.0.4)(zod@3.22.4) + viem: 2.7.11(typescript@5.0.4)(zod@3.22.4) transitivePeerDependencies: - '@azure/app-configuration' - '@azure/cosmos' From 1e1c5ae4debb43f8b64a0c5fd5ffa7527a5c360b Mon Sep 17 00:00:00 2001 From: Matthew Bunday Date: Tue, 20 Feb 2024 08:32:33 -0500 Subject: [PATCH 22/26] Delete unnecessary OpConfig code --- src/_test/config.ts | 5 ++--- src/constants/chains/base.ts | 15 --------------- src/constants/chains/optimism.ts | 15 --------------- src/constants/chains/zora.ts | 15 --------------- src/types/OpConfig.ts | 28 ---------------------------- 5 files changed, 2 insertions(+), 76 deletions(-) delete mode 100644 src/constants/chains/base.ts delete mode 100644 src/constants/chains/optimism.ts delete mode 100644 src/constants/chains/zora.ts delete mode 100644 src/types/OpConfig.ts diff --git a/src/_test/config.ts b/src/_test/config.ts index 853bcb7..1fded91 100644 --- a/src/_test/config.ts +++ b/src/_test/config.ts @@ -1,7 +1,6 @@ import { mock } from '@wagmi/connectors' -import { mainnet as viem_mainnet } from 'viem/chains' +import { base as viem_base, mainnet as viem_mainnet } from 'viem/chains' import { type Config, createConfig, http } from 'wagmi' -import { base as opWagmiBase } from '../constants/chains/base.js' import { accounts } from './constants.js' import { getRpcUrls } from './utils.js' @@ -17,7 +16,7 @@ const mainnet = { } const base = { - ...opWagmiBase, + ...viem_base, ...getRpcUrls({ port: 8546 }), // fork: { // blockNumber: process.env.VITE_OPTIMISM_FORK_BLOCK_NUMBER diff --git a/src/constants/chains/base.ts b/src/constants/chains/base.ts deleted file mode 100644 index 82f5349..0000000 --- a/src/constants/chains/base.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { baseAddresses } from 'op-viem/chains' -import { base as viem_base, type Chain, mainnet } from 'viem/chains' - -export const base: Chain = { - ...viem_base, - contracts: { - ...viem_base.contracts, - l1StandardBridge: { - [mainnet.id]: { - address: baseAddresses.l1StandardBridge.address, - blockCreated: baseAddresses.l1StandardBridge.blockCreated, - }, - }, - }, -} diff --git a/src/constants/chains/optimism.ts b/src/constants/chains/optimism.ts deleted file mode 100644 index 1af639e..0000000 --- a/src/constants/chains/optimism.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { optimismAddresses } from 'op-viem/chains' -import { type Chain, mainnet, optimism as viem_optimism } from 'viem/chains' - -export const optimism: Chain = { - ...viem_optimism, - contracts: { - ...viem_optimism.contracts, - l1StandardBridge: { - [mainnet.id]: { - address: optimismAddresses.l1StandardBridge.address, - blockCreated: optimismAddresses.l1StandardBridge.blockCreated, - }, - }, - }, -} diff --git a/src/constants/chains/zora.ts b/src/constants/chains/zora.ts deleted file mode 100644 index 9e94213..0000000 --- a/src/constants/chains/zora.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { zoraAddresses } from 'op-viem/chains' -import { type Chain, mainnet, zora as viem_zora } from 'viem/chains' - -export const zora: Chain = { - ...viem_zora, - contracts: { - ...viem_zora.contracts, - l1StandardBridge: { - [mainnet.id]: { - address: zoraAddresses.l1StandardBridge.address, - blockCreated: zoraAddresses.l1StandardBridge.blockCreated, - }, - }, - }, -} diff --git a/src/types/OpConfig.ts b/src/types/OpConfig.ts deleted file mode 100644 index bb5238b..0000000 --- a/src/types/OpConfig.ts +++ /dev/null @@ -1,28 +0,0 @@ -import type { Address } from 'viem' -import { type Config } from 'wagmi' - -// TODO: export these from op-viem and import here -export type ContractAddress = { address: Address; chainId: chainId; blockCreated?: number } -export type L1Addresses = { - portal: ContractAddress - l2OutputOracle: ContractAddress - l1StandardBridge: ContractAddress - l1CrossDomainMessenger: ContractAddress - l1Erc721Bridge: ContractAddress -} - -export type L2Addresses = { - l2L1MessagePasserAddress: ContractAddress - l2StandardBridge: ContractAddress -} - -export type L2Chain = { - chainId: l2ChainId - l1ChainId: l1ChainId - l1Addresses: L1Addresses - l2Addresses: L2Addresses -} - -export type OpConfig = Config & { - readonly l2chains: Record> -} From 6d567efda00e493f9c151928f283b94205df8f8c Mon Sep 17 00:00:00 2001 From: Matthew Bunday Date: Tue, 20 Feb 2024 08:41:27 -0500 Subject: [PATCH 23/26] Update example site --- example/app/providers.tsx | 10 +++++----- example/components/DepositContainer.tsx | 6 +----- example/components/FinalizeContainer.tsx | 6 +----- example/components/ProveContainer.tsx | 6 +----- example/components/WithdrawContainer.tsx | 6 +----- example/components/WithdrawERC20.tsx | 6 +----- example/components/WithdrawETH.tsx | 6 +----- example/constants/chainIdToExplorer.ts | 6 ++++++ example/constants/networkToChainId.ts | 6 ++++++ 9 files changed, 23 insertions(+), 35 deletions(-) create mode 100644 example/constants/chainIdToExplorer.ts create mode 100644 example/constants/networkToChainId.ts diff --git a/example/app/providers.tsx b/example/app/providers.tsx index 44c30ff..93274d0 100644 --- a/example/app/providers.tsx +++ b/example/app/providers.tsx @@ -2,16 +2,16 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query' import { createConfig, http, WagmiProvider } from 'wagmi' -import { baseGoerli, goerli, optimismGoerli } from 'wagmi/chains' +import { base, mainnet, optimism } from 'wagmi/chains' const queryClient = new QueryClient() const config = createConfig({ - chains: [goerli, baseGoerli, optimismGoerli], + chains: [base, mainnet, optimism], transports: { - [goerli.id]: http(), - [baseGoerli.id]: http(), - [optimismGoerli.id]: http(), + [base.id]: http(), + [mainnet.id]: http(), + [optimism.id]: http(), }, }) diff --git a/example/components/DepositContainer.tsx b/example/components/DepositContainer.tsx index 644381b..207370b 100644 --- a/example/components/DepositContainer.tsx +++ b/example/components/DepositContainer.tsx @@ -1,14 +1,10 @@ +import { networkToChainId } from '@/constants/networkToChainId' import { useState } from 'react' import { AssetTypeToggle } from './AssetTypeToggle' import { DepositERC20 } from './DepositERC20' import { DepositETH } from './DepositETH' import { NetworkSelector } from './NetworkSelector' -const networkToChainId: Record<'optimism' | 'base', number> = { - base: 84531, - optimism: 420, -} - export function DepositContainer() { const [selectedAssetType, setSelectedAssetType] = useState<'eth' | 'erc20'>('eth') const [selectedNetwork, setSelectedNetwork] = useState<'optimism' | 'base'>('base') diff --git a/example/components/FinalizeContainer.tsx b/example/components/FinalizeContainer.tsx index 9c1ae63..e6ede93 100644 --- a/example/components/FinalizeContainer.tsx +++ b/example/components/FinalizeContainer.tsx @@ -1,12 +1,8 @@ +import { networkToChainId } from '@/constants/networkToChainId' import { useState } from 'react' import { FinalizeWithdrawalTransaction } from './FinalizeWithdrawalTransaction' import { NetworkSelector } from './NetworkSelector' -const networkToChainId: Record<'optimism' | 'base', number> = { - base: 84531, - optimism: 420, -} - export function FinalizeContainer() { const [selectedNetwork, setSelectedNetwork] = useState<'optimism' | 'base'>('base') return ( diff --git a/example/components/ProveContainer.tsx b/example/components/ProveContainer.tsx index c7315eb..d7ef3b9 100644 --- a/example/components/ProveContainer.tsx +++ b/example/components/ProveContainer.tsx @@ -1,12 +1,8 @@ +import { networkToChainId } from '@/constants/networkToChainId' import { useState } from 'react' import { NetworkSelector } from './NetworkSelector' import { ProveWithdrawalTransaction } from './ProveWithdrawalTransaction' -const networkToChainId: Record<'optimism' | 'base', number> = { - base: 84531, - optimism: 420, -} - export function ProveContainer() { const [selectedNetwork, setSelectedNetwork] = useState<'optimism' | 'base'>('base') return ( diff --git a/example/components/WithdrawContainer.tsx b/example/components/WithdrawContainer.tsx index 33b4081..5deb3d7 100644 --- a/example/components/WithdrawContainer.tsx +++ b/example/components/WithdrawContainer.tsx @@ -1,14 +1,10 @@ +import { networkToChainId } from '@/constants/networkToChainId' import { useState } from 'react' import { AssetTypeToggle } from './AssetTypeToggle' import { NetworkSelector } from './NetworkSelector' import { WithdrawERC20 } from './WithdrawERC20' import { WithdrawETH } from './WithdrawETH' -const networkToChainId: Record<'optimism' | 'base', number> = { - base: 84531, - optimism: 420, -} - export function WithdrawContainer() { const [selectedAssetType, setSelectedAssetType] = useState<'eth' | 'erc20'>('eth') const [selectedNetwork, setSelectedNetwork] = useState<'optimism' | 'base'>('base') diff --git a/example/components/WithdrawERC20.tsx b/example/components/WithdrawERC20.tsx index ef07268..a840110 100644 --- a/example/components/WithdrawERC20.tsx +++ b/example/components/WithdrawERC20.tsx @@ -1,3 +1,4 @@ +import { chainIdToExplorer } from '@/constants/chainIdToExplorer' import { useSimulateWithdrawERC20, useWriteWithdrawERC20 } from 'op-wagmi' import { useState } from 'react' import { Address, erc20Abi, isAddress, parseUnits } from 'viem' @@ -8,11 +9,6 @@ import { InputGroup } from './InputGroup' const cbETHL2 = '0x7c6b91D9Be155A6Db01f749217d76fF02A7227F2' -const chainIdToExplorer: Record = { - 84531: 'https://goerli.basescan.org', - 420: 'https://goerli-optimism.etherscan.io', -} - type WithdrawERC20Props = { selectedChainId: number } diff --git a/example/components/WithdrawETH.tsx b/example/components/WithdrawETH.tsx index 381cf42..acaf77b 100644 --- a/example/components/WithdrawETH.tsx +++ b/example/components/WithdrawETH.tsx @@ -1,3 +1,4 @@ +import { chainIdToExplorer } from '@/constants/chainIdToExplorer' import { useSimulateWithdrawETH, useWriteWithdrawETH } from 'op-wagmi' import { useState } from 'react' import { Address, parseEther } from 'viem' @@ -5,11 +6,6 @@ import { Action, ActionToggle } from './ActionToggle' import { Button } from './Button' import { InputGroup } from './InputGroup' -const chainIdToExplorer: Record = { - 84531: 'https://goerli.basescan.org', - 420: 'https://goerli-optimism.etherscan.io', -} - type WithdrawETHProps = { selectedChainId: number } diff --git a/example/constants/chainIdToExplorer.ts b/example/constants/chainIdToExplorer.ts new file mode 100644 index 0000000..dadf201 --- /dev/null +++ b/example/constants/chainIdToExplorer.ts @@ -0,0 +1,6 @@ +import { base, optimism } from 'viem/chains' + +export const chainIdToExplorer: Record = { + [base.id]: base.blockExplorers.default.url, + [optimism.id]: optimism.blockExplorers.default.url, +} diff --git a/example/constants/networkToChainId.ts b/example/constants/networkToChainId.ts new file mode 100644 index 0000000..9adb625 --- /dev/null +++ b/example/constants/networkToChainId.ts @@ -0,0 +1,6 @@ +import { base, optimism } from 'viem/chains' + +export const networkToChainId: Record<'optimism' | 'base', number> = { + base: base.id, + optimism: optimism.id, +} From cabb074ea4d9f038c5add99442a366075b0d2c0c Mon Sep 17 00:00:00 2001 From: Matthew Bunday Date: Wed, 21 Feb 2024 09:05:36 -0500 Subject: [PATCH 24/26] Refactor example app to use Sepolia, add useSelectedNetwork hook --- example/app/providers.tsx | 12 ++++++------ example/components/DepositContainer.tsx | 3 ++- example/components/FinalizeContainer.tsx | 4 ++-- example/components/NetworkSelector.tsx | 14 ++++++++------ example/components/ProveContainer.tsx | 4 ++-- example/constants/chainIdToExplorer.ts | 7 ++++--- example/constants/networkToChainId.ts | 9 +++++---- 7 files changed, 29 insertions(+), 24 deletions(-) diff --git a/example/app/providers.tsx b/example/app/providers.tsx index 93274d0..5502301 100644 --- a/example/app/providers.tsx +++ b/example/app/providers.tsx @@ -2,16 +2,16 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query' import { createConfig, http, WagmiProvider } from 'wagmi' -import { base, mainnet, optimism } from 'wagmi/chains' +import { baseSepolia, optimismSepolia, sepolia } from 'wagmi/chains' const queryClient = new QueryClient() -const config = createConfig({ - chains: [base, mainnet, optimism], +export const config = createConfig({ + chains: [sepolia, baseSepolia, optimismSepolia], transports: { - [base.id]: http(), - [mainnet.id]: http(), - [optimism.id]: http(), + [sepolia.id]: http(), + [baseSepolia.id]: http(), + [optimismSepolia.id]: http(), }, }) diff --git a/example/components/DepositContainer.tsx b/example/components/DepositContainer.tsx index 207370b..9afecd2 100644 --- a/example/components/DepositContainer.tsx +++ b/example/components/DepositContainer.tsx @@ -1,4 +1,5 @@ import { networkToChainId } from '@/constants/networkToChainId' +import { useSelectedNetwork } from '@/hooks/useSelectedNetwork' import { useState } from 'react' import { AssetTypeToggle } from './AssetTypeToggle' import { DepositERC20 } from './DepositERC20' @@ -7,7 +8,7 @@ import { NetworkSelector } from './NetworkSelector' export function DepositContainer() { const [selectedAssetType, setSelectedAssetType] = useState<'eth' | 'erc20'>('eth') - const [selectedNetwork, setSelectedNetwork] = useState<'optimism' | 'base'>('base') + const { selectedNetwork, setSelectedNetwork } = useSelectedNetwork('baseSepolia') return (
diff --git a/example/components/FinalizeContainer.tsx b/example/components/FinalizeContainer.tsx index e6ede93..d48eec6 100644 --- a/example/components/FinalizeContainer.tsx +++ b/example/components/FinalizeContainer.tsx @@ -1,10 +1,10 @@ import { networkToChainId } from '@/constants/networkToChainId' -import { useState } from 'react' +import { useSelectedNetwork } from '@/hooks/useSelectedNetwork' import { FinalizeWithdrawalTransaction } from './FinalizeWithdrawalTransaction' import { NetworkSelector } from './NetworkSelector' export function FinalizeContainer() { - const [selectedNetwork, setSelectedNetwork] = useState<'optimism' | 'base'>('base') + const { selectedNetwork, setSelectedNetwork } = useSelectedNetwork('baseSepolia') return (
From diff --git a/example/components/NetworkSelector.tsx b/example/components/NetworkSelector.tsx index fbe5cc8..9bac8fb 100644 --- a/example/components/NetworkSelector.tsx +++ b/example/components/NetworkSelector.tsx @@ -1,6 +1,6 @@ type NetworkSelectorProps = { - selectedNetwork: 'optimism' | 'base' - setSelectedNetwork: (network: 'optimism' | 'base') => void + selectedNetwork: 'optimismSepolia' | 'baseSepolia' | 'sepolia' + setSelectedNetwork: (network: 'optimismSepolia' | 'baseSepolia' | 'sepolia') => void } export function NetworkSelector({ selectedNetwork, setSelectedNetwork }: NetworkSelectorProps) { @@ -8,19 +8,21 @@ export function NetworkSelector({ selectedNetwork, setSelectedNetwork }: Network
diff --git a/example/components/ProveContainer.tsx b/example/components/ProveContainer.tsx index d7ef3b9..a809af8 100644 --- a/example/components/ProveContainer.tsx +++ b/example/components/ProveContainer.tsx @@ -1,10 +1,10 @@ import { networkToChainId } from '@/constants/networkToChainId' -import { useState } from 'react' +import { useSelectedNetwork } from '@/hooks/useSelectedNetwork' import { NetworkSelector } from './NetworkSelector' import { ProveWithdrawalTransaction } from './ProveWithdrawalTransaction' export function ProveContainer() { - const [selectedNetwork, setSelectedNetwork] = useState<'optimism' | 'base'>('base') + const { selectedNetwork, setSelectedNetwork } = useSelectedNetwork('baseSepolia') return (
From diff --git a/example/constants/chainIdToExplorer.ts b/example/constants/chainIdToExplorer.ts index dadf201..514699e 100644 --- a/example/constants/chainIdToExplorer.ts +++ b/example/constants/chainIdToExplorer.ts @@ -1,6 +1,7 @@ -import { base, optimism } from 'viem/chains' +import { blastSepolia, optimismSepolia, sepolia } from 'viem/chains' export const chainIdToExplorer: Record = { - [base.id]: base.blockExplorers.default.url, - [optimism.id]: optimism.blockExplorers.default.url, + [sepolia.id]: sepolia.blockExplorers.default.url, + [blastSepolia.id]: blastSepolia.blockExplorers.default.url, + [optimismSepolia.id]: optimismSepolia.blockExplorers.default.url, } diff --git a/example/constants/networkToChainId.ts b/example/constants/networkToChainId.ts index 9adb625..98ff240 100644 --- a/example/constants/networkToChainId.ts +++ b/example/constants/networkToChainId.ts @@ -1,6 +1,7 @@ -import { base, optimism } from 'viem/chains' +import { baseSepolia, optimismSepolia, sepolia } from 'viem/chains' -export const networkToChainId: Record<'optimism' | 'base', number> = { - base: base.id, - optimism: optimism.id, +export const networkToChainId: Record = { + sepolia: sepolia.id, + baseSepolia: baseSepolia.id, + optimismSepolia: optimismSepolia.id, } From d1e0a8d2c375dd97253c676f592bea920bb90c3c Mon Sep 17 00:00:00 2001 From: Matthew Bunday Date: Wed, 21 Feb 2024 09:06:21 -0500 Subject: [PATCH 25/26] Remove lint ala Lukas --- example/hooks/useSelectedNetwork.ts | 7 +++++++ src/hooks/L1/useWriteDepositERC20.ts | 2 -- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 example/hooks/useSelectedNetwork.ts diff --git a/example/hooks/useSelectedNetwork.ts b/example/hooks/useSelectedNetwork.ts new file mode 100644 index 0000000..2e339cf --- /dev/null +++ b/example/hooks/useSelectedNetwork.ts @@ -0,0 +1,7 @@ +import { useState } from 'react' + +export function useSelectedNetwork(defaultNetwork: 'optimismSepolia' | 'baseSepolia' | 'sepolia' = 'baseSepolia') { + const [selectedNetwork, setSelectedNetwork] = useState<'optimismSepolia' | 'baseSepolia' | 'sepolia'>(defaultNetwork) + + return { selectedNetwork, setSelectedNetwork } +} diff --git a/src/hooks/L1/useWriteDepositERC20.ts b/src/hooks/L1/useWriteDepositERC20.ts index feb940b..50d4ca4 100644 --- a/src/hooks/L1/useWriteDepositERC20.ts +++ b/src/hooks/L1/useWriteDepositERC20.ts @@ -54,7 +54,6 @@ export function useWriteDepositERC20 { const { l2Chain, l1ChainId } = validateL2Chain(config, l2ChainId) const l1StandardBridge = validatel1StandardBridgeContract(l1ChainId, l2Chain).address - console.log('l1StandardBridge', l1StandardBridge) return writeContract( { @@ -82,7 +81,6 @@ export function useWriteDepositERC20 { const { l2Chain, l1ChainId } = validateL2Chain(config, l2ChainId) const l1StandardBridge = validatel1StandardBridgeContract(l1ChainId, l2Chain).address - console.log('l1StandardBridge', l1StandardBridge) return writeContractAsync({ chainId: l1ChainId, From 1590beca0eae71460270f6f6e1c914d5dafdbb6d Mon Sep 17 00:00:00 2001 From: Matthew Bunday Date: Wed, 21 Feb 2024 09:35:35 -0500 Subject: [PATCH 26/26] Add changeset --- .changeset/giant-poems-search.md | 9 +++++++++ package.json | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .changeset/giant-poems-search.md diff --git a/.changeset/giant-poems-search.md b/.changeset/giant-poems-search.md new file mode 100644 index 0000000..1ff067f --- /dev/null +++ b/.changeset/giant-poems-search.md @@ -0,0 +1,9 @@ +--- +"@op-wagmi/example": major +"@op-wagmi/docs": major +"op-wagmi": major +--- + +Use Viem 2 stable release, remove OpConfig and rely on wagmi config. + +OpConfigs can be removed from the project and the wagmi config can be used instead. This will allow for a more streamlined configuration process. Please see the configuration documentation for more information. https://www.opwagmi.sh/docs/configuration.html diff --git a/package.json b/package.json index 7ed6737..8e09e76 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "type": "git", "url": "https://github.com/base-org/op-wagmi.git" }, - "version": "1.0.0", + "version": "0.2.3", "type": "module", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js",