From d4da9a7d811e5da775232aa0378c690e9b355663 Mon Sep 17 00:00:00 2001 From: Martin Becze Date: Thu, 14 Nov 2024 14:10:03 +0000 Subject: [PATCH 1/3] updating types --- deno.json | 3 + deno.lock | 1169 ++--- packages/blockchain/mod.ts | 267 +- packages/blockchain/mod_test.ts | 15 +- packages/blockchain/package.json | 3 +- packages/client/guestCheckout_test.ts | 73 +- packages/client/mod.ts | 24 +- packages/client/mod_test.ts | 130 +- packages/client/package.json | 8 +- packages/client/stream.ts | 2 +- packages/client/stream_test.ts | 3 +- packages/contracts/deno.json | 3 + packages/contracts/mod.ts | 35 +- packages/contracts/src/generated.ts | 4356 +++++++++++++++++ packages/contracts/wagmi.config.ts | 44 + packages/frontend/package.json | 4 +- .../app/components/checkout/ChoosePayment.tsx | 28 +- .../src/app/components/transactions/Pay.tsx | 6 +- .../frontend/src/app/create-store/page.tsx | 10 +- packages/frontend/src/app/favicon.ico | Bin 25931 -> 0 bytes .../src/app/merchants/connect/page.tsx | 5 +- packages/frontend/src/app/store/page.tsx | 7 +- packages/frontend/src/app/utils.ts | 10 +- .../frontend/src/context/StoreContext.tsx | 5 +- packages/frontend/src/context/UserContext.tsx | 2 +- packages/stateManager/mockClient.ts | 14 +- packages/stateManager/mod.ts | 24 +- packages/stateManager/mod_test.ts | 30 +- packages/stateManager/package.json | 2 +- packages/utils/mod.ts | 11 +- packages/utils/package.json | 2 +- 31 files changed, 5047 insertions(+), 1248 deletions(-) create mode 100644 packages/contracts/src/generated.ts create mode 100644 packages/contracts/wagmi.config.ts delete mode 100644 packages/frontend/src/app/favicon.ico diff --git a/deno.json b/deno.json index db5d2acf..3018a0ff 100644 --- a/deno.json +++ b/deno.json @@ -16,5 +16,8 @@ }, "fmt": { "exclude": [".direnv", "node_modules", ".pre-commit-config.yaml"] + }, + "compilerOptions": { + "noErrorTruncation": true } } diff --git a/deno.lock b/deno.lock index a23bed03..ecf0dab9 100644 --- a/deno.lock +++ b/deno.lock @@ -8,9 +8,10 @@ "jsr:@std/testing@*": "1.0.3", "jsr:@wevm/viem@*": "2.21.25", "npm:@ethereumjs/util@^9.0.3": "9.1.0", + "npm:@ethereumjs/util@^9.1.0": "9.1.0", "npm:@next/eslint-plugin-next@^14.2.3": "14.2.15", "npm:@nextui-org/dropdown@^2.1.26": "2.1.31_@nextui-org+system@2.2.6__framer-motion@11.11.9___react@18.3.1___react-dom@18.3.1____react@18.3.1__react@18.3.1__react-dom@18.3.1___react@18.3.1__@nextui-org+theme@2.2.11___tailwindcss@3.4.14____postcss@8.4.47__tailwindcss@3.4.14___postcss@8.4.47_@nextui-org+theme@2.2.11__tailwindcss@3.4.14___postcss@8.4.47_framer-motion@11.11.9__react@18.3.1__react-dom@18.3.1___react@18.3.1_react@18.3.1_react-dom@18.3.1__react@18.3.1_tailwindcss@3.4.14__postcss@8.4.47_@types+react@18.3.11", - "npm:@rainbow-me/rainbowkit@^2.2.0": "2.2.0_@tanstack+react-query@5.59.15__react@18.3.1_react@18.3.1_react-dom@18.3.1__react@18.3.1_viem@2.21.32__ws@8.18.0_wagmi@2.12.23__@tanstack+react-query@5.59.15___react@18.3.1__react@18.3.1__viem@2.21.32___ws@8.18.0__@wagmi+core@2.14.1___viem@2.21.32____ws@8.18.0___@types+react@18.3.11___react@18.3.1___use-sync-external-store@1.2.0____react@18.3.1__react-dom@18.3.1___react@18.3.1__@types+react@18.3.11__use-sync-external-store@1.2.0___react@18.3.1_@vanilla-extract+css@1.15.5_@types+react@18.3.11", + "npm:@rainbow-me/rainbowkit@^2.2.0": "2.2.0_@tanstack+react-query@5.59.15__react@18.3.1_react@18.3.1_react-dom@18.3.1__react@18.3.1_viem@2.21.44__typescript@5.6.3__ws@8.18.0_wagmi@2.12.31__@tanstack+react-query@5.59.15___react@18.3.1__react@18.3.1__typescript@5.6.3__viem@2.21.44___typescript@5.6.3___ws@8.18.0__@wagmi+core@2.14.5___typescript@5.6.3___viem@2.21.44____typescript@5.6.3____ws@8.18.0___@types+react@18.3.11___react@18.3.1___use-sync-external-store@1.2.0____react@18.3.1__react-dom@18.3.1___react@18.3.1__@types+react@18.3.11__use-sync-external-store@1.2.0___react@18.3.1__encoding@0.1.13_@vanilla-extract+css@1.15.5_@types+react@18.3.11_typescript@5.6.3_encoding@0.1.13", "npm:@sentry/nextjs@^8.36.0": "8.36.0_next@14.0.4__react@18.3.1__react-dom@18.3.1___react@18.3.1_@opentelemetry+api@1.9.0_rollup@3.29.5_@opentelemetry+semantic-conventions@1.27.0_react@18.3.1_react-dom@18.3.1__react@18.3.1_encoding@0.1.13", "npm:@sentry/utils@^8.36.0": "8.36.0", "npm:@tanstack/react-query@^5.18.1": "5.59.15_react@18.3.1", @@ -50,7 +51,6 @@ "npm:level@^8.0.1": "8.0.1", "npm:long@*": "5.2.3", "npm:long@^5.2.3": "5.2.3", - "npm:memfs@^4.7.7": "4.14.0_tslib@2.8.0", "npm:memory-level@1": "1.0.0", "npm:next-router-mock@*": "0.9.13_next@14.0.4__react@18.3.1__react-dom@18.3.1___react@18.3.1_react@18.3.1_react-dom@18.3.1__react@18.3.1", "npm:next-router-mock@~0.9.13": "0.9.13_next@14.0.4__react@18.3.1__react-dom@18.3.1___react@18.3.1_react@18.3.1_react-dom@18.3.1__react@18.3.1", @@ -68,9 +68,8 @@ "npm:tailwindcss@^3.3.6": "3.4.14_postcss@8.4.47", "npm:ts-node@^10.9.2": "10.9.2_@types+node@22.5.4_typescript@5.6.3", "npm:typescript@^5.6.3": "5.6.3", - "npm:viem@^2.16.3": "2.21.32_ws@8.18.0", - "npm:vitest@^1.6.0": "1.6.0_@types+node@20.16.14_happy-dom@14.12.3_jsdom@24.1.3", - "npm:wagmi@^2.10.6": "2.12.23_@tanstack+react-query@5.59.15__react@18.3.1_react@18.3.1_viem@2.21.32__ws@8.18.0_@wagmi+core@2.14.1__viem@2.21.32___ws@8.18.0__@types+react@18.3.11__react@18.3.1__use-sync-external-store@1.2.0___react@18.3.1_react-dom@18.3.1__react@18.3.1_@types+react@18.3.11_use-sync-external-store@1.2.0__react@18.3.1", + "npm:viem@2.21.44": "2.21.44_typescript@5.6.3_ws@8.18.0", + "npm:wagmi@^2.12.31": "2.12.31_@tanstack+react-query@5.59.15__react@18.3.1_react@18.3.1_typescript@5.6.3_viem@2.21.44__typescript@5.6.3__ws@8.18.0_@wagmi+core@2.14.5__typescript@5.6.3__viem@2.21.44___typescript@5.6.3___ws@8.18.0__@types+react@18.3.11__react@18.3.1__use-sync-external-store@1.2.0___react@18.3.1_react-dom@18.3.1__react@18.3.1_@types+react@18.3.11_use-sync-external-store@1.2.0__react@18.3.1_encoding@0.1.13", "npm:web-streams-polyfill@4": "4.0.0" }, "jsr": { @@ -128,6 +127,9 @@ "@babel/compat-data@7.25.9": { "integrity": "sha512-yD+hEuJ/+wAJ4Ox2/rpNv5HIuPG82x3ZlQvYVn8iYCprdxzE7P1udpGF1jyjQVBU4dgznN+k2h103vxZ7NdPyw==" }, + "@babel/compat-data@7.26.2": { + "integrity": "sha512-Z0WgzSEa+aUcdiJuCIqgujCshpMWgUpgOxXotrYPSA53hA3qopNaqcJpyr0hVb1FeWdnqFA35/fUtXgBK8srQg==" + }, "@babel/core@7.25.9": { "integrity": "sha512-WYvQviPw+Qyib0v92AwNIrdLISTp7RfDkM7bPqBvpbnhY4wq8HvHBZREVdYDXk98C8BkOIVnHAY3yvj7AVISxQ==", "dependencies": [ @@ -173,7 +175,7 @@ "@babel/helper-compilation-targets@7.25.9": { "integrity": "sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ==", "dependencies": [ - "@babel/compat-data", + "@babel/compat-data@7.25.9", "@babel/helper-validator-option", "browserslist", "lru-cache@5.1.1", @@ -202,8 +204,8 @@ "semver@6.3.1" ] }, - "@babel/helper-define-polyfill-provider@0.6.2_@babel+core@7.25.9": { - "integrity": "sha512-LV76g+C502biUK6AyZ3LK10vDpDyCzZnhZFXkH1L75zHPj68+qc8Zfpx2th+gzwA2MzyK+1g/3EPl62yFnVttQ==", + "@babel/helper-define-polyfill-provider@0.6.3_@babel+core@7.25.9": { + "integrity": "sha512-HK7Bi+Hj6H+VTHA3ZvBis7V/6hu9QuTrnMXNybfUf2iiuU/N97I8VjB+KbhFF8Rld/Lx5MzoCwPCpPjfK+n8Cg==", "dependencies": [ "@babel/core", "@babel/helper-compilation-targets", @@ -307,7 +309,7 @@ "dependencies": [ "@babel/helper-validator-identifier", "chalk@2.4.2", - "js-tokens@4.0.0", + "js-tokens", "picocolors" ] }, @@ -436,15 +438,15 @@ "@babel/helper-plugin-utils" ] }, - "@babel/plugin-syntax-flow@7.25.9_@babel+core@7.25.9": { - "integrity": "sha512-F3FVgxwamIRS3+kfjNaPARX0DSAiH1exrQUVajXiR34hkdA9eyK+8rJbnu55DQjKL/ayuXqjNr2HDXwBEMEtFQ==", + "@babel/plugin-syntax-flow@7.26.0_@babel+core@7.25.9": { + "integrity": "sha512-B+O2DnPc0iG+YXFqOxv2WNuNU97ToWjOomUQ78DouOENWUaM5sVrmet9mcomUGQFwpJd//gvUagXBSdzO1fRKg==", "dependencies": [ "@babel/core", "@babel/helper-plugin-utils" ] }, - "@babel/plugin-syntax-import-assertions@7.25.9_@babel+core@7.25.9": { - "integrity": "sha512-4GHX5uzr5QMOOuzV0an9MFju4hKlm0OyePl/lHhcsTVae5t/IKVHnb8W67Vr6FuLlk5lPqLB7n7O+K5R46emYg==", + "@babel/plugin-syntax-import-assertions@7.26.0_@babel+core@7.25.9": { + "integrity": "sha512-QCWT5Hh830hK5EQa7XzuqIkQU9tT/whqbDz7kuaZMHFl1inRRg7JnuAEOQ0Ur0QUl0NufCk1msK2BeY79Aj/eg==", "dependencies": [ "@babel/core", "@babel/helper-plugin-utils" @@ -457,6 +459,13 @@ "@babel/helper-plugin-utils" ] }, + "@babel/plugin-syntax-import-attributes@7.26.0_@babel+core@7.25.9": { + "integrity": "sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A==", + "dependencies": [ + "@babel/core", + "@babel/helper-plugin-utils" + ] + }, "@babel/plugin-syntax-import-meta@7.10.4_@babel+core@7.25.9": { "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", "dependencies": [ @@ -596,8 +605,8 @@ "@babel/helper-plugin-utils" ] }, - "@babel/plugin-transform-class-static-block@7.25.9_@babel+core@7.25.9": { - "integrity": "sha512-UIf+72C7YJ+PJ685/PpATbCz00XqiFEzHX5iysRwfvNT0Ko+FaXSvRgLytFSp8xUItrG9pFM/KoBBZDrY/cYyg==", + "@babel/plugin-transform-class-static-block@7.26.0_@babel+core@7.25.9": { + "integrity": "sha512-6J2APTs7BDDm+UMqP1useWqhcRAXo0WIoVj26N7kPFB6S73Lgvyka4KTZYIxtgYXiN5HTyRObA72N2iu628iTQ==", "dependencies": [ "@babel/core", "@babel/helper-create-class-features-plugin", @@ -896,6 +905,14 @@ "regenerator-transform" ] }, + "@babel/plugin-transform-regexp-modifiers@7.26.0_@babel+core@7.25.9": { + "integrity": "sha512-vN6saax7lrA2yA/Pak3sCxuD6F5InBjn9IcrIKQPjpsLvuHYLVroTxjdlVRHjjBWxKOqIwpTXDkOssYT4BFdRw==", + "dependencies": [ + "@babel/core", + "@babel/helper-create-regexp-features-plugin", + "@babel/helper-plugin-utils" + ] + }, "@babel/plugin-transform-reserved-words@7.25.9_@babel+core@7.25.9": { "integrity": "sha512-7DL7DKYjn5Su++4RXu8puKZm2XBPHyjWLUidaPEkCUBbE7IPcsrkRHggAOOKydH1dASWdcUBxrkOGNxUv5P3Jg==", "dependencies": [ @@ -993,16 +1010,16 @@ "@babel/helper-plugin-utils" ] }, - "@babel/preset-env@7.25.9": { - "integrity": "sha512-XqDEt+hfsQukahSX9JOBDHhpUHDhj2zGSxoqWQFCMajOSBnbhBdgON/bU/5PkBA1yX5tqW6tTzuIPVsZTQ7h5Q==", + "@babel/preset-env@7.26.0": { + "integrity": "sha512-H84Fxq0CQJNdPFT2DrfnylZ3cf5K43rGfWK4LJGPpjKHiZlk0/RzwEus3PDDZZg+/Er7lCA03MVacueUuXdzfw==", "dependencies": [ - "@babel/compat-data" + "@babel/compat-data@7.26.2" ] }, - "@babel/preset-env@7.25.9_@babel+core@7.25.9": { - "integrity": "sha512-XqDEt+hfsQukahSX9JOBDHhpUHDhj2zGSxoqWQFCMajOSBnbhBdgON/bU/5PkBA1yX5tqW6tTzuIPVsZTQ7h5Q==", + "@babel/preset-env@7.26.0_@babel+core@7.25.9": { + "integrity": "sha512-H84Fxq0CQJNdPFT2DrfnylZ3cf5K43rGfWK4LJGPpjKHiZlk0/RzwEus3PDDZZg+/Er7lCA03MVacueUuXdzfw==", "dependencies": [ - "@babel/compat-data", + "@babel/compat-data@7.26.2", "@babel/core", "@babel/helper-compilation-targets", "@babel/helper-plugin-utils", @@ -1014,7 +1031,7 @@ "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly", "@babel/plugin-proposal-private-property-in-object", "@babel/plugin-syntax-import-assertions", - "@babel/plugin-syntax-import-attributes", + "@babel/plugin-syntax-import-attributes@7.26.0_@babel+core@7.25.9", "@babel/plugin-syntax-unicode-sets-regex", "@babel/plugin-transform-arrow-functions", "@babel/plugin-transform-async-generator-functions", @@ -1055,6 +1072,7 @@ "@babel/plugin-transform-private-property-in-object", "@babel/plugin-transform-property-literals", "@babel/plugin-transform-regenerator", + "@babel/plugin-transform-regexp-modifiers", "@babel/plugin-transform-reserved-words", "@babel/plugin-transform-shorthand-properties", "@babel/plugin-transform-spread", @@ -1091,8 +1109,8 @@ "esutils" ] }, - "@babel/preset-typescript@7.25.9_@babel+core@7.25.9": { - "integrity": "sha512-XWxw1AcKk36kgxf4C//fl0ikjLeqGUWn062/Fd8GtpTfDJOX6Ud95FK+4JlDA36BX4bNGndXi3a6Vr4Jo5/61A==", + "@babel/preset-typescript@7.26.0_@babel+core@7.25.9": { + "integrity": "sha512-NMk1IGZ5I/oHhoXEElcm+xUnL/szL6xflkFZmoEU9xj1qSJXpiS7rsspYo92B4DRCDvZn2erT5LdsCeXAKNCkg==", "dependencies": [ "@babel/core", "@babel/helper-plugin-utils", @@ -1153,7 +1171,7 @@ "integrity": "sha512-N/A2DRIf0Y3PHc1XAMvbBUu4zisna6qAdqABMZwBMNEfWrXpAwx16pZGkYCLGE+Rvv1edbcB2LYDRnACNcmCiw==", "dependencies": [ "bn.js@5.2.1", - "buffer@6.0.3", + "buffer", "clsx@1.2.1", "eth-block-tracker", "eth-json-rpc-filters", @@ -1163,8 +1181,8 @@ "sha.js" ] }, - "@coinbase/wallet-sdk@4.1.0": { - "integrity": "sha512-SkJJ72X/AA3+aS21sPs/4o4t6RVeDSA7HuBW4zauySX3eBiPU0zmVw95tXH/eNSX50agKz9WzeN8P5F+HcwLOw==", + "@coinbase/wallet-sdk@4.2.3": { + "integrity": "sha512-BcyHZ/Ec84z0emORzqdXDv4P0oV+tV3a0OirfA8Ko1JGBIAVvB+hzLvZzCDvnuZx7MTK+Dd8Y9Tjlo446BpCIg==", "dependencies": [ "@noble/hashes@1.5.0", "clsx@1.2.1", @@ -1178,8 +1196,8 @@ "@jridgewell/trace-mapping@0.3.9" ] }, - "@ecies/ciphers@0.2.0_@noble+ciphers@1.0.0": { - "integrity": "sha512-dqQk3HbyuXSdflgRMrXjEcCohKeBZQl2rm0lOcYnEC4Oue90irVMwVJ0GiM/nhjP0zzGimH8mVFF/pOzQcv+Lg==", + "@ecies/ciphers@0.2.1_@noble+ciphers@1.0.0": { + "integrity": "sha512-ezMihhjW24VNK/2qQR7lH8xCQY24nk0XHF/kwJ1OuiiY5iEwQXOcKVSy47fSoHPRG8gVGXcK5SgtONDk5xMwtQ==", "dependencies": [ "@noble/ciphers" ] @@ -1568,15 +1586,6 @@ "tslib@2.8.0" ] }, - "@hapi/hoek@9.3.0": { - "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==" - }, - "@hapi/topo@5.1.0": { - "integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==", - "dependencies": [ - "@hapi/hoek" - ] - }, "@humanwhocodes/config-array@0.13.0": { "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", "dependencies": [ @@ -1646,7 +1655,7 @@ "@jest/console@29.7.0": { "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", "dependencies": [ - "@jest/types@29.6.3", + "@jest/types", "@types/node@22.5.4", "chalk@4.1.2", "jest-message-util", @@ -1661,7 +1670,7 @@ "@jest/reporters", "@jest/test-result", "@jest/transform", - "@jest/types@29.6.3", + "@jest/types", "@types/node@22.5.4", "ansi-escapes", "chalk@4.1.2", @@ -1690,14 +1699,14 @@ "@jest/create-cache-key-function@29.7.0": { "integrity": "sha512-4QqS3LY5PBmTRHj9sAg1HLoPzqAI0uOX6wI/TRqHIcOxlFidy6YEmCQJk6FSZjNLGCeubDMfmkWL+qaLKhSGQA==", "dependencies": [ - "@jest/types@29.6.3" + "@jest/types" ] }, "@jest/environment@29.7.0": { "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", "dependencies": [ "@jest/fake-timers", - "@jest/types@29.6.3", + "@jest/types", "@types/node@22.5.4", "jest-mock" ] @@ -1718,7 +1727,7 @@ "@jest/fake-timers@29.7.0": { "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", "dependencies": [ - "@jest/types@29.6.3", + "@jest/types", "@sinonjs/fake-timers", "@types/node@22.5.4", "jest-message-util", @@ -1731,7 +1740,7 @@ "dependencies": [ "@jest/environment", "@jest/expect", - "@jest/types@29.6.3", + "@jest/types", "jest-mock" ] }, @@ -1742,7 +1751,7 @@ "@jest/console", "@jest/test-result", "@jest/transform", - "@jest/types@29.6.3", + "@jest/types", "@jridgewell/trace-mapping@0.3.25", "@types/node@22.5.4", "chalk@4.1.2", @@ -1782,7 +1791,7 @@ "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", "dependencies": [ "@jest/console", - "@jest/types@29.6.3", + "@jest/types", "@types/istanbul-lib-coverage", "collect-v8-coverage" ] @@ -1800,7 +1809,7 @@ "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", "dependencies": [ "@babel/core", - "@jest/types@29.6.3", + "@jest/types", "@jridgewell/trace-mapping@0.3.25", "babel-plugin-istanbul", "chalk@4.1.2", @@ -1816,16 +1825,6 @@ "write-file-atomic@4.0.2" ] }, - "@jest/types@26.6.2": { - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", - "dependencies": [ - "@types/istanbul-lib-coverage", - "@types/istanbul-reports", - "@types/node@22.5.4", - "@types/yargs@15.0.19", - "chalk@4.1.2" - ] - }, "@jest/types@29.6.3": { "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", "dependencies": [ @@ -1833,7 +1832,7 @@ "@types/istanbul-lib-coverage", "@types/istanbul-reports", "@types/node@22.5.4", - "@types/yargs@17.0.33", + "@types/yargs", "chalk@4.1.2" ] }, @@ -1881,28 +1880,6 @@ "lodash" ] }, - "@jsonjoy.com/base64@1.1.2_tslib@2.8.0": { - "integrity": "sha512-q6XAnWQDIMA3+FTiOYajoYqySkO+JSat0ytXGSuRdq9uXE7o92gzuQwQM14xaCRlBLGq3v5miDGC4vkVTn54xA==", - "dependencies": [ - "tslib@2.8.0" - ] - }, - "@jsonjoy.com/json-pack@1.1.0_tslib@2.8.0": { - "integrity": "sha512-zlQONA+msXPPwHWZMKFVS78ewFczIll5lXiVPwFPCZUsrOKdxc2AvxU1HoNBmMRhqDZUR9HkC3UOm+6pME6Xsg==", - "dependencies": [ - "@jsonjoy.com/base64", - "@jsonjoy.com/util", - "hyperdyperid", - "thingies", - "tslib@2.8.0" - ] - }, - "@jsonjoy.com/util@1.5.0_tslib@2.8.0": { - "integrity": "sha512-ojoNsrIuPI9g6o8UxhraZQSyF2ByJanAY4cTFbc8Mf2AXEF4aQRGY1dJxyJpuyav8r9FGflEt/Ff3u5Nt6YMPA==", - "dependencies": [ - "tslib@2.8.0" - ] - }, "@lit-labs/ssr-dom-shim@1.2.1": { "integrity": "sha512-wx4aBmgeGvFmOKucFKY+8VFJSYZxs9poN3SDNQFF6lT6NrQUnHiPB2PWz2sc4ieEcAaYYzN+1uWahEeTq2aRIQ==" }, @@ -1988,17 +1965,17 @@ "@metamask/safe-event-emitter@3.1.2": { "integrity": "sha512-5yb2gMI1BDm0JybZezeoX/3XhPDOtTbcFvpTXM9kxsoZjPZFh4XciqRbpD6N86HYZqWDhEaKUDuOyR0sQHEjMA==" }, - "@metamask/sdk-communication-layer@0.30.0_cross-fetch@4.0.0_eciesjs@0.3.20_eventemitter2@6.4.9_readable-stream@3.6.2_socket.io-client@4.8.0_bufferutil@4.0.8_utf-8-validate@5.0.10": { + "@metamask/sdk-communication-layer@0.30.0_cross-fetch@4.0.0__encoding@0.1.13_eciesjs@0.3.21_eventemitter2@6.4.9_readable-stream@3.6.2_socket.io-client@4.8.1_encoding@0.1.13_bufferutil@4.0.8_utf-8-validate@5.0.10": { "integrity": "sha512-q5nbdYkAf76MsZxi1l5MJEAyd8sY9jLRapC8a7x1Q1BNV4rzQeFeux/d0mJ/jTR2LAwbnLZs2rL226AM75oK4w==", "dependencies": [ "bufferutil", - "cross-fetch@4.0.0", + "cross-fetch@4.0.0_encoding@0.1.13", "date-fns", "debug@4.3.7", - "eciesjs@0.3.20", + "eciesjs@0.3.21", "eventemitter2", "readable-stream@3.6.2", - "socket.io-client@4.8.0_bufferutil@4.0.8_utf-8-validate@5.0.10", + "socket.io-client@4.8.1_bufferutil@4.0.8_utf-8-validate@5.0.10", "utf-8-validate", "uuid@8.3.2" ] @@ -2012,7 +1989,7 @@ "react-dom" ] }, - "@metamask/sdk@0.30.1_react@18.3.1_react-dom@18.3.1__react@18.3.1_cross-fetch@4.0.0_eventemitter2@6.4.9_readable-stream@3.6.2_socket.io-client@4.8.0_i18next@23.11.5_@types+react@18.3.11": { + "@metamask/sdk@0.30.1_react@18.3.1_react-dom@18.3.1__react@18.3.1_cross-fetch@4.0.0__encoding@0.1.13_eventemitter2@6.4.9_readable-stream@3.6.2_socket.io-client@4.8.1_i18next@23.11.5_encoding@0.1.13_@types+react@18.3.11": { "integrity": "sha512-NelEjJZsF5wVpSQELpmvXtnS9+C6HdxGQ4GB9jMRzeejphmPyKqmrIGM6XtaPrJtlpX+40AcJ2dtBQcjJVzpbQ==", "dependencies": [ "@metamask/onboarding", @@ -2020,9 +1997,9 @@ "@metamask/sdk-communication-layer", "@metamask/sdk-install-modal-web", "bowser", - "cross-fetch@4.0.0", + "cross-fetch@4.0.0_encoding@0.1.13", "debug@4.3.7", - "eciesjs@0.4.9_@noble+ciphers@1.0.0", + "eciesjs@0.4.11_@noble+ciphers@1.0.0", "eth-rpc-errors", "eventemitter2", "i18next", @@ -2034,7 +2011,7 @@ "react-dom", "react-native-webview", "readable-stream@3.6.2", - "socket.io-client@4.8.0", + "socket.io-client@4.8.1", "util", "uuid@8.3.2" ] @@ -2885,7 +2862,7 @@ "@protobufjs/utf8@1.1.0": { "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" }, - "@rainbow-me/rainbowkit@2.2.0_@tanstack+react-query@5.59.15__react@18.3.1_react@18.3.1_react-dom@18.3.1__react@18.3.1_viem@2.21.32__ws@8.18.0_wagmi@2.12.23__@tanstack+react-query@5.59.15___react@18.3.1__react@18.3.1__viem@2.21.32___ws@8.18.0__@wagmi+core@2.14.1___viem@2.21.32____ws@8.18.0___@types+react@18.3.11___react@18.3.1___use-sync-external-store@1.2.0____react@18.3.1__react-dom@18.3.1___react@18.3.1__@types+react@18.3.11__use-sync-external-store@1.2.0___react@18.3.1_@vanilla-extract+css@1.15.5_@types+react@18.3.11": { + "@rainbow-me/rainbowkit@2.2.0_@tanstack+react-query@5.59.15__react@18.3.1_react@18.3.1_react-dom@18.3.1__react@18.3.1_viem@2.21.44__typescript@5.6.3__ws@8.18.0_wagmi@2.12.31__@tanstack+react-query@5.59.15___react@18.3.1__react@18.3.1__typescript@5.6.3__viem@2.21.44___typescript@5.6.3___ws@8.18.0__@wagmi+core@2.14.5___typescript@5.6.3___viem@2.21.44____typescript@5.6.3____ws@8.18.0___@types+react@18.3.11___react@18.3.1___use-sync-external-store@1.2.0____react@18.3.1__react-dom@18.3.1___react@18.3.1__@types+react@18.3.11__use-sync-external-store@1.2.0___react@18.3.1__encoding@0.1.13_@vanilla-extract+css@1.15.5_@types+react@18.3.11_typescript@5.6.3_encoding@0.1.13": { "integrity": "sha512-N0wQ39UN6Soi6/ujk9lVy5KY2oY6me/dqMPe5BYWlZIKbpBc2De3cl9phSLPw+/rncL3Cp1r6kRZuMe0b+mP9Q==", "dependencies": [ "@tanstack/react-query", @@ -2898,7 +2875,7 @@ "react-dom", "react-remove-scroll", "ua-parser-js", - "viem@2.21.32_ws@8.18.0", + "viem@2.21.44_typescript@5.6.3_ws@8.18.0", "wagmi" ] }, @@ -3110,154 +3087,22 @@ "react" ] }, - "@react-native-community/cli-clean@14.1.0": { - "integrity": "sha512-/C4j1yntLo6faztNgZnsDtgpGqa6j0+GYrxOY8LqaKAN03OCnoeUUKO6w78dycbYSGglc1xjJg2RZI/M2oF2AA==", - "dependencies": [ - "@react-native-community/cli-tools", - "chalk@4.1.2", - "execa@5.1.1", - "fast-glob" - ] - }, - "@react-native-community/cli-config@14.1.0": { - "integrity": "sha512-P3FK2rPUJBD1fmQHLgTqpHxsc111pnMdEEFR7KeqprCNz+Qr2QpPxfNy0V7s15tGL5rAv+wpbOGcioIV50EbxA==", - "dependencies": [ - "@react-native-community/cli-tools", - "chalk@4.1.2", - "cosmiconfig@9.0.0", - "deepmerge", - "fast-glob", - "joi" - ] - }, - "@react-native-community/cli-debugger-ui@14.1.0": { - "integrity": "sha512-+YbeCL0wLcBcqDwraJFGsqzcXu9S+bwTVrfImne/4mT6itfe3Oa93yrOVJgNbstrt5pJHuwpU76ZXfXoiuncsg==", - "dependencies": [ - "serve-static" - ] - }, - "@react-native-community/cli-doctor@14.1.0": { - "integrity": "sha512-xIf0oQDRKt7lufUenRwcLYdINGc0x1FSXHaHjd7lQDGT5FJnCEYlIkYEDDgAl5tnVJSvM/IL2c6O+mffkNEPzQ==", - "dependencies": [ - "@react-native-community/cli-config", - "@react-native-community/cli-platform-android", - "@react-native-community/cli-platform-apple", - "@react-native-community/cli-platform-ios", - "@react-native-community/cli-tools", - "chalk@4.1.2", - "command-exists", - "deepmerge", - "envinfo", - "execa@5.1.1", - "node-stream-zip", - "ora@5.4.1", - "semver@7.6.3", - "strip-ansi@5.2.0", - "wcwidth", - "yaml" - ] - }, - "@react-native-community/cli-platform-android@14.1.0": { - "integrity": "sha512-4JnXkAV+ca8XdUhZ7xjgDhXAMwTVjQs8JqiwP7FTYVrayShXy2cBXm/C3HNDoe+oQOF5tPT2SqsDAF2vYTnKiQ==", - "dependencies": [ - "@react-native-community/cli-tools", - "chalk@4.1.2", - "execa@5.1.1", - "fast-glob", - "fast-xml-parser", - "logkitty" - ] - }, - "@react-native-community/cli-platform-apple@14.1.0": { - "integrity": "sha512-DExd+pZ7hHxXt8I6BBmckeYUxxq7PQ+o4YSmGIeQx0xUpi+f82obBct2WNC3VWU72Jw6obwfoN6Fwe6F7Wxp5Q==", - "dependencies": [ - "@react-native-community/cli-tools", - "chalk@4.1.2", - "execa@5.1.1", - "fast-glob", - "fast-xml-parser", - "ora@5.4.1" - ] - }, - "@react-native-community/cli-platform-ios@14.1.0": { - "integrity": "sha512-ah/ZTiJXUdCVHujyRJ4OmCL5nTq8OWcURcE3UXa1z0sIIiA8io06n+v5n299T9rtPKMwRtVJlQjtO/nbODABPQ==", - "dependencies": [ - "@react-native-community/cli-platform-apple" - ] - }, - "@react-native-community/cli-server-api@14.1.0": { - "integrity": "sha512-1k2LBQaYsy9RDWFIfKVne3frOye73O33MV6eYMoRPff7wqxHCrsX1CYJQkmwpgVigZHxYwalHj+Axtu3gpomCA==", - "dependencies": [ - "@react-native-community/cli-debugger-ui", - "@react-native-community/cli-tools", - "compression", - "connect", - "errorhandler", - "nocache", - "pretty-format@26.6.2", - "serve-static", - "ws@6.2.3" - ] - }, - "@react-native-community/cli-tools@14.1.0": { - "integrity": "sha512-r1KxSu2+OSuhWFoE//1UR7aSTXMLww/UYWQprEw4bSo/kvutGX//4r9ywgXSWp+39udpNN4jQpNTHuWhGZd/Bg==", - "dependencies": [ - "appdirsjs", - "chalk@4.1.2", - "execa@5.1.1", - "find-up@5.0.0", - "mime@2.6.0", - "open@6.4.0", - "ora@5.4.1", - "semver@7.6.3", - "shell-quote", - "sudo-prompt" - ] - }, - "@react-native-community/cli-types@14.1.0": { - "integrity": "sha512-aJwZI9mGRx3HdP8U4CGhqjt3S4r8GmeOqv4kRagC1UHDk4QNMC+bZ8JgPA4W7FrGiPey+lJQHMDPAXOo51SOUw==", - "dependencies": [ - "joi" - ] - }, - "@react-native-community/cli@14.1.0": { - "integrity": "sha512-k7aTdKNZIec7WMSqMJn9bDVLWPPOaYmshXcnjWy6t5ItsJnREju9p2azMTR5tXY5uIeynose3cxettbhk2Tbnw==", - "dependencies": [ - "@react-native-community/cli-clean", - "@react-native-community/cli-config", - "@react-native-community/cli-debugger-ui", - "@react-native-community/cli-doctor", - "@react-native-community/cli-server-api", - "@react-native-community/cli-tools", - "@react-native-community/cli-types", - "chalk@4.1.2", - "commander@9.5.0", - "deepmerge", - "execa@5.1.1", - "find-up@5.0.0", - "fs-extra@8.1.0", - "graceful-fs", - "prompts", - "semver@7.6.3" - ] - }, - "@react-native/assets-registry@0.75.4": { - "integrity": "sha512-WX6/LNHwyjislSFM+h3qQjBiPaXXPJW5ZV4TdgNKb6QOPO0g1KGYRQj44cI2xSpZ3fcWrvQFZfQgSMbVK9Sg7A==" + "@react-native/assets-registry@0.76.1": { + "integrity": "sha512-1mcDjyvC4Z+XYtY+Abl6pW9P49l/9HJmRChX7EHF1SoXe7zPAPBoAqeZsJNtf8dhJR3u/eGvapr1yJq8T/psEg==" }, - "@react-native/babel-plugin-codegen@0.75.4_@babel+core@7.25.9": { - "integrity": "sha512-gu5ZRIdr7+ufi09DJROhfDtbF4biTnCDJqtqcmtsku4cXOXPHE36QbC/vAmKEZ0PMPURBI8lwF2wfaeHLn7gig==", + "@react-native/babel-plugin-codegen@0.76.1_@babel+core@7.25.9": { + "integrity": "sha512-V9bGLyEdAF39nvn4L5gaJcPX1SvCHPJhaT3qfpVGvCnl7WPhdRyCq++WsN8HXlpo6WOAf6//oruLnLdl3RNM4Q==", "dependencies": [ - "@react-native/codegen@0.75.4_@babel+preset-env@7.25.9_@babel+core@7.25.9_@babel+preset-env@7.25.9__@babel+core@7.25.9" + "@react-native/codegen@0.76.1_@babel+preset-env@7.26.0_@babel+core@7.25.9_@babel+preset-env@7.26.0__@babel+core@7.25.9" ] }, - "@react-native/babel-preset@0.75.4_@babel+core@7.25.9": { - "integrity": "sha512-UtyYCDJ3rZIeggyFEfh/q5t/FZ5a1h9F8EI37Nbrwyk/OKPH+1XS4PbHROHJzBARlJwOAfmT75+ovYUO0eakJA==", + "@react-native/babel-preset@0.76.1_@babel+core@7.25.9": { + "integrity": "sha512-b6YRmA13CmVuTQKHRen/Q0glHwmZFZoEDs+MJ1NL0UNHq9V5ytvdwTW1ntkmjtXuTnPMzkwYvumJBN9UTZjkBA==", "dependencies": [ "@babel/core", "@babel/plugin-proposal-export-default-from", "@babel/plugin-syntax-dynamic-import", "@babel/plugin-syntax-export-default-from", - "@babel/plugin-syntax-flow", "@babel/plugin-syntax-nullish-coalescing-operator", "@babel/plugin-syntax-optional-chaining", "@babel/plugin-transform-arrow-functions", @@ -3296,59 +3141,59 @@ "@babel/plugin-transform-unicode-regex", "@babel/template", "@react-native/babel-plugin-codegen", + "babel-plugin-syntax-hermes-parser", "babel-plugin-transform-flow-enums", "react-refresh" ] }, - "@react-native/codegen@0.75.4_@babel+preset-env@7.25.9": { - "integrity": "sha512-0FplNAD/S5FUvm8YIn6uyarOcP4jdJPqWz17K4a/Gp2KSsG/JJKEskX3aj5wpePzVfNQl3WyvBJ0whODdCocIA==", + "@react-native/codegen@0.76.1_@babel+preset-env@7.26.0": { + "integrity": "sha512-7lE0hk2qq27wVeK5eF654v7XsKoRa7ficrfSwIDEDZ1aLB2xgUzLrsq+glSAP9EuzT6ycHhtD3QyqI+TqnlS/A==", "dependencies": [ "@babel/parser", - "@babel/preset-env@7.25.9", + "@babel/preset-env@7.26.0", "glob@7.2.3", - "hermes-parser@0.22.0", + "hermes-parser@0.23.1", "invariant", - "jscodeshift@0.14.0_@babel+preset-env@7.25.9_@babel+core@7.25.9", + "jscodeshift@0.14.0_@babel+preset-env@7.26.0_@babel+core@7.25.9", "mkdirp@0.5.6", "nullthrows", "yargs@17.7.2" ] }, - "@react-native/codegen@0.75.4_@babel+preset-env@7.25.9_@babel+core@7.25.9_@babel+preset-env@7.25.9__@babel+core@7.25.9": { - "integrity": "sha512-0FplNAD/S5FUvm8YIn6uyarOcP4jdJPqWz17K4a/Gp2KSsG/JJKEskX3aj5wpePzVfNQl3WyvBJ0whODdCocIA==", + "@react-native/codegen@0.76.1_@babel+preset-env@7.26.0_@babel+core@7.25.9_@babel+preset-env@7.26.0__@babel+core@7.25.9": { + "integrity": "sha512-7lE0hk2qq27wVeK5eF654v7XsKoRa7ficrfSwIDEDZ1aLB2xgUzLrsq+glSAP9EuzT6ycHhtD3QyqI+TqnlS/A==", "dependencies": [ "@babel/parser", - "@babel/preset-env@7.25.9_@babel+core@7.25.9", + "@babel/preset-env@7.26.0_@babel+core@7.25.9", "glob@7.2.3", - "hermes-parser@0.22.0", + "hermes-parser@0.23.1", "invariant", - "jscodeshift@0.14.0_@babel+preset-env@7.25.9_@babel+core@7.25.9_@babel+preset-env@7.25.9__@babel+core@7.25.9", + "jscodeshift@0.14.0_@babel+preset-env@7.26.0_@babel+core@7.25.9_@babel+preset-env@7.26.0__@babel+core@7.25.9", "mkdirp@0.5.6", "nullthrows", "yargs@17.7.2" ] }, - "@react-native/community-cli-plugin@0.75.4": { - "integrity": "sha512-k/hevYPjEpW0MNVVyb3v9PJosOP+FzenS7+oqYNLXdEmgTnGHrAtYX9ABrJJgzeJt7I6g8g+RDvm8PSE+tnM5w==", + "@react-native/community-cli-plugin@0.76.1_encoding@0.1.13": { + "integrity": "sha512-dECc1LuleMQDX/WK2oJInrYCpHb3OFBJxYkhPOAXb9HiktMWRA9T93qqpTDshmtLdYqvxeO9AM5eeoSL412WnQ==", "dependencies": [ - "@react-native-community/cli-server-api", - "@react-native-community/cli-tools", "@react-native/dev-middleware", "@react-native/metro-babel-transformer", "chalk@4.1.2", "execa@5.1.1", + "invariant", "metro", "metro-config", "metro-core", - "node-fetch@2.7.0", + "node-fetch", "readline" ] }, - "@react-native/debugger-frontend@0.75.4": { - "integrity": "sha512-QfGurR5hV6bhMPn/6VxS2RomYrPRFGwA03jJr+zKyWHnxDAu5jOqYVyKAktIIbhYe5sPp78QVl1ZYuhcnsRbEw==" + "@react-native/debugger-frontend@0.76.1": { + "integrity": "sha512-0gExx7GR8o2ctGfjIZ9+x54iFbg0eP6+kMYzRA6AcgmFAmMGLADMmjtObCN0CqGeZyWtdVVqcv5mAwRwmMlNWA==" }, - "@react-native/dev-middleware@0.75.4": { - "integrity": "sha512-UhyBeQOG2wNcvrUGw3+IBrHBk/lIu7hHGmWt4j8W9Aqv9BwktHKkPyko+5A1yoUeO1O/VDnHWYqWeOejcA9wpQ==", + "@react-native/dev-middleware@0.76.1": { + "integrity": "sha512-htaFSN2dwI0CinsMxjRuvIVdSDN6d6TDPeOJczM1bdAYalZX1M58knTKs5LJDComW5tleOCAg5lS5tIeFlM9+Q==", "dependencies": [ "@isaacs/ttlcache", "@react-native/debugger-frontend", @@ -3356,34 +3201,33 @@ "chromium-edge-launcher", "connect", "debug@2.6.9", - "node-fetch@2.7.0", "nullthrows", - "open@7.4.2", + "open", "selfsigned", "serve-static", "ws@6.2.3" ] }, - "@react-native/gradle-plugin@0.75.4": { - "integrity": "sha512-kKTmw7cF7p1raT30DC0L6N+xiVXN7dlRy0J+hYPiCRRVHplwgvyS7pszjxfzwXmHFqOxwpxQVI3du8opsma1Mg==" + "@react-native/gradle-plugin@0.76.1": { + "integrity": "sha512-X7rNFltPa9QYxvYrQGaSCw7U57C+y+DwspXf4AnLZj0bQm9tL6UYpijh5vE3VmPcHn76/RNU2bpFjVvWg6gjqw==" }, - "@react-native/js-polyfills@0.75.4": { - "integrity": "sha512-NF5ID5FjcVHBYk1LQ4JMRjPmxBWEo4yoqW1m6vGOQZPT8D5Qs9afgx3f7gQatxbn3ivMh0FVbLW0zBx6LyxEzA==" + "@react-native/js-polyfills@0.76.1": { + "integrity": "sha512-HO3fzJ0FnrnQGmxdXxh2lcGGAMfaX9h1Pg1Zh38MkVw35/KnZHxHqxg6cruze6iWwZdfqSoIcQoalmMuAHby7Q==" }, - "@react-native/metro-babel-transformer@0.75.4_@babel+core@7.25.9": { - "integrity": "sha512-O0WMW/K8Ny/MAAeRebqGEQhrbzcioxcPHZtos+EH2hWeBTEKHQV8fMYYxfYDabpr392qdhSBwg3LlXUD4U3PXQ==", + "@react-native/metro-babel-transformer@0.76.1_@babel+core@7.25.9": { + "integrity": "sha512-LUAKqgsrioXS2a+pE0jak8sutTbLo3T34KWv7mdVUZ5lUACpqkIql1EFtIQlWjIcR4oZE480CkPbRHBI681tkQ==", "dependencies": [ "@babel/core", "@react-native/babel-preset", - "hermes-parser@0.22.0", + "hermes-parser@0.23.1", "nullthrows" ] }, - "@react-native/normalize-colors@0.75.4": { - "integrity": "sha512-90QrQDLg0/k9xqYesaKuIkayOSjD+FKa0hsHollbwT5h3kuGMY+lU7UZxnb8tU55Y1PKdvjYxqQsYWI/ql79zA==" + "@react-native/normalize-colors@0.76.1": { + "integrity": "sha512-/+CUk/wGWIdXbJYVLw/q6Fs8Z0x91zzfXIbNiZUdSW1TNEDmytkF371H8a1/Nx3nWa1RqCMVsaZHCG4zqxeDvg==" }, - "@react-native/virtualized-lists@0.75.4_@types+react@18.3.11_react@18.3.1_react-native@0.75.4__@types+react@18.3.11__react@18.3.1": { - "integrity": "sha512-iEauRiXjvWG/iOH8bV+9MfepCS+72cuL5rhkrenYZS0NUnDcNjF+wtaoS9+Gx5z1UJOfEXxSmyXRtQJZne8SnA==", + "@react-native/virtualized-lists@0.76.1_@types+react@18.3.11_react@18.3.1_react-native@0.76.1__@types+react@18.3.11__react@18.3.1__encoding@0.1.13_encoding@0.1.13": { + "integrity": "sha512-uWJfv0FC3zmlYORr0Sa17ngbAaw6K9yw4MAkBZyFeTM+W6AJRvTVyR1Mes/MU+vIyGFChnTcyaQrQz8jWqADOA==", "dependencies": [ "@types/react", "invariant", @@ -3532,7 +3376,7 @@ "dependencies": [ "@rollup/pluginutils", "commondir", - "estree-walker@2.0.2", + "estree-walker", "glob@10.4.5", "is-reference", "magic-string@0.30.12", @@ -3543,7 +3387,7 @@ "integrity": "sha512-Pnsb6f32CD2W3uCaLZIzDmeFyQ2b8UWMFI7xtwUezpcGBDVDW6y9XgAWIlARiGAo6eNF5FK5aQTr0LFyNyqq5A==", "dependencies": [ "@types/estree", - "estree-walker@2.0.2", + "estree-walker", "picomatch@4.0.2", "rollup@3.29.5" ] @@ -3596,18 +3440,18 @@ "@rollup/rollup-win32-x64-msvc@4.24.0": { "integrity": "sha512-fbMkAF7fufku0N2dE5TBXcNlg0pt0cJue4xBRE2Qc5Vqikxr4VCgKj/ht6SMdFcOacVA9rqF70APJ8RN/4vMJw==" }, - "@safe-global/safe-apps-provider@0.18.3": { - "integrity": "sha512-f/0cNv3S4v7p8rowAjj0hDCg8Q8P/wBjp5twkNWeBdvd0RDr7BuRBPPk74LCqmjQ82P+1ltLlkmVFSmxTIT7XQ==", + "@safe-global/safe-apps-provider@0.18.4_typescript@5.6.3": { + "integrity": "sha512-SWYeG3gyTO6wGHMSokfHakZ9isByn2mHsM0VohIorYFFEyGGmJ89btnTm+DqDUSoQtvWAatZB7XNy6CaYMvqtg==", "dependencies": [ "@safe-global/safe-apps-sdk", "events" ] }, - "@safe-global/safe-apps-sdk@9.1.0": { + "@safe-global/safe-apps-sdk@9.1.0_typescript@5.6.3": { "integrity": "sha512-N5p/ulfnnA2Pi2M3YeWjULeWbjo7ei22JwU/IXnhoHzKq3pYCN6ynL9mJBOlvDVv892EgLPCWCOwQk/uBT2v0Q==", "dependencies": [ "@safe-global/safe-gateway-typescript-sdk", - "viem@2.21.32_ws@8.18.0" + "viem@2.21.44_typescript@5.6.3_ws@8.18.0" ] }, "@safe-global/safe-gateway-typescript-sdk@3.22.2": { @@ -3740,7 +3584,7 @@ "@sentry/cli-win32-i686", "@sentry/cli-win32-x64", "https-proxy-agent@5.0.1", - "node-fetch@2.7.0_encoding@0.1.13", + "node-fetch", "progress", "proxy-from-env", "which" @@ -3867,25 +3711,13 @@ "webpack" ] }, - "@sideway/address@4.1.5": { - "integrity": "sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q==", - "dependencies": [ - "@hapi/hoek" - ] - }, - "@sideway/formula@3.0.1": { - "integrity": "sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==" - }, - "@sideway/pinpoint@2.0.0": { - "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==" - }, "@sinclair/typebox@0.27.8": { "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==" }, "@sinonjs/commons@3.0.1": { "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", "dependencies": [ - "type-detect@4.0.8" + "type-detect" ] }, "@sinonjs/fake-timers@10.3.0": { @@ -4248,12 +4080,6 @@ "csstype" ] }, - "@types/secp256k1@4.0.6": { - "integrity": "sha512-hHxJU6PAEUn0TP4S/ZOzuTUvJWuZ6eIKeNKb5RBpODvSl6hp1Wrw4s7ATY50rklRCScUDpHzVA/DQdSjJ3UoYQ==", - "dependencies": [ - "@types/node@22.5.4" - ] - }, "@types/semver@7.5.8": { "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==" }, @@ -4278,12 +4104,6 @@ "@types/yargs-parser@21.0.3": { "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==" }, - "@types/yargs@15.0.19": { - "integrity": "sha512-2XUaGVmyQjgyAZldf0D0c14vvo/yv0MhQBSTJcejMMaitsn3nxCB6TmH4G0ZQf+uxROOa9mpanoSm8h6SG/1ZA==", - "dependencies": [ - "@types/yargs-parser" - ] - }, "@types/yargs@17.0.33": { "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", "dependencies": [ @@ -4418,49 +4238,10 @@ "vite" ] }, - "@vitest/expect@1.6.0": { - "integrity": "sha512-ixEvFVQjycy/oNgHjqsL6AZCDduC+tflRluaHIzKIsdbzkLn2U/iBnVeJwB6HsIjQBdfMR8Z0tRxKUsvFJEeWQ==", - "dependencies": [ - "@vitest/spy", - "@vitest/utils", - "chai" - ] - }, - "@vitest/runner@1.6.0": { - "integrity": "sha512-P4xgwPjwesuBiHisAVz/LSSZtDjOTPYZVmNAnpHHSR6ONrf8eCJOFRvUwdHn30F5M1fxhqtl7QZQUk2dprIXAg==", - "dependencies": [ - "@vitest/utils", - "p-limit@5.0.0", - "pathe" - ] - }, - "@vitest/snapshot@1.6.0": { - "integrity": "sha512-+Hx43f8Chus+DCmygqqfetcAZrDJwvTj0ymqjQq4CvmpKFSTVteEOBzCusu1x2tt4OJcvBflyHUE0DZSLgEMtQ==", - "dependencies": [ - "magic-string@0.30.12", - "pathe", - "pretty-format@29.7.0" - ] - }, - "@vitest/spy@1.6.0": { - "integrity": "sha512-leUTap6B/cqi/bQkXUu6bQV5TZPx7pmMBKBQiI0rJA8c3pB56ZsaTbREnF7CJfmvAS4V2cXIBAh/3rVwrrCYgw==", - "dependencies": [ - "tinyspy" - ] - }, - "@vitest/utils@1.6.0": { - "integrity": "sha512-21cPiuGMoMZwiOHa2i4LXkMkMkCGzA+MVFV70jRwHo95dL4x/ts5GZhML1QWuy7yfp3WzK3lRvZi3JnXTYqrBw==", - "dependencies": [ - "diff-sequences", - "estree-walker@3.0.3", - "loupe", - "pretty-format@29.7.0" - ] - }, "@wagmi/cli@2.1.16_zod@3.23.8_esbuild@0.19.12_picomatch@3.0.1": { "integrity": "sha512-uERiNCAwThM6Vwgyrimlf+X8tOF0EjDnir6NHqCoumTquJ1/nlKBvpe0CHD3aDx2RQCOWCqhkUIImtN9yk3Oag==", "dependencies": [ - "abitype", + "abitype@1.0.6_zod@3.23.8", "bundle-require", "cac", "change-case", @@ -4472,8 +4253,8 @@ "execa@8.0.1", "fdir", "find-up@6.3.0", - "fs-extra@11.2.0", - "ora@6.3.1", + "fs-extra", + "ora", "pathe", "picocolors", "picomatch@3.0.1", @@ -4482,25 +4263,27 @@ "zod" ] }, - "@wagmi/connectors@5.3.2_@wagmi+core@2.14.1__viem@2.21.32___ws@8.18.0__@types+react@18.3.11__react@18.3.1__use-sync-external-store@1.2.0___react@18.3.1_viem@2.21.32__ws@8.18.0_react@18.3.1_react-dom@18.3.1__react@18.3.1_@types+react@18.3.11_use-sync-external-store@1.2.0__react@18.3.1": { - "integrity": "sha512-EwLYPhifZaRQIxESxBGeP514S6zeTEtdokxf0xv9uOsZG+Kg2i79LKl2O0Hga9JG4wVcm1RhE92i5B1Nt6gwNA==", + "@wagmi/connectors@5.3.9_@wagmi+core@2.14.5__typescript@5.6.3__viem@2.21.44___typescript@5.6.3___ws@8.18.0__@types+react@18.3.11__react@18.3.1__use-sync-external-store@1.2.0___react@18.3.1_typescript@5.6.3_viem@2.21.44__typescript@5.6.3__ws@8.18.0_react@18.3.1_react-dom@18.3.1__react@18.3.1_@types+react@18.3.11_use-sync-external-store@1.2.0__react@18.3.1_encoding@0.1.13": { + "integrity": "sha512-TS1nJRfQbwPpeW28fPWkanuMuUJSoAAS0+zEthStq/PmwIDV4VKvOWycERgbl5pVeNtvdtHAstd7QtfhVADBXQ==", "dependencies": [ - "@coinbase/wallet-sdk@4.1.0", + "@coinbase/wallet-sdk@4.2.3", "@metamask/sdk", "@safe-global/safe-apps-provider", "@safe-global/safe-apps-sdk", "@wagmi/core", "@walletconnect/ethereum-provider", "cbw-sdk@npm:@coinbase/wallet-sdk@3.9.3", - "viem@2.21.32_ws@8.18.0" + "typescript", + "viem@2.21.44_typescript@5.6.3_ws@8.18.0" ] }, - "@wagmi/core@2.14.1_viem@2.21.32__ws@8.18.0_@types+react@18.3.11_react@18.3.1_use-sync-external-store@1.2.0__react@18.3.1": { - "integrity": "sha512-Vl7VK5XdKxPfnYlp3E7U7AJSweBdfh+cd953hgAU2H+uNrekS9Nmt89l1b6WkwkYyqvccRDjsCtlcKRwvPtNAQ==", + "@wagmi/core@2.14.5_typescript@5.6.3_viem@2.21.44__typescript@5.6.3__ws@8.18.0_@types+react@18.3.11_react@18.3.1_use-sync-external-store@1.2.0__react@18.3.1": { + "integrity": "sha512-tkeZYWtBiITQhvKspX4diEEs44rVu+d+dd2DAL5lAeTGS9d/Iu2VAT1G04frnVv49DUPS6zUu6PkCcUpSwS8Xw==", "dependencies": [ "eventemitter3", "mipd", - "viem@2.21.32_ws@8.18.0", + "typescript", + "viem@2.21.44_typescript@5.6.3_ws@8.18.0", "zustand" ] }, @@ -4553,7 +4336,7 @@ "tslib@1.14.1" ] }, - "@walletconnect/ethereum-provider@2.17.0_@types+react@18.3.11_react@18.3.1": { + "@walletconnect/ethereum-provider@2.17.0_encoding@0.1.13_@types+react@18.3.11_react@18.3.1": { "integrity": "sha512-b+KTAXOb6JjoxkwpgYQQKPUcTwENGmdEdZoIDLeRicUmZTn/IQKfkMoC2frClB4YxkyoVMtj1oMV2JAax+yu9A==", "dependencies": [ "@walletconnect/jsonrpc-http-connection", @@ -4583,12 +4366,12 @@ "events" ] }, - "@walletconnect/jsonrpc-http-connection@1.0.8": { + "@walletconnect/jsonrpc-http-connection@1.0.8_encoding@0.1.13": { "integrity": "sha512-+B7cRuaxijLeFDJUq5hAzNyef3e3tBDIxyaCNmFtjwnod5AGis3RToNqzFU33vpVcxFhofkpE7Cx+5MYejbMGw==", "dependencies": [ "@walletconnect/jsonrpc-utils", "@walletconnect/safe-json", - "cross-fetch@3.1.8", + "cross-fetch@3.1.8_encoding@0.1.13", "events" ] }, @@ -4740,7 +4523,7 @@ "events" ] }, - "@walletconnect/universal-provider@2.17.0": { + "@walletconnect/universal-provider@2.17.0_encoding@0.1.13": { "integrity": "sha512-d3V5Be7AqLrvzcdMZSBS8DmGDRdqnyLk1DWmRKAGgR6ieUWykhhUKlvfeoZtvJrIXrY7rUGYpH1X41UtFkW5Pw==", "dependencies": [ "@walletconnect/jsonrpc-http-connection", @@ -4923,6 +4706,12 @@ "abab@2.0.6": { "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==" }, + "abitype@1.0.6_typescript@5.6.3": { + "integrity": "sha512-MMSqYh4+C/aVqI2RQaWqbvI4Kxo5cQV40WQ4QFtDnNzCkqChm8MuENhElmynZlO0qUy/ObkEUaXtKqYnx1Kp3A==", + "dependencies": [ + "typescript" + ] + }, "abitype@1.0.6_zod@3.23.8": { "integrity": "sha512-MMSqYh4+C/aVqI2RQaWqbvI4Kxo5cQV40WQ4QFtDnNzCkqChm8MuENhElmynZlO0qUy/ObkEUaXtKqYnx1Kp3A==", "dependencies": [ @@ -4938,7 +4727,7 @@ "abstract-level@1.0.4": { "integrity": "sha512-eUP/6pbXBkMbXFdx4IH2fVgvB7M0JvR7/lIL33zcs0IBcwjdzSSl31TOJsaCzmKSSDF9h8QYSOJux4Nd4YJqFg==", "dependencies": [ - "buffer@6.0.3", + "buffer", "catering", "is-buffer", "level-supports", @@ -5021,17 +4810,6 @@ "type-fest@0.21.3" ] }, - "ansi-fragments@0.2.1": { - "integrity": "sha512-DykbNHxuXQwUDRv5ibc2b0x7uw7wmwOGLBUd5RmaQ5z8Lhx19vwvKV+FAsM5rEA6dEcHxX+/Ad5s9eF2k2bB+w==", - "dependencies": [ - "colorette@1.4.0", - "slice-ansi", - "strip-ansi@5.2.0" - ] - }, - "ansi-regex@4.1.1": { - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==" - }, "ansi-regex@5.0.1": { "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" }, @@ -5066,9 +4844,6 @@ "picomatch@2.3.1" ] }, - "appdirsjs@1.2.7": { - "integrity": "sha512-Quji6+8kLBC3NnBeo14nPDq0+2jUs5s3/xEye+udFHumHhRk4M7aAMXp/PBJqkKYGuuyR9M/6Dq7d2AViiGmhw==" - }, "arg@4.1.3": { "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" }, @@ -5169,18 +4944,12 @@ "asap@2.0.6": { "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==" }, - "assertion-error@1.1.0": { - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==" - }, "ast-types@0.15.2": { "integrity": "sha512-c27loCv9QkZinsa5ProX751khO9DJl/AcB5c2KNtA6NRvHKS0PgLfcftz72KVq504vB0Gku5s2kUZzDBvQWvHg==", "dependencies": [ "tslib@2.8.0" ] }, - "astral-regex@1.0.0": { - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==" - }, "async-limiter@1.0.1": { "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" }, @@ -5252,10 +5021,10 @@ "@types/babel__traverse" ] }, - "babel-plugin-polyfill-corejs2@0.4.11_@babel+core@7.25.9": { - "integrity": "sha512-sMEJ27L0gRHShOh5G54uAAPaiCOygY/5ratXuiyb2G46FmlSpc9eFCzYVyDiPxfNbwzA7mYahmjQc5q+CZQ09Q==", + "babel-plugin-polyfill-corejs2@0.4.12_@babel+core@7.25.9": { + "integrity": "sha512-CPWT6BwvhrTO2d8QVorhTCQw9Y43zOu7G9HigcfxvepOU6b8o3tcWad6oVgZIsZCTt42FFv97aA7ZJsbM4+8og==", "dependencies": [ - "@babel/compat-data", + "@babel/compat-data@7.26.2", "@babel/core", "@babel/helper-define-polyfill-provider", "semver@6.3.1" @@ -5269,13 +5038,19 @@ "core-js-compat" ] }, - "babel-plugin-polyfill-regenerator@0.6.2_@babel+core@7.25.9": { - "integrity": "sha512-2R25rQZWP63nGwaAswvDazbPXfrM3HwVoBXK6HcqeKrSrL/JqcC/rDcf95l4r7LXLyxDXc8uQDa064GubtCABg==", + "babel-plugin-polyfill-regenerator@0.6.3_@babel+core@7.25.9": { + "integrity": "sha512-LiWSbl4CRSIa5x/JAU6jZiG9eit9w6mz+yVMFwDE83LAWvt0AfGBoZ7HS/mkhrKuh2ZlzfVZYKoLjXdqw6Yt7Q==", "dependencies": [ "@babel/core", "@babel/helper-define-polyfill-provider" ] }, + "babel-plugin-syntax-hermes-parser@0.23.1": { + "integrity": "sha512-uNLD0tk2tLUjGFdmCk+u/3FEw2o+BAwW4g+z2QVlxJrzZYOOPADroEcNtTPt5lNiScctaUmnsTkVEnOwZUOLhA==", + "dependencies": [ + "hermes-parser@0.23.1" + ] + }, "babel-plugin-transform-flow-enums@0.0.2_@babel+core@7.25.9": { "integrity": "sha512-g4aaCrDDOsWjbm0PUUeVnkcVd6AKJsVc/MbnPhEotEpkeJQP6b8nzewohQi7+QS8UyPehOhGWn0nOwjvWpmMvQ==", "dependencies": [ @@ -5290,7 +5065,7 @@ "@babel/plugin-syntax-bigint", "@babel/plugin-syntax-class-properties", "@babel/plugin-syntax-class-static-block", - "@babel/plugin-syntax-import-attributes", + "@babel/plugin-syntax-import-attributes@7.25.9_@babel+core@7.25.9", "@babel/plugin-syntax-import-meta", "@babel/plugin-syntax-json-strings", "@babel/plugin-syntax-logical-assignment-operators", @@ -5320,18 +5095,10 @@ "binary-extensions@2.3.0": { "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==" }, - "bl@4.1.0": { - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dependencies": [ - "buffer@5.7.1", - "inherits", - "readable-stream@3.6.2" - ] - }, "bl@5.1.0": { "integrity": "sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ==", "dependencies": [ - "buffer@6.0.3", + "buffer", "inherits", "readable-stream@3.6.2" ] @@ -5397,13 +5164,6 @@ "buffer-from@1.1.2": { "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" }, - "buffer@5.7.1": { - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dependencies": [ - "base64-js", - "ieee754" - ] - }, "buffer@6.0.3": { "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", "dependencies": [ @@ -5430,9 +5190,6 @@ "streamsearch" ] }, - "bytes@3.0.0": { - "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==" - }, "cac@6.7.14": { "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==" }, @@ -5485,18 +5242,6 @@ "lodash" ] }, - "chai@4.5.0": { - "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", - "dependencies": [ - "assertion-error", - "check-error", - "deep-eql", - "get-func-name", - "loupe", - "pathval", - "type-detect@4.1.0" - ] - }, "chalk@2.4.2": { "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dependencies": [ @@ -5528,12 +5273,6 @@ "char-regex@1.0.2": { "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==" }, - "check-error@1.0.3": { - "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", - "dependencies": [ - "get-func-name" - ] - }, "chokidar@3.6.0": { "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "dependencies": [ @@ -5595,16 +5334,10 @@ "node-gyp-build" ] }, - "cli-cursor@3.1.0": { - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "dependencies": [ - "restore-cursor@3.1.0" - ] - }, "cli-cursor@4.0.0": { "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==", "dependencies": [ - "restore-cursor@4.0.0" + "restore-cursor" ] }, "cli-spinners@2.9.2": { @@ -5695,9 +5428,6 @@ "color-string" ] }, - "colorette@1.4.0": { - "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==" - }, "colorette@2.0.20": { "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==" }, @@ -5707,8 +5437,8 @@ "delayed-stream" ] }, - "command-exists@1.2.9": { - "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==" + "commander@12.1.0": { + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==" }, "commander@2.20.3": { "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" @@ -5716,30 +5446,9 @@ "commander@4.1.1": { "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==" }, - "commander@9.5.0": { - "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==" - }, "commondir@1.0.1": { "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==" }, - "compressible@2.0.18": { - "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", - "dependencies": [ - "mime-db" - ] - }, - "compression@1.7.4": { - "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", - "dependencies": [ - "accepts", - "bytes", - "compressible", - "debug@2.6.9", - "on-headers", - "safe-buffer@5.1.2", - "vary" - ] - }, "concat-map@0.0.1": { "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, @@ -5764,8 +5473,8 @@ "cookie-es@1.2.2": { "integrity": "sha512-+W7VmiVINB+ywl1HGXJXmrqkOhpKrIiVZV6tQuV54ZyQC7MMuBt81Vc336GMLoHBq5hV/F9eXgt5Mnx0Rha5Fg==" }, - "core-js-compat@3.38.1": { - "integrity": "sha512-JRH6gfXxGmrzF3tZ57lFx97YARxCXPaMzPo6jELZhv88pBH5VXpQ+y0znKGlFnzuaihqhLbefxSJxWJMPtfDzw==", + "core-js-compat@3.39.0": { + "integrity": "sha512-VgEUx3VwlExr5no0tXlBt+silBvhTryPwCXRI2Id1PN8WTKu7MreethvddqOubrYxkFdv/RnYrqlv1sFNAUelw==", "dependencies": [ "browserslist" ] @@ -5782,22 +5491,13 @@ "parse-json@4.0.0" ] }, - "cosmiconfig@9.0.0": { - "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", - "dependencies": [ - "env-paths", - "import-fresh@3.3.0", - "js-yaml@4.1.0", - "parse-json@5.2.0" - ] - }, "crc-32@1.2.2": { "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==" }, "create-jest@29.7.0": { "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", "dependencies": [ - "@jest/types@29.6.3", + "@jest/types", "chalk@4.1.2", "exit", "graceful-fs", @@ -5809,16 +5509,16 @@ "create-require@1.1.1": { "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" }, - "cross-fetch@3.1.8": { + "cross-fetch@3.1.8_encoding@0.1.13": { "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", "dependencies": [ - "node-fetch@2.7.0" + "node-fetch" ] }, - "cross-fetch@4.0.0": { + "cross-fetch@4.0.0_encoding@0.1.13": { "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", "dependencies": [ - "node-fetch@2.7.0" + "node-fetch" ] }, "cross-spawn@7.0.3": { @@ -5913,9 +5613,6 @@ "dateformat@4.6.3": { "integrity": "sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==" }, - "dayjs@1.11.13": { - "integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==" - }, "debug@2.6.9": { "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dependencies": [ @@ -5943,12 +5640,6 @@ "dedent@1.5.3": { "integrity": "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==" }, - "deep-eql@4.1.4": { - "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", - "dependencies": [ - "type-detect@4.1.0" - ] - }, "deep-equal@2.2.3": { "integrity": "sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==", "dependencies": [ @@ -6096,16 +5787,15 @@ "eastasianwidth@0.2.0": { "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" }, - "eciesjs@0.3.20": { - "integrity": "sha512-Rz5AB8v9+xmMdS/R7RzWPe/R8DP5QfyrkA6ce4umJopoB5su2H2aDy/GcgIfwhmCwxnBkqGf/PbGzmKcGtIgGA==", + "eciesjs@0.3.21": { + "integrity": "sha512-6FiThm7KlTihph8ROhq/BHEglGCJSwq6c8KVgcCcJiNJFNlbrFtfnTqZobVmWIB764mzhZTOBFyinADSXXvTLg==", "dependencies": [ - "@types/secp256k1", "futoin-hkdf", "secp256k1" ] }, - "eciesjs@0.4.9_@noble+ciphers@1.0.0": { - "integrity": "sha512-PYbXFMOKtzJMlQ+IXinjsM6p2jnQCf7/lyBKu8/ZqzJ/jyRrb+O/E64iv0ZApl/64oBDZEUIwyYp/2I3wHbAZQ==", + "eciesjs@0.4.11_@noble+ciphers@1.0.0": { + "integrity": "sha512-SmUG449n1w1YGvJD9R30tBGvpxTxA0cnn0rfvpFIBvmezfIhagLjsH2JG8HBHOLS8slXsPh48II7IDUTH/J3Mg==", "dependencies": [ "@ecies/ciphers", "@noble/ciphers", @@ -6173,8 +5863,8 @@ "once" ] }, - "engine.io-client@6.6.1": { - "integrity": "sha512-aYuoak7I+R83M/BBPIOs2to51BmFIpC1wZe6zZzMrT2llVsHy5cvcmdsJgP2Qz6smHu+sD9oexiSUAVd8OfBPw==", + "engine.io-client@6.6.2": { + "integrity": "sha512-TAr+NKeoVTjEVW8P3iHguO1LO6RlUz9O5Y8o7EY0fU+gY1NYqas7NN3slpFtbXEsLMHk0h90fJMfKjRkQ0qUIw==", "dependencies": [ "@socket.io/component-emitter", "debug@4.3.7", @@ -6183,8 +5873,8 @@ "xmlhttprequest-ssl" ] }, - "engine.io-client@6.6.1_bufferutil@4.0.8_utf-8-validate@5.0.10": { - "integrity": "sha512-aYuoak7I+R83M/BBPIOs2to51BmFIpC1wZe6zZzMrT2llVsHy5cvcmdsJgP2Qz6smHu+sD9oexiSUAVd8OfBPw==", + "engine.io-client@6.6.2_bufferutil@4.0.8_utf-8-validate@5.0.10": { + "integrity": "sha512-TAr+NKeoVTjEVW8P3iHguO1LO6RlUz9O5Y8o7EY0fU+gY1NYqas7NN3slpFtbXEsLMHk0h90fJMfKjRkQ0qUIw==", "dependencies": [ "@socket.io/component-emitter", "debug@4.3.7", @@ -6206,12 +5896,6 @@ "entities@4.5.0": { "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==" }, - "env-paths@2.2.1": { - "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==" - }, - "envinfo@7.14.0": { - "integrity": "sha512-CO40UI41xDQzhLB1hWyqUKgFhs250pNcGbyGKe1l/e4FSaI/+YE4IMG76GDt0In67WLPACIITC+sOi08x4wIvg==" - }, "error-ex@1.3.2": { "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dependencies": [ @@ -6224,13 +5908,6 @@ "stackframe" ] }, - "errorhandler@1.5.1": { - "integrity": "sha512-rcOwbfvP1WTViVoUjcfZicVzjhjTuhSMntHh6mW3IrEiyE6mJyXvsToJUJGlGlw/2xU9P5whlWNGlIDVeCiT4A==", - "dependencies": [ - "accepts", - "escape-html" - ] - }, "es-abstract@1.23.3": { "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", "dependencies": [ @@ -6561,12 +6238,6 @@ "estree-walker@2.0.2": { "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" }, - "estree-walker@3.0.3": { - "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", - "dependencies": [ - "@types/estree" - ] - }, "esutils@2.0.3": { "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" }, @@ -6674,7 +6345,7 @@ "extension-port-stream@3.0.0": { "integrity": "sha512-an2S5quJMiy5bnZKEf6AkfH/7r8CzHvhchU40gxN+OM6HPhe7Z9T1FUychcf2M9PpPOO0Hf7BAEfJkw2TDIBDw==", "dependencies": [ - "readable-stream@3.6.2", + "readable-stream@4.5.2", "webextension-polyfill" ] }, @@ -6706,12 +6377,6 @@ "fast-safe-stringify@2.1.1": { "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==" }, - "fast-xml-parser@4.5.0": { - "integrity": "sha512-/PlTQCI96+fZMAOLMZK4CWG1ItCbfZ/0jx7UIJFChPNrx7tcEgerUgWbeieCM9MfHInUDyK8DWYZ+YrywDJuTg==", - "dependencies": [ - "strnum" - ] - }, "fastq@1.17.1": { "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", "dependencies": [ @@ -6809,8 +6474,8 @@ "flow-enums-runtime@0.0.6": { "integrity": "sha512-3PYnM29RFXwvAN6Pc/scUfkI7RwhQ/xqyLUyPNlXUp9S40zI8nup9tUSrTLSVnWGBN38FNiGWbwZOB6uR4OGdw==" }, - "flow-parser@0.250.0": { - "integrity": "sha512-8mkLh/CotlvqA9vCyQMbhJoPx2upEg9oKxARAayz8zQ58wCdABnTZy6U4xhMHvHvbTUFgZQk4uH2cglOCOel5A==" + "flow-parser@0.252.0": { + "integrity": "sha512-z8hKPUjZ33VLn4HVntifqmEhmolUMopysnMNzazoDqo1GLUkBsreLNsxETlKJMPotUWStQnen6SGvUNe1j4Hlg==" }, "for-each@0.3.3": { "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", @@ -6851,18 +6516,10 @@ "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", "dependencies": [ "graceful-fs", - "jsonfile@6.1.0", + "jsonfile", "universalify@2.0.1" ] }, - "fs-extra@8.1.0": { - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dependencies": [ - "graceful-fs", - "jsonfile@4.0.0", - "universalify@0.1.2" - ] - }, "fs.realpath@1.0.0": { "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, @@ -6896,9 +6553,6 @@ "get-caller-file@2.0.5": { "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" }, - "get-func-name@2.0.2": { - "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==" - }, "get-intrinsic@1.2.4": { "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dependencies": [ @@ -7103,17 +6757,11 @@ "help-me@5.0.0": { "integrity": "sha512-7xgomUX6ADmcYzFik0HzAxh/73YlKR9bmFzf51CZwR+b6YtzU2m0u49hQCqV6SvlqIqsaxovfwdvbnsw3b/zpg==" }, - "hermes-estree@0.22.0": { - "integrity": "sha512-FLBt5X9OfA8BERUdc6aZS36Xz3rRuB0Y/mfocSADWEJfomc1xfene33GdyAmtTkKTBXTN/EgAy+rjTKkkZJHlw==" - }, "hermes-estree@0.23.1": { "integrity": "sha512-eT5MU3f5aVhTqsfIReZ6n41X5sYn4IdQL0nvz6yO+MMlPxw49aSARHLg/MSehQftyjnrE8X6bYregzSumqc6cg==" }, - "hermes-parser@0.22.0": { - "integrity": "sha512-gn5RfZiEXCsIWsFGsKiykekktUoh0PdFWYocXsUdZIyWSckT6UIyPcyyUIPSR3kpnELWeK3n3ztAse7Mat6PSA==", - "dependencies": [ - "hermes-estree@0.22.0" - ] + "hermes-estree@0.24.0": { + "integrity": "sha512-LyoXLB7IFzeZW0EvAbGZacbxBN7t6KKSDqFJPo3Ydow7wDlrDjXwsdiAHV6XOdvEN9MEuWXsSIFN4tzpyrXIHw==" }, "hermes-parser@0.23.1": { "integrity": "sha512-oxl5h2DkFW83hT4DAUJorpah8ou4yvmweUzLJmmr6YV2cezduCdlil1AvU/a/xSsAFo4WUcNA4GoV5Bvq6JffA==", @@ -7121,6 +6769,12 @@ "hermes-estree@0.23.1" ] }, + "hermes-parser@0.24.0": { + "integrity": "sha512-IJooSvvu2qNRe7oo9Rb04sUT4omtZqZqf9uq9WM25Tb6v3usmvA93UqfnnoWs5V0uYjEl9Al6MNU10MCGKLwpg==", + "dependencies": [ + "hermes-estree@0.24.0" + ] + }, "hey-listen@1.0.8": { "integrity": "sha512-COpmrF2NOg4TBWUJ5UVyaCU2A88wEMkUPK4hNqyCkqHbxT92BbvfjoSozkAIIm6XhicGlJHhFdullInrdhwU8Q==" }, @@ -7201,9 +6855,6 @@ "human-signals@5.0.0": { "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==" }, - "hyperdyperid@1.2.0": { - "integrity": "sha512-Y93lCzHYgGWdrJ66yIktxiaGULYc6oGiABxhcO5AufBeOyoIdZF7bIfLaOrbM0iGIOXQQgxxRrFEnb+Y6w1n4A==" - }, "i18next-browser-languagedetector@7.1.0": { "integrity": "sha512-cr2k7u1XJJ4HTOjM9GyOMtbOA47RtUoWRAtt52z43r3AoMs2StYKyjS3URPhzHaf+mn10hY9dZWamga5WPQjhA==", "dependencies": [ @@ -7396,9 +7047,6 @@ "call-bind" ] }, - "is-fullwidth-code-point@2.0.0": { - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==" - }, "is-fullwidth-code-point@3.0.0": { "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" }, @@ -7423,9 +7071,6 @@ "is-docker@3.0.0" ] }, - "is-interactive@1.0.0": { - "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==" - }, "is-interactive@2.0.0": { "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==" }, @@ -7502,9 +7147,6 @@ "which-typed-array" ] }, - "is-unicode-supported@0.1.0": { - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==" - }, "is-unicode-supported@1.3.0": { "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==" }, @@ -7524,9 +7166,6 @@ "get-intrinsic" ] }, - "is-wsl@1.1.0": { - "integrity": "sha512-gfygJYZ2gLTDlmbWMI0CE2MwnFzSN/2SZfkMlItC4K/JBlsWVDB0bO6XhqcY13YXE7iMcAJnzTCJjPiTeJJ0Mw==" - }, "is-wsl@2.2.0": { "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", "dependencies": [ @@ -7647,7 +7286,7 @@ "@jest/environment", "@jest/expect", "@jest/test-result", - "@jest/types@29.6.3", + "@jest/types", "@types/node@22.5.4", "chalk@4.1.2", "co", @@ -7671,7 +7310,7 @@ "dependencies": [ "@jest/core", "@jest/test-result", - "@jest/types@29.6.3", + "@jest/types", "chalk@4.1.2", "create-jest", "exit", @@ -7687,7 +7326,7 @@ "dependencies": [ "@babel/core", "@jest/test-sequencer", - "@jest/types@29.6.3", + "@jest/types", "babel-jest", "chalk@4.1.2", "ci-info@3.9.0", @@ -7714,7 +7353,7 @@ "dependencies": [ "@babel/core", "@jest/test-sequencer", - "@jest/types@29.6.3", + "@jest/types", "@types/node@22.5.4", "babel-jest", "chalk@4.1.2", @@ -7755,7 +7394,7 @@ "jest-each@29.7.0": { "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", "dependencies": [ - "@jest/types@29.6.3", + "@jest/types", "chalk@4.1.2", "jest-get-type", "jest-util", @@ -7767,7 +7406,7 @@ "dependencies": [ "@jest/environment", "@jest/fake-timers", - "@jest/types@29.6.3", + "@jest/types", "@types/jsdom", "@types/node@22.5.4", "jest-mock", @@ -7780,7 +7419,7 @@ "dependencies": [ "@jest/environment", "@jest/fake-timers", - "@jest/types@29.6.3", + "@jest/types", "@types/node@22.5.4", "jest-mock", "jest-util" @@ -7792,7 +7431,7 @@ "jest-haste-map@29.7.0": { "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", "dependencies": [ - "@jest/types@29.6.3", + "@jest/types", "@types/graceful-fs", "@types/node@22.5.4", "anymatch", @@ -7826,7 +7465,7 @@ "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", "dependencies": [ "@babel/code-frame", - "@jest/types@29.6.3", + "@jest/types", "@types/stack-utils", "chalk@4.1.2", "graceful-fs", @@ -7839,7 +7478,7 @@ "jest-mock@29.7.0": { "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", "dependencies": [ - "@jest/types@29.6.3", + "@jest/types", "@types/node@22.5.4", "jest-util" ] @@ -7881,7 +7520,7 @@ "@jest/environment", "@jest/test-result", "@jest/transform", - "@jest/types@29.6.3", + "@jest/types", "@types/node@22.5.4", "chalk@4.1.2", "emittery", @@ -7909,7 +7548,7 @@ "@jest/source-map", "@jest/test-result", "@jest/transform", - "@jest/types@29.6.3", + "@jest/types", "@types/node@22.5.4", "chalk@4.1.2", "cjs-module-lexer", @@ -7937,7 +7576,7 @@ "@babel/types", "@jest/expect-utils", "@jest/transform", - "@jest/types@29.6.3", + "@jest/types", "babel-preset-current-node-syntax", "chalk@4.1.2", "expect", @@ -7955,7 +7594,7 @@ "jest-util@29.7.0": { "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", "dependencies": [ - "@jest/types@29.6.3", + "@jest/types", "@types/node@22.5.4", "chalk@4.1.2", "ci-info@3.9.0", @@ -7966,7 +7605,7 @@ "jest-validate@29.7.0": { "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", "dependencies": [ - "@jest/types@29.6.3", + "@jest/types", "camelcase@6.3.0", "chalk@4.1.2", "jest-get-type", @@ -7978,7 +7617,7 @@ "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", "dependencies": [ "@jest/test-result", - "@jest/types@29.6.3", + "@jest/types", "@types/node@22.5.4", "ansi-escapes", "chalk@4.1.2", @@ -8008,7 +7647,7 @@ "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", "dependencies": [ "@jest/core", - "@jest/types@29.6.3", + "@jest/types", "import-local", "jest-cli" ] @@ -8019,16 +7658,6 @@ "jiti@2.3.3": { "integrity": "sha512-EX4oNDwcXSivPrw2qKH2LB5PoFxEvgtv2JgwW0bU858HoLQ+kutSvjLMUqBd0PeJYEinLWhoI9Ol0eYMqj/wNQ==" }, - "joi@17.13.3": { - "integrity": "sha512-otDA4ldcIx+ZXsKHWmp0YizCweVRZG96J10b0FevjfuncLO1oX59THoAmHkNubYJ+9gWsYsp5k8v4ib6oDv1fA==", - "dependencies": [ - "@hapi/hoek", - "@hapi/topo", - "@sideway/address", - "@sideway/formula", - "@sideway/pinpoint" - ] - }, "joycon@3.1.1": { "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==" }, @@ -8038,9 +7667,6 @@ "js-tokens@4.0.0": { "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, - "js-tokens@9.0.0": { - "integrity": "sha512-WriZw1luRMlmV3LGJaR6QOJjWwgLUTf89OwT2lUOyjX2dJGBwgmIkbcz+7WFZjrZM635JOIR517++e/67CP9dQ==" - }, "js-yaml@3.14.1": { "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dependencies": [ @@ -8066,7 +7692,7 @@ "jsc-safe-url@0.2.4": { "integrity": "sha512-0wM3YBWtYePOjfyXQH5MWQ8H7sdk5EXSwZvmSLKk2RboVQ2Bu239jycHDz5J/8Blf3K0Qnoy2b6xD+z10MFB+Q==" }, - "jscodeshift@0.14.0_@babel+preset-env@7.25.9_@babel+core@7.25.9": { + "jscodeshift@0.14.0_@babel+preset-env@7.26.0_@babel+core@7.25.9": { "integrity": "sha512-7eCC1knD7bLUPuSCwXsMZUH51O8jIcoVyKtI6P0XM0IVzlGjckPy3FIwQlorzbN0Sg79oK+RlohN32Mqf/lrYA==", "dependencies": [ "@babel/core", @@ -8075,7 +7701,7 @@ "@babel/plugin-proposal-nullish-coalescing-operator", "@babel/plugin-proposal-optional-chaining", "@babel/plugin-transform-modules-commonjs", - "@babel/preset-env@7.25.9_@babel+core@7.25.9", + "@babel/preset-env@7.26.0_@babel+core@7.25.9", "@babel/preset-flow", "@babel/preset-typescript", "@babel/register", @@ -8091,7 +7717,7 @@ "write-file-atomic@2.4.3" ] }, - "jscodeshift@0.14.0_@babel+preset-env@7.25.9_@babel+core@7.25.9_@babel+preset-env@7.25.9__@babel+core@7.25.9": { + "jscodeshift@0.14.0_@babel+preset-env@7.26.0_@babel+core@7.25.9_@babel+preset-env@7.26.0__@babel+core@7.25.9": { "integrity": "sha512-7eCC1knD7bLUPuSCwXsMZUH51O8jIcoVyKtI6P0XM0IVzlGjckPy3FIwQlorzbN0Sg79oK+RlohN32Mqf/lrYA==", "dependencies": [ "@babel/core", @@ -8100,7 +7726,7 @@ "@babel/plugin-proposal-nullish-coalescing-operator", "@babel/plugin-proposal-optional-chaining", "@babel/plugin-transform-modules-commonjs", - "@babel/preset-env@7.25.9_@babel+core@7.25.9", + "@babel/preset-env@7.26.0_@babel+core@7.25.9", "@babel/preset-flow", "@babel/preset-typescript", "@babel/register", @@ -8224,12 +7850,6 @@ "json5@2.2.3": { "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==" }, - "jsonfile@4.0.0": { - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "dependencies": [ - "graceful-fs" - ] - }, "jsonfile@6.1.0": { "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", "dependencies": [ @@ -8281,7 +7901,7 @@ "level-transcoder@1.0.1": { "integrity": "sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w==", "dependencies": [ - "buffer@6.0.3", + "buffer", "module-error" ] }, @@ -8383,13 +8003,6 @@ "loader-runner@4.3.0": { "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==" }, - "local-pkg@0.5.0": { - "integrity": "sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==", - "dependencies": [ - "mlly", - "pkg-types" - ] - }, "locate-path@3.0.0": { "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dependencies": [ @@ -8445,26 +8058,11 @@ "lodash@4.17.21": { "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, - "log-symbols@4.1.0": { - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dependencies": [ - "chalk@4.1.2", - "is-unicode-supported@0.1.0" - ] - }, "log-symbols@5.1.0": { "integrity": "sha512-l0x2DvrW294C9uDCoQe1VSU4gf529FkSZ6leBl4TiqZH/e+0R7hSfHQBNut2mNygDgHwvYHfFLn6Oxb3VWj2rA==", "dependencies": [ "chalk@5.3.0", - "is-unicode-supported@1.3.0" - ] - }, - "logkitty@0.7.1": { - "integrity": "sha512-/3ER20CTTbahrCrpYfPn7Xavv9diBROZpoXGVZDWMw4b/X4uuUwAC0ki85tgsdMRONURyIJbcOvS94QsUBYPbQ==", - "dependencies": [ - "ansi-fragments", - "dayjs", - "yargs@15.4.1" + "is-unicode-supported" ] }, "long@5.2.3": { @@ -8473,13 +8071,7 @@ "loose-envify@1.4.0": { "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "dependencies": [ - "js-tokens@4.0.0" - ] - }, - "loupe@2.3.7": { - "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", - "dependencies": [ - "get-func-name" + "js-tokens" ] }, "lru-cache@10.4.3": { @@ -8561,15 +8153,6 @@ "@babel/runtime" ] }, - "memfs@4.14.0_tslib@2.8.0": { - "integrity": "sha512-JUeY0F/fQZgIod31Ja1eJgiSxLn7BfQlCnqhwXFBzFHEw63OdLK7VJUJ7bnzNsWgCyoUP5tEp1VRY8rDaYzqOA==", - "dependencies": [ - "@jsonjoy.com/json-pack", - "@jsonjoy.com/util", - "tree-dump", - "tslib@2.8.0" - ] - }, "memoize-one@5.2.1": { "integrity": "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==" }, @@ -8587,34 +8170,34 @@ "merge2@1.4.1": { "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==" }, - "metro-babel-transformer@0.80.12": { - "integrity": "sha512-YZziRs0MgA3pzCkkvOoQRXjIoVjvrpi/yRlJnObyIvMP6lFdtyG4nUGIwGY9VXnBvxmXD6mPY2e+NSw6JAyiRg==", + "metro-babel-transformer@0.81.0": { + "integrity": "sha512-Dc0QWK4wZIeHnyZ3sevWGTnnSkIDDn/SWyfrn99zbKbDOCoCYy71PAn9uCRrP/hduKLJQOy+tebd63Rr9D8tXg==", "dependencies": [ "@babel/core", "flow-enums-runtime", - "hermes-parser@0.23.1", + "hermes-parser@0.24.0", "nullthrows" ] }, - "metro-cache-key@0.80.12": { - "integrity": "sha512-o4BspKnugg/pE45ei0LGHVuBJXwRgruW7oSFAeSZvBKA/sGr0UhOGY3uycOgWInnS3v5yTTfiBA9lHlNRhsvGA==", + "metro-cache-key@0.81.0": { + "integrity": "sha512-qX/IwtknP9bQZL78OK9xeSvLM/xlGfrs6SlUGgHvrxtmGTRSsxcyqxR+c+7ch1xr05n62Gin/O44QKg5V70rNQ==", "dependencies": [ "flow-enums-runtime" ] }, - "metro-cache@0.80.12": { - "integrity": "sha512-p5kNHh2KJ0pbQI/H7ZBPCEwkyNcSz7OUkslzsiIWBMPQGFJ/xArMwkV7I+GJcWh+b4m6zbLxE5fk6fqbVK1xGA==", + "metro-cache@0.81.0": { + "integrity": "sha512-DyuqySicHXkHUDZFVJmh0ygxBSx6pCKUrTcSgb884oiscV/ROt1Vhye+x+OIHcsodyA10gzZtrVtxIFV4l9I4g==", "dependencies": [ "exponential-backoff", "flow-enums-runtime", "metro-core" ] }, - "metro-config@0.80.12": { - "integrity": "sha512-4rwOWwrhm62LjB12ytiuR5NgK1ZBNr24/He8mqCsC+HXZ+ATbrewLNztzbAZHtFsrxP4D4GLTGgh96pCpYLSAQ==", + "metro-config@0.81.0": { + "integrity": "sha512-6CinEaBe3WLpRlKlYXXu8r1UblJhbwD6Gtnoib5U8j6Pjp7XxMG9h/DGMeNp9aGLDu1OieUqiXpFo7O0/rR5Kg==", "dependencies": [ "connect", - "cosmiconfig@5.2.1", + "cosmiconfig", "flow-enums-runtime", "jest-validate", "metro", @@ -8623,16 +8206,16 @@ "metro-runtime" ] }, - "metro-core@0.80.12": { - "integrity": "sha512-QqdJ/yAK+IpPs2HU/h5v2pKEdANBagSsc6DRSjnwSyJsCoHlmyJKCaCJ7KhWGx+N4OHxh37hoA8fc2CuZbx0Fw==", + "metro-core@0.81.0": { + "integrity": "sha512-CVkM5YCOAFkNMvJai6KzA0RpztzfEKRX62/PFMOJ9J7K0uq/UkOFLxcgpcncMIrfy0PbfEj811b69tjULUQe1Q==", "dependencies": [ "flow-enums-runtime", "lodash.throttle", "metro-resolver" ] }, - "metro-file-map@0.80.12": { - "integrity": "sha512-sYdemWSlk66bWzW2wp79kcPMzwuG32x1ZF3otI0QZTmrnTaaTiGyhE66P1z6KR4n2Eu5QXiABa6EWbAQv0r8bw==", + "metro-file-map@0.81.0": { + "integrity": "sha512-zMDI5uYhQCyxbye/AuFx/pAbsz9K+vKL7h1ShUXdN2fz4VUPiyQYRsRqOoVG1DsiCgzd5B6LW0YW77NFpjDQeg==", "dependencies": [ "anymatch", "debug@2.6.9", @@ -8648,30 +8231,31 @@ "walker" ] }, - "metro-minify-terser@0.80.12": { - "integrity": "sha512-muWzUw3y5k+9083ZoX9VaJLWEV2Jcgi+Oan0Mmb/fBNMPqP9xVDuy4pOMn/HOiGndgfh/MK7s4bsjkyLJKMnXQ==", + "metro-minify-terser@0.81.0": { + "integrity": "sha512-U2ramh3W822ZR1nfXgIk+emxsf5eZSg10GbQrT0ZizImK8IZ5BmJY+BHRIkQgHzWFpExOVxC7kWbGL1bZALswA==", "dependencies": [ "flow-enums-runtime", "terser" ] }, - "metro-resolver@0.80.12": { - "integrity": "sha512-PR24gYRZnYHM3xT9pg6BdbrGbM/Cu1TcyIFBVlAk7qDAuHkUNQ1nMzWumWs+kwSvtd9eZGzHoucGJpTUEeLZAw==", + "metro-resolver@0.81.0": { + "integrity": "sha512-Uu2Q+buHhm571cEwpPek8egMbdSTqmwT/5U7ZVNpK6Z2ElQBBCxd7HmFAslKXa7wgpTO2FAn6MqGeERbAtVDUA==", "dependencies": [ "flow-enums-runtime" ] }, - "metro-runtime@0.80.12": { - "integrity": "sha512-LIx7+92p5rpI0i6iB4S4GBvvLxStNt6fF0oPMaUd1Weku7jZdfkCZzmrtDD9CSQ6EPb0T9NUZoyXIxlBa3wOCw==", + "metro-runtime@0.81.0": { + "integrity": "sha512-6oYB5HOt37RuGz2eV4A6yhcl+PUTwJYLDlY9vhT+aVjbUWI6MdBCf69vc4f5K5Vpt+yOkjy+2LDwLS0ykWFwYw==", "dependencies": [ "@babel/runtime", "flow-enums-runtime" ] }, - "metro-source-map@0.80.12": { - "integrity": "sha512-o+AXmE7hpvM8r8MKsx7TI21/eerYYy2DCDkWfoBkv+jNkl61khvDHlQn0cXZa6lrcNZiZkl9oHSMcwLLIrFmpw==", + "metro-source-map@0.81.0": { + "integrity": "sha512-TzsVxhH83dyxg4A4+L1nzNO12I7ps5IHLjKGZH3Hrf549eiZivkdjYiq/S5lOB+p2HiQ+Ykcwtmcja95LIC62g==", "dependencies": [ "@babel/traverse", + "@babel/traverse--for-generate-function-map@npm:@babel/traverse@7.25.9", "@babel/types", "flow-enums-runtime", "invariant", @@ -8682,8 +8266,8 @@ "vlq" ] }, - "metro-symbolicate@0.80.12": { - "integrity": "sha512-/dIpNdHksXkGHZXARZpL7doUzHqSNxgQ8+kQGxwpJuHnDhGkENxB5PS2QBaTDdEcmyTMjS53CN1rl9n1gR6fmw==", + "metro-symbolicate@0.81.0": { + "integrity": "sha512-C/1rWbNTPYp6yzID8IPuQPpVGzJ2rbWYBATxlvQ9dfK5lVNoxcwz77hjcY8ISLsRRR15hyd/zbjCNKPKeNgE1Q==", "dependencies": [ "flow-enums-runtime", "invariant", @@ -8694,8 +8278,8 @@ "vlq" ] }, - "metro-transform-plugins@0.80.12": { - "integrity": "sha512-WQWp00AcZvXuQdbjQbx1LzFR31IInlkCDYJNRs6gtEtAyhwpMMlL2KcHmdY+wjDO9RPcliZ+Xl1riOuBecVlPA==", + "metro-transform-plugins@0.81.0": { + "integrity": "sha512-uErLAPBvttGCrmGSCa0dNHlOTk3uJFVEVWa5WDg6tQ79PRmuYRwzUgLhVzn/9/kyr75eUX3QWXN79Jvu4txt6Q==", "dependencies": [ "@babel/core", "@babel/generator", @@ -8705,8 +8289,8 @@ "nullthrows" ] }, - "metro-transform-worker@0.80.12": { - "integrity": "sha512-KAPFN1y3eVqEbKLx1I8WOarHPqDMUa8WelWxaJCNKO/yHCP26zELeqTJvhsQup+8uwB6EYi/sp0b6TGoh6lOEA==", + "metro-transform-worker@0.81.0": { + "integrity": "sha512-HrQ0twiruhKy0yA+9nK5bIe3WQXZcC66PXTvRIos61/EASLAP2DzEmW7IxN/MGsfZegN2UzqL2CG38+mOB45vg==", "dependencies": [ "@babel/core", "@babel/generator", @@ -8723,8 +8307,8 @@ "nullthrows" ] }, - "metro@0.80.12": { - "integrity": "sha512-1UsH5FzJd9quUsD1qY+zUG4JY3jo3YEMxbMYH9jT6NK3j4iORhlwTK8fYTfAUBhDKjgLfKjAh7aoazNE23oIRA==", + "metro@0.81.0": { + "integrity": "sha512-kzdzmpL0gKhEthZ9aOV7sTqvg6NuTxDV8SIm9pf9sO8VVEbKrQk5DNcwupOUjgPPFAuKUc2NkT0suyT62hm2xg==", "dependencies": [ "@babel/code-frame", "@babel/core", @@ -8742,7 +8326,7 @@ "error-stack-parser", "flow-enums-runtime", "graceful-fs", - "hermes-parser@0.23.1", + "hermes-parser@0.24.0", "image-size", "invariant", "jest-worker@29.7.0", @@ -8792,9 +8376,6 @@ "mime@1.6.0": { "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" }, - "mime@2.6.0": { - "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==" - }, "mime@3.0.0": { "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==" }, @@ -8852,8 +8433,11 @@ "minipass@7.1.2": { "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==" }, - "mipd@0.0.7": { - "integrity": "sha512-aAPZPNDQ3uMTdKbuO2YmAw2TxLHO0moa4YKAyETM/DTj5FloZo+a+8tU+iv4GmW+sOxKLSRwcSFuczk+Cpt6fg==" + "mipd@0.0.7_typescript@5.6.3": { + "integrity": "sha512-aAPZPNDQ3uMTdKbuO2YmAw2TxLHO0moa4YKAyETM/DTj5FloZo+a+8tU+iv4GmW+sOxKLSRwcSFuczk+Cpt6fg==", + "dependencies": [ + "typescript" + ] }, "mkdirp@0.5.6": { "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", @@ -8987,9 +8571,6 @@ "watchpack@2.4.0" ] }, - "nocache@3.0.4": { - "integrity": "sha512-WDD0bdg9mbq6F4mRxEYcPWwfA1vxd0mrvKOyxI7Xj/atfRHVeutzuWByG//jfm4uPzp0y4Kj051EORCBSQMycw==" - }, "node-abort-controller@3.1.1": { "integrity": "sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==" }, @@ -9011,12 +8592,6 @@ "node-fetch-native@1.6.4": { "integrity": "sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ==" }, - "node-fetch@2.7.0": { - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "dependencies": [ - "whatwg-url@5.0.0" - ] - }, "node-fetch@2.7.0_encoding@0.1.13": { "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dependencies": [ @@ -9036,9 +8611,6 @@ "node-releases@2.0.18": { "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==" }, - "node-stream-zip@1.15.0": { - "integrity": "sha512-LN4fydt9TqhZhThkZIVQnF9cwjU3qmUH9h78Mx/K7d3VvfRqqwthLwJEUOEL0QPZ0XQmNN7be5Ggit5+4dq3Bw==" - }, "normalize-path@3.0.0": { "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" }, @@ -9063,8 +8635,8 @@ "nwsapi@2.2.13": { "integrity": "sha512-cTGB9ptp9dY9A5VbMSe7fQBcl/tt22Vcqdq8+eN93rblOuE0aCFu4aZ2vMwct/2t+lFnosm8RkQW1I0Omb1UtQ==" }, - "ob1@0.80.12": { - "integrity": "sha512-VMArClVT6LkhUGpnuEoBuyjG9rzUyEzg4PDkav6wK1cLhOK02gPCYFxoiB4mqVnrMhDpIzJcrGNAMVi9P+hXrw==", + "ob1@0.81.0": { + "integrity": "sha512-6Cvrkxt1tqaRdWqTAMcVYEiO5i1xcF9y7t06nFdjFqkfPsEloCf8WwhXdwBpNUkVYSQlSGS7cDgVQR86miBfBQ==", "dependencies": [ "flow-enums-runtime" ] @@ -9159,9 +8731,6 @@ "ee-first" ] }, - "on-headers@1.0.2": { - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==" - }, "once@1.4.0": { "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dependencies": [ @@ -9180,12 +8749,6 @@ "mimic-fn@4.0.0" ] }, - "open@6.4.0": { - "integrity": "sha512-IFenVPgF70fSm1keSd2iDBIDIBZkroLeuffXq+wKTzTJlBpesFWojV9lb8mzOfaAzM1sr7HQHuO0vtV0zYekGg==", - "dependencies": [ - "is-wsl@1.1.0" - ] - }, "open@7.4.2": { "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", "dependencies": [ @@ -9215,34 +8778,33 @@ "word-wrap" ] }, - "ora@5.4.1": { - "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", - "dependencies": [ - "bl@4.1.0", - "chalk@4.1.2", - "cli-cursor@3.1.0", - "cli-spinners", - "is-interactive@1.0.0", - "is-unicode-supported@0.1.0", - "log-symbols@4.1.0", - "strip-ansi@6.0.1", - "wcwidth" - ] - }, "ora@6.3.1": { "integrity": "sha512-ERAyNnZOfqM+Ao3RAvIXkYh5joP220yf59gVe2X/cI6SiCxIdi4c9HZKZD8R6q/RDXEje1THBju6iExiSsgJaQ==", "dependencies": [ "chalk@5.3.0", - "cli-cursor@4.0.0", + "cli-cursor", "cli-spinners", - "is-interactive@2.0.0", - "is-unicode-supported@1.3.0", - "log-symbols@5.1.0", + "is-interactive", + "is-unicode-supported", + "log-symbols", "stdin-discarder", "strip-ansi@7.1.0", "wcwidth" ] }, + "ox@0.1.2_typescript@5.6.3": { + "integrity": "sha512-ak/8K0Rtphg9vnRJlbOdaX9R7cmxD2MiSthjWGaQdMk3D7hrAlDoM+6Lxn7hN52Za3vrXfZ7enfke/5WjolDww==", + "dependencies": [ + "@adraffy/ens-normalize", + "@noble/curves@1.6.0", + "@noble/hashes@1.5.0", + "@scure/bip32@1.5.0", + "@scure/bip39@1.4.0", + "abitype@1.0.6_typescript@5.6.3", + "eventemitter3", + "typescript" + ] + }, "p-limit@2.3.0": { "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dependencies": [ @@ -9261,12 +8823,6 @@ "yocto-queue@1.1.1" ] }, - "p-limit@5.0.0": { - "integrity": "sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==", - "dependencies": [ - "yocto-queue@1.1.1" - ] - }, "p-locate@3.0.0": { "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dependencies": [ @@ -9362,9 +8918,6 @@ "pathe@1.1.2": { "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==" }, - "pathval@1.1.1": { - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==" - }, "pg-int8@1.0.1": { "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==" }, @@ -9421,7 +8974,7 @@ "pino-pretty@11.3.0": { "integrity": "sha512-oXwn7ICywaZPHmu3epHGU2oJX4nPmKvHvB/bwrJHlGcbEWaVcotkpyVHMKLKmiVryWYByNp0jpgAcXpFJDXJzA==", "dependencies": [ - "colorette@2.0.20", + "colorette", "dateformat", "fast-copy", "fast-safe-stringify", @@ -9572,15 +9125,6 @@ "prettier@3.3.3": { "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==" }, - "pretty-format@26.6.2": { - "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==", - "dependencies": [ - "@jest/types@26.6.2", - "ansi-regex@5.0.1", - "ansi-styles@4.3.0", - "react-is@17.0.2" - ] - }, "pretty-format@27.5.1": { "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", "dependencies": [ @@ -9777,7 +9321,7 @@ "react-is@18.3.1": { "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==" }, - "react-native-webview@11.26.1_react@18.3.1_react-native@0.75.4__@types+react@18.3.11__react@18.3.1_@types+react@18.3.11": { + "react-native-webview@11.26.1_react@18.3.1_react-native@0.76.1__@types+react@18.3.11__react@18.3.1__encoding@0.1.13_@types+react@18.3.11_encoding@0.1.13": { "integrity": "sha512-hC7BkxOpf+z0UKhxFSFTPAM4shQzYmZHoELa6/8a/MspcjEP7ukYKpuSUTLDywQditT8yI9idfcKvfZDKQExGw==", "dependencies": [ "escape-string-regexp@2.0.0", @@ -9786,15 +9330,12 @@ "react-native" ] }, - "react-native@0.75.4_@types+react@18.3.11_react@18.3.1": { - "integrity": "sha512-Jehg4AMNIAXu9cn0/1jbTCoNg3tc+t6EekwucCalN8YoRmxGd/PY6osQTI/5fSAM40JQ4O8uv8Qg09Ycpb5sxQ==", + "react-native@0.76.1_@types+react@18.3.11_react@18.3.1_encoding@0.1.13": { + "integrity": "sha512-z4KnbrnnAvloRs9NGnah3u6/LK3IbtNMrvByxa3ifigbMlsMY4WPRYV9lvt/hH4Mzt8bfuI+utnOxFyJTTq3lg==", "dependencies": [ "@jest/create-cache-key-function", - "@react-native-community/cli", - "@react-native-community/cli-platform-android", - "@react-native-community/cli-platform-ios", "@react-native/assets-registry", - "@react-native/codegen@0.75.4_@babel+preset-env@7.25.9", + "@react-native/codegen@0.76.1_@babel+preset-env@7.26.0", "@react-native/community-cli-plugin", "@react-native/gradle-plugin", "@react-native/js-polyfills", @@ -9804,9 +9345,11 @@ "abort-controller", "anser", "ansi-regex@5.0.1", + "babel-jest", + "babel-plugin-syntax-hermes-parser", "base64-js", "chalk@4.1.2", - "commander@9.5.0", + "commander@12.1.0", "event-target-shim", "flow-enums-runtime", "glob@7.2.3", @@ -9818,7 +9361,7 @@ "metro-source-map", "mkdirp@0.5.6", "nullthrows", - "pretty-format@26.6.2", + "pretty-format@29.7.0", "promise", "react", "react-devtools-core", @@ -9919,7 +9462,7 @@ "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", "dependencies": [ "abort-controller", - "buffer@6.0.3", + "buffer", "events", "process", "string_decoder@1.3.0" @@ -10009,8 +9552,8 @@ "regjsgen@0.8.0": { "integrity": "sha512-RvwtGe3d7LvWiDQXeQw8p5asZUmfU1G/l6WbUXeHta7Y2PEIvBTwH6E2EfmYUK8pxcxEdEmaomqyp0vZZ7C+3Q==" }, - "regjsparser@0.11.1": { - "integrity": "sha512-1DHODs4B8p/mQHU9kr+jv8+wIC9mtG4eBHxWxIq5mhjE3D5oORhCc6deRKzTjs9DcfRFmj9BHSDguZklqCGFWQ==", + "regjsparser@0.11.2": { + "integrity": "sha512-3OGZZ4HoLJkkAZx/48mTXJNlmqTGOzc0o9OWQPuWpkOlXXPbyN6OafCcoXUnBqE2D3f/T5L+pWc1kdEmnfnRsA==", "dependencies": [ "jsesc" ] @@ -10072,13 +9615,6 @@ "supports-preserve-symlinks-flag" ] }, - "restore-cursor@3.1.0": { - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "dependencies": [ - "onetime@5.1.2", - "signal-exit@3.0.7" - ] - }, "restore-cursor@4.0.0": { "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==", "dependencies": [ @@ -10326,9 +9862,6 @@ "object-inspect" ] }, - "siginfo@2.0.0": { - "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==" - }, "signal-exit@3.0.7": { "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" }, @@ -10347,29 +9880,21 @@ "slash@3.0.0": { "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==" }, - "slice-ansi@2.1.0": { - "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", - "dependencies": [ - "ansi-styles@3.2.1", - "astral-regex", - "is-fullwidth-code-point@2.0.0" - ] - }, - "socket.io-client@4.8.0": { - "integrity": "sha512-C0jdhD5yQahMws9alf/yvtsMGTaIDBnZ8Rb5HU56svyq0l5LIrGzIDZZD5pHQlmzxLuU91Gz+VpQMKgCTNYtkw==", + "socket.io-client@4.8.1": { + "integrity": "sha512-hJVXfu3E28NmzGk8o1sHhN3om52tRvwYeidbj7xKy2eIIse5IoKX3USlS6Tqt3BHAtflLIkCQBkzVrEEfWUyYQ==", "dependencies": [ "@socket.io/component-emitter", "debug@4.3.7", - "engine.io-client@6.6.1", + "engine.io-client@6.6.2", "socket.io-parser" ] }, - "socket.io-client@4.8.0_bufferutil@4.0.8_utf-8-validate@5.0.10": { - "integrity": "sha512-C0jdhD5yQahMws9alf/yvtsMGTaIDBnZ8Rb5HU56svyq0l5LIrGzIDZZD5pHQlmzxLuU91Gz+VpQMKgCTNYtkw==", + "socket.io-client@4.8.1_bufferutil@4.0.8_utf-8-validate@5.0.10": { + "integrity": "sha512-hJVXfu3E28NmzGk8o1sHhN3om52tRvwYeidbj7xKy2eIIse5IoKX3USlS6Tqt3BHAtflLIkCQBkzVrEEfWUyYQ==", "dependencies": [ "@socket.io/component-emitter", "debug@4.3.7", - "engine.io-client@6.6.1_bufferutil@4.0.8_utf-8-validate@5.0.10", + "engine.io-client@6.6.2_bufferutil@4.0.8_utf-8-validate@5.0.10", "socket.io-parser" ] }, @@ -10430,9 +9955,6 @@ "escape-string-regexp@2.0.0" ] }, - "stackback@0.0.2": { - "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==" - }, "stackframe@1.3.4": { "integrity": "sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw==" }, @@ -10454,7 +9976,7 @@ "stdin-discarder@0.1.0": { "integrity": "sha512-xhV7w8S+bUwlPTb4bAOUQhv8/cSS5offJuX8GQGq32ONF0ZtDWKfkdomM3HMRA+LhX6um/FZ0COqlwsjD53LeQ==", "dependencies": [ - "bl@5.1.0" + "bl" ] }, "stop-iteration-iterator@1.0.0": { @@ -10483,7 +10005,7 @@ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dependencies": [ "emoji-regex@8.0.0", - "is-fullwidth-code-point@3.0.0", + "is-fullwidth-code-point", "strip-ansi@6.0.1" ] }, @@ -10556,12 +10078,6 @@ "safe-buffer@5.2.1" ] }, - "strip-ansi@5.2.0": { - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dependencies": [ - "ansi-regex@4.1.1" - ] - }, "strip-ansi@6.0.1": { "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dependencies": [ @@ -10592,15 +10108,6 @@ "strip-json-comments@3.1.1": { "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==" }, - "strip-literal@2.1.0": { - "integrity": "sha512-Op+UycaUt/8FbN/Z2TWPBLge3jWrP3xj10f3fnYxf052bKuS3EKs1ZQcVGjnEMdsNVAM+plXRdmjrZ/KgG3Skw==", - "dependencies": [ - "js-tokens@9.0.0" - ] - }, - "strnum@1.0.5": { - "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==" - }, "styled-jsx@5.1.1_react@18.3.1": { "integrity": "sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==", "dependencies": [ @@ -10620,9 +10127,6 @@ "ts-interface-checker" ] }, - "sudo-prompt@9.2.1": { - "integrity": "sha512-Mu7R0g4ig9TUuGSxJavny5Rv0egCEtpZRNMrZaYS1vxkiIxGiGUwoezU3LazIQ+KE04hTrTfNPgxU5gzi7F5Pw==" - }, "superstruct@1.0.4": { "integrity": "sha512-7JpaAoX2NGyoFlI9NBh66BQXGONc+uE+MRS5i2iOBKuS4e+ccgMDjATgZldkah+33DakBxDHiss9kvUcGAO8UQ==" }, @@ -10745,12 +10249,6 @@ "any-promise" ] }, - "thingies@1.21.0_tslib@2.8.0": { - "integrity": "sha512-hsqsJsFMsV+aD4s3CWKk85ep/3I9XzYV/IXaSouJMYIoDlgyi11cBhsqYe9/geRfB0YIikBQg6raRaM+nIMP9g==", - "dependencies": [ - "tslib@2.8.0" - ] - }, "thread-stream@0.15.2": { "integrity": "sha512-UkEhKIg2pD+fjkHQKyJO3yoIvAP3N6RlNFt2dUhcS1FGvCD1cQa1M/PGknCLFIyZdtJOWQjejp7bdNqmN7zwdA==", "dependencies": [ @@ -10767,15 +10265,6 @@ "xtend" ] }, - "tinybench@2.9.0": { - "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==" - }, - "tinypool@0.8.4": { - "integrity": "sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ==" - }, - "tinyspy@2.2.1": { - "integrity": "sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==" - }, "tmp@0.2.3": { "integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==" }, @@ -10815,12 +10304,6 @@ "punycode" ] }, - "tree-dump@1.0.2_tslib@2.8.0": { - "integrity": "sha512-dpev9ABuLWdEubk+cIaI9cHwRNNDjkBBLXTwI4UCUFdQ5xXKqNXoK4FEciw/vxf+NQ7Cb7sGUyeUtORvHIdRXQ==", - "dependencies": [ - "tslib@2.8.0" - ] - }, "ts-api-utils@1.3.0_typescript@5.6.3": { "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", "dependencies": [ @@ -10871,9 +10354,6 @@ "type-detect@4.0.8": { "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==" }, - "type-detect@4.1.0": { - "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==" - }, "type-fest@0.20.2": { "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==" }, @@ -10988,9 +10468,6 @@ "unicode-property-aliases-ecmascript@2.1.0": { "integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==" }, - "universalify@0.1.2": { - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" - }, "universalify@0.2.0": { "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==" }, @@ -11128,10 +10605,7 @@ "use-sync-external-store" ] }, - "vary@1.1.2": { - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==" - }, - "viem@2.21.32_ws@8.18.0": { + "viem@2.21.32_zod@3.23.8_ws@8.18.0": { "integrity": "sha512-2oXt5JNIb683oy7C8wuIJ/SeL3XtHVMEQpy1U2TA6WMnJQ4ScssRvyPwYLcaP6mKlrGXE/cR/V7ncWpvLUVPYQ==", "dependencies": [ "@adraffy/ens-normalize", @@ -11139,36 +10613,27 @@ "@noble/hashes@1.5.0", "@scure/bip32@1.5.0", "@scure/bip39@1.4.0", - "abitype", + "abitype@1.0.6_zod@3.23.8", "isows", "webauthn-p256", "ws@8.18.0" ] }, - "viem@2.21.32_zod@3.23.8_ws@8.18.0": { - "integrity": "sha512-2oXt5JNIb683oy7C8wuIJ/SeL3XtHVMEQpy1U2TA6WMnJQ4ScssRvyPwYLcaP6mKlrGXE/cR/V7ncWpvLUVPYQ==", + "viem@2.21.44_typescript@5.6.3_ws@8.18.0": { + "integrity": "sha512-oyLTCt7OQUetQN2m9KPNgSA//MzpnQLABAyglPKh+fAypU8cTT/hC5UyLQvaYt4WPg6dkbKOxfsahV4739pu9w==", "dependencies": [ - "@adraffy/ens-normalize", "@noble/curves@1.6.0", "@noble/hashes@1.5.0", "@scure/bip32@1.5.0", "@scure/bip39@1.4.0", - "abitype", + "abitype@1.0.6_typescript@5.6.3", "isows", + "ox", + "typescript", "webauthn-p256", "ws@8.18.0" ] }, - "vite-node@1.6.0_@types+node@20.16.14": { - "integrity": "sha512-de6HJgzC+TFzOu0NTC4RAIsyf/DY/ibWDYQUcuEA84EMHhcefTUGkjFHKKEJhQN4A+6I0u++kr3l36ZF2d7XRw==", - "dependencies": [ - "cac", - "debug@4.3.7", - "pathe", - "picocolors", - "vite" - ] - }, "vite@5.4.9_@types+node@20.16.14": { "integrity": "sha512-20OVpJHh0PAM0oSOELa5GaZNWeDjcAvQjGXy2Uyr+Tp+/D2/Hdz6NLgpJLsarPTA2QJ6v8mX2P1ZfbsSKvdMkg==", "dependencies": [ @@ -11179,34 +10644,6 @@ "rollup@4.24.0" ] }, - "vitest@1.6.0_@types+node@20.16.14_happy-dom@14.12.3_jsdom@24.1.3": { - "integrity": "sha512-H5r/dN06swuFnzNFhq/dnz37bPXnq8xB2xB5JOVk8K09rUtoeNN+LHWkoQ0A/i3hvbUKKcCei9KpbxqHMLhLLA==", - "dependencies": [ - "@types/node@20.16.14", - "@vitest/expect", - "@vitest/runner", - "@vitest/snapshot", - "@vitest/spy", - "@vitest/utils", - "acorn-walk", - "chai", - "debug@4.3.7", - "execa@8.0.1", - "happy-dom", - "jsdom@24.1.3", - "local-pkg", - "magic-string@0.30.12", - "pathe", - "picocolors", - "std-env", - "strip-literal", - "tinybench", - "tinypool", - "vite", - "vite-node", - "why-is-node-running" - ] - }, "vlq@1.0.1": { "integrity": "sha512-gQpnTgkubC6hQgdIcRdYGDSDc+SaujOdyesZQMv6JlfQee/9Mp0Qhnys6WxDWvQnL5WZdT7o2Ul187aSt0Rq+w==" }, @@ -11222,15 +10659,16 @@ "xml-name-validator@5.0.0" ] }, - "wagmi@2.12.23_@tanstack+react-query@5.59.15__react@18.3.1_react@18.3.1_viem@2.21.32__ws@8.18.0_@wagmi+core@2.14.1__viem@2.21.32___ws@8.18.0__@types+react@18.3.11__react@18.3.1__use-sync-external-store@1.2.0___react@18.3.1_react-dom@18.3.1__react@18.3.1_@types+react@18.3.11_use-sync-external-store@1.2.0__react@18.3.1": { - "integrity": "sha512-ENe90We81OjrpnFg14Mr7sxf8K67btsCOdhrySjZ+RyVCG1r2W/YpGqEZha8xzBHqHh8BaCALmAZaBEjbcUSHg==", + "wagmi@2.12.31_@tanstack+react-query@5.59.15__react@18.3.1_react@18.3.1_typescript@5.6.3_viem@2.21.44__typescript@5.6.3__ws@8.18.0_@wagmi+core@2.14.5__typescript@5.6.3__viem@2.21.44___typescript@5.6.3___ws@8.18.0__@types+react@18.3.11__react@18.3.1__use-sync-external-store@1.2.0___react@18.3.1_react-dom@18.3.1__react@18.3.1_@types+react@18.3.11_use-sync-external-store@1.2.0__react@18.3.1_encoding@0.1.13": { + "integrity": "sha512-vUY5fTajLktBPj/JN5XXwu+KrW2x6MQ5dpshJ2col39BToLCMETP6X05YelmEcTKALU4dl06wc+cK5cMPiD+rw==", "dependencies": [ "@tanstack/react-query", "@wagmi/connectors", "@wagmi/core", "react", + "typescript", "use-sync-external-store", - "viem@2.21.32_ws@8.18.0" + "viem@2.21.44_typescript@5.6.3_ws@8.18.0" ] }, "walker@1.0.8": { @@ -11409,13 +10847,6 @@ "isexe" ] }, - "why-is-node-running@2.3.0": { - "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", - "dependencies": [ - "siginfo", - "stackback" - ] - }, "word-wrap@1.2.5": { "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==" }, @@ -11492,8 +10923,8 @@ "xmlcreate@2.0.4": { "integrity": "sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg==" }, - "xmlhttprequest-ssl@2.1.1": { - "integrity": "sha512-ptjR8YSJIXoA3Mbv5po7RtSYHO6mZr8s7i5VGmEk7QY2pQWyT1o0N+W1gKbOyJPUCGXGnuw0wqe8f0L6Y0ny7g==" + "xmlhttprequest-ssl@2.1.2": { + "integrity": "sha512-TEU+nJVUUnA4CYJFLvK5X9AOeH4KvDvhIfm0vV1GaQRtchnG0hgK5p8hw/xjv8cunWYCsiPCSDzObPyhEwq3KQ==" }, "xtend@4.0.2": { "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" @@ -11574,22 +11005,20 @@ "packages/blockchain": { "packageJson": { "dependencies": [ - "npm:viem@^2.16.3", - "npm:vitest@^1.6.0" + "npm:viem@2.21.44" ] } }, "packages/client": { "packageJson": { "dependencies": [ + "npm:@ethereumjs/util@^9.1.0", "npm:@types/node@^20.11.19", "npm:@types/ws@^8.5.10", - "npm:abitype@^1.0.1", "npm:buffer@^6.0.3", "npm:isows@^1.0.3", "npm:long@^5.2.3", - "npm:memfs@^4.7.7", - "npm:viem@^2.16.3", + "npm:viem@2.21.44", "npm:web-streams-polyfill@4" ] } @@ -11645,8 +11074,8 @@ "npm:tailwindcss@^3.3.6", "npm:ts-node@^10.9.2", "npm:typescript@^5.6.3", - "npm:viem@^2.16.3", - "npm:wagmi@^2.10.6" + "npm:viem@2.21.44", + "npm:wagmi@^2.12.31" ] } }, @@ -11665,7 +11094,7 @@ "npm:@ethereumjs/util@^9.0.3", "npm:events@^3.3.0", "npm:memory-level@1", - "npm:viem@^2.16.3" + "npm:viem@2.21.44" ] } }, @@ -11674,7 +11103,7 @@ "dependencies": [ "npm:@sentry/nextjs@^8.36.0", "npm:buffer@^6.0.3", - "npm:viem@^2.16.3" + "npm:viem@2.21.44" ] } } diff --git a/packages/blockchain/mod.ts b/packages/blockchain/mod.ts index 5c48eb77..ab0f886c 100644 --- a/packages/blockchain/mod.ts +++ b/packages/blockchain/mod.ts @@ -1,188 +1,168 @@ // SPDX-FileCopyrightText: 2024 Mass Labs // // SPDX-License-Identifier: MIT - import { + type Abi, type Account, type Address, bytesToHex, type Chain, + type ContractFunctionArgs, + type ContractFunctionName, + type ContractFunctionReturnType, hexToBytes, type PublicClient, type Transport, type WalletClient, + type WriteContractParameters, } from "viem"; import { privateKeyToAccount } from "viem/accounts"; -import { randomBytes } from "@massmarket/utils"; +import { random256BigInt } from "@massmarket/utils"; import * as abi from "@massmarket/contracts"; export type ConcreteWalletClient = WalletClient; -export interface PaymentArgs { - wallet: ConcreteWalletClient; - chainId: number; - ttl: number; - orderHash: `0x${string}`; - currencyAddress: Address; - total: bigint; - payeeAddress: Address; - isPaymentEndpoint: boolean; - shopId: `0x${string}`; - shopSignature: `0x${string}`; -} +type Mutable = "nonpayable" | "payable"; +type ReadOnly = "view" | "pure"; -export function payTokenPreApproved(args: PaymentArgs) { - const paymentArgs = [ - args.chainId, - args.ttl, - args.orderHash, - args.currencyAddress, - args.total, - args.payeeAddress, - args.isPaymentEndpoint, - args.shopId, - args.shopSignature, - ]; - return args.wallet.writeContract({ - address: abi.addresses.Payments as Address, - abi: abi.PaymentsByAddress, - functionName: "payTokenPreApproved", - args: [paymentArgs], - }); +export function genericWriteContract< + const abiT extends Abi, + const FuncName extends ContractFunctionName, +>(abi: abiT, functionName: FuncName, address: Address) { + return ( + wallet: ConcreteWalletClient, + args: ContractFunctionArgs< + abiT, + Mutable, + FuncName + >, + ) => { + return wallet.writeContract({ + chain: wallet.chain, + account: wallet.account, + address, + abi, + functionName, + args, + } as WriteContractParameters); + }; } -export function payNative(args: PaymentArgs) { - const paymentArgs = [ - args.chainId, - args.ttl, - args.orderHash, - args.currencyAddress, - args.total, - args.payeeAddress, - args.isPaymentEndpoint, - args.shopId, - args.shopSignature, - ]; - return args.wallet.writeContract({ - address: abi.addresses.Payments as Address, - abi: abi.PaymentsByAddress, - functionName: "payNative", - value: args.total, - args: [paymentArgs], - }); +export function genericReadContract< + const abiT extends Abi, + const FuncName extends ContractFunctionName, +>(abi: abiT, functionName: FuncName, address: Address) { + return ( + wallet: PublicClient, + args: ContractFunctionArgs< + abiT, + ReadOnly, + FuncName + >, + ): Promise< + ContractFunctionReturnType< + abiT, + ReadOnly, + FuncName, + ContractFunctionArgs + > + > => { + return wallet.readContract({ + address, + abi, + functionName, + args, + }); + }; } -export function getPaymentAddress( - args: Omit & { - refundAddress: Address; - wallet: PublicClient; - }, -) { - const paymentArgs = [ - args.chainId, - args.ttl, - args.orderHash, - args.currencyAddress, - args.total, - args.payeeAddress, - args.isPaymentEndpoint, - args.shopId, - args.shopSignature, - ]; - return args.wallet.readContract({ - address: abi.addresses.Payments as Address, - abi: abi.PaymentsByAddress, - functionName: "getPaymentAddress", - args: [paymentArgs, args.refundAddress], - }) as Promise
; -} +export const payTokenPreApproved = genericWriteContract( + abi.paymentsByAddressAbi, + "payTokenPreApproved", + abi.addresses.Payments, +); -export function getPaymentId( - args: Omit & { - wallet: PublicClient; - }, -) { - const paymentArgs = [ - args.chainId, - args.ttl, - args.orderHash, - args.currencyAddress, - args.total, - args.payeeAddress, - args.isPaymentEndpoint, - args.shopId, - args.shopSignature, - ]; - return args.wallet.readContract({ - address: abi.addresses.Payments as Address, - abi: abi.PaymentsByAddress, - functionName: "getPaymentId", - args: [paymentArgs], - }) as Promise; -} +export const payNative = genericWriteContract( + abi.paymentsByAddressAbi, + "payNative", + abi.addresses.Payments, +); -export async function getPaymentAddressAndID( - args: Omit & { - refundAddress: Address; - wallet: PublicClient; - }, -) { - return { - address: await getPaymentAddress(args), - id: await getPaymentId(args), - }; -} +export const getPaymentAddress = genericReadContract( + abi.paymentsByAddressAbi, + "getPaymentAddress", + abi.addresses.Payments, +); + +export const getPaymentId = genericReadContract( + abi.paymentsByAddressAbi, + "getPaymentId", + abi.addresses.Payments, +); export function approveERC20( wallet: ConcreteWalletClient, - currencyAddress: Address, - amount: bigint, + address: Address, + args: ContractFunctionArgs< + typeof abi.eddiesAbi, + "nonpayable" | "payable", + "approve" + >, ) { return wallet.writeContract({ - address: currencyAddress, - abi: abi.ERC20, + address, + abi: abi.eddiesAbi, functionName: "approve", - args: [abi.addresses.Payments, amount], + args, }); } +export const addRelay = genericWriteContract( + abi.shopRegAbi, + "addRelay", + abi.addresses.ShopReg, +); + +export const setTokenURI = genericWriteContract( + abi.shopRegAbi, + "setTokenURI", + abi.addresses.ShopReg, +); + +export const publishInviteVerifier = genericWriteContract( + abi.shopRegAbi, + "publishInviteVerifier", + abi.addresses.ShopReg, +); + +export const redeemInvite = genericWriteContract( + abi.shopRegAbi, + "redeemInvite", + abi.addresses.ShopReg, +); + +export const mintShop = genericWriteContract( + abi.shopRegAbi, + "mint", + abi.addresses.ShopReg, +); export class BlockchainClient { - constructor(public shopId = bytesToHex(randomBytes(32))) {} + constructor(public shopId = random256BigInt()) {} - addRelay(wallet: ConcreteWalletClient, tokenId: `0x${string}`) { - return wallet.writeContract({ - address: abi.addresses.ShopReg as Address, - abi: abi.ShopReg, - functionName: "addRelay", - args: [BigInt(this.shopId), tokenId], - }); + addRelay(wallet: ConcreteWalletClient, tokenId: bigint) { + return addRelay(wallet, [this.shopId, tokenId]); } createShop(wallet: ConcreteWalletClient) { - return wallet.writeContract({ - address: abi.addresses.ShopReg as Address, - abi: abi.ShopReg, - functionName: "mint", - args: [BigInt(this.shopId), wallet.account.address], - }); + return mintShop(wallet, [this.shopId, wallet.account.address]); } setShopMetadataURI(wallet: ConcreteWalletClient, uri: string) { - return wallet.writeContract({ - address: abi.addresses.ShopReg as Address, - abi: abi.ShopReg, - functionName: "setTokenURI", - args: [BigInt(this.shopId), uri], - }); + return setTokenURI(wallet, [this.shopId, uri]); } createInviteSecret(wallet: ConcreteWalletClient, token: Address) { // Save the public key onchain - return wallet.writeContract({ - address: abi.addresses.ShopReg as Address, - abi: abi.ShopReg, - functionName: "publishInviteVerifier", - args: [BigInt(this.shopId), token], - }); + return publishInviteVerifier(wallet, [this.shopId, token]); } async redeemInviteSecret(secret: Address, wallet: ConcreteWalletClient) { @@ -195,11 +175,6 @@ export class BlockchainClient { const v = sigBytes[64]; const r = bytesToHex(sigBytes.slice(0, 32)); const s = bytesToHex(sigBytes.slice(32, 64)); - return wallet.writeContract({ - address: abi.addresses.ShopReg as Address, - abi: abi.ShopReg, - functionName: "redeemInvite", - args: [BigInt(this.shopId), v, r, s, wallet.account.address], - }); + return redeemInvite(wallet, [this.shopId, v, r, s, wallet.account.address]); } } diff --git a/packages/blockchain/mod_test.ts b/packages/blockchain/mod_test.ts index 1ba60e49..230478c3 100644 --- a/packages/blockchain/mod_test.ts +++ b/packages/blockchain/mod_test.ts @@ -10,7 +10,7 @@ import { import { privateKeyToAccount } from "viem/accounts"; import { hardhat } from "viem/chains"; import * as abi from "@massmarket/contracts"; -import { random32BytesHex } from "@massmarket/utils"; +import { random256BigInt } from "@massmarket/utils"; import { BlockchainClient } from "./mod.ts"; const account = privateKeyToAccount( @@ -18,7 +18,7 @@ const account = privateKeyToAccount( ); let blockChainClient: BlockchainClient; -const shopId = random32BytesHex(); +const shopId = random256BigInt(); describe({ name: "blockChain Client", @@ -45,11 +45,18 @@ describe({ it("setShopMetadataURI", async () => { blockChainClient = new BlockchainClient(shopId); const test_uri = "/testing/path"; - await blockChainClient.setShopMetadataURI(wallet, test_uri); + const transactionHash = await blockChainClient.setShopMetadataURI( + wallet, + test_uri, + ); + const receipt = await publicClient.waitForTransactionReceipt({ + hash: transactionHash, + }); + expect(receipt.status).toBe("success"); const uri = await publicClient.readContract({ address: abi.addresses.ShopReg as Address, - abi: abi.ShopReg, + abi: abi.shopRegAbi, functionName: "tokenURI", args: [shopId], }); diff --git a/packages/blockchain/package.json b/packages/blockchain/package.json index 8e16a794..33d5409b 100644 --- a/packages/blockchain/package.json +++ b/packages/blockchain/package.json @@ -17,7 +17,6 @@ "dependencies": { "@massmarket/contracts": "workspace:*", "@massmarket/utils": "workspace:*", - "viem": "^2.16.3", - "vitest": "^1.6.0" + "viem": "2.21.44" } } diff --git a/packages/client/guestCheckout_test.ts b/packages/client/guestCheckout_test.ts index 897c30d9..f2d4c93f 100644 --- a/packages/client/guestCheckout_test.ts +++ b/packages/client/guestCheckout_test.ts @@ -8,30 +8,30 @@ import { describe, it } from "jsr:@std/testing/bdd"; import { type Account, type Address, + bytesToBigInt, createPublicClient, createWalletClient, hexToBytes, http, - pad, toHex, -} from "viem"; -import { hardhat } from "viem/chains"; -import { privateKeyToAccount } from "viem/accounts"; -import { random32BytesHex } from "@massmarket/utils"; -import * as abi from "@massmarket/contracts"; +} from "npm:viem"; +import { hardhat } from "npm:viem/chains"; +import { privateKeyToAccount } from "npm:viem/accounts"; +import { random256BigInt, random32BytesHex } from "@massmarket/utils"; import { + addresses, anvilPrivateKey2, - objectId, - priceToUint256, - randomAddress, - zeroAddress, -} from "@massmarket/utils"; + eddiesAbi, + paymentsByAddressAbi, +} from "@massmarket/contracts"; +import { objectId, priceToUint256, randomAddress } from "@massmarket/utils"; import { BlockchainClient, type ConcreteWalletClient, } from "@massmarket/blockchain"; import { discoverRelay, RelayClient } from "./mod.ts"; import type schema from "../schema/mod.ts"; +import { bytesToHex } from "jsr:@wevm/viem/utils"; describe({ name: "guestCheckout", @@ -62,7 +62,7 @@ describe({ }); } - const shopId = random32BytesHex(); + const shopId = random256BigInt(); const blockchain = new BlockchainClient(shopId); it("create shop", async () => { @@ -92,7 +92,7 @@ describe({ // create a random address to pay to const payee: Uint8Array = hexToBytes(randomAddress()); - const currency: Uint8Array = hexToBytes(abi.addresses.Eddies as Address); + const currency: Uint8Array = hexToBytes(addresses.Eddies as Address); it("write shop manifest", async () => { await relayClient.connect(); @@ -158,7 +158,7 @@ describe({ await wallet.sendTransaction({ account, to: guestAccount.address, - value: BigInt("250000000000000000"), + value: 250000000000000000n, }); const w = createWalletClient({ account: guestAccount, @@ -242,6 +242,7 @@ describe({ }); const stream = guestRelayClient.createEventStream(); for await (const { event } of stream) { + console.log("here!!", event); //FIXME: not getting payment details currently for guests. use payTokenPreApproved here once paymentdetails comes through. if (event.updateOrder?.setPaymentDetails) { return; @@ -267,10 +268,10 @@ describe({ it("single item checkout with a guest", async () => { // give the guest account some money to spend const txHash1 = await wallet.writeContract({ - address: abi.addresses.Eddies as Address, - abi: abi.Eddies, + address: addresses.Eddies as Address, + abi: eddiesAbi, functionName: "mint", - args: [guestAccount.address, 999999999999], + args: [guestAccount.address, 999999999999n], }); const receipt1 = await publicClient.waitForTransactionReceipt({ @@ -280,10 +281,10 @@ describe({ // allow the payment contract to transfer on behalf of the guest user const txHash2 = await guestWallet.writeContract({ - address: abi.addresses.Eddies as Address, - abi: abi.Eddies, + address: addresses.Eddies as Address, + abi: eddiesAbi, functionName: "approve", - args: [abi.addresses.Payments, 9999999999], + args: [addresses.Payments, 9999999999n], }); const receipt2 = await publicClient.waitForTransactionReceipt({ hash: txHash2, @@ -295,20 +296,20 @@ describe({ for await (const { event } of stream) { if (event.updateOrder?.setPaymentDetails) { const order = event.updateOrder.setPaymentDetails; - const args = [ - 31337, - order.ttl, - pad(zeroAddress, { size: 32 }), //orderHash - toHex(currency), //currency address - toHex(order.total!.raw!), - toHex(payee), //payee address - false, // is paymentendpoint? - shopId, - toHex(order.shopSignature!.raw!), - ]; + const args = { + chainId: 31337n, + ttl: BigInt(order.ttl!), + order: bytesToHex(new Uint8Array(32)), + currency: toHex(currency), //currency address + amount: bytesToBigInt(order.total!.raw!), + payeeAddress: toHex(payee), //payee address + isPaymentEndpoint: false, // is paymentendpoint? + shopId: shopId, + shopSignature: toHex(order.shopSignature!.raw!), + }; const paymentId = (await publicClient.readContract({ - address: abi.addresses.Payments as Address, - abi: abi.PaymentsByAddress, + address: addresses.Payments as Address, + abi: paymentsByAddressAbi, functionName: "getPaymentId", args: [args], })) as bigint; @@ -316,8 +317,8 @@ describe({ // call the pay function const hash = await guestWallet.writeContract({ - address: abi.addresses.Payments as Address, - abi: abi.PaymentsByAddress, + address: addresses.Payments as Address, + abi: paymentsByAddressAbi, functionName: "pay", args: [args], }); @@ -331,7 +332,7 @@ describe({ // TODO: add timeout if (event.updateOrder?.addPaymentTx) { expect(event.updateOrder.id).toEqual(orderId); - expect(toHex(event.updateOrder.addPaymentTx.txHash.raw)).toEqual( + expect(toHex(event.updateOrder!.addPaymentTx!.txHash!.raw!)).toEqual( paymentHash, ); return; diff --git a/packages/client/mod.ts b/packages/client/mod.ts index 6006d617..d7595fb2 100644 --- a/packages/client/mod.ts +++ b/packages/client/mod.ts @@ -8,6 +8,7 @@ import { WebSocket } from "isows"; import { hexToBigInt, hexToBytes, toBytes } from "viem"; import type { PrivateKeyAccount } from "viem/accounts"; import { createSiweMessage } from "viem/siwe"; +import { bigIntToBytes } from "@ethereumjs/util"; import schema, { EnvelopMessageTypes } from "@massmarket/schema"; import type { ConcreteWalletClient } from "@massmarket/blockchain"; @@ -172,8 +173,8 @@ export class RelayClient extends EventEmitter { this.eventNonceCounter = counter; } - shopManifest(manifest: schema.IManifest, shopId: `0x${string}`) { - manifest.tokenId = { raw: hexToBytes(shopId) }; + shopManifest(manifest: schema.IManifest, shopId: bigint) { + manifest.tokenId = { raw: bigIntToBytes(shopId) }; return this.sendShopEvent({ manifest: manifest, }); @@ -273,7 +274,7 @@ export class RelayClient extends EventEmitter { }); } - async sendMerchantSubscriptionRequest(shopId: `0x${string}`, seqNo = 0) { + async sendMerchantSubscriptionRequest(shopId: bigint, seqNo = 0) { assert( this.subscriptionId == null, "subscriptionId is already set. cancel first.", @@ -289,15 +290,14 @@ export class RelayClient extends EventEmitter { const { response } = await this.encodeAndSend({ subscriptionRequest: { startShopSeqNo: seqNo, - shopId: { raw: hexToBytes(shopId) }, + shopId: { raw: bigIntToBytes(shopId) }, filters, }, }); - assert(response, "response is required"); - assert(response.payload, "response.payload is required"); + assert(response?.payload, "response.payload is required"); this.subscriptionId = response.payload; } - async sendGuestCheckoutSubscriptionRequest(shopId: `0x${string}`, seqNo = 0) { + async sendGuestCheckoutSubscriptionRequest(shopId: bigint, seqNo = 0) { assert( this.subscriptionId == null, "subscriptionId is already set. cancel first.", @@ -312,7 +312,7 @@ export class RelayClient extends EventEmitter { const { response } = await this.encodeAndSend({ subscriptionRequest: { startShopSeqNo: seqNo, - shopId: { raw: hexToBytes(shopId) }, + shopId: { raw: bigIntToBytes(shopId) }, filters, }, }); @@ -320,7 +320,7 @@ export class RelayClient extends EventEmitter { this.subscriptionId = response.payload; } - async sendGuestSubscriptionRequest(shopId: `0x${string}`, seqNo = 0) { + async sendGuestSubscriptionRequest(shopId: bigint, seqNo = 0) { assert( this.subscriptionId == null, "subscriptionId is already set. cancel first.", @@ -334,7 +334,7 @@ export class RelayClient extends EventEmitter { const { response } = await this.encodeAndSend({ subscriptionRequest: { startShopSeqNo: seqNo, - shopId: { raw: hexToBytes(shopId) }, + shopId: { raw: bigIntToBytes(shopId) }, filters, }, }); @@ -418,7 +418,7 @@ export class RelayClient extends EventEmitter { async enrollKeycard( wallet: ConcreteWalletClient, isGuest: boolean = true, - shopId: `0x${string}`, + shopId: bigint, location?: URL, ) { const publicKey = toBytes(this.keyCardWallet.publicKey).slice(1); @@ -437,7 +437,7 @@ export class RelayClient extends EventEmitter { version: "1", resources: [ `mass-relayid:${hexToBigInt(this.relayEndpoint.tokenId)}`, - `mass-shopid:${hexToBigInt(shopId)}`, + `mass-shopid:${shopId}`, `mass-keycard:${Buffer.from(publicKey).toString("hex")}`, ], }); diff --git a/packages/client/mod_test.ts b/packages/client/mod_test.ts index 0d1f47ba..33e7e904 100644 --- a/packages/client/mod_test.ts +++ b/packages/client/mod_test.ts @@ -2,34 +2,35 @@ // // SPDX-License-Identifier: MIT -import { WebSocket } from "isows"; +import { WebSocket } from "npm:isows"; import { - type Address, + bytesToBigInt, + bytesToHex, createPublicClient, createWalletClient, - hexToBigInt, hexToBytes, http, - pad, - toBytes, toHex, -} from "viem"; -import { hardhat } from "viem/chains"; -import { privateKeyToAccount } from "viem/accounts"; +} from "npm:viem"; +import { hardhat } from "npm:viem/chains"; +import { privateKeyToAccount } from "npm:viem/accounts"; import { beforeAll, beforeEach, describe, test } from "jsr:@std/testing/bdd"; import { expect } from "jsr:@std/expect"; - import { - anvilAddress, - anvilPrivateKey, objectId, priceToUint256, + random256BigInt, random32BytesHex, randomBytes, - zeroAddress, } from "@massmarket/utils"; -import * as abi from "@massmarket/contracts"; -import { BlockchainClient } from "@massmarket/blockchain"; +import { + addresses, + anvilPrivateKey, + paymentsByAddressAbi, + permissions, + shopRegAbi, +} from "@massmarket/contracts"; +import { BlockchainClient, mintShop } from "@massmarket/blockchain"; import { discoverRelay, RelayClient } from "./mod.ts"; @@ -50,7 +51,7 @@ const publicClient = createPublicClient({ transport: http(), }); -const shopId = random32BytesHex(); +const shopId = random256BigInt(); let blockchain: BlockchainClient; const relayURL = Deno.env.get("RELAY_ENDPOINT") || "ws://localhost:4444/v3"; const relayEndpoint = await discoverRelay(relayURL); @@ -72,10 +73,11 @@ describe({ }); describe("RelayClient", () => { const relayClient = createRelayClient(); - test("should create a shop", async () => { - const transactionHash = await blockchain.createShop(wallet); - // wait for the transaction to be included in the blockchain + const transactionHash = await mintShop(wallet, [ + shopId, + wallet.account.address, + ]); // wait for the transaction to be included in the blockchain const receipt = await publicClient.waitForTransactionReceipt({ hash: transactionHash, }); @@ -123,26 +125,27 @@ describe({ // verify access level const canUpdateRootHash = await publicClient.readContract({ - address: abi.addresses.ShopReg as Address, - abi: abi.ShopReg, + address: addresses.ShopReg, + abi: shopRegAbi, functionName: "hasPermission", args: [ blockchain.shopId, acc2.address, - abi.permissions.updateRootHash, + permissions.updateRootHash, ], }); expect(canUpdateRootHash).toBe(true); const canRemoveUser = await publicClient.readContract({ - address: abi.addresses.ShopReg as Address, - abi: abi.ShopReg, + address: addresses.ShopReg, + abi: shopRegAbi, functionName: "hasPermission", - args: [blockchain.shopId, acc2.address, abi.permissions.removeUser], + args: [blockchain.shopId, acc2.address, permissions.removeUser], }); expect(canRemoveUser).toBe(false); - - await relayClient2.disconnect(); - await relayClient.disconnect(); + await Promise.all([ + relayClient2.disconnect(), + relayClient.disconnect(), + ]); }); }); @@ -187,7 +190,7 @@ describe({ payees: [ { address: { - raw: toBytes(anvilAddress), + raw: hexToBytes(addresses.anvilAddress), }, callAsContract: false, chainId: 31337, @@ -197,12 +200,12 @@ describe({ acceptedCurrencies: [ { chainId: 10, - address: { raw: hexToBytes(zeroAddress) }, + address: { raw: hexToBytes(addresses.zeroAddress) }, }, ], pricingCurrency: { chainId: 10, - address: { raw: hexToBytes(zeroAddress) }, + address: { raw: hexToBytes(addresses.zeroAddress) }, }, shippingRegions: [ { @@ -221,11 +224,11 @@ describe({ await relayClient.updateShopManifest({ addAcceptedCurrencies: [ { - address: { raw: hexToBytes(abi.addresses.Eddies as Address) }, + address: { raw: hexToBytes(addresses.Eddies) }, chainId: 31337, }, { - address: { raw: hexToBytes(zeroAddress) }, + address: { raw: hexToBytes(addresses.zeroAddress) }, chainId: 31337, }, ], @@ -233,7 +236,7 @@ describe({ await relayClient.updateShopManifest({ removeAcceptedCurrencies: [ { - address: { raw: hexToBytes(abi.addresses.Eddies as Address) }, + address: { raw: hexToBytes(addresses.Eddies) }, chainId: 31337, }, ], @@ -357,15 +360,16 @@ describe({ }, }); await relayClient.updateOrder({ id: orderId, commitItems: {} }); + console.log("he#####"); await relayClient.updateOrder({ id: orderId, choosePayment: { currency: { chainId: 31337, - address: { raw: hexToBytes(zeroAddress) }, + address: { raw: hexToBytes(addresses.zeroAddress) }, }, payee: { - address: { raw: toBytes(anvilAddress) }, + address: { raw: hexToBytes(addresses.anvilAddress) }, callAsContract: false, chainId: 31337, name: "default", @@ -377,25 +381,24 @@ describe({ for await (const { event } of stream) { if (event.updateOrder?.setPaymentDetails) { const paymentDetails = event.updateOrder.setPaymentDetails; - const zeros32Bytes = pad(zeroAddress, { size: 32 }); - const total = toHex(paymentDetails.total!.raw!); - const args = [ - 31337, // chainid - paymentDetails.ttl, - zeros32Bytes, - zeroAddress, - total, - anvilAddress, - false, // is paymentendpoint? - shopId, - toHex(paymentDetails.shopSignature!.raw!), - ]; - const paymentId = (await publicClient.readContract({ - address: abi.addresses.Payments as Address, - abi: abi.PaymentsByAddress, + const total = paymentDetails.total!.raw!; + const args = { + chainId: 31337n, + ttl: BigInt(paymentDetails.ttl!), + order: bytesToHex(new Uint8Array(32)), + currency: addresses.zeroAddress, //currency address + amount: bytesToBigInt(total), + payeeAddress: addresses.anvilAddress, //payee address + isPaymentEndpoint: false, // is paymentendpoint? + shopId: shopId, + shopSignature: toHex(paymentDetails.shopSignature!.raw!), + }; + const paymentId = await publicClient.readContract({ + address: addresses.Payments, + abi: paymentsByAddressAbi, functionName: "getPaymentId", args: [args], - })) as bigint; + }); // TODO: toHex is not padding BigInt coerrect, so this cause random test // failures @@ -403,11 +406,11 @@ describe({ toHex(paymentId), ); const hash = await wallet.writeContract({ - address: abi.addresses.Payments as Address, - abi: abi.PaymentsByAddress, + address: addresses.Payments, + abi: paymentsByAddressAbi, functionName: "pay", args: [args], - value: hexToBigInt(total), + value: bytesToBigInt(total), }); const receipt = await publicClient.waitForTransactionReceipt({ hash, @@ -419,9 +422,10 @@ describe({ // TODO: add timeout if (event.updateOrder?.addPaymentTx) { expect(event.updateOrder.id).toEqual(orderId); - expect(toHex(event.updateOrder.addPaymentTx.txHash.raw)).toEqual( - paymentHash, - ); + expect(toHex(event!.updateOrder!.addPaymentTx!.txHash!.raw!)) + .toEqual( + paymentHash, + ); return; } } @@ -448,7 +452,7 @@ describe({ await wallet.sendTransaction({ account, to: acc2.address, - value: BigInt("250000000000000000"), + value: 250000000000000000n, }); client2Wallet = createWalletClient({ account: acc2, @@ -503,7 +507,7 @@ describe({ describe("If there is a network error, state manager should not change the state.", () => { const client = createRelayClient(); - const shopId = random32BytesHex(); + const shopId = random256BigInt(); const blockchain = new BlockchainClient(shopId); test("Bad network calls should not change state data", async () => { @@ -527,7 +531,7 @@ describe({ payees: [ { address: { - raw: toBytes(anvilAddress), + raw: hexToBytes(addresses.anvilAddress), }, callAsContract: false, chainId: 1, @@ -537,12 +541,12 @@ describe({ acceptedCurrencies: [ { chainId: 10, - address: { raw: hexToBytes(zeroAddress) }, + address: { raw: hexToBytes(addresses.anvilAddress) }, }, ], pricingCurrency: { chainId: 10, - address: { raw: hexToBytes(zeroAddress) }, + address: { raw: hexToBytes(addresses.anvilAddress) }, }, shippingRegions: [ { diff --git a/packages/client/package.json b/packages/client/package.json index b6c638c9..de38417f 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -8,27 +8,25 @@ ".": { "default": "./mod.ts" }, - "./stream": { "default": "./stream.ts" } }, "dependencies": { + "@ethereumjs/util": "^9.1.0", "@massmarket/blockchain": "workspace:*", "@massmarket/contracts": "workspace:*", "@massmarket/schema": "workspace:*", "@massmarket/utils": "workspace:*", - "abitype": "^1.0.1", "buffer": "^6.0.3", "isows": "^1.0.3", "long": "^5.2.3", - "viem": "^2.16.3", + "viem": "2.21.44", "web-streams-polyfill": "^4.0.0" }, "devDependencies": { "@types/node": "^20.11.19", - "@types/ws": "^8.5.10", - "memfs": "^4.7.7" + "@types/ws": "^8.5.10" }, "type": "module" } diff --git a/packages/client/stream.ts b/packages/client/stream.ts index 70920325..e75e1de3 100644 --- a/packages/client/stream.ts +++ b/packages/client/stream.ts @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: 2024 Mass Labs // // SPDX-License-Identifier: MIT -import { ReadableStream } from "web-streams-polyfill"; +// import { ReadableStream } from "web-streams-polyfill"; import { recoverMessageAddress } from "viem"; import Long from "long"; diff --git a/packages/client/stream_test.ts b/packages/client/stream_test.ts index 05ec5bc4..1602c7c9 100644 --- a/packages/client/stream_test.ts +++ b/packages/client/stream_test.ts @@ -9,7 +9,8 @@ import { expect } from "jsr:@std/expect"; import { privateKeyToAccount } from "jsr:@wevm/viem/accounts"; import { hexToBytes } from "jsr:@wevm/viem"; import schema, { testVectors } from "@massmarket/schema"; -import { anvilPrivateKey, objectId, priceToUint256 } from "@massmarket/utils"; +import { objectId, priceToUint256 } from "@massmarket/utils"; +import { anvilPrivateKey } from "@massmarket/contracts"; import { ReadableEventStream } from "./stream.ts"; const account = privateKeyToAccount(anvilPrivateKey); diff --git a/packages/contracts/deno.json b/packages/contracts/deno.json index ccf69d74..915d7e7a 100644 --- a/packages/contracts/deno.json +++ b/packages/contracts/deno.json @@ -4,5 +4,8 @@ "exports": "./mod.ts", "fmt": { "exclude": ["./deploymentAddresses.json"] + }, + "tasks": { + "build": "deno run --allow-run --allow-sys --allow-env --allow-read --allow-write npm:@wagmi/cli generate" } } diff --git a/packages/contracts/mod.ts b/packages/contracts/mod.ts index 5b68336f..a93c527d 100644 --- a/packages/contracts/mod.ts +++ b/packages/contracts/mod.ts @@ -2,25 +2,13 @@ // // SPDX-License-Identifier: Unlicense -import addresses from "./deploymentAddresses.json" with { type: "json" }; -export { addresses }; +import contractAddresses from "./deploymentAddresses.json" with { + type: "json", +}; import tokenAddresses from "./tokenAddresses.json" with { type: "json" }; export { tokenAddresses }; -import Payments from "./abi/Payments.json" with { type: "json" }; -export { Payments }; +export * from "./src/generated.ts"; -import PaymentsByAddress from "./abi/PaymentsByAddress.json" with { - type: "json", -}; -export { PaymentsByAddress }; -import RelayReg from "./abi/RelayReg.json" with { type: "json" }; -export { RelayReg }; -import ShopReg from "./abi/ShopReg.json" with { type: "json" }; -export { ShopReg }; -import ERC20 from "./abi/ERC20.json" with { type: "json" }; -export { ERC20 }; -import Eddies from "./abi/Eddies.json" with { type: "json" }; -export { Eddies }; export const permissions = { addPermission: 0, removePermission: 1, @@ -31,5 +19,18 @@ export const permissions = { registerUser: 6, removeUser: 7, publishInviteVerifier: 8, +} as const; + +const _addresses = { + ...contractAddresses, + anvilAddress: "0xa0Ee7A142d267C1f36714E4a8F75612F20a79720", + zeroAddress: "0x0000000000000000000000000000000000000000", }; -export const zeroAddress = "0x0000000000000000000000000000000000000000"; + +type Addresses = Record; +export const addresses = _addresses as Addresses; + +export const anvilPrivateKey = + "0x2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6" as const; +export const anvilPrivateKey2 = + "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" as const; diff --git a/packages/contracts/src/generated.ts b/packages/contracts/src/generated.ts new file mode 100644 index 00000000..7c48d698 --- /dev/null +++ b/packages/contracts/src/generated.ts @@ -0,0 +1,4356 @@ +import { + createUseReadContract, + createUseSimulateContract, + createUseWatchContractEvent, + createUseWriteContract, +} from "wagmi/codegen"; + +import { + createReadContract, + createSimulateContract, + createWatchContractEvent, + createWriteContract, +} from "wagmi/codegen"; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Eddies +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +export const eddiesAbi = [ + { + type: "constructor", + inputs: [ + { name: "_name", internalType: "string", type: "string" }, + { name: "_symbol", internalType: "string", type: "string" }, + { name: "_decimals", internalType: "uint8", type: "uint8" }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "DOMAIN_SEPARATOR", + outputs: [{ name: "result", internalType: "bytes32", type: "bytes32" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "owner", internalType: "address", type: "address" }, + { name: "spender", internalType: "address", type: "address" }, + ], + name: "allowance", + outputs: [{ name: "result", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "spender", internalType: "address", type: "address" }, + { name: "amount", internalType: "uint256", type: "uint256" }, + ], + name: "approve", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "owner", internalType: "address", type: "address" }], + name: "balanceOf", + outputs: [{ name: "result", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "from", internalType: "address", type: "address" }, + { name: "value", internalType: "uint256", type: "uint256" }, + ], + name: "burn", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "decimals", + outputs: [{ name: "", internalType: "uint8", type: "uint8" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "owner", internalType: "address", type: "address" }, + { name: "spender", internalType: "address", type: "address" }, + { name: "amount", internalType: "uint256", type: "uint256" }, + ], + name: "directSpendAllowance", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "from", internalType: "address", type: "address" }, + { name: "to", internalType: "address", type: "address" }, + { name: "amount", internalType: "uint256", type: "uint256" }, + ], + name: "directTransfer", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "to", internalType: "address", type: "address" }, + { name: "value", internalType: "uint256", type: "uint256" }, + ], + name: "mint", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "name", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "owner", internalType: "address", type: "address" }], + name: "nonces", + outputs: [{ name: "result", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "owner", internalType: "address", type: "address" }, + { name: "spender", internalType: "address", type: "address" }, + { name: "value", internalType: "uint256", type: "uint256" }, + { name: "deadline", internalType: "uint256", type: "uint256" }, + { name: "v", internalType: "uint8", type: "uint8" }, + { name: "r", internalType: "bytes32", type: "bytes32" }, + { name: "s", internalType: "bytes32", type: "bytes32" }, + ], + name: "permit", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "symbol", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "totalSupply", + outputs: [{ name: "result", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "to", internalType: "address", type: "address" }, + { name: "amount", internalType: "uint256", type: "uint256" }, + ], + name: "transfer", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "from", internalType: "address", type: "address" }, + { name: "to", internalType: "address", type: "address" }, + { name: "amount", internalType: "uint256", type: "uint256" }, + ], + name: "transferFrom", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "nonpayable", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "owner", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "spender", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "amount", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "Approval", + }, + { + type: "event", + anonymous: false, + inputs: [ + { name: "from", internalType: "address", type: "address", indexed: true }, + { name: "to", internalType: "address", type: "address", indexed: true }, + { + name: "amount", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "Transfer", + }, + { type: "error", inputs: [], name: "AllowanceOverflow" }, + { type: "error", inputs: [], name: "AllowanceUnderflow" }, + { type: "error", inputs: [], name: "InsufficientAllowance" }, + { type: "error", inputs: [], name: "InsufficientBalance" }, + { type: "error", inputs: [], name: "InvalidPermit" }, + { type: "error", inputs: [], name: "PermitExpired" }, + { type: "error", inputs: [], name: "TotalSupplyOverflow" }, +] as const; + +export const eddiesAddress = + "0xB76331fe2b5a68d9609d7e391827ecB9a82ecaA6" as const; + +export const eddiesConfig = { address: eddiesAddress, abi: eddiesAbi } as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// PaymentsByAddress +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +export const paymentsByAddressAbi = [ + { + type: "constructor", + inputs: [ + { name: "permit2", internalType: "contract IPermit2", type: "address" }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { + name: "payments", + internalType: "struct PaymentRequest[]", + type: "tuple[]", + components: [ + { name: "chainId", internalType: "uint256", type: "uint256" }, + { name: "ttl", internalType: "uint256", type: "uint256" }, + { name: "order", internalType: "bytes32", type: "bytes32" }, + { name: "currency", internalType: "address", type: "address" }, + { name: "amount", internalType: "uint256", type: "uint256" }, + { name: "payeeAddress", internalType: "address", type: "address" }, + { name: "isPaymentEndpoint", internalType: "bool", type: "bool" }, + { name: "shopId", internalType: "uint256", type: "uint256" }, + { name: "shopSignature", internalType: "bytes", type: "bytes" }, + ], + }, + { name: "refunds", internalType: "address payable[]", type: "address[]" }, + ], + name: "batch", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { + name: "payment", + internalType: "struct PaymentRequest", + type: "tuple", + components: [ + { name: "chainId", internalType: "uint256", type: "uint256" }, + { name: "ttl", internalType: "uint256", type: "uint256" }, + { name: "order", internalType: "bytes32", type: "bytes32" }, + { name: "currency", internalType: "address", type: "address" }, + { name: "amount", internalType: "uint256", type: "uint256" }, + { name: "payeeAddress", internalType: "address", type: "address" }, + { name: "isPaymentEndpoint", internalType: "bool", type: "bool" }, + { name: "shopId", internalType: "uint256", type: "uint256" }, + { name: "shopSignature", internalType: "bytes", type: "bytes" }, + ], + }, + { name: "refund", internalType: "address", type: "address" }, + ], + name: "getBytecode", + outputs: [{ name: "", internalType: "bytes", type: "bytes" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { + name: "payment", + internalType: "struct PaymentRequest", + type: "tuple", + components: [ + { name: "chainId", internalType: "uint256", type: "uint256" }, + { name: "ttl", internalType: "uint256", type: "uint256" }, + { name: "order", internalType: "bytes32", type: "bytes32" }, + { name: "currency", internalType: "address", type: "address" }, + { name: "amount", internalType: "uint256", type: "uint256" }, + { name: "payeeAddress", internalType: "address", type: "address" }, + { name: "isPaymentEndpoint", internalType: "bool", type: "bool" }, + { name: "shopId", internalType: "uint256", type: "uint256" }, + { name: "shopSignature", internalType: "bytes", type: "bytes" }, + ], + }, + { name: "refund", internalType: "address", type: "address" }, + ], + name: "getPaymentAddress", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { + name: "payment", + internalType: "struct PaymentRequest", + type: "tuple", + components: [ + { name: "chainId", internalType: "uint256", type: "uint256" }, + { name: "ttl", internalType: "uint256", type: "uint256" }, + { name: "order", internalType: "bytes32", type: "bytes32" }, + { name: "currency", internalType: "address", type: "address" }, + { name: "amount", internalType: "uint256", type: "uint256" }, + { name: "payeeAddress", internalType: "address", type: "address" }, + { name: "isPaymentEndpoint", internalType: "bool", type: "bool" }, + { name: "shopId", internalType: "uint256", type: "uint256" }, + { name: "shopSignature", internalType: "bytes", type: "bytes" }, + ], + }, + ], + name: "getPaymentId", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "pure", + }, + { + type: "function", + inputs: [ + { name: "from", internalType: "address", type: "address" }, + { + name: "payment", + internalType: "struct PaymentRequest", + type: "tuple", + components: [ + { name: "chainId", internalType: "uint256", type: "uint256" }, + { name: "ttl", internalType: "uint256", type: "uint256" }, + { name: "order", internalType: "bytes32", type: "bytes32" }, + { name: "currency", internalType: "address", type: "address" }, + { name: "amount", internalType: "uint256", type: "uint256" }, + { name: "payeeAddress", internalType: "address", type: "address" }, + { name: "isPaymentEndpoint", internalType: "bool", type: "bool" }, + { name: "shopId", internalType: "uint256", type: "uint256" }, + { name: "shopSignature", internalType: "bytes", type: "bytes" }, + ], + }, + ], + name: "hasPaymentBeenMade", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { + name: "payments", + internalType: "struct PaymentRequest[]", + type: "tuple[]", + components: [ + { name: "chainId", internalType: "uint256", type: "uint256" }, + { name: "ttl", internalType: "uint256", type: "uint256" }, + { name: "order", internalType: "bytes32", type: "bytes32" }, + { name: "currency", internalType: "address", type: "address" }, + { name: "amount", internalType: "uint256", type: "uint256" }, + { name: "payeeAddress", internalType: "address", type: "address" }, + { name: "isPaymentEndpoint", internalType: "bool", type: "bool" }, + { name: "shopId", internalType: "uint256", type: "uint256" }, + { name: "shopSignature", internalType: "bytes", type: "bytes" }, + ], + }, + { name: "permit2Sigs", internalType: "bytes[]", type: "bytes[]" }, + ], + name: "multiPay", + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + inputs: [ + { + name: "payment", + internalType: "struct PaymentRequest", + type: "tuple", + components: [ + { name: "chainId", internalType: "uint256", type: "uint256" }, + { name: "ttl", internalType: "uint256", type: "uint256" }, + { name: "order", internalType: "bytes32", type: "bytes32" }, + { name: "currency", internalType: "address", type: "address" }, + { name: "amount", internalType: "uint256", type: "uint256" }, + { name: "payeeAddress", internalType: "address", type: "address" }, + { name: "isPaymentEndpoint", internalType: "bool", type: "bool" }, + { name: "shopId", internalType: "uint256", type: "uint256" }, + { name: "shopSignature", internalType: "bytes", type: "bytes" }, + ], + }, + ], + name: "pay", + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + inputs: [ + { + name: "payment", + internalType: "struct PaymentRequest", + type: "tuple", + components: [ + { name: "chainId", internalType: "uint256", type: "uint256" }, + { name: "ttl", internalType: "uint256", type: "uint256" }, + { name: "order", internalType: "bytes32", type: "bytes32" }, + { name: "currency", internalType: "address", type: "address" }, + { name: "amount", internalType: "uint256", type: "uint256" }, + { name: "payeeAddress", internalType: "address", type: "address" }, + { name: "isPaymentEndpoint", internalType: "bool", type: "bool" }, + { name: "shopId", internalType: "uint256", type: "uint256" }, + { name: "shopSignature", internalType: "bytes", type: "bytes" }, + ], + }, + ], + name: "payNative", + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + inputs: [ + { + name: "payment", + internalType: "struct PaymentRequest", + type: "tuple", + components: [ + { name: "chainId", internalType: "uint256", type: "uint256" }, + { name: "ttl", internalType: "uint256", type: "uint256" }, + { name: "order", internalType: "bytes32", type: "bytes32" }, + { name: "currency", internalType: "address", type: "address" }, + { name: "amount", internalType: "uint256", type: "uint256" }, + { name: "payeeAddress", internalType: "address", type: "address" }, + { name: "isPaymentEndpoint", internalType: "bool", type: "bool" }, + { name: "shopId", internalType: "uint256", type: "uint256" }, + { name: "shopSignature", internalType: "bytes", type: "bytes" }, + ], + }, + { name: "permit2signature", internalType: "bytes", type: "bytes" }, + ], + name: "payToken", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { + name: "payment", + internalType: "struct PaymentRequest", + type: "tuple", + components: [ + { name: "chainId", internalType: "uint256", type: "uint256" }, + { name: "ttl", internalType: "uint256", type: "uint256" }, + { name: "order", internalType: "bytes32", type: "bytes32" }, + { name: "currency", internalType: "address", type: "address" }, + { name: "amount", internalType: "uint256", type: "uint256" }, + { name: "payeeAddress", internalType: "address", type: "address" }, + { name: "isPaymentEndpoint", internalType: "bool", type: "bool" }, + { name: "shopId", internalType: "uint256", type: "uint256" }, + { name: "shopSignature", internalType: "bytes", type: "bytes" }, + ], + }, + ], + name: "payTokenPreApproved", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { + name: "payment", + internalType: "struct PaymentRequest", + type: "tuple", + components: [ + { name: "chainId", internalType: "uint256", type: "uint256" }, + { name: "ttl", internalType: "uint256", type: "uint256" }, + { name: "order", internalType: "bytes32", type: "bytes32" }, + { name: "currency", internalType: "address", type: "address" }, + { name: "amount", internalType: "uint256", type: "uint256" }, + { name: "payeeAddress", internalType: "address", type: "address" }, + { name: "isPaymentEndpoint", internalType: "bool", type: "bool" }, + { name: "shopId", internalType: "uint256", type: "uint256" }, + { name: "shopSignature", internalType: "bytes", type: "bytes" }, + ], + }, + { name: "refund", internalType: "address payable", type: "address" }, + ], + name: "processPayment", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "from", internalType: "address", type: "address" }, + { + name: "payment", + internalType: "struct PaymentRequest", + type: "tuple", + components: [ + { name: "chainId", internalType: "uint256", type: "uint256" }, + { name: "ttl", internalType: "uint256", type: "uint256" }, + { name: "order", internalType: "bytes32", type: "bytes32" }, + { name: "currency", internalType: "address", type: "address" }, + { name: "amount", internalType: "uint256", type: "uint256" }, + { name: "payeeAddress", internalType: "address", type: "address" }, + { name: "isPaymentEndpoint", internalType: "bool", type: "bool" }, + { name: "shopId", internalType: "uint256", type: "uint256" }, + { name: "shopSignature", internalType: "bytes", type: "bytes" }, + ], + }, + ], + name: "revertPayment", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "paymentId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + ], + name: "PaymentMade", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "payment", + internalType: "struct PaymentRequest", + type: "tuple", + components: [ + { name: "chainId", internalType: "uint256", type: "uint256" }, + { name: "ttl", internalType: "uint256", type: "uint256" }, + { name: "order", internalType: "bytes32", type: "bytes32" }, + { name: "currency", internalType: "address", type: "address" }, + { name: "amount", internalType: "uint256", type: "uint256" }, + { name: "payeeAddress", internalType: "address", type: "address" }, + { name: "isPaymentEndpoint", internalType: "bool", type: "bool" }, + { name: "shopId", internalType: "uint256", type: "uint256" }, + { name: "shopSignature", internalType: "bytes", type: "bytes" }, + ], + indexed: false, + }, + ], + name: "SweepFailed", + }, + { type: "error", inputs: [], name: "InvalidPaymentAmount" }, + { type: "error", inputs: [], name: "InvalidPaymentToken" }, + { type: "error", inputs: [], name: "NotPayee" }, + { type: "error", inputs: [], name: "PayeeRefusedPayment" }, + { type: "error", inputs: [], name: "PaymentAlreadyMade" }, + { type: "error", inputs: [], name: "PaymentExpired" }, + { type: "error", inputs: [], name: "PaymentNotMade" }, + { type: "error", inputs: [], name: "WrongChain" }, +] as const; + +export const paymentsByAddressAddress = + "0x380E9111Fa6aA3EA50b6db944949801B649A7D67" as const; + +export const paymentsByAddressConfig = { + address: paymentsByAddressAddress, + abi: paymentsByAddressAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// RelayReg +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +export const relayRegAbi = [ + { type: "constructor", inputs: [], stateMutability: "nonpayable" }, + { + type: "function", + inputs: [ + { name: "account", internalType: "address", type: "address" }, + { name: "id", internalType: "uint256", type: "uint256" }, + ], + name: "approve", + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + inputs: [{ name: "owner", internalType: "address", type: "address" }], + name: "balanceOf", + outputs: [{ name: "result", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "id", internalType: "uint256", type: "uint256" }], + name: "getApproved", + outputs: [{ name: "result", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "owner", internalType: "address", type: "address" }, + { name: "operator", internalType: "address", type: "address" }, + ], + name: "isApprovedForAll", + outputs: [{ name: "result", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "newRelayId", internalType: "uint256", type: "uint256" }, + { name: "relay", internalType: "address", type: "address" }, + { name: "uri", internalType: "string", type: "string" }, + ], + name: "mint", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "name", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "pure", + }, + { + type: "function", + inputs: [{ name: "id", internalType: "uint256", type: "uint256" }], + name: "ownerOf", + outputs: [{ name: "result", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "relayURIs", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "from", internalType: "address", type: "address" }, + { name: "to", internalType: "address", type: "address" }, + { name: "id", internalType: "uint256", type: "uint256" }, + ], + name: "safeTransferFrom", + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + inputs: [ + { name: "from", internalType: "address", type: "address" }, + { name: "to", internalType: "address", type: "address" }, + { name: "id", internalType: "uint256", type: "uint256" }, + { name: "data", internalType: "bytes", type: "bytes" }, + ], + name: "safeTransferFrom", + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + inputs: [ + { name: "operator", internalType: "address", type: "address" }, + { name: "isApproved", internalType: "bool", type: "bool" }, + ], + name: "setApprovalForAll", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "interfaceId", internalType: "bytes4", type: "bytes4" }], + name: "supportsInterface", + outputs: [{ name: "result", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "symbol", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "pure", + }, + { + type: "function", + inputs: [{ name: "id", internalType: "uint256", type: "uint256" }], + name: "tokenURI", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "from", internalType: "address", type: "address" }, + { name: "to", internalType: "address", type: "address" }, + { name: "id", internalType: "uint256", type: "uint256" }, + ], + name: "transferFrom", + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + inputs: [ + { name: "relayId", internalType: "uint256", type: "uint256" }, + { name: "uri", internalType: "string", type: "string" }, + ], + name: "updateURI", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "owner", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "account", + internalType: "address", + type: "address", + indexed: true, + }, + { name: "id", internalType: "uint256", type: "uint256", indexed: true }, + ], + name: "Approval", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "owner", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "operator", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "isApproved", + internalType: "bool", + type: "bool", + indexed: false, + }, + ], + name: "ApprovalForAll", + }, + { + type: "event", + anonymous: false, + inputs: [ + { name: "from", internalType: "address", type: "address", indexed: true }, + { name: "to", internalType: "address", type: "address", indexed: true }, + { name: "id", internalType: "uint256", type: "uint256", indexed: true }, + ], + name: "Transfer", + }, + { type: "error", inputs: [], name: "AccountBalanceOverflow" }, + { type: "error", inputs: [], name: "BalanceQueryForZeroAddress" }, + { type: "error", inputs: [], name: "NotOwnerNorApproved" }, + { type: "error", inputs: [], name: "TokenAlreadyExists" }, + { type: "error", inputs: [], name: "TokenDoesNotExist" }, + { type: "error", inputs: [], name: "TransferFromIncorrectOwner" }, + { type: "error", inputs: [], name: "TransferToNonERC721ReceiverImplementer" }, + { type: "error", inputs: [], name: "TransferToZeroAddress" }, +] as const; + +export const relayRegAddress = + "0x7877285634BF8c8980Df4afFcBfa94a74158EfB5" as const; + +export const relayRegConfig = { + address: relayRegAddress, + abi: relayRegAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// ShopReg +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +export const shopRegAbi = [ + { + type: "constructor", + inputs: [{ name: "r", internalType: "contract RelayReg", type: "address" }], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "PERM_addPermission", + outputs: [{ name: "", internalType: "uint8", type: "uint8" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "PERM_addRelay", + outputs: [{ name: "", internalType: "uint8", type: "uint8" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "PERM_publishInviteVerifier", + outputs: [{ name: "", internalType: "uint8", type: "uint8" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "PERM_registerUser", + outputs: [{ name: "", internalType: "uint8", type: "uint8" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "PERM_removePermission", + outputs: [{ name: "", internalType: "uint8", type: "uint8" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "PERM_removeRelay", + outputs: [{ name: "", internalType: "uint8", type: "uint8" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "PERM_removeUser", + outputs: [{ name: "", internalType: "uint8", type: "uint8" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "PERM_replaceRelay", + outputs: [{ name: "", internalType: "uint8", type: "uint8" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "PERM_updateRootHash", + outputs: [{ name: "", internalType: "uint8", type: "uint8" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "user", internalType: "address", type: "address" }], + name: "_getTokenMessageHash", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + stateMutability: "pure", + }, + { + type: "function", + inputs: [ + { name: "shopId", internalType: "uint256", type: "uint256" }, + { name: "user", internalType: "address", type: "address" }, + { name: "perm", internalType: "uint8", type: "uint8" }, + ], + name: "addPermission", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "shopId", internalType: "uint256", type: "uint256" }, + { name: "relayId", internalType: "uint256", type: "uint256" }, + ], + name: "addRelay", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "id", internalType: "uint256", type: "uint256" }, + { name: "perms", internalType: "uint256", type: "uint256" }, + ], + name: "allPermissionsGuard", + outputs: [], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "account", internalType: "address", type: "address" }, + { name: "id", internalType: "uint256", type: "uint256" }, + ], + name: "approve", + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + inputs: [{ name: "owner", internalType: "address", type: "address" }], + name: "balanceOf", + outputs: [{ name: "result", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "id", internalType: "uint256", type: "uint256" }, + { name: "user", internalType: "address", type: "address" }, + ], + name: "getAllPermissions", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "shopId", internalType: "uint256", type: "uint256" }], + name: "getAllRelays", + outputs: [{ name: "", internalType: "uint256[]", type: "uint256[]" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "id", internalType: "uint256", type: "uint256" }], + name: "getApproved", + outputs: [{ name: "result", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "shopId", internalType: "uint256", type: "uint256" }], + name: "getRelayCount", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "id", internalType: "uint256", type: "uint256" }, + { name: "user", internalType: "address", type: "address" }, + { name: "perms", internalType: "uint256", type: "uint256" }, + ], + name: "hasEnoughPermissions", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "id", internalType: "uint256", type: "uint256" }, + { name: "user", internalType: "address", type: "address" }, + { name: "perm", internalType: "uint8", type: "uint8" }, + ], + name: "hasPermission", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "owner", internalType: "address", type: "address" }, + { name: "operator", internalType: "address", type: "address" }, + ], + name: "isApprovedForAll", + outputs: [{ name: "result", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "shopId", internalType: "uint256", type: "uint256" }, + { name: "owner", internalType: "address", type: "address" }, + ], + name: "mint", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "name", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "pure", + }, + { + type: "function", + inputs: [{ name: "shopid", internalType: "uint256", type: "uint256" }], + name: "nonce", + outputs: [{ name: "", internalType: "uint64", type: "uint64" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "id", internalType: "uint256", type: "uint256" }], + name: "ownerOf", + outputs: [{ name: "result", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "id", internalType: "uint256", type: "uint256" }, + { name: "perm", internalType: "uint8", type: "uint8" }, + ], + name: "permissionGuard", + outputs: [], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "perms", internalType: "uint8[]", type: "uint8[]" }], + name: "permsToBitmap", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "pure", + }, + { + type: "function", + inputs: [ + { name: "shopId", internalType: "uint256", type: "uint256" }, + { name: "verifier", internalType: "address", type: "address" }, + ], + name: "publishInviteVerifier", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "shopId", internalType: "uint256", type: "uint256" }, + { name: "v", internalType: "uint8", type: "uint8" }, + { name: "r", internalType: "bytes32", type: "bytes32" }, + { name: "s", internalType: "bytes32", type: "bytes32" }, + { name: "user", internalType: "address", type: "address" }, + ], + name: "redeemInvite", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "shopId", internalType: "uint256", type: "uint256" }, + { name: "user", internalType: "address", type: "address" }, + { name: "perms", internalType: "uint256", type: "uint256" }, + ], + name: "registerUser", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "relayReg", + outputs: [{ name: "", internalType: "contract RelayReg", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "shopid", internalType: "uint256", type: "uint256" }, + { name: "", internalType: "uint256", type: "uint256" }, + ], + name: "relays", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "shopId", internalType: "uint256", type: "uint256" }, + { name: "user", internalType: "address", type: "address" }, + { name: "perm", internalType: "uint8", type: "uint8" }, + ], + name: "removePermission", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "shopId", internalType: "uint256", type: "uint256" }, + { name: "idx", internalType: "uint8", type: "uint8" }, + ], + name: "removeRelay", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "shopId", internalType: "uint256", type: "uint256" }, + { name: "user", internalType: "address", type: "address" }, + ], + name: "removeUser", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "shopId", internalType: "uint256", type: "uint256" }, + { name: "idx", internalType: "uint8", type: "uint8" }, + { name: "relayId", internalType: "uint256", type: "uint256" }, + ], + name: "replaceRelay", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "shopid", internalType: "uint256", type: "uint256" }], + name: "rootHashes", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "from", internalType: "address", type: "address" }, + { name: "to", internalType: "address", type: "address" }, + { name: "id", internalType: "uint256", type: "uint256" }, + ], + name: "safeTransferFrom", + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + inputs: [ + { name: "from", internalType: "address", type: "address" }, + { name: "to", internalType: "address", type: "address" }, + { name: "id", internalType: "uint256", type: "uint256" }, + { name: "data", internalType: "bytes", type: "bytes" }, + ], + name: "safeTransferFrom", + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + inputs: [ + { name: "operator", internalType: "address", type: "address" }, + { name: "isApproved", internalType: "bool", type: "bool" }, + ], + name: "setApprovalForAll", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "shopId", internalType: "uint256", type: "uint256" }, + { name: "newTokenURI", internalType: "string", type: "string" }, + ], + name: "setTokenURI", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "shopURIs", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "interfaceId", internalType: "bytes4", type: "bytes4" }], + name: "supportsInterface", + outputs: [{ name: "result", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "symbol", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "pure", + }, + { + type: "function", + inputs: [{ name: "id", internalType: "uint256", type: "uint256" }], + name: "tokenURI", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "from", internalType: "address", type: "address" }, + { name: "to", internalType: "address", type: "address" }, + { name: "id", internalType: "uint256", type: "uint256" }, + ], + name: "transferFrom", + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + inputs: [ + { name: "shopId", internalType: "uint256", type: "uint256" }, + { name: "hash", internalType: "bytes32", type: "bytes32" }, + { name: "_nonce", internalType: "uint64", type: "uint64" }, + ], + name: "updateRootHash", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "owner", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "account", + internalType: "address", + type: "address", + indexed: true, + }, + { name: "id", internalType: "uint256", type: "uint256", indexed: true }, + ], + name: "Approval", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "owner", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "operator", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "isApproved", + internalType: "bool", + type: "bool", + indexed: false, + }, + ], + name: "ApprovalForAll", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "shopId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "user", + internalType: "address", + type: "address", + indexed: false, + }, + { + name: "permission", + internalType: "uint8", + type: "uint8", + indexed: false, + }, + ], + name: "PermissionAdded", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "shopId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "user", + internalType: "address", + type: "address", + indexed: false, + }, + { + name: "permission", + internalType: "uint8", + type: "uint8", + indexed: false, + }, + ], + name: "PermissionRemoved", + }, + { + type: "event", + anonymous: false, + inputs: [ + { name: "from", internalType: "address", type: "address", indexed: true }, + { name: "to", internalType: "address", type: "address", indexed: true }, + { name: "id", internalType: "uint256", type: "uint256", indexed: true }, + ], + name: "Transfer", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "shopId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "user", + internalType: "address", + type: "address", + indexed: false, + }, + { + name: "permissions", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "UserAdded", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "shopId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "users", + internalType: "address", + type: "address", + indexed: false, + }, + ], + name: "UserRemoved", + }, + { type: "error", inputs: [], name: "AccountBalanceOverflow" }, + { type: "error", inputs: [], name: "BalanceQueryForZeroAddress" }, + { + type: "error", + inputs: [ + { name: "cur", internalType: "uint64", type: "uint64" }, + { name: "_nonce", internalType: "uint64", type: "uint64" }, + ], + name: "InvalidNonce", + }, + { type: "error", inputs: [], name: "NoVerifier" }, + { + type: "error", + inputs: [{ name: "permision", internalType: "uint8", type: "uint8" }], + name: "NotAuthorized", + }, + { type: "error", inputs: [], name: "NotOwnerNorApproved" }, + { type: "error", inputs: [], name: "TokenAlreadyExists" }, + { type: "error", inputs: [], name: "TokenDoesNotExist" }, + { type: "error", inputs: [], name: "TransferFromIncorrectOwner" }, + { type: "error", inputs: [], name: "TransferToNonERC721ReceiverImplementer" }, + { type: "error", inputs: [], name: "TransferToZeroAddress" }, +] as const; + +export const shopRegAddress = + "0x4d3791e4767114bb730a8Be6F096cB8689A57339" as const; + +export const shopRegConfig = { + address: shopRegAddress, + abi: shopRegAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// React +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link eddiesAbi}__ + */ +export const useReadEddies = /*#__PURE__*/ createUseReadContract({ + abi: eddiesAbi, + address: eddiesAddress, +}); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"DOMAIN_SEPARATOR"` + */ +export const useReadEddiesDomainSeparator = /*#__PURE__*/ createUseReadContract( + { abi: eddiesAbi, address: eddiesAddress, functionName: "DOMAIN_SEPARATOR" }, +); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"allowance"` + */ +export const useReadEddiesAllowance = /*#__PURE__*/ createUseReadContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "allowance", +}); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"balanceOf"` + */ +export const useReadEddiesBalanceOf = /*#__PURE__*/ createUseReadContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "balanceOf", +}); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"decimals"` + */ +export const useReadEddiesDecimals = /*#__PURE__*/ createUseReadContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "decimals", +}); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"name"` + */ +export const useReadEddiesName = /*#__PURE__*/ createUseReadContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "name", +}); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"nonces"` + */ +export const useReadEddiesNonces = /*#__PURE__*/ createUseReadContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "nonces", +}); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"symbol"` + */ +export const useReadEddiesSymbol = /*#__PURE__*/ createUseReadContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "symbol", +}); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"totalSupply"` + */ +export const useReadEddiesTotalSupply = /*#__PURE__*/ createUseReadContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "totalSupply", +}); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link eddiesAbi}__ + */ +export const useWriteEddies = /*#__PURE__*/ createUseWriteContract({ + abi: eddiesAbi, + address: eddiesAddress, +}); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"approve"` + */ +export const useWriteEddiesApprove = /*#__PURE__*/ createUseWriteContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "approve", +}); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"burn"` + */ +export const useWriteEddiesBurn = /*#__PURE__*/ createUseWriteContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "burn", +}); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"directSpendAllowance"` + */ +export const useWriteEddiesDirectSpendAllowance = + /*#__PURE__*/ createUseWriteContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "directSpendAllowance", + }); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"directTransfer"` + */ +export const useWriteEddiesDirectTransfer = + /*#__PURE__*/ createUseWriteContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "directTransfer", + }); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"mint"` + */ +export const useWriteEddiesMint = /*#__PURE__*/ createUseWriteContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "mint", +}); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"permit"` + */ +export const useWriteEddiesPermit = /*#__PURE__*/ createUseWriteContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "permit", +}); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"transfer"` + */ +export const useWriteEddiesTransfer = /*#__PURE__*/ createUseWriteContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "transfer", +}); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"transferFrom"` + */ +export const useWriteEddiesTransferFrom = /*#__PURE__*/ createUseWriteContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "transferFrom", +}); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link eddiesAbi}__ + */ +export const useSimulateEddies = /*#__PURE__*/ createUseSimulateContract({ + abi: eddiesAbi, + address: eddiesAddress, +}); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"approve"` + */ +export const useSimulateEddiesApprove = /*#__PURE__*/ createUseSimulateContract( + { abi: eddiesAbi, address: eddiesAddress, functionName: "approve" }, +); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"burn"` + */ +export const useSimulateEddiesBurn = /*#__PURE__*/ createUseSimulateContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "burn", +}); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"directSpendAllowance"` + */ +export const useSimulateEddiesDirectSpendAllowance = + /*#__PURE__*/ createUseSimulateContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "directSpendAllowance", + }); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"directTransfer"` + */ +export const useSimulateEddiesDirectTransfer = + /*#__PURE__*/ createUseSimulateContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "directTransfer", + }); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"mint"` + */ +export const useSimulateEddiesMint = /*#__PURE__*/ createUseSimulateContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "mint", +}); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"permit"` + */ +export const useSimulateEddiesPermit = /*#__PURE__*/ createUseSimulateContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "permit", +}); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"transfer"` + */ +export const useSimulateEddiesTransfer = + /*#__PURE__*/ createUseSimulateContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "transfer", + }); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"transferFrom"` + */ +export const useSimulateEddiesTransferFrom = + /*#__PURE__*/ createUseSimulateContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "transferFrom", + }); + +/** + * Wraps __{@link useWatchContractEvent}__ with `abi` set to __{@link eddiesAbi}__ + */ +export const useWatchEddiesEvent = /*#__PURE__*/ createUseWatchContractEvent({ + abi: eddiesAbi, + address: eddiesAddress, +}); + +/** + * Wraps __{@link useWatchContractEvent}__ with `abi` set to __{@link eddiesAbi}__ and `eventName` set to `"Approval"` + */ +export const useWatchEddiesApprovalEvent = + /*#__PURE__*/ createUseWatchContractEvent({ + abi: eddiesAbi, + address: eddiesAddress, + eventName: "Approval", + }); + +/** + * Wraps __{@link useWatchContractEvent}__ with `abi` set to __{@link eddiesAbi}__ and `eventName` set to `"Transfer"` + */ +export const useWatchEddiesTransferEvent = + /*#__PURE__*/ createUseWatchContractEvent({ + abi: eddiesAbi, + address: eddiesAddress, + eventName: "Transfer", + }); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ + */ +export const useReadPaymentsByAddress = /*#__PURE__*/ createUseReadContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, +}); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"getBytecode"` + */ +export const useReadPaymentsByAddressGetBytecode = + /*#__PURE__*/ createUseReadContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "getBytecode", + }); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"getPaymentAddress"` + */ +export const useReadPaymentsByAddressGetPaymentAddress = + /*#__PURE__*/ createUseReadContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "getPaymentAddress", + }); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"getPaymentId"` + */ +export const useReadPaymentsByAddressGetPaymentId = + /*#__PURE__*/ createUseReadContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "getPaymentId", + }); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"hasPaymentBeenMade"` + */ +export const useReadPaymentsByAddressHasPaymentBeenMade = + /*#__PURE__*/ createUseReadContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "hasPaymentBeenMade", + }); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ + */ +export const useWritePaymentsByAddress = /*#__PURE__*/ createUseWriteContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, +}); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"batch"` + */ +export const useWritePaymentsByAddressBatch = + /*#__PURE__*/ createUseWriteContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "batch", + }); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"multiPay"` + */ +export const useWritePaymentsByAddressMultiPay = + /*#__PURE__*/ createUseWriteContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "multiPay", + }); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"pay"` + */ +export const useWritePaymentsByAddressPay = + /*#__PURE__*/ createUseWriteContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "pay", + }); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"payNative"` + */ +export const useWritePaymentsByAddressPayNative = + /*#__PURE__*/ createUseWriteContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "payNative", + }); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"payToken"` + */ +export const useWritePaymentsByAddressPayToken = + /*#__PURE__*/ createUseWriteContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "payToken", + }); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"payTokenPreApproved"` + */ +export const useWritePaymentsByAddressPayTokenPreApproved = + /*#__PURE__*/ createUseWriteContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "payTokenPreApproved", + }); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"processPayment"` + */ +export const useWritePaymentsByAddressProcessPayment = + /*#__PURE__*/ createUseWriteContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "processPayment", + }); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"revertPayment"` + */ +export const useWritePaymentsByAddressRevertPayment = + /*#__PURE__*/ createUseWriteContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "revertPayment", + }); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ + */ +export const useSimulatePaymentsByAddress = + /*#__PURE__*/ createUseSimulateContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + }); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"batch"` + */ +export const useSimulatePaymentsByAddressBatch = + /*#__PURE__*/ createUseSimulateContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "batch", + }); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"multiPay"` + */ +export const useSimulatePaymentsByAddressMultiPay = + /*#__PURE__*/ createUseSimulateContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "multiPay", + }); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"pay"` + */ +export const useSimulatePaymentsByAddressPay = + /*#__PURE__*/ createUseSimulateContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "pay", + }); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"payNative"` + */ +export const useSimulatePaymentsByAddressPayNative = + /*#__PURE__*/ createUseSimulateContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "payNative", + }); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"payToken"` + */ +export const useSimulatePaymentsByAddressPayToken = + /*#__PURE__*/ createUseSimulateContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "payToken", + }); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"payTokenPreApproved"` + */ +export const useSimulatePaymentsByAddressPayTokenPreApproved = + /*#__PURE__*/ createUseSimulateContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "payTokenPreApproved", + }); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"processPayment"` + */ +export const useSimulatePaymentsByAddressProcessPayment = + /*#__PURE__*/ createUseSimulateContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "processPayment", + }); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"revertPayment"` + */ +export const useSimulatePaymentsByAddressRevertPayment = + /*#__PURE__*/ createUseSimulateContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "revertPayment", + }); + +/** + * Wraps __{@link useWatchContractEvent}__ with `abi` set to __{@link paymentsByAddressAbi}__ + */ +export const useWatchPaymentsByAddressEvent = + /*#__PURE__*/ createUseWatchContractEvent({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + }); + +/** + * Wraps __{@link useWatchContractEvent}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `eventName` set to `"PaymentMade"` + */ +export const useWatchPaymentsByAddressPaymentMadeEvent = + /*#__PURE__*/ createUseWatchContractEvent({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + eventName: "PaymentMade", + }); + +/** + * Wraps __{@link useWatchContractEvent}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `eventName` set to `"SweepFailed"` + */ +export const useWatchPaymentsByAddressSweepFailedEvent = + /*#__PURE__*/ createUseWatchContractEvent({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + eventName: "SweepFailed", + }); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link relayRegAbi}__ + */ +export const useReadRelayReg = /*#__PURE__*/ createUseReadContract({ + abi: relayRegAbi, + address: relayRegAddress, +}); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"balanceOf"` + */ +export const useReadRelayRegBalanceOf = /*#__PURE__*/ createUseReadContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "balanceOf", +}); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"getApproved"` + */ +export const useReadRelayRegGetApproved = /*#__PURE__*/ createUseReadContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "getApproved", +}); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"isApprovedForAll"` + */ +export const useReadRelayRegIsApprovedForAll = + /*#__PURE__*/ createUseReadContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "isApprovedForAll", + }); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"name"` + */ +export const useReadRelayRegName = /*#__PURE__*/ createUseReadContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "name", +}); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"ownerOf"` + */ +export const useReadRelayRegOwnerOf = /*#__PURE__*/ createUseReadContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "ownerOf", +}); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"relayURIs"` + */ +export const useReadRelayRegRelayUrIs = /*#__PURE__*/ createUseReadContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "relayURIs", +}); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"supportsInterface"` + */ +export const useReadRelayRegSupportsInterface = + /*#__PURE__*/ createUseReadContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "supportsInterface", + }); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"symbol"` + */ +export const useReadRelayRegSymbol = /*#__PURE__*/ createUseReadContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "symbol", +}); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"tokenURI"` + */ +export const useReadRelayRegTokenUri = /*#__PURE__*/ createUseReadContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "tokenURI", +}); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link relayRegAbi}__ + */ +export const useWriteRelayReg = /*#__PURE__*/ createUseWriteContract({ + abi: relayRegAbi, + address: relayRegAddress, +}); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"approve"` + */ +export const useWriteRelayRegApprove = /*#__PURE__*/ createUseWriteContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "approve", +}); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"mint"` + */ +export const useWriteRelayRegMint = /*#__PURE__*/ createUseWriteContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "mint", +}); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"safeTransferFrom"` + */ +export const useWriteRelayRegSafeTransferFrom = + /*#__PURE__*/ createUseWriteContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "safeTransferFrom", + }); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"setApprovalForAll"` + */ +export const useWriteRelayRegSetApprovalForAll = + /*#__PURE__*/ createUseWriteContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "setApprovalForAll", + }); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"transferFrom"` + */ +export const useWriteRelayRegTransferFrom = + /*#__PURE__*/ createUseWriteContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "transferFrom", + }); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"updateURI"` + */ +export const useWriteRelayRegUpdateUri = /*#__PURE__*/ createUseWriteContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "updateURI", +}); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link relayRegAbi}__ + */ +export const useSimulateRelayReg = /*#__PURE__*/ createUseSimulateContract({ + abi: relayRegAbi, + address: relayRegAddress, +}); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"approve"` + */ +export const useSimulateRelayRegApprove = + /*#__PURE__*/ createUseSimulateContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "approve", + }); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"mint"` + */ +export const useSimulateRelayRegMint = /*#__PURE__*/ createUseSimulateContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "mint", +}); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"safeTransferFrom"` + */ +export const useSimulateRelayRegSafeTransferFrom = + /*#__PURE__*/ createUseSimulateContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "safeTransferFrom", + }); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"setApprovalForAll"` + */ +export const useSimulateRelayRegSetApprovalForAll = + /*#__PURE__*/ createUseSimulateContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "setApprovalForAll", + }); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"transferFrom"` + */ +export const useSimulateRelayRegTransferFrom = + /*#__PURE__*/ createUseSimulateContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "transferFrom", + }); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"updateURI"` + */ +export const useSimulateRelayRegUpdateUri = + /*#__PURE__*/ createUseSimulateContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "updateURI", + }); + +/** + * Wraps __{@link useWatchContractEvent}__ with `abi` set to __{@link relayRegAbi}__ + */ +export const useWatchRelayRegEvent = /*#__PURE__*/ createUseWatchContractEvent({ + abi: relayRegAbi, + address: relayRegAddress, +}); + +/** + * Wraps __{@link useWatchContractEvent}__ with `abi` set to __{@link relayRegAbi}__ and `eventName` set to `"Approval"` + */ +export const useWatchRelayRegApprovalEvent = + /*#__PURE__*/ createUseWatchContractEvent({ + abi: relayRegAbi, + address: relayRegAddress, + eventName: "Approval", + }); + +/** + * Wraps __{@link useWatchContractEvent}__ with `abi` set to __{@link relayRegAbi}__ and `eventName` set to `"ApprovalForAll"` + */ +export const useWatchRelayRegApprovalForAllEvent = + /*#__PURE__*/ createUseWatchContractEvent({ + abi: relayRegAbi, + address: relayRegAddress, + eventName: "ApprovalForAll", + }); + +/** + * Wraps __{@link useWatchContractEvent}__ with `abi` set to __{@link relayRegAbi}__ and `eventName` set to `"Transfer"` + */ +export const useWatchRelayRegTransferEvent = + /*#__PURE__*/ createUseWatchContractEvent({ + abi: relayRegAbi, + address: relayRegAddress, + eventName: "Transfer", + }); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link shopRegAbi}__ + */ +export const useReadShopReg = /*#__PURE__*/ createUseReadContract({ + abi: shopRegAbi, + address: shopRegAddress, +}); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"PERM_addPermission"` + */ +export const useReadShopRegPermAddPermission = + /*#__PURE__*/ createUseReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "PERM_addPermission", + }); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"PERM_addRelay"` + */ +export const useReadShopRegPermAddRelay = /*#__PURE__*/ createUseReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "PERM_addRelay", +}); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"PERM_publishInviteVerifier"` + */ +export const useReadShopRegPermPublishInviteVerifier = + /*#__PURE__*/ createUseReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "PERM_publishInviteVerifier", + }); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"PERM_registerUser"` + */ +export const useReadShopRegPermRegisterUser = + /*#__PURE__*/ createUseReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "PERM_registerUser", + }); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"PERM_removePermission"` + */ +export const useReadShopRegPermRemovePermission = + /*#__PURE__*/ createUseReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "PERM_removePermission", + }); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"PERM_removeRelay"` + */ +export const useReadShopRegPermRemoveRelay = + /*#__PURE__*/ createUseReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "PERM_removeRelay", + }); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"PERM_removeUser"` + */ +export const useReadShopRegPermRemoveUser = /*#__PURE__*/ createUseReadContract( + { abi: shopRegAbi, address: shopRegAddress, functionName: "PERM_removeUser" }, +); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"PERM_replaceRelay"` + */ +export const useReadShopRegPermReplaceRelay = + /*#__PURE__*/ createUseReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "PERM_replaceRelay", + }); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"PERM_updateRootHash"` + */ +export const useReadShopRegPermUpdateRootHash = + /*#__PURE__*/ createUseReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "PERM_updateRootHash", + }); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"_getTokenMessageHash"` + */ +export const useReadShopRegGetTokenMessageHash = + /*#__PURE__*/ createUseReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "_getTokenMessageHash", + }); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"allPermissionsGuard"` + */ +export const useReadShopRegAllPermissionsGuard = + /*#__PURE__*/ createUseReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "allPermissionsGuard", + }); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"balanceOf"` + */ +export const useReadShopRegBalanceOf = /*#__PURE__*/ createUseReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "balanceOf", +}); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"getAllPermissions"` + */ +export const useReadShopRegGetAllPermissions = + /*#__PURE__*/ createUseReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "getAllPermissions", + }); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"getAllRelays"` + */ +export const useReadShopRegGetAllRelays = /*#__PURE__*/ createUseReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "getAllRelays", +}); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"getApproved"` + */ +export const useReadShopRegGetApproved = /*#__PURE__*/ createUseReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "getApproved", +}); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"getRelayCount"` + */ +export const useReadShopRegGetRelayCount = /*#__PURE__*/ createUseReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "getRelayCount", +}); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"hasEnoughPermissions"` + */ +export const useReadShopRegHasEnoughPermissions = + /*#__PURE__*/ createUseReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "hasEnoughPermissions", + }); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"hasPermission"` + */ +export const useReadShopRegHasPermission = /*#__PURE__*/ createUseReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "hasPermission", +}); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"isApprovedForAll"` + */ +export const useReadShopRegIsApprovedForAll = + /*#__PURE__*/ createUseReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "isApprovedForAll", + }); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"name"` + */ +export const useReadShopRegName = /*#__PURE__*/ createUseReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "name", +}); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"nonce"` + */ +export const useReadShopRegNonce = /*#__PURE__*/ createUseReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "nonce", +}); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"ownerOf"` + */ +export const useReadShopRegOwnerOf = /*#__PURE__*/ createUseReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "ownerOf", +}); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"permissionGuard"` + */ +export const useReadShopRegPermissionGuard = + /*#__PURE__*/ createUseReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "permissionGuard", + }); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"permsToBitmap"` + */ +export const useReadShopRegPermsToBitmap = /*#__PURE__*/ createUseReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "permsToBitmap", +}); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"relayReg"` + */ +export const useReadShopRegRelayReg = /*#__PURE__*/ createUseReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "relayReg", +}); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"relays"` + */ +export const useReadShopRegRelays = /*#__PURE__*/ createUseReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "relays", +}); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"rootHashes"` + */ +export const useReadShopRegRootHashes = /*#__PURE__*/ createUseReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "rootHashes", +}); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"shopURIs"` + */ +export const useReadShopRegShopUrIs = /*#__PURE__*/ createUseReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "shopURIs", +}); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"supportsInterface"` + */ +export const useReadShopRegSupportsInterface = + /*#__PURE__*/ createUseReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "supportsInterface", + }); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"symbol"` + */ +export const useReadShopRegSymbol = /*#__PURE__*/ createUseReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "symbol", +}); + +/** + * Wraps __{@link useReadContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"tokenURI"` + */ +export const useReadShopRegTokenUri = /*#__PURE__*/ createUseReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "tokenURI", +}); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link shopRegAbi}__ + */ +export const useWriteShopReg = /*#__PURE__*/ createUseWriteContract({ + abi: shopRegAbi, + address: shopRegAddress, +}); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"addPermission"` + */ +export const useWriteShopRegAddPermission = + /*#__PURE__*/ createUseWriteContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "addPermission", + }); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"addRelay"` + */ +export const useWriteShopRegAddRelay = /*#__PURE__*/ createUseWriteContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "addRelay", +}); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"approve"` + */ +export const useWriteShopRegApprove = /*#__PURE__*/ createUseWriteContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "approve", +}); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"mint"` + */ +export const useWriteShopRegMint = /*#__PURE__*/ createUseWriteContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "mint", +}); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"publishInviteVerifier"` + */ +export const useWriteShopRegPublishInviteVerifier = + /*#__PURE__*/ createUseWriteContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "publishInviteVerifier", + }); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"redeemInvite"` + */ +export const useWriteShopRegRedeemInvite = /*#__PURE__*/ createUseWriteContract( + { abi: shopRegAbi, address: shopRegAddress, functionName: "redeemInvite" }, +); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"registerUser"` + */ +export const useWriteShopRegRegisterUser = /*#__PURE__*/ createUseWriteContract( + { abi: shopRegAbi, address: shopRegAddress, functionName: "registerUser" }, +); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"removePermission"` + */ +export const useWriteShopRegRemovePermission = + /*#__PURE__*/ createUseWriteContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "removePermission", + }); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"removeRelay"` + */ +export const useWriteShopRegRemoveRelay = /*#__PURE__*/ createUseWriteContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "removeRelay", +}); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"removeUser"` + */ +export const useWriteShopRegRemoveUser = /*#__PURE__*/ createUseWriteContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "removeUser", +}); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"replaceRelay"` + */ +export const useWriteShopRegReplaceRelay = /*#__PURE__*/ createUseWriteContract( + { abi: shopRegAbi, address: shopRegAddress, functionName: "replaceRelay" }, +); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"safeTransferFrom"` + */ +export const useWriteShopRegSafeTransferFrom = + /*#__PURE__*/ createUseWriteContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "safeTransferFrom", + }); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"setApprovalForAll"` + */ +export const useWriteShopRegSetApprovalForAll = + /*#__PURE__*/ createUseWriteContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "setApprovalForAll", + }); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"setTokenURI"` + */ +export const useWriteShopRegSetTokenUri = /*#__PURE__*/ createUseWriteContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "setTokenURI", +}); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"transferFrom"` + */ +export const useWriteShopRegTransferFrom = /*#__PURE__*/ createUseWriteContract( + { abi: shopRegAbi, address: shopRegAddress, functionName: "transferFrom" }, +); + +/** + * Wraps __{@link useWriteContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"updateRootHash"` + */ +export const useWriteShopRegUpdateRootHash = + /*#__PURE__*/ createUseWriteContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "updateRootHash", + }); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link shopRegAbi}__ + */ +export const useSimulateShopReg = /*#__PURE__*/ createUseSimulateContract({ + abi: shopRegAbi, + address: shopRegAddress, +}); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"addPermission"` + */ +export const useSimulateShopRegAddPermission = + /*#__PURE__*/ createUseSimulateContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "addPermission", + }); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"addRelay"` + */ +export const useSimulateShopRegAddRelay = + /*#__PURE__*/ createUseSimulateContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "addRelay", + }); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"approve"` + */ +export const useSimulateShopRegApprove = + /*#__PURE__*/ createUseSimulateContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "approve", + }); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"mint"` + */ +export const useSimulateShopRegMint = /*#__PURE__*/ createUseSimulateContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "mint", +}); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"publishInviteVerifier"` + */ +export const useSimulateShopRegPublishInviteVerifier = + /*#__PURE__*/ createUseSimulateContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "publishInviteVerifier", + }); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"redeemInvite"` + */ +export const useSimulateShopRegRedeemInvite = + /*#__PURE__*/ createUseSimulateContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "redeemInvite", + }); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"registerUser"` + */ +export const useSimulateShopRegRegisterUser = + /*#__PURE__*/ createUseSimulateContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "registerUser", + }); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"removePermission"` + */ +export const useSimulateShopRegRemovePermission = + /*#__PURE__*/ createUseSimulateContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "removePermission", + }); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"removeRelay"` + */ +export const useSimulateShopRegRemoveRelay = + /*#__PURE__*/ createUseSimulateContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "removeRelay", + }); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"removeUser"` + */ +export const useSimulateShopRegRemoveUser = + /*#__PURE__*/ createUseSimulateContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "removeUser", + }); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"replaceRelay"` + */ +export const useSimulateShopRegReplaceRelay = + /*#__PURE__*/ createUseSimulateContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "replaceRelay", + }); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"safeTransferFrom"` + */ +export const useSimulateShopRegSafeTransferFrom = + /*#__PURE__*/ createUseSimulateContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "safeTransferFrom", + }); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"setApprovalForAll"` + */ +export const useSimulateShopRegSetApprovalForAll = + /*#__PURE__*/ createUseSimulateContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "setApprovalForAll", + }); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"setTokenURI"` + */ +export const useSimulateShopRegSetTokenUri = + /*#__PURE__*/ createUseSimulateContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "setTokenURI", + }); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"transferFrom"` + */ +export const useSimulateShopRegTransferFrom = + /*#__PURE__*/ createUseSimulateContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "transferFrom", + }); + +/** + * Wraps __{@link useSimulateContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"updateRootHash"` + */ +export const useSimulateShopRegUpdateRootHash = + /*#__PURE__*/ createUseSimulateContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "updateRootHash", + }); + +/** + * Wraps __{@link useWatchContractEvent}__ with `abi` set to __{@link shopRegAbi}__ + */ +export const useWatchShopRegEvent = /*#__PURE__*/ createUseWatchContractEvent({ + abi: shopRegAbi, + address: shopRegAddress, +}); + +/** + * Wraps __{@link useWatchContractEvent}__ with `abi` set to __{@link shopRegAbi}__ and `eventName` set to `"Approval"` + */ +export const useWatchShopRegApprovalEvent = + /*#__PURE__*/ createUseWatchContractEvent({ + abi: shopRegAbi, + address: shopRegAddress, + eventName: "Approval", + }); + +/** + * Wraps __{@link useWatchContractEvent}__ with `abi` set to __{@link shopRegAbi}__ and `eventName` set to `"ApprovalForAll"` + */ +export const useWatchShopRegApprovalForAllEvent = + /*#__PURE__*/ createUseWatchContractEvent({ + abi: shopRegAbi, + address: shopRegAddress, + eventName: "ApprovalForAll", + }); + +/** + * Wraps __{@link useWatchContractEvent}__ with `abi` set to __{@link shopRegAbi}__ and `eventName` set to `"PermissionAdded"` + */ +export const useWatchShopRegPermissionAddedEvent = + /*#__PURE__*/ createUseWatchContractEvent({ + abi: shopRegAbi, + address: shopRegAddress, + eventName: "PermissionAdded", + }); + +/** + * Wraps __{@link useWatchContractEvent}__ with `abi` set to __{@link shopRegAbi}__ and `eventName` set to `"PermissionRemoved"` + */ +export const useWatchShopRegPermissionRemovedEvent = + /*#__PURE__*/ createUseWatchContractEvent({ + abi: shopRegAbi, + address: shopRegAddress, + eventName: "PermissionRemoved", + }); + +/** + * Wraps __{@link useWatchContractEvent}__ with `abi` set to __{@link shopRegAbi}__ and `eventName` set to `"Transfer"` + */ +export const useWatchShopRegTransferEvent = + /*#__PURE__*/ createUseWatchContractEvent({ + abi: shopRegAbi, + address: shopRegAddress, + eventName: "Transfer", + }); + +/** + * Wraps __{@link useWatchContractEvent}__ with `abi` set to __{@link shopRegAbi}__ and `eventName` set to `"UserAdded"` + */ +export const useWatchShopRegUserAddedEvent = + /*#__PURE__*/ createUseWatchContractEvent({ + abi: shopRegAbi, + address: shopRegAddress, + eventName: "UserAdded", + }); + +/** + * Wraps __{@link useWatchContractEvent}__ with `abi` set to __{@link shopRegAbi}__ and `eventName` set to `"UserRemoved"` + */ +export const useWatchShopRegUserRemovedEvent = + /*#__PURE__*/ createUseWatchContractEvent({ + abi: shopRegAbi, + address: shopRegAddress, + eventName: "UserRemoved", + }); + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Action +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link eddiesAbi}__ + */ +export const readEddies = /*#__PURE__*/ createReadContract({ + abi: eddiesAbi, + address: eddiesAddress, +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"DOMAIN_SEPARATOR"` + */ +export const readEddiesDomainSeparator = /*#__PURE__*/ createReadContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "DOMAIN_SEPARATOR", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"allowance"` + */ +export const readEddiesAllowance = /*#__PURE__*/ createReadContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "allowance", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"balanceOf"` + */ +export const readEddiesBalanceOf = /*#__PURE__*/ createReadContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "balanceOf", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"decimals"` + */ +export const readEddiesDecimals = /*#__PURE__*/ createReadContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "decimals", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"name"` + */ +export const readEddiesName = /*#__PURE__*/ createReadContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "name", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"nonces"` + */ +export const readEddiesNonces = /*#__PURE__*/ createReadContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "nonces", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"symbol"` + */ +export const readEddiesSymbol = /*#__PURE__*/ createReadContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "symbol", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"totalSupply"` + */ +export const readEddiesTotalSupply = /*#__PURE__*/ createReadContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "totalSupply", +}); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link eddiesAbi}__ + */ +export const writeEddies = /*#__PURE__*/ createWriteContract({ + abi: eddiesAbi, + address: eddiesAddress, +}); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"approve"` + */ +export const writeEddiesApprove = /*#__PURE__*/ createWriteContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "approve", +}); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"burn"` + */ +export const writeEddiesBurn = /*#__PURE__*/ createWriteContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "burn", +}); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"directSpendAllowance"` + */ +export const writeEddiesDirectSpendAllowance = + /*#__PURE__*/ createWriteContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "directSpendAllowance", + }); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"directTransfer"` + */ +export const writeEddiesDirectTransfer = /*#__PURE__*/ createWriteContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "directTransfer", +}); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"mint"` + */ +export const writeEddiesMint = /*#__PURE__*/ createWriteContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "mint", +}); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"permit"` + */ +export const writeEddiesPermit = /*#__PURE__*/ createWriteContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "permit", +}); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"transfer"` + */ +export const writeEddiesTransfer = /*#__PURE__*/ createWriteContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "transfer", +}); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"transferFrom"` + */ +export const writeEddiesTransferFrom = /*#__PURE__*/ createWriteContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "transferFrom", +}); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link eddiesAbi}__ + */ +export const simulateEddies = /*#__PURE__*/ createSimulateContract({ + abi: eddiesAbi, + address: eddiesAddress, +}); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"approve"` + */ +export const simulateEddiesApprove = /*#__PURE__*/ createSimulateContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "approve", +}); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"burn"` + */ +export const simulateEddiesBurn = /*#__PURE__*/ createSimulateContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "burn", +}); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"directSpendAllowance"` + */ +export const simulateEddiesDirectSpendAllowance = + /*#__PURE__*/ createSimulateContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "directSpendAllowance", + }); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"directTransfer"` + */ +export const simulateEddiesDirectTransfer = + /*#__PURE__*/ createSimulateContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "directTransfer", + }); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"mint"` + */ +export const simulateEddiesMint = /*#__PURE__*/ createSimulateContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "mint", +}); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"permit"` + */ +export const simulateEddiesPermit = /*#__PURE__*/ createSimulateContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "permit", +}); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"transfer"` + */ +export const simulateEddiesTransfer = /*#__PURE__*/ createSimulateContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "transfer", +}); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link eddiesAbi}__ and `functionName` set to `"transferFrom"` + */ +export const simulateEddiesTransferFrom = /*#__PURE__*/ createSimulateContract({ + abi: eddiesAbi, + address: eddiesAddress, + functionName: "transferFrom", +}); + +/** + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link eddiesAbi}__ + */ +export const watchEddiesEvent = /*#__PURE__*/ createWatchContractEvent({ + abi: eddiesAbi, + address: eddiesAddress, +}); + +/** + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link eddiesAbi}__ and `eventName` set to `"Approval"` + */ +export const watchEddiesApprovalEvent = /*#__PURE__*/ createWatchContractEvent({ + abi: eddiesAbi, + address: eddiesAddress, + eventName: "Approval", +}); + +/** + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link eddiesAbi}__ and `eventName` set to `"Transfer"` + */ +export const watchEddiesTransferEvent = /*#__PURE__*/ createWatchContractEvent({ + abi: eddiesAbi, + address: eddiesAddress, + eventName: "Transfer", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ + */ +export const readPaymentsByAddress = /*#__PURE__*/ createReadContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"getBytecode"` + */ +export const readPaymentsByAddressGetBytecode = + /*#__PURE__*/ createReadContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "getBytecode", + }); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"getPaymentAddress"` + */ +export const readPaymentsByAddressGetPaymentAddress = + /*#__PURE__*/ createReadContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "getPaymentAddress", + }); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"getPaymentId"` + */ +export const readPaymentsByAddressGetPaymentId = + /*#__PURE__*/ createReadContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "getPaymentId", + }); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"hasPaymentBeenMade"` + */ +export const readPaymentsByAddressHasPaymentBeenMade = + /*#__PURE__*/ createReadContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "hasPaymentBeenMade", + }); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ + */ +export const writePaymentsByAddress = /*#__PURE__*/ createWriteContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, +}); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"batch"` + */ +export const writePaymentsByAddressBatch = /*#__PURE__*/ createWriteContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "batch", +}); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"multiPay"` + */ +export const writePaymentsByAddressMultiPay = /*#__PURE__*/ createWriteContract( + { + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "multiPay", + }, +); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"pay"` + */ +export const writePaymentsByAddressPay = /*#__PURE__*/ createWriteContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "pay", +}); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"payNative"` + */ +export const writePaymentsByAddressPayNative = + /*#__PURE__*/ createWriteContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "payNative", + }); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"payToken"` + */ +export const writePaymentsByAddressPayToken = /*#__PURE__*/ createWriteContract( + { + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "payToken", + }, +); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"payTokenPreApproved"` + */ +export const writePaymentsByAddressPayTokenPreApproved = + /*#__PURE__*/ createWriteContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "payTokenPreApproved", + }); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"processPayment"` + */ +export const writePaymentsByAddressProcessPayment = + /*#__PURE__*/ createWriteContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "processPayment", + }); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"revertPayment"` + */ +export const writePaymentsByAddressRevertPayment = + /*#__PURE__*/ createWriteContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "revertPayment", + }); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ + */ +export const simulatePaymentsByAddress = /*#__PURE__*/ createSimulateContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, +}); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"batch"` + */ +export const simulatePaymentsByAddressBatch = + /*#__PURE__*/ createSimulateContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "batch", + }); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"multiPay"` + */ +export const simulatePaymentsByAddressMultiPay = + /*#__PURE__*/ createSimulateContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "multiPay", + }); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"pay"` + */ +export const simulatePaymentsByAddressPay = + /*#__PURE__*/ createSimulateContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "pay", + }); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"payNative"` + */ +export const simulatePaymentsByAddressPayNative = + /*#__PURE__*/ createSimulateContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "payNative", + }); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"payToken"` + */ +export const simulatePaymentsByAddressPayToken = + /*#__PURE__*/ createSimulateContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "payToken", + }); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"payTokenPreApproved"` + */ +export const simulatePaymentsByAddressPayTokenPreApproved = + /*#__PURE__*/ createSimulateContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "payTokenPreApproved", + }); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"processPayment"` + */ +export const simulatePaymentsByAddressProcessPayment = + /*#__PURE__*/ createSimulateContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "processPayment", + }); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `functionName` set to `"revertPayment"` + */ +export const simulatePaymentsByAddressRevertPayment = + /*#__PURE__*/ createSimulateContract({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + functionName: "revertPayment", + }); + +/** + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link paymentsByAddressAbi}__ + */ +export const watchPaymentsByAddressEvent = + /*#__PURE__*/ createWatchContractEvent({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + }); + +/** + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `eventName` set to `"PaymentMade"` + */ +export const watchPaymentsByAddressPaymentMadeEvent = + /*#__PURE__*/ createWatchContractEvent({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + eventName: "PaymentMade", + }); + +/** + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link paymentsByAddressAbi}__ and `eventName` set to `"SweepFailed"` + */ +export const watchPaymentsByAddressSweepFailedEvent = + /*#__PURE__*/ createWatchContractEvent({ + abi: paymentsByAddressAbi, + address: paymentsByAddressAddress, + eventName: "SweepFailed", + }); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link relayRegAbi}__ + */ +export const readRelayReg = /*#__PURE__*/ createReadContract({ + abi: relayRegAbi, + address: relayRegAddress, +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"balanceOf"` + */ +export const readRelayRegBalanceOf = /*#__PURE__*/ createReadContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "balanceOf", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"getApproved"` + */ +export const readRelayRegGetApproved = /*#__PURE__*/ createReadContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "getApproved", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"isApprovedForAll"` + */ +export const readRelayRegIsApprovedForAll = /*#__PURE__*/ createReadContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "isApprovedForAll", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"name"` + */ +export const readRelayRegName = /*#__PURE__*/ createReadContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "name", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"ownerOf"` + */ +export const readRelayRegOwnerOf = /*#__PURE__*/ createReadContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "ownerOf", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"relayURIs"` + */ +export const readRelayRegRelayUrIs = /*#__PURE__*/ createReadContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "relayURIs", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"supportsInterface"` + */ +export const readRelayRegSupportsInterface = /*#__PURE__*/ createReadContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "supportsInterface", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"symbol"` + */ +export const readRelayRegSymbol = /*#__PURE__*/ createReadContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "symbol", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"tokenURI"` + */ +export const readRelayRegTokenUri = /*#__PURE__*/ createReadContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "tokenURI", +}); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link relayRegAbi}__ + */ +export const writeRelayReg = /*#__PURE__*/ createWriteContract({ + abi: relayRegAbi, + address: relayRegAddress, +}); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"approve"` + */ +export const writeRelayRegApprove = /*#__PURE__*/ createWriteContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "approve", +}); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"mint"` + */ +export const writeRelayRegMint = /*#__PURE__*/ createWriteContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "mint", +}); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"safeTransferFrom"` + */ +export const writeRelayRegSafeTransferFrom = /*#__PURE__*/ createWriteContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "safeTransferFrom", +}); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"setApprovalForAll"` + */ +export const writeRelayRegSetApprovalForAll = /*#__PURE__*/ createWriteContract( + { + abi: relayRegAbi, + address: relayRegAddress, + functionName: "setApprovalForAll", + }, +); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"transferFrom"` + */ +export const writeRelayRegTransferFrom = /*#__PURE__*/ createWriteContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "transferFrom", +}); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"updateURI"` + */ +export const writeRelayRegUpdateUri = /*#__PURE__*/ createWriteContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "updateURI", +}); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link relayRegAbi}__ + */ +export const simulateRelayReg = /*#__PURE__*/ createSimulateContract({ + abi: relayRegAbi, + address: relayRegAddress, +}); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"approve"` + */ +export const simulateRelayRegApprove = /*#__PURE__*/ createSimulateContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "approve", +}); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"mint"` + */ +export const simulateRelayRegMint = /*#__PURE__*/ createSimulateContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "mint", +}); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"safeTransferFrom"` + */ +export const simulateRelayRegSafeTransferFrom = + /*#__PURE__*/ createSimulateContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "safeTransferFrom", + }); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"setApprovalForAll"` + */ +export const simulateRelayRegSetApprovalForAll = + /*#__PURE__*/ createSimulateContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "setApprovalForAll", + }); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"transferFrom"` + */ +export const simulateRelayRegTransferFrom = + /*#__PURE__*/ createSimulateContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "transferFrom", + }); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link relayRegAbi}__ and `functionName` set to `"updateURI"` + */ +export const simulateRelayRegUpdateUri = /*#__PURE__*/ createSimulateContract({ + abi: relayRegAbi, + address: relayRegAddress, + functionName: "updateURI", +}); + +/** + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link relayRegAbi}__ + */ +export const watchRelayRegEvent = /*#__PURE__*/ createWatchContractEvent({ + abi: relayRegAbi, + address: relayRegAddress, +}); + +/** + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link relayRegAbi}__ and `eventName` set to `"Approval"` + */ +export const watchRelayRegApprovalEvent = + /*#__PURE__*/ createWatchContractEvent({ + abi: relayRegAbi, + address: relayRegAddress, + eventName: "Approval", + }); + +/** + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link relayRegAbi}__ and `eventName` set to `"ApprovalForAll"` + */ +export const watchRelayRegApprovalForAllEvent = + /*#__PURE__*/ createWatchContractEvent({ + abi: relayRegAbi, + address: relayRegAddress, + eventName: "ApprovalForAll", + }); + +/** + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link relayRegAbi}__ and `eventName` set to `"Transfer"` + */ +export const watchRelayRegTransferEvent = + /*#__PURE__*/ createWatchContractEvent({ + abi: relayRegAbi, + address: relayRegAddress, + eventName: "Transfer", + }); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link shopRegAbi}__ + */ +export const readShopReg = /*#__PURE__*/ createReadContract({ + abi: shopRegAbi, + address: shopRegAddress, +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"PERM_addPermission"` + */ +export const readShopRegPermAddPermission = /*#__PURE__*/ createReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "PERM_addPermission", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"PERM_addRelay"` + */ +export const readShopRegPermAddRelay = /*#__PURE__*/ createReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "PERM_addRelay", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"PERM_publishInviteVerifier"` + */ +export const readShopRegPermPublishInviteVerifier = + /*#__PURE__*/ createReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "PERM_publishInviteVerifier", + }); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"PERM_registerUser"` + */ +export const readShopRegPermRegisterUser = /*#__PURE__*/ createReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "PERM_registerUser", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"PERM_removePermission"` + */ +export const readShopRegPermRemovePermission = /*#__PURE__*/ createReadContract( + { + abi: shopRegAbi, + address: shopRegAddress, + functionName: "PERM_removePermission", + }, +); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"PERM_removeRelay"` + */ +export const readShopRegPermRemoveRelay = /*#__PURE__*/ createReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "PERM_removeRelay", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"PERM_removeUser"` + */ +export const readShopRegPermRemoveUser = /*#__PURE__*/ createReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "PERM_removeUser", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"PERM_replaceRelay"` + */ +export const readShopRegPermReplaceRelay = /*#__PURE__*/ createReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "PERM_replaceRelay", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"PERM_updateRootHash"` + */ +export const readShopRegPermUpdateRootHash = /*#__PURE__*/ createReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "PERM_updateRootHash", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"_getTokenMessageHash"` + */ +export const readShopRegGetTokenMessageHash = /*#__PURE__*/ createReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "_getTokenMessageHash", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"allPermissionsGuard"` + */ +export const readShopRegAllPermissionsGuard = /*#__PURE__*/ createReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "allPermissionsGuard", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"balanceOf"` + */ +export const readShopRegBalanceOf = /*#__PURE__*/ createReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "balanceOf", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"getAllPermissions"` + */ +export const readShopRegGetAllPermissions = /*#__PURE__*/ createReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "getAllPermissions", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"getAllRelays"` + */ +export const readShopRegGetAllRelays = /*#__PURE__*/ createReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "getAllRelays", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"getApproved"` + */ +export const readShopRegGetApproved = /*#__PURE__*/ createReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "getApproved", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"getRelayCount"` + */ +export const readShopRegGetRelayCount = /*#__PURE__*/ createReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "getRelayCount", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"hasEnoughPermissions"` + */ +export const readShopRegHasEnoughPermissions = /*#__PURE__*/ createReadContract( + { + abi: shopRegAbi, + address: shopRegAddress, + functionName: "hasEnoughPermissions", + }, +); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"hasPermission"` + */ +export const readShopRegHasPermission = /*#__PURE__*/ createReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "hasPermission", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"isApprovedForAll"` + */ +export const readShopRegIsApprovedForAll = /*#__PURE__*/ createReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "isApprovedForAll", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"name"` + */ +export const readShopRegName = /*#__PURE__*/ createReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "name", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"nonce"` + */ +export const readShopRegNonce = /*#__PURE__*/ createReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "nonce", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"ownerOf"` + */ +export const readShopRegOwnerOf = /*#__PURE__*/ createReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "ownerOf", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"permissionGuard"` + */ +export const readShopRegPermissionGuard = /*#__PURE__*/ createReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "permissionGuard", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"permsToBitmap"` + */ +export const readShopRegPermsToBitmap = /*#__PURE__*/ createReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "permsToBitmap", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"relayReg"` + */ +export const readShopRegRelayReg = /*#__PURE__*/ createReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "relayReg", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"relays"` + */ +export const readShopRegRelays = /*#__PURE__*/ createReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "relays", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"rootHashes"` + */ +export const readShopRegRootHashes = /*#__PURE__*/ createReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "rootHashes", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"shopURIs"` + */ +export const readShopRegShopUrIs = /*#__PURE__*/ createReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "shopURIs", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"supportsInterface"` + */ +export const readShopRegSupportsInterface = /*#__PURE__*/ createReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "supportsInterface", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"symbol"` + */ +export const readShopRegSymbol = /*#__PURE__*/ createReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "symbol", +}); + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"tokenURI"` + */ +export const readShopRegTokenUri = /*#__PURE__*/ createReadContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "tokenURI", +}); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link shopRegAbi}__ + */ +export const writeShopReg = /*#__PURE__*/ createWriteContract({ + abi: shopRegAbi, + address: shopRegAddress, +}); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"addPermission"` + */ +export const writeShopRegAddPermission = /*#__PURE__*/ createWriteContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "addPermission", +}); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"addRelay"` + */ +export const writeShopRegAddRelay = /*#__PURE__*/ createWriteContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "addRelay", +}); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"approve"` + */ +export const writeShopRegApprove = /*#__PURE__*/ createWriteContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "approve", +}); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"mint"` + */ +export const writeShopRegMint = /*#__PURE__*/ createWriteContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "mint", +}); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"publishInviteVerifier"` + */ +export const writeShopRegPublishInviteVerifier = + /*#__PURE__*/ createWriteContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "publishInviteVerifier", + }); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"redeemInvite"` + */ +export const writeShopRegRedeemInvite = /*#__PURE__*/ createWriteContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "redeemInvite", +}); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"registerUser"` + */ +export const writeShopRegRegisterUser = /*#__PURE__*/ createWriteContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "registerUser", +}); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"removePermission"` + */ +export const writeShopRegRemovePermission = /*#__PURE__*/ createWriteContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "removePermission", +}); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"removeRelay"` + */ +export const writeShopRegRemoveRelay = /*#__PURE__*/ createWriteContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "removeRelay", +}); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"removeUser"` + */ +export const writeShopRegRemoveUser = /*#__PURE__*/ createWriteContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "removeUser", +}); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"replaceRelay"` + */ +export const writeShopRegReplaceRelay = /*#__PURE__*/ createWriteContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "replaceRelay", +}); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"safeTransferFrom"` + */ +export const writeShopRegSafeTransferFrom = /*#__PURE__*/ createWriteContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "safeTransferFrom", +}); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"setApprovalForAll"` + */ +export const writeShopRegSetApprovalForAll = /*#__PURE__*/ createWriteContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "setApprovalForAll", +}); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"setTokenURI"` + */ +export const writeShopRegSetTokenUri = /*#__PURE__*/ createWriteContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "setTokenURI", +}); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"transferFrom"` + */ +export const writeShopRegTransferFrom = /*#__PURE__*/ createWriteContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "transferFrom", +}); + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"updateRootHash"` + */ +export const writeShopRegUpdateRootHash = /*#__PURE__*/ createWriteContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "updateRootHash", +}); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link shopRegAbi}__ + */ +export const simulateShopReg = /*#__PURE__*/ createSimulateContract({ + abi: shopRegAbi, + address: shopRegAddress, +}); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"addPermission"` + */ +export const simulateShopRegAddPermission = + /*#__PURE__*/ createSimulateContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "addPermission", + }); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"addRelay"` + */ +export const simulateShopRegAddRelay = /*#__PURE__*/ createSimulateContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "addRelay", +}); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"approve"` + */ +export const simulateShopRegApprove = /*#__PURE__*/ createSimulateContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "approve", +}); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"mint"` + */ +export const simulateShopRegMint = /*#__PURE__*/ createSimulateContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "mint", +}); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"publishInviteVerifier"` + */ +export const simulateShopRegPublishInviteVerifier = + /*#__PURE__*/ createSimulateContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "publishInviteVerifier", + }); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"redeemInvite"` + */ +export const simulateShopRegRedeemInvite = /*#__PURE__*/ createSimulateContract( + { abi: shopRegAbi, address: shopRegAddress, functionName: "redeemInvite" }, +); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"registerUser"` + */ +export const simulateShopRegRegisterUser = /*#__PURE__*/ createSimulateContract( + { abi: shopRegAbi, address: shopRegAddress, functionName: "registerUser" }, +); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"removePermission"` + */ +export const simulateShopRegRemovePermission = + /*#__PURE__*/ createSimulateContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "removePermission", + }); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"removeRelay"` + */ +export const simulateShopRegRemoveRelay = /*#__PURE__*/ createSimulateContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "removeRelay", +}); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"removeUser"` + */ +export const simulateShopRegRemoveUser = /*#__PURE__*/ createSimulateContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "removeUser", +}); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"replaceRelay"` + */ +export const simulateShopRegReplaceRelay = /*#__PURE__*/ createSimulateContract( + { abi: shopRegAbi, address: shopRegAddress, functionName: "replaceRelay" }, +); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"safeTransferFrom"` + */ +export const simulateShopRegSafeTransferFrom = + /*#__PURE__*/ createSimulateContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "safeTransferFrom", + }); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"setApprovalForAll"` + */ +export const simulateShopRegSetApprovalForAll = + /*#__PURE__*/ createSimulateContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "setApprovalForAll", + }); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"setTokenURI"` + */ +export const simulateShopRegSetTokenUri = /*#__PURE__*/ createSimulateContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "setTokenURI", +}); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"transferFrom"` + */ +export const simulateShopRegTransferFrom = /*#__PURE__*/ createSimulateContract( + { abi: shopRegAbi, address: shopRegAddress, functionName: "transferFrom" }, +); + +/** + * Wraps __{@link simulateContract}__ with `abi` set to __{@link shopRegAbi}__ and `functionName` set to `"updateRootHash"` + */ +export const simulateShopRegUpdateRootHash = + /*#__PURE__*/ createSimulateContract({ + abi: shopRegAbi, + address: shopRegAddress, + functionName: "updateRootHash", + }); + +/** + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link shopRegAbi}__ + */ +export const watchShopRegEvent = /*#__PURE__*/ createWatchContractEvent({ + abi: shopRegAbi, + address: shopRegAddress, +}); + +/** + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link shopRegAbi}__ and `eventName` set to `"Approval"` + */ +export const watchShopRegApprovalEvent = /*#__PURE__*/ createWatchContractEvent( + { abi: shopRegAbi, address: shopRegAddress, eventName: "Approval" }, +); + +/** + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link shopRegAbi}__ and `eventName` set to `"ApprovalForAll"` + */ +export const watchShopRegApprovalForAllEvent = + /*#__PURE__*/ createWatchContractEvent({ + abi: shopRegAbi, + address: shopRegAddress, + eventName: "ApprovalForAll", + }); + +/** + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link shopRegAbi}__ and `eventName` set to `"PermissionAdded"` + */ +export const watchShopRegPermissionAddedEvent = + /*#__PURE__*/ createWatchContractEvent({ + abi: shopRegAbi, + address: shopRegAddress, + eventName: "PermissionAdded", + }); + +/** + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link shopRegAbi}__ and `eventName` set to `"PermissionRemoved"` + */ +export const watchShopRegPermissionRemovedEvent = + /*#__PURE__*/ createWatchContractEvent({ + abi: shopRegAbi, + address: shopRegAddress, + eventName: "PermissionRemoved", + }); + +/** + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link shopRegAbi}__ and `eventName` set to `"Transfer"` + */ +export const watchShopRegTransferEvent = /*#__PURE__*/ createWatchContractEvent( + { abi: shopRegAbi, address: shopRegAddress, eventName: "Transfer" }, +); + +/** + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link shopRegAbi}__ and `eventName` set to `"UserAdded"` + */ +export const watchShopRegUserAddedEvent = + /*#__PURE__*/ createWatchContractEvent({ + abi: shopRegAbi, + address: shopRegAddress, + eventName: "UserAdded", + }); + +/** + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link shopRegAbi}__ and `eventName` set to `"UserRemoved"` + */ +export const watchShopRegUserRemovedEvent = + /*#__PURE__*/ createWatchContractEvent({ + abi: shopRegAbi, + address: shopRegAddress, + eventName: "UserRemoved", + }); diff --git a/packages/contracts/wagmi.config.ts b/packages/contracts/wagmi.config.ts new file mode 100644 index 00000000..7c89ff80 --- /dev/null +++ b/packages/contracts/wagmi.config.ts @@ -0,0 +1,44 @@ +// @ts-check + +/** @type {import('@wagmi/cli').Config} */ + +import { actions, react } from "npm:@wagmi/cli/plugins"; +import PaymentsByAddress from "./abi/PaymentsByAddress.json" with { + type: "json", +}; +import RelayReg from "./abi/RelayReg.json" with { type: "json" }; +import ShopReg from "./abi/ShopReg.json" with { type: "json" }; +import Eddies from "./abi/Eddies.json" with { type: "json" }; +import addresses from "./deploymentAddresses.json" with { type: "json" }; + +export default { + out: "src/generated.ts", + contracts: [ + { + name: "PaymentsByAddress", + abi: PaymentsByAddress, + address: addresses.Payments, + }, + { + name: "RelayReg", + abi: RelayReg, + address: addresses.RelayReg, + }, + { + name: "ShopReg", + abi: ShopReg, + address: addresses.ShopReg, + }, + { + name: "Eddies", + abi: Eddies, + address: addresses.Eddies, + }, + ], + plugins: [ + react(), + actions({ + overridePackageName: "wagmi", + }), + ], +}; diff --git a/packages/frontend/package.json b/packages/frontend/package.json index 36d2a560..1102c859 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -38,8 +38,8 @@ "react-test-renderer": "^18.2.0", "ts-node": "^10.9.2", "typescript": "^5.6.3", - "viem": "^2.16.3", - "wagmi": "^2.10.6" + "viem": "2.21.44", + "wagmi": "^2.12.31" }, "devDependencies": { "@next/eslint-plugin-next": "^14.2.3", diff --git a/packages/frontend/src/app/components/checkout/ChoosePayment.tsx b/packages/frontend/src/app/components/checkout/ChoosePayment.tsx index 9c334c30..ff7ebbdc 100644 --- a/packages/frontend/src/app/components/checkout/ChoosePayment.tsx +++ b/packages/frontend/src/app/components/checkout/ChoosePayment.tsx @@ -1,17 +1,9 @@ import React, { Dispatch, SetStateAction, useEffect, useState } from "react"; import { useChains } from "wagmi"; import { Address, pad, toHex } from "viem"; -import { - assert, - formatUnitsFromString, - logger, - zeroAddress, -} from "@massmarket/utils"; +import { assert, formatUnitsFromString, logger } from "@massmarket/utils"; import * as abi from "@massmarket/contracts"; -import { - getPaymentAddressAndID, - type PaymentArgs, -} from "@massmarket/blockchain"; +import { getPaymentAddress, getPaymentId } from "@massmarket/blockchain"; import { CheckoutStep, CurrencyChainOption, @@ -135,7 +127,7 @@ export default function ChoosePayment({ currency.address, ); //FIXME: get orderHash from paymentDetails. - const zeros32Bytes = pad(abi.zeroAddress, { size: 32 }); + const zeros32Bytes = pad(abi.addresses.zeroAddress, { size: 32 }); //FIXME: separate this into a function that constructs the arg. const arg = { chainId: currency.chainId, @@ -148,21 +140,17 @@ export default function ChoosePayment({ shopId: shopId!, shopSignature, }; - const calculatedPaymentInfo = await getPaymentAddressAndID({ - wallet: paymentRPC, - refundAddress: arg.payeeAddress, - ...arg, - }); - if (!calculatedPaymentInfo.address) { + const paymentAddr = await getPaymentAddress(paymentRPC, arg); + const id = await getPaymentId(paymentRPC, arg); + if (!paymentAddr) { throw new Error("No payment address found"); } - if (toHex(calculatedPaymentInfo.id) !== paymentId) { + if (toHex(id) !== paymentId) { debug(`received payment Id: ${paymentId}`); - debug(`calculated payment Id: ${toHex(calculatedPaymentInfo.id)}`); + debug(`calculated payment Id: ${toHex(id)}`); throw new Error("Payment ID mismatch"); } setPaymentArgs(arg); - const paymentAddr = calculatedPaymentInfo.address; const amount = BigInt(total); debug(`amount: ${amount}`); const payLink = currency.address === zeroAddress diff --git a/packages/frontend/src/app/components/transactions/Pay.tsx b/packages/frontend/src/app/components/transactions/Pay.tsx index c5657904..c9e2ca17 100644 --- a/packages/frontend/src/app/components/transactions/Pay.tsx +++ b/packages/frontend/src/app/components/transactions/Pay.tsx @@ -1,11 +1,11 @@ import React, { useEffect, useState } from "react"; import { ConnectButton } from "@rainbow-me/rainbowkit"; import { useAccount } from "wagmi"; +import { addresses } from "@massmarket/contracts"; -import { assert, logger, zeroAddress } from "@massmarket/utils"; +import { assert, logger } from "@massmarket/utils"; import { approveERC20, - type PaymentArgs, payNative, payTokenPreApproved, } from "@massmarket/blockchain"; @@ -48,7 +48,7 @@ export default function Pay({ const paymentArgsWallet = { wallet: clientWallet, ...paymentArgs }; try { setLoading(true); - if (paymentArgs.currencyAddress !== zeroAddress) { + if (paymentArgs.currencyAddress !== addresses.zeroAddress) { debug("Approve ERC20 contract call"); // TODO: should do this if we have already approved the contract await approveERC20( diff --git a/packages/frontend/src/app/create-store/page.tsx b/packages/frontend/src/app/create-store/page.tsx index 1a27f123..e222591a 100644 --- a/packages/frontend/src/app/create-store/page.tsx +++ b/packages/frontend/src/app/create-store/page.tsx @@ -10,12 +10,8 @@ import { privateKeyToAccount } from "viem/accounts"; import { useAccount, useChains } from "wagmi"; import { BlockchainClient } from "@massmarket/blockchain"; -import { - assert, - logger, - random32BytesHex, - zeroAddress, -} from "@massmarket/utils"; +import { assert, logger, random32BytesHex } from "@massmarket/utils"; +import { addresses } from "@massmarket/contracts"; import { CurrencyChainOption, ShopCurrencies, Status } from "@/types"; import { getTokenAddress, isValidHex } from "@/app/utils"; @@ -63,7 +59,7 @@ const StoreCreation = () => { const [avatar, setAvatar] = useState(null); const [pricingCurrency, setPricingCurrency] = useState< Partial - >({ address: zeroAddress }); + >({ address: addresses.zeroAddress }); const [acceptedCurrencies, setAcceptedCurrencies] = useState< ShopCurrencies[] >([]); diff --git a/packages/frontend/src/app/favicon.ico b/packages/frontend/src/app/favicon.ico deleted file mode 100644 index 718d6fea4835ec2d246af9800eddb7ffb276240c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 25931 zcmeHv30#a{`}aL_*G&7qml|y<+KVaDM2m#dVr!KsA!#An?kSQM(q<_dDNCpjEux83 zLb9Z^XxbDl(w>%i@8hT6>)&Gu{h#Oeyszu?xtw#Zb1mO{pgX9699l+Qppw7jXaYf~-84xW z)w4x8?=youko|}Vr~(D$UXIbiXABHh`p1?nn8Po~fxRJv}|0e(BPs|G`(TT%kKVJAdg5*Z|x0leQq0 zkdUBvb#>9F()jo|T~kx@OM8$9wzs~t2l;K=woNssA3l6|sx2r3+kdfVW@e^8e*E}v zA1y5{bRi+3Z`uD3{F7LgFJDdvm;nJilkzDku>BwXH(8ItVCXk*-lSJnR?-2UN%hJ){&rlvg`CDTj z)Bzo!3v7Ou#83zEDEFcKt(f1E0~=rqeEbTnMvWR#{+9pg%7G8y>u1OVRUSoox-ovF z2Ydma(;=YuBY(eI|04{hXzZD6_f(v~H;C~y5=DhAC{MMS>2fm~1H_t2$56pc$NH8( z5bH|<)71dV-_oCHIrzrT`2s-5w_+2CM0$95I6X8p^r!gHp+j_gd;9O<1~CEQQGS8) zS9Qh3#p&JM-G8rHekNmKVewU;pJRcTAog68KYo^dRo}(M>36U4Us zfgYWSiHZL3;lpWT=zNAW>Dh#mB!_@Lg%$ms8N-;aPqMn+C2HqZgz&9~Eu z4|Kp<`$q)Uw1R?y(~S>ePdonHxpV1#eSP1B;Ogo+-Pk}6#0GsZZ5!||ev2MGdh}_m z{DeR7?0-1^zVs&`AV6Vt;r3`I`OI_wgs*w=eO%_#7Kepl{B@xiyCANc(l zzIyd4y|c6PXWq9-|KM8(zIk8LPk(>a)zyFWjhT!$HJ$qX1vo@d25W<fvZQ2zUz5WRc(UnFMKHwe1| zWmlB1qdbiA(C0jmnV<}GfbKtmcu^2*P^O?MBLZKt|As~ge8&AAO~2K@zbXelK|4T<{|y4`raF{=72kC2Kn(L4YyenWgrPiv z@^mr$t{#X5VuIMeL!7Ab6_kG$&#&5p*Z{+?5U|TZ`B!7llpVmp@skYz&n^8QfPJzL z0G6K_OJM9x+Wu2gfN45phANGt{7=C>i34CV{Xqlx(fWpeAoj^N0Biu`w+MVcCUyU* zDZuzO0>4Z6fbu^T_arWW5n!E45vX8N=bxTVeFoep_G#VmNlQzAI_KTIc{6>c+04vr zx@W}zE5JNSU>!THJ{J=cqjz+4{L4A{Ob9$ZJ*S1?Ggg3klFp!+Y1@K+pK1DqI|_gq z5ZDXVpge8-cs!o|;K73#YXZ3AShj50wBvuq3NTOZ`M&qtjj#GOFfgExjg8Gn8>Vq5 z`85n+9|!iLCZF5$HJ$Iu($dm?8~-ofu}tEc+-pyke=3!im#6pk_Wo8IA|fJwD&~~F zc16osQ)EBo58U7XDuMexaPRjU@h8tXe%S{fA0NH3vGJFhuyyO!Uyl2^&EOpX{9As0 zWj+P>{@}jxH)8|r;2HdupP!vie{sJ28b&bo!8`D^x}TE$%zXNb^X1p@0PJ86`dZyj z%ce7*{^oo+6%&~I!8hQy-vQ7E)0t0ybH4l%KltWOo~8cO`T=157JqL(oq_rC%ea&4 z2NcTJe-HgFjNg-gZ$6!Y`SMHrlj}Etf7?r!zQTPPSv}{so2e>Fjs1{gzk~LGeesX%r(Lh6rbhSo_n)@@G-FTQy93;l#E)hgP@d_SGvyCp0~o(Y;Ee8{ zdVUDbHm5`2taPUOY^MAGOw*>=s7=Gst=D+p+2yON!0%Hk` zz5mAhyT4lS*T3LS^WSxUy86q&GnoHxzQ6vm8)VS}_zuqG?+3td68_x;etQAdu@sc6 zQJ&5|4(I?~3d-QOAODHpZ=hlSg(lBZ!JZWCtHHSj`0Wh93-Uk)_S%zsJ~aD>{`A0~ z9{AG(e|q3g5B%wYKRxiL2Y$8(4w6bzchKuloQW#e&S3n+P- z8!ds-%f;TJ1>)v)##>gd{PdS2Oc3VaR`fr=`O8QIO(6(N!A?pr5C#6fc~Ge@N%Vvu zaoAX2&(a6eWy_q&UwOhU)|P3J0Qc%OdhzW=F4D|pt0E4osw;%<%Dn58hAWD^XnZD= z>9~H(3bmLtxpF?a7su6J7M*x1By7YSUbxGi)Ot0P77`}P3{)&5Un{KD?`-e?r21!4vTTnN(4Y6Lin?UkSM z`MXCTC1@4A4~mvz%Rh2&EwY))LeoT=*`tMoqcEXI>TZU9WTP#l?uFv+@Dn~b(>xh2 z;>B?;Tz2SR&KVb>vGiBSB`@U7VIWFSo=LDSb9F{GF^DbmWAfpms8Sx9OX4CnBJca3 zlj9(x!dIjN?OG1X4l*imJNvRCk}F%!?SOfiOq5y^mZW)jFL@a|r-@d#f7 z2gmU8L3IZq0ynIws=}~m^#@&C%J6QFo~Mo4V`>v7MI-_!EBMMtb%_M&kvAaN)@ZVw z+`toz&WG#HkWDjnZE!6nk{e-oFdL^$YnbOCN}JC&{$#$O27@|Tn-skXr)2ml2~O!5 zX+gYoxhoc7qoU?C^3~&!U?kRFtnSEecWuH0B0OvLodgUAi}8p1 zrO6RSXHH}DMc$&|?D004DiOVMHV8kXCP@7NKB zgaZq^^O<7PoKEp72kby@W0Z!Y*Ay{&vfg#C&gG@YVR9g?FEocMUi1gSN$+V+ayF45{a zuDZDTN}mS|;BO%gEf}pjBfN2-gIrU#G5~cucA;dokXW89%>AyXJJI z9X4UlIWA|ZYHgbI z5?oFk@A=Ik7lrEQPDH!H+b`7_Y~aDb_qa=B2^Y&Ow41cU=4WDd40dp5(QS-WMN-=Y z9g;6_-JdNU;|6cPwf$ak*aJIcwL@1n$#l~zi{c{EW?T;DaW*E8DYq?Umtz{nJ&w-M zEMyTDrC&9K$d|kZe2#ws6)L=7K+{ zQw{XnV6UC$6-rW0emqm8wJoeZK)wJIcV?dST}Z;G0Arq{dVDu0&4kd%N!3F1*;*pW zR&qUiFzK=@44#QGw7k1`3t_d8&*kBV->O##t|tonFc2YWrL7_eqg+=+k;!F-`^b8> z#KWCE8%u4k@EprxqiV$VmmtiWxDLgnGu$Vs<8rppV5EajBXL4nyyZM$SWVm!wnCj-B!Wjqj5-5dNXukI2$$|Bu3Lrw}z65Lc=1G z^-#WuQOj$hwNGG?*CM_TO8Bg-1+qc>J7k5c51U8g?ZU5n?HYor;~JIjoWH-G>AoUP ztrWWLbRNqIjW#RT*WqZgPJXU7C)VaW5}MiijYbABmzoru6EmQ*N8cVK7a3|aOB#O& zBl8JY2WKfmj;h#Q!pN%9o@VNLv{OUL?rixHwOZuvX7{IJ{(EdPpuVFoQqIOa7giLVkBOKL@^smUA!tZ1CKRK}#SSM)iQHk)*R~?M!qkCruaS!#oIL1c z?J;U~&FfH#*98^G?i}pA{ z9Jg36t4=%6mhY(quYq*vSxptes9qy|7xSlH?G=S@>u>Ebe;|LVhs~@+06N<4CViBk zUiY$thvX;>Tby6z9Y1edAMQaiH zm^r3v#$Q#2T=X>bsY#D%s!bhs^M9PMAcHbCc0FMHV{u-dwlL;a1eJ63v5U*?Q_8JO zT#50!RD619#j_Uf))0ooADz~*9&lN!bBDRUgE>Vud-i5ck%vT=r^yD*^?Mp@Q^v+V zG#-?gKlr}Eeqifb{|So?HM&g91P8|av8hQoCmQXkd?7wIJwb z_^v8bbg`SAn{I*4bH$u(RZ6*xUhuA~hc=8czK8SHEKTzSxgbwi~9(OqJB&gwb^l4+m`k*Q;_?>Y-APi1{k zAHQ)P)G)f|AyjSgcCFps)Fh6Bca*Xznq36!pV6Az&m{O8$wGFD? zY&O*3*J0;_EqM#jh6^gMQKpXV?#1?>$ml1xvh8nSN>-?H=V;nJIwB07YX$e6vLxH( zqYwQ>qxwR(i4f)DLd)-$P>T-no_c!LsN@)8`e;W@)-Hj0>nJ-}Kla4-ZdPJzI&Mce zv)V_j;(3ERN3_@I$N<^|4Lf`B;8n+bX@bHbcZTopEmDI*Jfl)-pFDvo6svPRoo@(x z);_{lY<;);XzT`dBFpRmGrr}z5u1=pC^S-{ce6iXQlLGcItwJ^mZx{m$&DA_oEZ)B{_bYPq-HA zcH8WGoBG(aBU_j)vEy+_71T34@4dmSg!|M8Vf92Zj6WH7Q7t#OHQqWgFE3ARt+%!T z?oLovLVlnf?2c7pTc)~cc^($_8nyKwsN`RA-23ed3sdj(ys%pjjM+9JrctL;dy8a( z@en&CQmnV(()bu|Y%G1-4a(6x{aLytn$T-;(&{QIJB9vMox11U-1HpD@d(QkaJdEb zG{)+6Dos_L+O3NpWo^=gR?evp|CqEG?L&Ut#D*KLaRFOgOEK(Kq1@!EGcTfo+%A&I z=dLbB+d$u{sh?u)xP{PF8L%;YPPW53+@{>5W=Jt#wQpN;0_HYdw1{ksf_XhO4#2F= zyPx6Lx2<92L-;L5PD`zn6zwIH`Jk($?Qw({erA$^bC;q33hv!d!>%wRhj# zal^hk+WGNg;rJtb-EB(?czvOM=H7dl=vblBwAv>}%1@{}mnpUznfq1cE^sgsL0*4I zJ##!*B?=vI_OEVis5o+_IwMIRrpQyT_Sq~ZU%oY7c5JMIADzpD!Upz9h@iWg_>>~j zOLS;wp^i$-E?4<_cp?RiS%Rd?i;f*mOz=~(&3lo<=@(nR!_Rqiprh@weZlL!t#NCc zO!QTcInq|%#>OVgobj{~ixEUec`E25zJ~*DofsQdzIa@5^nOXj2T;8O`l--(QyU^$t?TGY^7#&FQ+2SS3B#qK*k3`ye?8jUYSajE5iBbJls75CCc(m3dk{t?- zopcER9{Z?TC)mk~gpi^kbbu>b-+a{m#8-y2^p$ka4n60w;Sc2}HMf<8JUvhCL0B&Btk)T`ctE$*qNW8L$`7!r^9T+>=<=2qaq-;ll2{`{Rg zc5a0ZUI$oG&j-qVOuKa=*v4aY#IsoM+1|c4Z)<}lEDvy;5huB@1RJPquU2U*U-;gu z=En2m+qjBzR#DEJDO`WU)hdd{Vj%^0V*KoyZ|5lzV87&g_j~NCjwv0uQVqXOb*QrQ zy|Qn`hxx(58c70$E;L(X0uZZ72M1!6oeg)(cdKO ze0gDaTz+ohR-#d)NbAH4x{I(21yjwvBQfmpLu$)|m{XolbgF!pmsqJ#D}(ylp6uC> z{bqtcI#hT#HW=wl7>p!38sKsJ`r8}lt-q%Keqy%u(xk=yiIJiUw6|5IvkS+#?JTBl z8H5(Q?l#wzazujH!8o>1xtn8#_w+397*_cy8!pQGP%K(Ga3pAjsaTbbXJlQF_+m+-UpUUent@xM zg%jqLUExj~o^vQ3Gl*>wh=_gOr2*|U64_iXb+-111aH}$TjeajM+I20xw(((>fej-@CIz4S1pi$(#}P7`4({6QS2CaQS4NPENDp>sAqD z$bH4KGzXGffkJ7R>V>)>tC)uax{UsN*dbeNC*v}#8Y#OWYwL4t$ePR?VTyIs!wea+ z5Urmc)X|^`MG~*dS6pGSbU+gPJoq*^a=_>$n4|P^w$sMBBy@f*Z^Jg6?n5?oId6f{ z$LW4M|4m502z0t7g<#Bx%X;9<=)smFolV&(V^(7Cv2-sxbxopQ!)*#ZRhTBpx1)Fc zNm1T%bONzv6@#|dz(w02AH8OXe>kQ#1FMCzO}2J_mST)+ExmBr9cva-@?;wnmWMOk z{3_~EX_xadgJGv&H@zK_8{(x84`}+c?oSBX*Ge3VdfTt&F}yCpFP?CpW+BE^cWY0^ zb&uBN!Ja3UzYHK-CTyA5=L zEMW{l3Usky#ly=7px648W31UNV@K)&Ub&zP1c7%)`{);I4b0Q<)B}3;NMG2JH=X$U zfIW4)4n9ZM`-yRj67I)YSLDK)qfUJ_ij}a#aZN~9EXrh8eZY2&=uY%2N0UFF7<~%M zsB8=erOWZ>Ct_#^tHZ|*q`H;A)5;ycw*IcmVxi8_0Xk}aJA^ath+E;xg!x+As(M#0=)3!NJR6H&9+zd#iP(m0PIW8$ z1Y^VX`>jm`W!=WpF*{ioM?C9`yOR>@0q=u7o>BP-eSHqCgMDj!2anwH?s%i2p+Q7D zzszIf5XJpE)IG4;d_(La-xenmF(tgAxK`Y4sQ}BSJEPs6N_U2vI{8=0C_F?@7<(G; zo$~G=8p+076G;`}>{MQ>t>7cm=zGtfbdDXm6||jUU|?X?CaE?(<6bKDYKeHlz}DA8 zXT={X=yp_R;HfJ9h%?eWvQ!dRgz&Su*JfNt!Wu>|XfU&68iRikRrHRW|ZxzRR^`eIGt zIeiDgVS>IeExKVRWW8-=A=yA`}`)ZkWBrZD`hpWIxBGkh&f#ijr449~m`j6{4jiJ*C!oVA8ZC?$1RM#K(_b zL9TW)kN*Y4%^-qPpMP7d4)o?Nk#>aoYHT(*g)qmRUb?**F@pnNiy6Fv9rEiUqD(^O zzyS?nBrX63BTRYduaG(0VVG2yJRe%o&rVrLjbxTaAFTd8s;<<@Qs>u(<193R8>}2_ zuwp{7;H2a*X7_jryzriZXMg?bTuegABb^87@SsKkr2)0Gyiax8KQWstw^v#ix45EVrcEhr>!NMhprl$InQMzjSFH54x5k9qHc`@9uKQzvL4ihcq{^B zPrVR=o_ic%Y>6&rMN)hTZsI7I<3&`#(nl+3y3ys9A~&^=4?PL&nd8)`OfG#n zwAMN$1&>K++c{^|7<4P=2y(B{jJsQ0a#U;HTo4ZmWZYvI{+s;Td{Yzem%0*k#)vjpB zia;J&>}ICate44SFYY3vEelqStQWFihx%^vQ@Do(sOy7yR2@WNv7Y9I^yL=nZr3mb zXKV5t@=?-Sk|b{XMhA7ZGB@2hqsx}4xwCW!in#C zI@}scZlr3-NFJ@NFaJlhyfcw{k^vvtGl`N9xSo**rDW4S}i zM9{fMPWo%4wYDG~BZ18BD+}h|GQKc-g^{++3MY>}W_uq7jGHx{mwE9fZiPCoxN$+7 zrODGGJrOkcPQUB(FD5aoS4g~7#6NR^ma7-!>mHuJfY5kTe6PpNNKC9GGRiu^L31uG z$7v`*JknQHsYB!Tm_W{a32TM099djW%5e+j0Ve_ct}IM>XLF1Ap+YvcrLV=|CKo6S zb+9Nl3_YdKP6%Cxy@6TxZ>;4&nTneadr z_ES90ydCev)LV!dN=#(*f}|ZORFdvkYBni^aLbUk>BajeWIOcmHP#8S)*2U~QKI%S zyrLmtPqb&TphJ;>yAxri#;{uyk`JJqODDw%(Z=2`1uc}br^V%>j!gS)D*q*f_-qf8&D;W1dJgQMlaH5er zN2U<%Smb7==vE}dDI8K7cKz!vs^73o9f>2sgiTzWcwY|BMYHH5%Vn7#kiw&eItCqa zIkR2~Q}>X=Ar8W|^Ms41Fm8o6IB2_j60eOeBB1Br!boW7JnoeX6Gs)?7rW0^5psc- zjS16yb>dFn>KPOF;imD}e!enuIniFzv}n$m2#gCCv4jM#ArwlzZ$7@9&XkFxZ4n!V zj3dyiwW4Ki2QG{@i>yuZXQizw_OkZI^-3otXC{!(lUpJF33gI60ak;Uqitp74|B6I zgg{b=Iz}WkhCGj1M=hu4#Aw173YxIVbISaoc z-nLZC*6Tgivd5V`K%GxhBsp@SUU60-rfc$=wb>zdJzXS&-5(NRRodFk;Kxk!S(O(a0e7oY=E( zAyS;Ow?6Q&XA+cnkCb{28_1N8H#?J!*$MmIwLq^*T_9-z^&UE@A(z9oGYtFy6EZef LrJugUA?W`A8`#=m diff --git a/packages/frontend/src/app/merchants/connect/page.tsx b/packages/frontend/src/app/merchants/connect/page.tsx index 93f6edc9..2f5eb915 100644 --- a/packages/frontend/src/app/merchants/connect/page.tsx +++ b/packages/frontend/src/app/merchants/connect/page.tsx @@ -6,7 +6,6 @@ import React, { useEffect, useRef, useState } from "react"; import { useAccount } from "wagmi"; -import { Address } from "viem"; import { ConnectButton } from "@rainbow-me/rainbowkit"; import * as abi from "@massmarket/contracts"; @@ -66,8 +65,8 @@ const MerchantConnectWallet = () => { } try { const uri = (await shopPublicClient!.readContract({ - address: abi.addresses.ShopReg as Address, - abi: abi.ShopReg, + address: abi.addresses.ShopReg, + abi: abi.shopRegAbi, functionName: "tokenURI", args: [searchShopId], })) as string; diff --git a/packages/frontend/src/app/store/page.tsx b/packages/frontend/src/app/store/page.tsx index b01c3ab4..7f53df24 100644 --- a/packages/frontend/src/app/store/page.tsx +++ b/packages/frontend/src/app/store/page.tsx @@ -10,7 +10,8 @@ import { Address } from "viem"; import { UpdateShopManifest } from "@massmarket/stateManager/types"; import { BlockchainClient } from "@massmarket/blockchain"; -import { logger, zeroAddress } from "@massmarket/utils"; +import { logger } from "@massmarket/utils"; +import { addresses } from "@massmarket/contracts"; import { CurrencyChainOption, ShopCurrencies, ShopManifest } from "@/types"; import { getTokenAddress } from "@/app/utils"; @@ -60,8 +61,8 @@ function StoreProfile() { chains.map((c) => { chainsToRender.push({ label: `ETH/${c.name}`, - value: `${zeroAddress}/${c.id}`, - address: zeroAddress, + value: `${addresses.zeroAddress}/${c.id}`, + address: addresses.zeroAddress, chainId: c.id, }); const usdcTokenAddress = getTokenAddress("USDC", String(c.id)); diff --git a/packages/frontend/src/app/utils.ts b/packages/frontend/src/app/utils.ts index 13011bf7..56c2c5eb 100644 --- a/packages/frontend/src/app/utils.ts +++ b/packages/frontend/src/app/utils.ts @@ -15,7 +15,7 @@ import { import { privateKeyToAccount } from "viem/accounts"; import { hardhat } from "wagmi/chains"; -import { assert, random32BytesHex, zeroAddress } from "@massmarket/utils"; +import { assert, random32BytesHex } from "@massmarket/utils"; import * as abi from "@massmarket/contracts"; import { Metadata } from "@/types"; @@ -80,7 +80,7 @@ export const getTokenInformation = ( ): Promise<[string, number]> => { assert(publicClient.chain, "publicClient.chain is undefined"); const chainId = publicClient.chain.id; - if (tokenAddress === zeroAddress) { + if (tokenAddress === abi.addresses.zeroAddress) { return new Promise((resolve) => { resolve(["ETH", 18]); }); @@ -91,13 +91,13 @@ export const getTokenInformation = ( } const symbol = publicClient.readContract({ address: tokenAddress, - abi: abi.ERC20, + abi: abi.eddiesAbi, functionName: "symbol", args: [], }) as Promise; const decimal = publicClient.readContract({ address: tokenAddress, - abi: abi.ERC20, + abi: abi.eddiesAbi, functionName: "decimals", args: [], }) as Promise; @@ -105,7 +105,7 @@ export const getTokenInformation = ( }; export const getTokenAddress = (symbol: string, chainId: string): Address => { - if (symbol === "ETH") return zeroAddress; + if (symbol === "ETH") return abi.addresses.zeroAddress; const addresses: { [key: string]: { [key: string]: string; diff --git a/packages/frontend/src/context/StoreContext.tsx b/packages/frontend/src/context/StoreContext.tsx index adc3cdb9..eb2bcaad 100644 --- a/packages/frontend/src/context/StoreContext.tsx +++ b/packages/frontend/src/context/StoreContext.tsx @@ -4,7 +4,6 @@ import React, { createContext, useContext, useEffect, useState } from "react"; import { useChains } from "wagmi"; -import { Address } from "viem"; import { usePathname } from "next/navigation"; import * as abi from "@massmarket/contracts"; @@ -56,8 +55,8 @@ export const StoreContextProvider = ( if (shopPublicClient && shopId) { (async () => { const uri = await shopPublicClient.readContract({ - address: abi.addresses.ShopReg as Address, - abi: abi.ShopReg, + address: abi.addresses.ShopReg, + abi: abi.shopRegAbi, functionName: "tokenURI", args: [BigInt(shopId)], }); diff --git a/packages/frontend/src/context/UserContext.tsx b/packages/frontend/src/context/UserContext.tsx index 961f866e..6bc98c35 100644 --- a/packages/frontend/src/context/UserContext.tsx +++ b/packages/frontend/src/context/UserContext.tsx @@ -146,7 +146,7 @@ export const UserContextProvider = ( if (walletAddress) { const hasAccess = (await shopPublicClient.readContract({ address: abi.addresses.ShopReg as `0x${string}`, - abi: abi.ShopReg, + abi: abi.shopRegAbi, functionName: "hasPermission", args: [shopId, walletAddress, abi.permissions.updateRootHash], })) as boolean; diff --git a/packages/stateManager/mockClient.ts b/packages/stateManager/mockClient.ts index f22e6214..d602f138 100644 --- a/packages/stateManager/mockClient.ts +++ b/packages/stateManager/mockClient.ts @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: GPL-3.0-or-later -import { hexToBytes, type PublicClient } from "viem"; +import { hexToBytes, numberToBytes, type PublicClient } from "viem"; import { type PrivateKeyAccount, privateKeyToAccount } from "viem/accounts"; import Long from "long"; import { MemoryLevel } from "memory-level"; @@ -31,7 +31,7 @@ export class MockClientStateManager { public stateManager: StateManager | null; public relayClient: IRelayClient | null; - constructor(publicClient: PublicClient, shopId: `0x${string}`) { + constructor(publicClient: PublicClient, shopId: bigint) { this.stateManager = null; this.relayClient = null; this.publicClient = publicClient; @@ -196,8 +196,8 @@ export class MockClient implements IRelayClient { updateTag: tag, }); } - shopManifest(manifest: schema.IManifest, shopId: `0x${string}`) { - manifest.tokenId = { raw: hexToBytes(shopId) }; + shopManifest(manifest: schema.IManifest, shopId: bigint) { + manifest.tokenId = { raw: numberToBytes(shopId) }; return this.sendShopEvent({ manifest: manifest, }); @@ -229,12 +229,12 @@ export class MockClient implements IRelayClient { const file = blob.get(`file`) as { name: string }; return { url: file.name }; } - async sendGuestSubscriptionRequest(_shopId: `0x${string}`, _seqNo = 0) {} + async sendGuestSubscriptionRequest(_shopId: bigint, _seqNo = 0) {} async sendGuestCheckoutSubscriptionRequest( - _shopId: `0x${string}`, + _shopId: bigint, _seqNo = 0, ) {} - async sendMerchantSubscriptionRequest(_shopId: `0x${string}`, _seqNo = 0) {} + async sendMerchantSubscriptionRequest(_shopId: bigint, _seqNo = 0) {} //Mimics client-fired event paymentDetails after commit event - for testing paymentDetails gets stored correctly in stateManager. sendPaymentDetails(orderId: `0x${string}`) { return this.sendShopEvent({ diff --git a/packages/stateManager/mod.ts b/packages/stateManager/mod.ts index d479fd66..e30d4867 100644 --- a/packages/stateManager/mod.ts +++ b/packages/stateManager/mod.ts @@ -510,7 +510,7 @@ class ShopManifestManager extends PublicObjectManager { } } - async create(manifest: CreateShopManifest, shopId: `0x${string}`) { + async create(manifest: CreateShopManifest, shopId: bigint) { const m: schema.Manifest = schema.Manifest.create({}); assert(manifest.pricingCurrency, "manifest.pricingCurrency is required"); m.pricingCurrency = addressToUint256( @@ -1190,7 +1190,7 @@ export class StateManager { orderStore: Store, keycardStore: Store, keycardNonceStore: Store, - shopId: `0x${string}`, + shopId: bigint, publicClient: PublicClient, ) { this.listings = new ListingManager(listingStore, client); @@ -1208,27 +1208,27 @@ export class StateManager { //When we inititally create a shop, we are saving the relay tokenId => shopId. //Here, we are retrieving all the relay addresses associated with the shopId and saving them to keycards store. //Since some shopEvents are signed by a relay, we need to include these addresses when verifying the event signer. - const count = (await this.publicClient.readContract({ - address: abi.addresses.ShopReg as `0x${string}`, - abi: abi.ShopReg, + const count = await this.publicClient.readContract({ + address: abi.addresses.ShopReg, + abi: abi.shopRegAbi, functionName: "getRelayCount", args: [this.shopId], - })) as number; + }); if (count > 0) { - const tokenIds = (await this.publicClient.readContract({ + const tokenIds = await this.publicClient.readContract({ address: abi.addresses.ShopReg as `0x${string}`, - abi: abi.ShopReg, + abi: abi.shopRegAbi, functionName: "getAllRelays", args: [this.shopId], - })) as `0x${string}`[]; + }); for await (const tokenId of tokenIds) { - const ownerAdd = (await this.publicClient!.readContract({ + const ownerAdd = await this.publicClient!.readContract({ address: abi.addresses.RelayReg as `0x${string}`, - abi: abi.RelayReg, + abi: abi.shopRegAbi, functionName: "ownerOf", args: [tokenId], - })) as `0x${string}`; + }); debug(`adding relay: ${ownerAdd}`); await this.keycards.addAddress(ownerAdd); } diff --git a/packages/stateManager/mod_test.ts b/packages/stateManager/mod_test.ts index 8a92dbaf..923fb8b8 100644 --- a/packages/stateManager/mod_test.ts +++ b/packages/stateManager/mod_test.ts @@ -1,17 +1,15 @@ import { afterAll, beforeEach, describe, it } from "jsr:@std/testing/bdd"; import { expect } from "jsr:@std/expect"; -import { MemoryLevel } from "memory-level"; -import { hardhat } from "viem/chains"; - -import { objectId, randomAddress, zeroAddress } from "@massmarket/utils"; +import { MemoryLevel } from "npm:memory-level"; +import { hardhat } from "npm:viem/chains"; +import { objectId, random256BigInt, randomAddress } from "@massmarket/utils"; import { - type Address, bytesToHex, createPublicClient, formatUnits, fromHex, http, -} from "viem"; +} from "npm:viem"; import * as abi from "@massmarket/contracts"; import { StateManager } from "./mod.ts"; @@ -59,7 +57,7 @@ async function setupTestManager() { orderStore, keycardStore, keycardNonceStore, - randomAddress(), + random256BigInt(), publicClient, ); @@ -78,7 +76,7 @@ async function setupTestManager() { }; } -const eddies = abi.addresses.Eddies.toLowerCase() as Address; +const eddies = abi.addresses.Eddies.toLowerCase() as `0x${string}`; const currencies = [ { @@ -87,7 +85,7 @@ const currencies = [ }, { chainId: 12, - address: zeroAddress, + address: abi.addresses.zeroAddress, }, ]; const payees = [ @@ -349,12 +347,12 @@ describe({ name: "global test settings", sanitizeResources: false }, () => { acceptedCurrencies: currencies, pricingCurrency: { chainId: 1, - address: zeroAddress, + address: abi.addresses.zeroAddress, }, payees, shippingRegions, }, - randomAddress(), + random256BigInt(), ); await close(); expect(called).toBeTruthy(); @@ -385,18 +383,18 @@ describe({ name: "global test settings", sanitizeResources: false }, () => { acceptedCurrencies: currencies, pricingCurrency: { chainId: 1, - address: zeroAddress, + address: abi.addresses.zeroAddress, }, payees, shippingRegions, }, - randomAddress(), + random256BigInt(), ); const shop = await stateManager.manifest.get(); expect(shop.acceptedCurrencies).toEqual(currencies); expect(shop.pricingCurrency).toEqual({ chainId: 1, - address: zeroAddress, + address: abi.addresses.zeroAddress, }); expect(shop.payees).toEqual(payees); expect(shop.shippingRegions).toEqual(shippingRegions); @@ -437,7 +435,7 @@ describe({ name: "global test settings", sanitizeResources: false }, () => { expect(removed.acceptedCurrencies.length).toEqual(3); //Make sure the correct currency is removed const found = removed.acceptedCurrencies.find( - (c) => c.address === zeroAddress, + (c) => c.address === abi.addresses.zeroAddress, ); expect(found).toBe(undefined); }); @@ -668,7 +666,7 @@ describe({ name: "global test settings", sanitizeResources: false }, () => { name: "default", }; const currency = { - address: zeroAddress, + address: abi.addresses.zeroAddress, chainId: 1, }; //Order should not have a choosePayment/paymentDetails property yet. diff --git a/packages/stateManager/package.json b/packages/stateManager/package.json index 8d928e9e..b42182df 100644 --- a/packages/stateManager/package.json +++ b/packages/stateManager/package.json @@ -15,7 +15,7 @@ "@massmarket/utils": "workspace:*", "@massmarket/contracts": "workspace:*", "events": "^3.3.0", - "viem": "^2.16.3" + "viem": "2.21.44" }, "exports": { ".": { diff --git a/packages/utils/mod.ts b/packages/utils/mod.ts index 83c4871d..c9823d11 100644 --- a/packages/utils/mod.ts +++ b/packages/utils/mod.ts @@ -12,6 +12,7 @@ import { toBytes, } from "viem"; import * as Sentry from "@sentry/nextjs"; +import { bytesToBigInt } from "@ethereumjs/util"; // TODO: type case first argument to captureException // TODO: add extras arguments (https://docs.sentry.io/platforms/javascript/guides/nextjs/enriching-events/) @@ -169,10 +170,6 @@ export function addressesToUint256(addressObject: AdressObj[]) { }); } -export const zeroAddress: `0x${string}` = - "0x0000000000000000000000000000000000000000"; -export const anvilPrivateKey = - "0x2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6"; -export const anvilPrivateKey2 = - "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"; -export const anvilAddress = "0xa0Ee7A142d267C1f36714E4a8F75612F20a79720"; +export function random256BigInt() { + return bytesToBigInt(randomBytes(32)); +} diff --git a/packages/utils/package.json b/packages/utils/package.json index 5bf1a480..7ef75866 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -13,7 +13,7 @@ }, "dependencies": { "buffer": "^6.0.3", - "viem": "^2.16.3", + "viem": "2.21.44", "@sentry/nextjs": "^8.36.0" } } From 99dc799799466f190a9a2dc94060ad9f5e0b3ddd Mon Sep 17 00:00:00 2001 From: JC <70621556+youngbbcoconut@users.noreply.github.com> Date: Sat, 16 Nov 2024 18:48:57 +0700 Subject: [PATCH 2/3] store id to bigint (#151) * separate isMerchantPath fn * shopID hex => bigInt * if client is not yet connected, do not render app removing withClient * fixing arg for getPaymentAddress * fixing guest checkout --- packages/client/guestCheckout_test.ts | 78 +++++++------------ .../src/app/ClientWithStateManager.ts | 2 +- .../app/components/checkout/ChoosePayment.tsx | 21 +++-- .../src/app/components/contact/Share.tsx | 11 ++- .../src/app/components/withClient.tsx | 23 ------ .../src/app/create-store/Confirmation.tsx | 10 +-- .../frontend/src/app/create-store/page.tsx | 14 ++-- .../src/app/merchant-dashboard/page.tsx | 3 +- .../src/app/merchants/connect/page.tsx | 14 ++-- packages/frontend/src/app/products/page.tsx | 3 +- .../src/app/products/productDetail/page.tsx | 3 +- packages/frontend/src/app/store/page.tsx | 4 +- packages/frontend/src/app/utils.ts | 6 ++ .../frontend/src/context/StoreContext.tsx | 20 ++++- packages/frontend/src/context/UserContext.tsx | 20 +++-- packages/frontend/src/types/index.ts | 2 +- packages/stateManager/mod.ts | 11 ++- packages/stateManager/types.ts | 2 +- 18 files changed, 114 insertions(+), 133 deletions(-) delete mode 100644 packages/frontend/src/app/components/withClient.tsx diff --git a/packages/client/guestCheckout_test.ts b/packages/client/guestCheckout_test.ts index f2d4c93f..d86f58df 100644 --- a/packages/client/guestCheckout_test.ts +++ b/packages/client/guestCheckout_test.ts @@ -24,7 +24,7 @@ import { eddiesAbi, paymentsByAddressAbi, } from "@massmarket/contracts"; -import { objectId, priceToUint256, randomAddress } from "@massmarket/utils"; +import { objectId, priceToUint256 } from "@massmarket/utils"; import { BlockchainClient, type ConcreteWalletClient, @@ -91,7 +91,7 @@ describe({ }); // create a random address to pay to - const payee: Uint8Array = hexToBytes(randomAddress()); + const payee: Uint8Array = hexToBytes(addresses.anvilAddress); const currency: Uint8Array = hexToBytes(addresses.Eddies as Address); it("write shop manifest", async () => { @@ -142,7 +142,7 @@ describe({ // create an item await relayClient.listing({ id: itemId, - price: { raw: priceToUint256("10.99") }, + price: { raw: priceToUint256("1.99") }, metadata, }); }); @@ -158,8 +158,9 @@ describe({ await wallet.sendTransaction({ account, to: guestAccount.address, - value: 250000000000000000n, + value: 13980000000000000000n, }); + const w = createWalletClient({ account: guestAccount, chain: hardhat, @@ -240,29 +241,6 @@ describe({ }, }, }); - const stream = guestRelayClient.createEventStream(); - for await (const { event } of stream) { - console.log("here!!", event); - //FIXME: not getting payment details currently for guests. use payTokenPreApproved here once paymentdetails comes through. - if (event.updateOrder?.setPaymentDetails) { - return; - } - } - }); - - it("create a new order", async () => { - // create an order - orderId = { raw: objectId() }; - await guestRelayClient.createOrder({ id: orderId }); - }); - - it("guest updating an order", async () => { - await guestRelayClient.updateOrder({ - id: orderId, - changeItems: { - adds: [{ listingId: itemId, quantity: 1 }], - }, - }); }); it("single item checkout with a guest", async () => { @@ -271,7 +249,7 @@ describe({ address: addresses.Eddies as Address, abi: eddiesAbi, functionName: "mint", - args: [guestAccount.address, 999999999999n], + args: [guestAccount.address, 3980000000000000000n], }); const receipt1 = await publicClient.waitForTransactionReceipt({ @@ -279,33 +257,22 @@ describe({ }); expect(receipt1.status).toEqual("success"); - // allow the payment contract to transfer on behalf of the guest user - const txHash2 = await guestWallet.writeContract({ - address: addresses.Eddies as Address, - abi: eddiesAbi, - functionName: "approve", - args: [addresses.Payments, 9999999999n], - }); - const receipt2 = await publicClient.waitForTransactionReceipt({ - hash: txHash2, - }); - expect(receipt2.status).toEqual("success"); - const stream = guestRelayClient.createEventStream(); let paymentHash: `0x${string}` | undefined; for await (const { event } of stream) { if (event.updateOrder?.setPaymentDetails) { - const order = event.updateOrder.setPaymentDetails; + const paymentDetails = event.updateOrder.setPaymentDetails; + const total = paymentDetails.total!.raw!; const args = { chainId: 31337n, - ttl: BigInt(order.ttl!), + ttl: BigInt(paymentDetails.ttl!), order: bytesToHex(new Uint8Array(32)), - currency: toHex(currency), //currency address - amount: bytesToBigInt(order.total!.raw!), - payeeAddress: toHex(payee), //payee address - isPaymentEndpoint: false, // is paymentendpoint? + currency: bytesToHex(currency), + amount: bytesToBigInt(total), + payeeAddress: bytesToHex(payee), + isPaymentEndpoint: false, shopId: shopId, - shopSignature: toHex(order.shopSignature!.raw!), + shopSignature: toHex(paymentDetails.shopSignature!.raw!), }; const paymentId = (await publicClient.readContract({ address: addresses.Payments as Address, @@ -313,7 +280,21 @@ describe({ functionName: "getPaymentId", args: [args], })) as bigint; - expect(toHex(order.paymentId!.raw!)).toEqual(toHex(paymentId)); + + expect(toHex(paymentDetails.paymentId!.raw!)).toEqual( + toHex(paymentId), + ); + // allow the payment contract to transfer on behalf of the guest user + const txHash2 = await guestWallet.writeContract({ + address: addresses.Eddies as Address, + abi: eddiesAbi, + functionName: "approve", + args: [addresses.Payments, bytesToBigInt(total)], + }); + const receipt2 = await publicClient.waitForTransactionReceipt({ + hash: txHash2, + }); + expect(receipt2.status).toEqual("success"); // call the pay function const hash = await guestWallet.writeContract({ @@ -321,6 +302,7 @@ describe({ abi: paymentsByAddressAbi, functionName: "pay", args: [args], + value: bytesToBigInt(total), }); const receipt = await publicClient.waitForTransactionReceipt({ hash, diff --git a/packages/frontend/src/app/ClientWithStateManager.ts b/packages/frontend/src/app/ClientWithStateManager.ts index 71417c9b..6c2eea0f 100644 --- a/packages/frontend/src/app/ClientWithStateManager.ts +++ b/packages/frontend/src/app/ClientWithStateManager.ts @@ -32,7 +32,7 @@ export class ClientWithStateManager { async createStateManager() { const merchantKC = localStorage.getItem("merchantKC"); - const dbName = `${this.shopId.slice(0, 7)}${ + const dbName = `${String(this.shopId).slice(0, 7)}${ merchantKC ? merchantKC.slice(0, 5) : "-guest" }`; debug(`using level db: ${dbName}`); diff --git a/packages/frontend/src/app/components/checkout/ChoosePayment.tsx b/packages/frontend/src/app/components/checkout/ChoosePayment.tsx index ff7ebbdc..4b44cefa 100644 --- a/packages/frontend/src/app/components/checkout/ChoosePayment.tsx +++ b/packages/frontend/src/app/components/checkout/ChoosePayment.tsx @@ -131,20 +131,25 @@ export default function ChoosePayment({ //FIXME: separate this into a function that constructs the arg. const arg = { chainId: currency.chainId, - ttl: Number(ttl), // is this correct? - orderHash: zeros32Bytes, - currencyAddress: currency.address, - total: BigInt(total), + ttl: BigInt(ttl), + order: zeros32Bytes, + currency: currency.address, + amount: BigInt(total), payeeAddress: payee.address, isPaymentEndpoint: false, //isPaymentEndpoint - shopId: shopId!, + shopId: shopId, shopSignature, }; - const paymentAddr = await getPaymentAddress(paymentRPC, arg); - const id = await getPaymentId(paymentRPC, arg); + + const paymentAddr = await getPaymentAddress(paymentRPC, [ + arg, + payee.address, + ]); if (!paymentAddr) { throw new Error("No payment address found"); } + const id = await getPaymentId(paymentRPC, [arg]); + if (toHex(id) !== paymentId) { debug(`received payment Id: ${paymentId}`); debug(`calculated payment Id: ${toHex(id)}`); @@ -153,7 +158,7 @@ export default function ChoosePayment({ setPaymentArgs(arg); const amount = BigInt(total); debug(`amount: ${amount}`); - const payLink = currency.address === zeroAddress + const payLink = currency.address === abi.addresses.zeroAddress ? `ethereum:${paymentAddr}?value=${amount}` : `ethereum:${currency.address}/transfer?address=${paymentAddr}&uint256=${amount}`; setPaymentAddress(paymentAddr); diff --git a/packages/frontend/src/app/components/contact/Share.tsx b/packages/frontend/src/app/components/contact/Share.tsx index 730a8e9a..9582de68 100644 --- a/packages/frontend/src/app/components/contact/Share.tsx +++ b/packages/frontend/src/app/components/contact/Share.tsx @@ -8,11 +8,12 @@ import React from "react"; import BackButton from "@/app/common/components/BackButton"; import { useUserContext } from "@/context/UserContext"; -function Share() { +export default function Share() { const { shopId } = useUserContext(); - const copyToClipboard = () => { - navigator.clipboard.writeText(shopId!); - }; + + function copyToClipboard() { + navigator.clipboard.writeText(String(shopId)); + } return (
@@ -43,5 +44,3 @@ function Share() {
); } - -export default Share; diff --git a/packages/frontend/src/app/components/withClient.tsx b/packages/frontend/src/app/components/withClient.tsx deleted file mode 100644 index 5da98fad..00000000 --- a/packages/frontend/src/app/components/withClient.tsx +++ /dev/null @@ -1,23 +0,0 @@ -// SPDX-FileCopyrightText: 2024 Mass Labs -// -// SPDX-License-Identifier: GPL-3.0-or-later - -import React, { FunctionComponent } from "react"; -import { useClient } from "@/context/AuthContext"; -import { Status } from "@/types"; - -interface PageProps { - params?: { slug: string }; - searchParams?: { [key: string]: string | string[] | undefined }; -} - -export default (WrappedComponent: FunctionComponent) => { - return function (props: PageProps) { - const { clientConnected } = useClient(); - if (clientConnected === Status.Complete) { - return ; - } else { - return
; - } - }; -}; diff --git a/packages/frontend/src/app/create-store/Confirmation.tsx b/packages/frontend/src/app/create-store/Confirmation.tsx index 83cd04c5..d0eb5a8c 100644 --- a/packages/frontend/src/app/create-store/Confirmation.tsx +++ b/packages/frontend/src/app/create-store/Confirmation.tsx @@ -8,11 +8,11 @@ import Link from "next/link"; import { useUserContext } from "@/context/UserContext"; import Button from "@/app/common/components/Button"; -const Confirmation = () => { +export default function Confirmation() { const { shopId } = useUserContext(); const copyToClipboard = () => { - navigator.clipboard.writeText(shopId!); + navigator.clipboard.writeText(String(shopId)); }; return ( @@ -40,7 +40,7 @@ const Confirmation = () => {

-

{shopId}

+

{String(shopId)}

); } - -export default Cart; diff --git a/packages/frontend/src/app/checkout/page.tsx b/packages/frontend/src/app/checkout/page.tsx index da632946..b58b0294 100644 --- a/packages/frontend/src/app/checkout/page.tsx +++ b/packages/frontend/src/app/checkout/page.tsx @@ -22,7 +22,7 @@ const namespace = "frontend:Checkout"; const debug = logger(namespace); const logerr = logger(namespace, "error"); -const CheckoutFlow = () => { +export default function CheckoutFlow() { const { clientWithStateManager } = useUserContext(); const { setCommittedOrderId } = useStoreContext(); @@ -192,6 +192,4 @@ const CheckoutFlow = () => { {renderContent()} ); -}; - -export default CheckoutFlow; +} diff --git a/packages/frontend/src/app/common/components/AvatarUpload.tsx b/packages/frontend/src/app/common/components/AvatarUpload.tsx index c8075fce..ba5f4323 100644 --- a/packages/frontend/src/app/common/components/AvatarUpload.tsx +++ b/packages/frontend/src/app/common/components/AvatarUpload.tsx @@ -11,11 +11,11 @@ import React, { useState, } from "react"; -const AvatarUpload = ({ +export default function AvatarUpload({ setImgBlob, }: { setImgBlob: Dispatch>; -}) => { +}) { const [localImg, setLocalImg] = useState(null); const fileInputRef = useRef(null); @@ -88,6 +88,4 @@ const AvatarUpload = ({ ); -}; - -export default AvatarUpload; +} diff --git a/packages/frontend/src/app/common/components/BackButton.tsx b/packages/frontend/src/app/common/components/BackButton.tsx index b3f99e12..dd726c7a 100644 --- a/packages/frontend/src/app/common/components/BackButton.tsx +++ b/packages/frontend/src/app/common/components/BackButton.tsx @@ -7,7 +7,7 @@ import React from "react"; import Link from "next/link"; -function BackButton({ +export default function BackButton({ href, onClick, }: { @@ -42,4 +42,3 @@ function BackButton({ ); } } -export default BackButton; diff --git a/packages/frontend/src/app/common/components/CurrencyDropdown.tsx b/packages/frontend/src/app/common/components/CurrencyDropdown.tsx index 5da97361..f25f3ce1 100644 --- a/packages/frontend/src/app/common/components/CurrencyDropdown.tsx +++ b/packages/frontend/src/app/common/components/CurrencyDropdown.tsx @@ -2,7 +2,7 @@ import React, { useEffect, useState } from "react"; import Chevron from "./Chevron"; import { CurrencyChainOption } from "@/types"; -const Dropdown = ({ +export default function Dropdown({ options, callback, selected = null, @@ -10,23 +10,25 @@ const Dropdown = ({ options: CurrencyChainOption[]; callback: (option: CurrencyChainOption) => void | Promise; selected?: null | CurrencyChainOption; -}) => { +}) { const [isOpen, setIsOpen] = useState(false); const [selectedOption, setSelectedOption] = useState< CurrencyChainOption | null >(selected); - const toggleDropdown = () => setIsOpen(!isOpen); + function toggleDropdown() { + setIsOpen(!isOpen); + } useEffect(() => { selected && setSelectedOption(selected); }, [selected]); - const handleOptionClick = (option: CurrencyChainOption) => { + function handleOptionClick(option: CurrencyChainOption) { setSelectedOption(option); setIsOpen(false); callback(option); - }; + } return (
@@ -69,6 +71,4 @@ const Dropdown = ({ )}
); -}; - -export default Dropdown; +} diff --git a/packages/frontend/src/app/common/components/ErrorMessage.tsx b/packages/frontend/src/app/common/components/ErrorMessage.tsx index 7f6b01bf..1a414698 100644 --- a/packages/frontend/src/app/common/components/ErrorMessage.tsx +++ b/packages/frontend/src/app/common/components/ErrorMessage.tsx @@ -8,10 +8,10 @@ interface ErrorMessageProps { onClose: () => void; } -const ErrorMessage: React.FC = ({ +export default function ErrorMessage({ errorMessage, onClose, -}) => { +}: ErrorMessageProps) { if (!errorMessage) return null; return ( @@ -30,6 +30,4 @@ const ErrorMessage: React.FC = ({ ); -}; - -export default ErrorMessage; +} diff --git a/packages/frontend/src/app/common/components/FullModal.tsx b/packages/frontend/src/app/common/components/FullModal.tsx deleted file mode 100644 index 6c651c9b..00000000 --- a/packages/frontend/src/app/common/components/FullModal.tsx +++ /dev/null @@ -1,90 +0,0 @@ -// SPDX-FileCopyrightText: 2024 Mass Labs -// -// SPDX-License-Identifier: GPL-3.0-or-later - -import React, { ReactNode } from "react"; -import Link from "next/link"; - -interface FullModalProps { - isOpen: boolean; - onClose?: () => void; - header?: string; - modalBgColor?: string; - showAvatar?: boolean; - children: ReactNode; -} - -const FullModal: React.FC = ({ - isOpen, - onClose, - header, - modalBgColor = "white", - showAvatar = false, - children, -}) => { - if (!isOpen) { - return null; - } - const hed = showAvatar - ? ( -
-
- quit-icon - - eclipse-avatar - -
-
- ) - : ( -
- arrow-icon -
-
{header}
-
-
- ); - return ( -
-
-
-
- {onClose && hed} - {children} -
-
- ); -}; - -export default FullModal; diff --git a/packages/frontend/src/app/common/components/HalfModal.tsx b/packages/frontend/src/app/common/components/HalfModal.tsx deleted file mode 100644 index 04ff21a5..00000000 --- a/packages/frontend/src/app/common/components/HalfModal.tsx +++ /dev/null @@ -1,35 +0,0 @@ -// SPDX-FileCopyrightText: 2024 Mass Labs -// -// SPDX-License-Identifier: GPL-3.0-or-later - -import React, { ReactNode } from "react"; - -interface HalfModalProps { - isOpen: boolean; - onClose: () => void; - children: ReactNode; -} - -const HalfModal: React.FC = ({ isOpen, onClose, children }) => { - if (!isOpen) { - return null; - } - return ( -
-
-
-
-
{children}
-
-
- ); -}; - -export default HalfModal; diff --git a/packages/frontend/src/app/common/components/ModalHeader.tsx b/packages/frontend/src/app/common/components/ModalHeader.tsx deleted file mode 100644 index 2d419337..00000000 --- a/packages/frontend/src/app/common/components/ModalHeader.tsx +++ /dev/null @@ -1,57 +0,0 @@ -// SPDX-FileCopyrightText: 2024 Mass Labs -// -// SPDX-License-Identifier: GPL-3.0-or-later - -"use client"; - -import React, { ReactNode } from "react"; -import { useRouter } from "next/navigation"; - -export type Header = { - headerText?: string; - goBack?: () => void; - rightIcon?: ReactNode; -}; - -const ModalHeader = ({ goBack, headerText, rightIcon }: Header) => { - const router = useRouter(); - if (headerText) { - return ( -
-
- left-arrow-icon -
-

{headerText}

-
- {rightIcon && ( -
{rightIcon}
- )} -
-
- ); - } - return ( -
-
- left-arrow-icon router.back()} - /> -

back

-
-
- ); -}; - -export default ModalHeader; diff --git a/packages/frontend/src/app/common/components/SuccessToast.tsx b/packages/frontend/src/app/common/components/SuccessToast.tsx index 0650b070..cd0ea797 100644 --- a/packages/frontend/src/app/common/components/SuccessToast.tsx +++ b/packages/frontend/src/app/common/components/SuccessToast.tsx @@ -9,7 +9,7 @@ interface SuccessToastProps { onClose: () => void; } -const SuccessToast: React.FC = ({ message, onClose }) => { +export default function SuccessToast({ message, onClose }: SuccessToastProps) { if (!message) return null; return ( @@ -28,6 +28,4 @@ const SuccessToast: React.FC = ({ message, onClose }) => { ); -}; - -export default SuccessToast; +} diff --git a/packages/frontend/src/app/common/components/ValidationWarning.tsx b/packages/frontend/src/app/common/components/ValidationWarning.tsx index 29ae4320..aa20571c 100644 --- a/packages/frontend/src/app/common/components/ValidationWarning.tsx +++ b/packages/frontend/src/app/common/components/ValidationWarning.tsx @@ -9,10 +9,10 @@ interface ValidationWarningProps { onClose: () => void; } -const ValidationWarning: React.FC = ({ +export default function ValidationWarning({ warning, onClose, -}) => { +}: ValidationWarningProps) { if (!warning) return null; return ( @@ -31,6 +31,4 @@ const ValidationWarning: React.FC = ({ ); -}; - -export default ValidationWarning; +} diff --git a/packages/frontend/src/app/components/checkout/QRScan.tsx b/packages/frontend/src/app/components/checkout/QRScan.tsx index 6f608862..f5f3b5e3 100644 --- a/packages/frontend/src/app/components/checkout/QRScan.tsx +++ b/packages/frontend/src/app/components/checkout/QRScan.tsx @@ -6,7 +6,7 @@ import React, { useEffect, useState } from "react"; import QRCode from "qrcode"; import BackButton from "@/app/common/components/BackButton"; -function QRScan({ +export default function QRScan({ imgSrc, purchaseAddress, displayedAmount, @@ -18,9 +18,9 @@ function QRScan({ goBack: () => void; }) { const [src, setQr] = useState(null); - const copyToClipboard = () => { + function copyToClipboard() { navigator.clipboard.writeText(purchaseAddress!); - }; + } useEffect(() => { imgSrc && QRCode.toDataURL(imgSrc).then(setQr); }, [imgSrc]); @@ -67,5 +67,3 @@ function QRScan({ ); } - -export default QRScan; diff --git a/packages/frontend/src/app/components/checkout/ShippingDetails.tsx b/packages/frontend/src/app/components/checkout/ShippingDetails.tsx index 462de1a9..214f89d6 100644 --- a/packages/frontend/src/app/components/checkout/ShippingDetails.tsx +++ b/packages/frontend/src/app/components/checkout/ShippingDetails.tsx @@ -19,7 +19,7 @@ const namespace = "frontend:ShippingDetails"; const debug = logger(namespace); const errlog = logger(namespace, "error"); -function ShippingDetails({ +export default function ShippingDetails({ setStep, startTimer, countdown, @@ -202,5 +202,3 @@ function ShippingDetails({ ); } - -export default ShippingDetails; diff --git a/packages/frontend/src/app/components/products/CustomerViewProducts.tsx b/packages/frontend/src/app/components/products/CustomerViewProducts.tsx index 2dc66926..057cd1a4 100644 --- a/packages/frontend/src/app/components/products/CustomerViewProducts.tsx +++ b/packages/frontend/src/app/components/products/CustomerViewProducts.tsx @@ -12,7 +12,11 @@ import { Listing, ListingViewState } from "@/types"; import { createQueryString } from "@/app/utils"; import { useStoreContext } from "@/context/StoreContext"; -function CustomerViewProducts({ products }: { products: Listing[] | null }) { +export default function CustomerViewProducts({ + products, +}: { + products: Listing[] | null; +}) { const { getBaseTokenInfo } = useStoreContext(); const [baseDecimal, setBaseDecimal] = useState(null); const [tokenIcon, setIcon] = useState("/icons/usdc-coin.png"); @@ -100,4 +104,3 @@ function CustomerViewProducts({ products }: { products: Listing[] | null }) { ); } -export default CustomerViewProducts; diff --git a/packages/frontend/src/app/components/products/MerchantViewProducts.tsx b/packages/frontend/src/app/components/products/MerchantViewProducts.tsx index 180ae8f6..8e58e3af 100644 --- a/packages/frontend/src/app/components/products/MerchantViewProducts.tsx +++ b/packages/frontend/src/app/components/products/MerchantViewProducts.tsx @@ -13,7 +13,11 @@ import { createQueryString } from "@/app/utils"; import { useStoreContext } from "@/context/StoreContext"; import Button from "@/app/common/components/Button"; -function MerchantViewProducts({ products }: { products: Listing[] | null }) { +export default function MerchantViewProducts({ + products, +}: { + products: Listing[] | null; +}) { const { getBaseTokenInfo } = useStoreContext(); const [baseDecimal, setBaseDecimal] = useState(null); @@ -122,4 +126,3 @@ function MerchantViewProducts({ products }: { products: Listing[] | null }) { ); } -export default MerchantViewProducts; diff --git a/packages/frontend/src/app/components/transactions/PaymentOptions.tsx b/packages/frontend/src/app/components/transactions/PaymentOptions.tsx deleted file mode 100644 index 0266557f..00000000 --- a/packages/frontend/src/app/components/transactions/PaymentOptions.tsx +++ /dev/null @@ -1,28 +0,0 @@ -// SPDX-FileCopyrightText: 2024 Mass Labs -// -// SPDX-License-Identifier: GPL-3.0-or-later - -import React from "react"; -import FullModal from "@/app/common/components/FullModal"; -import Button from "@/app/common/components/Button"; - -const PaymentOptions = ({ - isOpen, - onClose, - checkout, -}: { - isOpen: boolean; - onClose: () => void; - checkout: (ar: boolean) => void; -}) => { - return ( - -
- - -
-
- ); -}; - -export default PaymentOptions; diff --git a/packages/frontend/src/app/contact/page.tsx b/packages/frontend/src/app/contact/page.tsx index 32ed92f2..c907accc 100644 --- a/packages/frontend/src/app/contact/page.tsx +++ b/packages/frontend/src/app/contact/page.tsx @@ -10,7 +10,7 @@ import { useSearchParams } from "next/navigation"; import BackButton from "@/app/common/components/BackButton"; import Share from "@/app/components/contact/Share"; -function Contact() { +export default function Contact() { const searchParams = useSearchParams(); const page = searchParams.get("page"); @@ -60,5 +60,3 @@ function Contact() { ); } - -export default Contact; diff --git a/packages/frontend/src/app/create-store/Confirmation.tsx b/packages/frontend/src/app/create-store/Confirmation.tsx index d0eb5a8c..e5dc6d55 100644 --- a/packages/frontend/src/app/create-store/Confirmation.tsx +++ b/packages/frontend/src/app/create-store/Confirmation.tsx @@ -11,9 +11,9 @@ import Button from "@/app/common/components/Button"; export default function Confirmation() { const { shopId } = useUserContext(); - const copyToClipboard = () => { + function copyToClipboard() { navigator.clipboard.writeText(String(shopId)); - }; + } return (
diff --git a/packages/frontend/src/app/create-store/page.tsx b/packages/frontend/src/app/create-store/page.tsx index ea0b3570..5b45e87c 100644 --- a/packages/frontend/src/app/create-store/page.tsx +++ b/packages/frontend/src/app/create-store/page.tsx @@ -36,7 +36,7 @@ const namespace = "frontend:create-store"; const debug = logger(namespace); const errlog = logger(namespace, "error"); -const StoreCreation = () => { +export default function StoreCreation() { const { shopPublicClient, clientWallet, @@ -536,6 +536,4 @@ const StoreCreation = () => { } else if (step === "confirmation") { return ; } -}; - -export default StoreCreation; +} diff --git a/packages/frontend/src/app/merchant-dashboard/page.tsx b/packages/frontend/src/app/merchant-dashboard/page.tsx index 75ac4b02..92bda563 100644 --- a/packages/frontend/src/app/merchant-dashboard/page.tsx +++ b/packages/frontend/src/app/merchant-dashboard/page.tsx @@ -12,13 +12,13 @@ import { createQueryString } from "@/app/utils"; import { useUserContext } from "@/context/UserContext"; import OrderDetails from "@/app/components/orders/OrderDetails"; -const MerchantDashboard = () => { +export default function MerchantDashboard() { const { clientWithStateManager } = useUserContext(); const [orders, setOrders] = useState(new Map()); const [viewOrderDetails, setOrderDetails] = useState(null); - const getAllOrders = async () => { + async function getAllOrders() { const allOrders = new Map(); for await ( const [ @@ -33,17 +33,17 @@ const MerchantDashboard = () => { allOrders.set(id, o); } return allOrders; - }; + } useEffect(() => { - const onCreateOrder = (order: Order) => { + function onCreateOrder(order: Order) { orders.set(order.id, order); setOrders(orders); - }; - const onUpdateOrder = (order: Order) => { + } + function onUpdateOrder(order: Order) { orders.set(order.id, order); setOrders(orders); - }; + } getAllOrders().then((allOrders) => { setOrders(allOrders); clientWithStateManager.stateManager.orders.on("create", onCreateOrder); @@ -63,7 +63,7 @@ const MerchantDashboard = () => { }; }, []); - const renderTransactions = () => { + function renderTransactions() { const transactions = Array.from([...orders.entries()]); return transactions?.length ? ( @@ -111,7 +111,7 @@ const MerchantDashboard = () => {

no transactions

); - }; + } if (viewOrderDetails) { return ( @@ -181,6 +181,4 @@ const MerchantDashboard = () => {
); -}; - -export default MerchantDashboard; +} diff --git a/packages/frontend/src/app/merchants/connect/Confirmation.tsx b/packages/frontend/src/app/merchants/connect/Confirmation.tsx index 02806884..4ae8ccd6 100644 --- a/packages/frontend/src/app/merchants/connect/Confirmation.tsx +++ b/packages/frontend/src/app/merchants/connect/Confirmation.tsx @@ -8,7 +8,7 @@ import Link from "next/link"; import { useStoreContext } from "@/context/StoreContext"; import Button from "@/app/common/components/Button"; -const Confirmation = () => { +export default function Confirmation() { const { shopDetails } = useStoreContext(); return ( @@ -31,6 +31,4 @@ const Confirmation = () => { ); -}; - -export default Confirmation; +} diff --git a/packages/frontend/src/app/merchants/connect/page.tsx b/packages/frontend/src/app/merchants/connect/page.tsx index 5c9069d9..e8e2e3ca 100644 --- a/packages/frontend/src/app/merchants/connect/page.tsx +++ b/packages/frontend/src/app/merchants/connect/page.tsx @@ -23,7 +23,7 @@ const namespace = "frontend:connect-merchant"; const debug = logger(namespace); const errlog = logger(namespace, "error"); -const MerchantConnectWallet = () => { +export default function MerchantConnectWallet() { const { shopPublicClient, clientWallet, @@ -207,6 +207,4 @@ const MerchantConnectWallet = () => { ); -}; - -export default MerchantConnectWallet; +} diff --git a/packages/frontend/src/app/products/edit/page.tsx b/packages/frontend/src/app/products/edit/page.tsx index af6a53ae..5bb9ec25 100644 --- a/packages/frontend/src/app/products/edit/page.tsx +++ b/packages/frontend/src/app/products/edit/page.tsx @@ -23,7 +23,7 @@ const namespace = "frontend:edit-product"; const debug = logger(namespace); const errlog = logger(namespace, "error"); -const AddProductView = () => { +export default function AddProductView() { const router = useRouter(); const searchParams = useSearchParams(); const itemId = searchParams.get("itemId") as ListingId | "new"; @@ -103,13 +103,13 @@ const AddProductView = () => { const fileInputRef = useRef(null); const hed = editView && productInView ? "Edit product" : "Add Product"; - const triggerFileInput = () => { + function triggerFileInput() { if (fileInputRef.current) { fileInputRef.current.click(); } - }; + } - const handleUpload = (e: ChangeEvent) => { + function handleUpload(e: ChangeEvent) { try { const fileInput = e.target; if (fileInput.files && fileInput.files[0]) { @@ -132,13 +132,13 @@ const AddProductView = () => { errlog("Error during image upload", error); setErrorMsg("Error during image upload"); } - }; + } - const removeImg = (img: { blob: null | FormData; url: string }) => { + function removeImg(img: { blob: null | FormData; url: string }) { setImages(images.filter((i) => img.url !== i.url)); - }; + } - const handleDelete = async () => { + async function handleDelete() { try { await clientWithStateManager!.stateManager!.listings.update({ id: productInView!.id, @@ -150,9 +150,9 @@ const AddProductView = () => { errlog("Error deleting listing", error); setErrorMsg("Error deleting listing"); } - }; + } - const create = async (newItem: Partial) => { + async function create(newItem: Partial) { try { const { id } = await clientWithStateManager!.stateManager!.listings .create( @@ -176,9 +176,9 @@ const AddProductView = () => { errlog("Error creating listing", error); setErrorMsg("Error creating listing"); } - }; + } - const update = async (newItem: Partial) => { + async function update(newItem: Partial) { try { //compare the edited fields against the original object. const diff: Partial = { @@ -238,9 +238,9 @@ const AddProductView = () => { errlog("Error updating listing", error); setErrorMsg("Error updating listing"); } - }; + } - const onPublish = async () => { + async function onPublish() { if (!price) { setValidationError("Product must include price."); } else if (!title) { @@ -284,32 +284,33 @@ const AddProductView = () => { setErrorMsg("Error publishing listing"); } } - }; + } - const handleTitleChange = (e: ChangeEvent) => { + function handleTitleChange(e: ChangeEvent) { setTitle(e.target.value); - }; - const handleDescriptionChange = (e: ChangeEvent) => { + } + + function handleDescriptionChange(e: ChangeEvent) { setDescription(e.target.value); - }; + } - const handlePriceChange = (e: ChangeEvent) => { + function handlePriceChange(e: ChangeEvent) { const _price = e.target.value; if (_price && !Number(_price)) { setPrice(""); } else { setPrice(_price); } - }; + } - const handleStockChange = (e: ChangeEvent) => { + function handleStockChange(e: ChangeEvent) { const units = e.target.value; if (units && !Number(units)) { setUnits(0); } else { setUnits(Number(e.target.value) || 0); } - }; + } return (
@@ -527,5 +528,4 @@ const AddProductView = () => {
); -}; -export default AddProductView; +} diff --git a/packages/frontend/src/app/products/page.tsx b/packages/frontend/src/app/products/page.tsx index df9c2c58..cea4284d 100644 --- a/packages/frontend/src/app/products/page.tsx +++ b/packages/frontend/src/app/products/page.tsx @@ -11,13 +11,13 @@ import { useClient } from "@/context/AuthContext"; import MerchantViewProducts from "@/app/components/products/MerchantViewProducts"; import CustomerViewProducts from "@/app/components/products/CustomerViewProducts"; -function Products() { +export default function Products() { const { clientWithStateManager } = useUserContext(); const { isMerchantView } = useClient(); const [products, setProducts] = useState(new Map()); - const getAllListings = async () => { + async function getAllListings() { const listings = new Map(); for await ( const [ @@ -28,10 +28,10 @@ function Products() { listings.set(id, item); } return listings; - }; + } useEffect(() => { - const onCreateEvent = async () => { + async function onCreateEvent() { const l = new Map(); for await ( const [ @@ -42,8 +42,8 @@ function Products() { l.set(id, item); } setProducts(l); - }; - const onUpdateEvent = async () => { + } + async function onUpdateEvent() { const l = new Map(); for await ( const [ @@ -54,7 +54,7 @@ function Products() { l.set(id, item); } setProducts(l); - }; + } getAllListings().then((listings) => { setProducts(listings); @@ -89,5 +89,3 @@ function Products() { ); } - -export default Products; diff --git a/packages/frontend/src/app/products/productDetail/page.tsx b/packages/frontend/src/app/products/productDetail/page.tsx index f088517b..c0f69e6f 100644 --- a/packages/frontend/src/app/products/productDetail/page.tsx +++ b/packages/frontend/src/app/products/productDetail/page.tsx @@ -23,7 +23,7 @@ import SuccessToast from "@/app/common/components/SuccessToast"; const namespace = "frontend:product-detail"; const debug = logger(namespace); -const ProductDetail = () => { +export default function ProductDetail() { const { getBaseTokenInfo, getOpenOrderId } = useStoreContext(); const { upgradeGuestToCustomer, clientWithStateManager } = useUserContext(); const searchParams = useSearchParams(); @@ -219,5 +219,4 @@ const ProductDetail = () => { ); -}; -export default ProductDetail; +} diff --git a/packages/frontend/src/app/store/page.tsx b/packages/frontend/src/app/store/page.tsx index 7e4a0782..a4457ea9 100644 --- a/packages/frontend/src/app/store/page.tsx +++ b/packages/frontend/src/app/store/page.tsx @@ -34,7 +34,7 @@ interface AcceptedChain { const debug = logger("frontend:storeProfile"); -function StoreProfile() { +export default function StoreProfile() { const { shopDetails, setShopDetails } = useStoreContext(); const { shopId, clientWallet, clientWithStateManager } = useUserContext(); const [storeName, setStoreName] = useState(shopDetails.name || ""); @@ -78,14 +78,14 @@ function StoreProfile() { }, []); useEffect(() => { - const onUpdateEvent = (updatedManifest: ShopManifest) => { + function onUpdateEvent(updatedManifest: ShopManifest) { const { pricingCurrency, acceptedCurrencies } = updatedManifest; setAcceptedCurrencies(acceptedCurrencies); setPricingCurrency({ address: pricingCurrency.address!, chainId: pricingCurrency.chainId!, }); - }; + } clientWithStateManager! .stateManager!.manifest.get() @@ -358,5 +358,3 @@ function StoreProfile() { ); } - -export default StoreProfile;