From c041f205ceaba69431b98260daa31d6e5c79c42e Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Tue, 3 Sep 2024 07:23:59 +0100 Subject: [PATCH 01/26] chore: added @fuel-ts/abi package --- packages/abi/LICENSE | 201 +++++++++++++++++++++++++++++++++ packages/abi/README.md | 3 + packages/abi/package.json | 29 +++++ packages/abi/tsconfig.dts.json | 9 ++ packages/abi/tsconfig.json | 7 ++ packages/abi/tsdoc.json | 4 + packages/abi/tsup.config.ts | 3 + pnpm-lock.yaml | 2 + 8 files changed, 258 insertions(+) create mode 100644 packages/abi/LICENSE create mode 100644 packages/abi/README.md create mode 100644 packages/abi/package.json create mode 100644 packages/abi/tsconfig.dts.json create mode 100644 packages/abi/tsconfig.json create mode 100644 packages/abi/tsdoc.json create mode 100644 packages/abi/tsup.config.ts diff --git a/packages/abi/LICENSE b/packages/abi/LICENSE new file mode 100644 index 00000000000..261eeb9e9f8 --- /dev/null +++ b/packages/abi/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/abi/README.md b/packages/abi/README.md new file mode 100644 index 00000000000..ced0388cf00 --- /dev/null +++ b/packages/abi/README.md @@ -0,0 +1,3 @@ +## @fuel-ts/abi + +TODO write up README diff --git a/packages/abi/package.json b/packages/abi/package.json new file mode 100644 index 00000000000..6c250e452b7 --- /dev/null +++ b/packages/abi/package.json @@ -0,0 +1,29 @@ +{ + "name": "@fuel-ts/abi", + "private": true, + "version": "0.0.0", + "description": "", + "author": "Fuel Labs (https://fuel.network/)", + "license": "Apache-2.0", + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "engines": { + "node": "^18.20.3 || ^20.0.0 || ^22.0.0" + }, + "exports": { + ".": { + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + } + }, + "files": [ + "dist" + ], + "scripts": { + "build": "tsup" + }, + "dependencies": {}, + "devDependencies": {} +} diff --git a/packages/abi/tsconfig.dts.json b/packages/abi/tsconfig.dts.json new file mode 100644 index 00000000000..ccca2ac1f3e --- /dev/null +++ b/packages/abi/tsconfig.dts.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./dist", + "rootDir": "./src" + }, + "include": ["src"], + "exclude": ["**/*.test.ts"] +} diff --git a/packages/abi/tsconfig.json b/packages/abi/tsconfig.json new file mode 100644 index 00000000000..b22c89a4b35 --- /dev/null +++ b/packages/abi/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "outDir": "./dist" + }, + "include": ["src", "test"] +} diff --git a/packages/abi/tsdoc.json b/packages/abi/tsdoc.json new file mode 100644 index 00000000000..4514b072727 --- /dev/null +++ b/packages/abi/tsdoc.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", + "extends": ["../../tsdoc.base.json"] +} diff --git a/packages/abi/tsup.config.ts b/packages/abi/tsup.config.ts new file mode 100644 index 00000000000..4c7f2f0354f --- /dev/null +++ b/packages/abi/tsup.config.ts @@ -0,0 +1,3 @@ +import { index } from '@internal/tsup'; + +export default index; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a014aa374c6..b1814b37e7b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -611,6 +611,8 @@ importers: internal/tsup: {} + packages/abi: {} + packages/abi-coder: dependencies: '@fuel-ts/crypto': From cb48d9c6825e6227c3bb478dc54dd46bce9754db Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Tue, 3 Sep 2024 07:30:07 +0100 Subject: [PATCH 02/26] chore: added basic folder structure --- packages/abi/src/coder/AbiCoder.ts | 1 + packages/abi/src/coder/encoding/v1/index.ts | 0 packages/abi/src/coder/types.ts | 1 + packages/abi/src/gen/AbiGen.ts | 0 packages/abi/src/gen/types.ts | 1 + packages/abi/src/parse/AbiParser.ts | 1 + packages/abi/src/parse/specifications/v1/index.ts | 1 + packages/abi/src/parse/types.ts | 1 + 8 files changed, 6 insertions(+) create mode 100644 packages/abi/src/coder/AbiCoder.ts create mode 100644 packages/abi/src/coder/encoding/v1/index.ts create mode 100644 packages/abi/src/coder/types.ts create mode 100644 packages/abi/src/gen/AbiGen.ts create mode 100644 packages/abi/src/gen/types.ts create mode 100644 packages/abi/src/parse/AbiParser.ts create mode 100644 packages/abi/src/parse/specifications/v1/index.ts create mode 100644 packages/abi/src/parse/types.ts diff --git a/packages/abi/src/coder/AbiCoder.ts b/packages/abi/src/coder/AbiCoder.ts new file mode 100644 index 00000000000..10051c76805 --- /dev/null +++ b/packages/abi/src/coder/AbiCoder.ts @@ -0,0 +1 @@ +// Placeholder diff --git a/packages/abi/src/coder/encoding/v1/index.ts b/packages/abi/src/coder/encoding/v1/index.ts new file mode 100644 index 00000000000..e69de29bb2d diff --git a/packages/abi/src/coder/types.ts b/packages/abi/src/coder/types.ts new file mode 100644 index 00000000000..10051c76805 --- /dev/null +++ b/packages/abi/src/coder/types.ts @@ -0,0 +1 @@ +// Placeholder diff --git a/packages/abi/src/gen/AbiGen.ts b/packages/abi/src/gen/AbiGen.ts new file mode 100644 index 00000000000..e69de29bb2d diff --git a/packages/abi/src/gen/types.ts b/packages/abi/src/gen/types.ts new file mode 100644 index 00000000000..10051c76805 --- /dev/null +++ b/packages/abi/src/gen/types.ts @@ -0,0 +1 @@ +// Placeholder diff --git a/packages/abi/src/parse/AbiParser.ts b/packages/abi/src/parse/AbiParser.ts new file mode 100644 index 00000000000..10051c76805 --- /dev/null +++ b/packages/abi/src/parse/AbiParser.ts @@ -0,0 +1 @@ +// Placeholder diff --git a/packages/abi/src/parse/specifications/v1/index.ts b/packages/abi/src/parse/specifications/v1/index.ts new file mode 100644 index 00000000000..10051c76805 --- /dev/null +++ b/packages/abi/src/parse/specifications/v1/index.ts @@ -0,0 +1 @@ +// Placeholder diff --git a/packages/abi/src/parse/types.ts b/packages/abi/src/parse/types.ts new file mode 100644 index 00000000000..10051c76805 --- /dev/null +++ b/packages/abi/src/parse/types.ts @@ -0,0 +1 @@ +// Placeholder From 74a6f505aca3add11342b9b63f84d750fd2daeb9 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Tue, 3 Sep 2024 07:31:19 +0100 Subject: [PATCH 03/26] chore: added ignore to changeset --- .changeset/config.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.changeset/config.json b/.changeset/config.json index ceb7a7ee177..df72861d7a0 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -7,6 +7,7 @@ "baseBranch": "master", "updateInternalDependencies": "patch", "ignore": [ + "@fuel-ts/abi", "fuel-gauge", "docs", "demo-fuels", From 073634462dbec9536abb634f19d623d7f391adcc Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Tue, 3 Sep 2024 07:31:56 +0100 Subject: [PATCH 04/26] chore: changeset --- .changeset/flat-roses-lie.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .changeset/flat-roses-lie.md diff --git a/.changeset/flat-roses-lie.md b/.changeset/flat-roses-lie.md new file mode 100644 index 00000000000..a845151cc84 --- /dev/null +++ b/.changeset/flat-roses-lie.md @@ -0,0 +1,2 @@ +--- +--- From 584d354445ddf49aab8f3255e4f7a0c87eb1ec4b Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Tue, 3 Sep 2024 07:32:02 +0100 Subject: [PATCH 05/26] chore: changeset --- .changeset/flat-roses-lie.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.changeset/flat-roses-lie.md b/.changeset/flat-roses-lie.md index a845151cc84..632f2c9f283 100644 --- a/.changeset/flat-roses-lie.md +++ b/.changeset/flat-roses-lie.md @@ -1,2 +1,4 @@ --- --- + +feat: ABI refactor From f63a1710e03987b629acfd4cd3698d154dc87e76 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Tue, 3 Sep 2024 07:50:19 +0100 Subject: [PATCH 06/26] chore: added missing index file --- packages/abi/src/index.ts | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 packages/abi/src/index.ts diff --git a/packages/abi/src/index.ts b/packages/abi/src/index.ts new file mode 100644 index 00000000000..e69de29bb2d From a618c894035e1a4c7aad4e09ea22be1eb00d59dd Mon Sep 17 00:00:00 2001 From: nedsalk Date: Tue, 3 Sep 2024 15:58:52 +0200 Subject: [PATCH 07/26] scaffold cleanup --- packages/abi/src/coder/{AbiCoder.ts => abi-coder-types.ts} | 0 packages/abi/src/coder/abi-coder.ts | 2 ++ packages/abi/src/coder/index.ts | 1 + packages/abi/src/gen/AbiGen.ts | 0 packages/abi/src/{coder/types.ts => gen/abi-gen-types.ts} | 0 packages/abi/src/gen/abi-gen.ts | 1 + packages/abi/src/gen/index.ts | 1 + packages/abi/src/gen/types.ts | 1 - packages/abi/src/index.ts | 2 ++ 9 files changed, 7 insertions(+), 1 deletion(-) rename packages/abi/src/coder/{AbiCoder.ts => abi-coder-types.ts} (100%) create mode 100644 packages/abi/src/coder/abi-coder.ts create mode 100644 packages/abi/src/coder/index.ts delete mode 100644 packages/abi/src/gen/AbiGen.ts rename packages/abi/src/{coder/types.ts => gen/abi-gen-types.ts} (100%) create mode 100644 packages/abi/src/gen/abi-gen.ts create mode 100644 packages/abi/src/gen/index.ts delete mode 100644 packages/abi/src/gen/types.ts diff --git a/packages/abi/src/coder/AbiCoder.ts b/packages/abi/src/coder/abi-coder-types.ts similarity index 100% rename from packages/abi/src/coder/AbiCoder.ts rename to packages/abi/src/coder/abi-coder-types.ts diff --git a/packages/abi/src/coder/abi-coder.ts b/packages/abi/src/coder/abi-coder.ts new file mode 100644 index 00000000000..38325e4eff3 --- /dev/null +++ b/packages/abi/src/coder/abi-coder.ts @@ -0,0 +1,2 @@ +// Placeholder +export class AbiCoder {} diff --git a/packages/abi/src/coder/index.ts b/packages/abi/src/coder/index.ts new file mode 100644 index 00000000000..242ad2e5a73 --- /dev/null +++ b/packages/abi/src/coder/index.ts @@ -0,0 +1 @@ +export { AbiCoder } from './abi-coder'; diff --git a/packages/abi/src/gen/AbiGen.ts b/packages/abi/src/gen/AbiGen.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/packages/abi/src/coder/types.ts b/packages/abi/src/gen/abi-gen-types.ts similarity index 100% rename from packages/abi/src/coder/types.ts rename to packages/abi/src/gen/abi-gen-types.ts diff --git a/packages/abi/src/gen/abi-gen.ts b/packages/abi/src/gen/abi-gen.ts new file mode 100644 index 00000000000..e0ad4905d2f --- /dev/null +++ b/packages/abi/src/gen/abi-gen.ts @@ -0,0 +1 @@ +export class AbiGen {} diff --git a/packages/abi/src/gen/index.ts b/packages/abi/src/gen/index.ts new file mode 100644 index 00000000000..11641ac45c6 --- /dev/null +++ b/packages/abi/src/gen/index.ts @@ -0,0 +1 @@ +export { AbiGen } from './abi-gen'; diff --git a/packages/abi/src/gen/types.ts b/packages/abi/src/gen/types.ts deleted file mode 100644 index 10051c76805..00000000000 --- a/packages/abi/src/gen/types.ts +++ /dev/null @@ -1 +0,0 @@ -// Placeholder diff --git a/packages/abi/src/index.ts b/packages/abi/src/index.ts index e69de29bb2d..22506bf91e0 100644 --- a/packages/abi/src/index.ts +++ b/packages/abi/src/index.ts @@ -0,0 +1,2 @@ +export * from './coder'; +export * from './gen'; From 8e58b2306980293dd87ccf033d46bd3b067ca200 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Wed, 4 Sep 2024 11:31:04 +0100 Subject: [PATCH 08/26] chore: added basic test infrastructure (#3090) --- .github/workflows/test.yaml | 1 + packages/abi/package.json | 3 +- packages/fuel-gauge/package.json | 3 +- packages/fuel-gauge/src/abi/abi-coder.test.ts | 23 ++ packages/fuel-gauge/src/abi/abi-gen.test.ts | 23 ++ packages/fuel-gauge/src/abi/utils.ts | 19 + .../test/fixtures/forc-projects/Forc.toml | 3 + .../forc-projects/abi-contract/Forc.toml | 4 + .../forc-projects/abi-contract/src/main.sw | 11 + .../forc-projects/abi-predicate/Forc.toml | 4 + .../forc-projects/abi-predicate/src/main.sw | 5 + .../forc-projects/abi-script/Forc.toml | 4 + .../forc-projects/abi-script/src/main.sw | 5 + pnpm-lock.yaml | 364 ++++++++---------- 14 files changed, 275 insertions(+), 197 deletions(-) create mode 100644 packages/fuel-gauge/src/abi/abi-coder.test.ts create mode 100644 packages/fuel-gauge/src/abi/abi-gen.test.ts create mode 100644 packages/fuel-gauge/src/abi/utils.ts create mode 100644 packages/fuel-gauge/test/fixtures/forc-projects/abi-contract/Forc.toml create mode 100644 packages/fuel-gauge/test/fixtures/forc-projects/abi-contract/src/main.sw create mode 100644 packages/fuel-gauge/test/fixtures/forc-projects/abi-predicate/Forc.toml create mode 100644 packages/fuel-gauge/test/fixtures/forc-projects/abi-predicate/src/main.sw create mode 100644 packages/fuel-gauge/test/fixtures/forc-projects/abi-script/Forc.toml create mode 100644 packages/fuel-gauge/test/fixtures/forc-projects/abi-script/src/main.sw diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 33eb5238653..94684da8cc5 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -88,6 +88,7 @@ jobs: PUBLISHED_NPM_TAG: next e2e: + if: false runs-on: ubuntu-latest timeout-minutes: 25 needs: [environments] diff --git a/packages/abi/package.json b/packages/abi/package.json index 6c250e452b7..8ad5a2b2cbd 100644 --- a/packages/abi/package.json +++ b/packages/abi/package.json @@ -22,7 +22,8 @@ "dist" ], "scripts": { - "build": "tsup" + "build": "tsup", + "postbuild": "tsx ../../scripts/postbuild.ts" }, "dependencies": {}, "devDependencies": {} diff --git a/packages/fuel-gauge/package.json b/packages/fuel-gauge/package.json index b4d765f06f9..c63313da403 100644 --- a/packages/fuel-gauge/package.json +++ b/packages/fuel-gauge/package.json @@ -12,7 +12,8 @@ }, "license": "Apache-2.0", "dependencies": { - "fuels": "workspace:*" + "fuels": "workspace:*", + "@fuel-ts/abi": "workspace:*" }, "devDependencies": { "@fuel-ts/account": "workspace:*", diff --git a/packages/fuel-gauge/src/abi/abi-coder.test.ts b/packages/fuel-gauge/src/abi/abi-coder.test.ts new file mode 100644 index 00000000000..aa3b1f56aa9 --- /dev/null +++ b/packages/fuel-gauge/src/abi/abi-coder.test.ts @@ -0,0 +1,23 @@ +import { log } from 'console'; + +import { AbiProjectsEnum, getAbiForcProject } from './utils'; + +/** + * @group node + */ +describe('AbiCoder', () => { + test('contract', () => { + const { abiContents } = getAbiForcProject(AbiProjectsEnum.ABI_CONTRACT); + log(abiContents); + }); + + test('script', () => { + const { abiContents } = getAbiForcProject(AbiProjectsEnum.ABI_SCRIPT); + log(abiContents); + }); + + test('predicate', () => { + const { abiContents } = getAbiForcProject(AbiProjectsEnum.ABI_PREDICATE); + log(abiContents); + }); +}); diff --git a/packages/fuel-gauge/src/abi/abi-gen.test.ts b/packages/fuel-gauge/src/abi/abi-gen.test.ts new file mode 100644 index 00000000000..e3a2b44922a --- /dev/null +++ b/packages/fuel-gauge/src/abi/abi-gen.test.ts @@ -0,0 +1,23 @@ +import { log } from 'console'; + +import { AbiProjectsEnum, getAbiForcProject } from './utils'; + +/** + * @group node + */ +describe('AbiGen', () => { + test('contract', () => { + const { abiContents } = getAbiForcProject(AbiProjectsEnum.ABI_CONTRACT); + log(abiContents); + }); + + test('script', () => { + const { abiContents } = getAbiForcProject(AbiProjectsEnum.ABI_SCRIPT); + log(abiContents); + }); + + test('predicate', () => { + const { abiContents } = getAbiForcProject(AbiProjectsEnum.ABI_PREDICATE); + log(abiContents); + }); +}); diff --git a/packages/fuel-gauge/src/abi/utils.ts b/packages/fuel-gauge/src/abi/utils.ts new file mode 100644 index 00000000000..cc08b4ff954 --- /dev/null +++ b/packages/fuel-gauge/src/abi/utils.ts @@ -0,0 +1,19 @@ +import { getForcProject } from '@fuel-ts/utils/test-utils'; +import { join } from 'path'; + +export enum AbiProjectsEnum { + ABI_CONTRACT = 'abi-contract', + ABI_PREDICATE = 'abi-predicate', + ABI_SCRIPT = 'abi-script', +} + +const forcProjectsDir = join(__dirname, '../../test/fixtures/forc-projects'); + +export const getAbiForcProject = (project: AbiProjectsEnum) => { + const result = getForcProject({ + projectDir: join(forcProjectsDir, project), + projectName: project, + build: 'release', + }); + return result; +}; diff --git a/packages/fuel-gauge/test/fixtures/forc-projects/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/Forc.toml index b7fa116ba4c..88adf159a0b 100644 --- a/packages/fuel-gauge/test/fixtures/forc-projects/Forc.toml +++ b/packages/fuel-gauge/test/fixtures/forc-projects/Forc.toml @@ -1,5 +1,8 @@ [workspace] members = [ + "abi-contract", + "abi-script", + "abi-predicate", "advanced-logging", "advanced-logging-abi", "advanced-logging-other-contract", diff --git a/packages/fuel-gauge/test/fixtures/forc-projects/abi-contract/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/abi-contract/Forc.toml new file mode 100644 index 00000000000..d1ae3bcb75a --- /dev/null +++ b/packages/fuel-gauge/test/fixtures/forc-projects/abi-contract/Forc.toml @@ -0,0 +1,4 @@ +[project] +authors = ["Fuel Labs "] +license = "Apache-2.0" +name = "abi-contract" diff --git a/packages/fuel-gauge/test/fixtures/forc-projects/abi-contract/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/abi-contract/src/main.sw new file mode 100644 index 00000000000..6abaa813e43 --- /dev/null +++ b/packages/fuel-gauge/test/fixtures/forc-projects/abi-contract/src/main.sw @@ -0,0 +1,11 @@ +contract; + +abi AbiContract { + fn types_u8() -> u8; +} + +impl AbiContract for Contract { + fn types_u8() -> u8 { + 0 + } +} diff --git a/packages/fuel-gauge/test/fixtures/forc-projects/abi-predicate/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/abi-predicate/Forc.toml new file mode 100644 index 00000000000..07df6e22027 --- /dev/null +++ b/packages/fuel-gauge/test/fixtures/forc-projects/abi-predicate/Forc.toml @@ -0,0 +1,4 @@ +[project] +authors = ["Fuel Labs "] +license = "Apache-2.0" +name = "abi-predicate" diff --git a/packages/fuel-gauge/test/fixtures/forc-projects/abi-predicate/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/abi-predicate/src/main.sw new file mode 100644 index 00000000000..d529f4e1893 --- /dev/null +++ b/packages/fuel-gauge/test/fixtures/forc-projects/abi-predicate/src/main.sw @@ -0,0 +1,5 @@ +predicate; + +fn main() -> bool { + false +} diff --git a/packages/fuel-gauge/test/fixtures/forc-projects/abi-script/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/abi-script/Forc.toml new file mode 100644 index 00000000000..324740dd9f8 --- /dev/null +++ b/packages/fuel-gauge/test/fixtures/forc-projects/abi-script/Forc.toml @@ -0,0 +1,4 @@ +[project] +authors = ["Fuel Labs "] +license = "Apache-2.0" +name = "abi-script" diff --git a/packages/fuel-gauge/test/fixtures/forc-projects/abi-script/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/abi-script/src/main.sw new file mode 100644 index 00000000000..097ee2e7de5 --- /dev/null +++ b/packages/fuel-gauge/test/fixtures/forc-projects/abi-script/src/main.sw @@ -0,0 +1,5 @@ +script; + +fn main() -> bool { + false +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e9315b8c02a..53ff70f021b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -94,7 +94,7 @@ importers: version: 3.2.0(eslint@8.57.0) eslint-plugin-import: specifier: ^2.29.1 - version: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + version: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0) eslint-plugin-jsdoc: specifier: ^46.8.2 version: 46.8.2(eslint@8.57.0) @@ -154,7 +154,7 @@ importers: version: 0.1.1 tsup: specifier: ^6.7.0 - version: 6.7.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(postcss@8.4.41)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.2.0)(typescript@5.4.5))(typescript@5.4.5) + version: 6.7.0(@swc/core@1.7.14)(postcss@8.4.41)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.2.0)(typescript@5.4.5))(typescript@5.4.5) tsx: specifier: ^4.17.0 version: 4.17.0 @@ -260,7 +260,7 @@ importers: version: 8.4.33 tailwindcss: specifier: ^3.4.10 - version: 3.4.10(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.0)(typescript@5.4.5)) + version: 3.4.10(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.0)(typescript@5.4.5)) typescript: specifier: ~5.4.5 version: 5.4.5 @@ -357,7 +357,7 @@ importers: version: 18.3.0 eslint-config-react-app: specifier: ^7.0.1 - version: 7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.22.5))(@babel/plugin-transform-react-jsx@7.25.2(@babel/core@7.22.5))(eslint@8.57.0)(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10))(typescript@5.4.5) + version: 7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.22.5))(@babel/plugin-transform-react-jsx@7.25.2(@babel/core@7.22.5))(eslint@8.57.0)(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10))(typescript@5.4.5) fuels: specifier: workspace:* version: link:../../packages/fuels @@ -369,7 +369,7 @@ importers: version: 18.3.1(react@18.3.1) react-scripts: specifier: 5.0.1 - version: 5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.22.5))(@babel/plugin-transform-react-jsx@7.25.2(@babel/core@7.22.5))(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.17.19)(eslint@8.57.0)(react@18.3.1)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.2.0)(typescript@5.4.5))(type-fest@3.1.0)(typescript@5.4.5)(utf-8-validate@5.0.10) + version: 5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.22.5))(@babel/plugin-transform-react-jsx@7.25.2(@babel/core@7.22.5))(@swc/core@1.7.14)(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.17.19)(eslint@8.57.0)(react@18.3.1)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.2.0)(typescript@5.4.5))(type-fest@3.1.0)(typescript@5.4.5)(utf-8-validate@5.0.10) typescript: specifier: ~5.4.5 version: 5.4.5 @@ -490,7 +490,7 @@ importers: version: 6.0.1(jiti@1.21.6)(postcss@8.4.41)(tsx@4.17.0)(yaml@2.5.0) tailwindcss: specifier: ^3.4.10 - version: 3.4.10(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.2.0)(typescript@5.4.5)) + version: 3.4.10(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.2.0)(typescript@5.4.5)) typescript: specifier: ~5.4.5 version: 5.4.5 @@ -919,6 +919,9 @@ importers: packages/fuel-gauge: dependencies: + '@fuel-ts/abi': + specifier: workspace:* + version: link:../abi fuels: specifier: workspace:* version: link:../fuels @@ -1281,7 +1284,7 @@ importers: version: 8.4.24 tailwindcss: specifier: ^3.4.10 - version: 3.4.10(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.2.0)(typescript@5.4.5)) + version: 3.4.10(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.2.0)(typescript@5.4.5)) typescript: specifier: ~5.4.5 version: 5.4.5 @@ -1363,7 +1366,7 @@ importers: version: 8.4.41 tailwindcss: specifier: ^3.4.10 - version: 3.4.10(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.0)(typescript@5.4.5)) + version: 3.4.10(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.0)(typescript@5.4.5)) typescript: specifier: ~5.4.5 version: 5.4.5 @@ -19050,7 +19053,7 @@ snapshots: jest-util: 28.1.3 slash: 3.0.0 - '@jest/core@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10)': + '@jest/core@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10)': dependencies: '@jest/console': 27.5.1 '@jest/reporters': 27.5.1 @@ -19064,7 +19067,7 @@ snapshots: exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 27.5.1 - jest-config: 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10) + jest-config: 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10) jest-haste-map: 27.5.1 jest-message-util: 27.5.1 jest-regex-util: 27.5.1 @@ -19887,7 +19890,7 @@ snapshots: dependencies: playwright: 1.46.1 - '@pmmmwh/react-refresh-webpack-plugin@0.5.10(react-refresh@0.11.0)(type-fest@3.1.0)(webpack-dev-server@4.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)))(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19))': + '@pmmmwh/react-refresh-webpack-plugin@0.5.10(react-refresh@0.11.0)(type-fest@3.1.0)(webpack-dev-server@4.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)))(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19))': dependencies: ansi-html-community: 0.0.8 common-path-prefix: 3.0.0 @@ -19899,10 +19902,10 @@ snapshots: react-refresh: 0.11.0 schema-utils: 3.3.0 source-map: 0.7.4 - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) optionalDependencies: type-fest: 3.1.0 - webpack-dev-server: 4.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) + webpack-dev-server: 4.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) '@polka/url@1.0.0-next.24': {} @@ -21837,23 +21840,12 @@ snapshots: vite: 5.4.2(@types/node@22.5.0)(terser@5.31.6) vue: 3.4.38(typescript@5.4.5) - '@vitest/browser@1.6.0(playwright@1.46.1)(vitest@1.6.0)(webdriverio@8.40.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))': - dependencies: - '@vitest/utils': 1.6.0 - magic-string: 0.30.5 - sirv: 2.0.4 - vitest: 1.6.0(@types/node@22.5.0)(@vitest/browser@1.6.0)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.31.6) - optionalDependencies: - playwright: 1.46.1 - webdriverio: 8.40.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) - optional: true - '@vitest/browser@1.6.0(playwright@1.46.1)(vitest@1.6.0)(webdriverio@8.40.2(bufferutil@4.0.8)(utf-8-validate@6.0.4))': dependencies: '@vitest/utils': 1.6.0 magic-string: 0.30.5 sirv: 2.0.4 - vitest: 1.6.0(@types/node@22.5.0)(@vitest/browser@1.6.0)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.31.6) + vitest: 1.6.0(@types/node@22.2.0)(@vitest/browser@1.6.0)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.31.6) optionalDependencies: playwright: 1.46.1 webdriverio: 8.40.2(bufferutil@4.0.8)(utf-8-validate@6.0.4) @@ -23798,14 +23790,14 @@ snapshots: transitivePeerDependencies: - supports-color - babel-loader@8.3.0(@babel/core@7.22.5)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)): + babel-loader@8.3.0(@babel/core@7.22.5)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: '@babel/core': 7.22.5 find-cache-dir: 3.3.2 loader-utils: 2.0.4 make-dir: 3.1.0 schema-utils: 2.7.1 - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) babel-plugin-istanbul@6.1.1: dependencies: @@ -24889,7 +24881,7 @@ snapshots: dependencies: hyphenate-style-name: 1.0.4 - css-loader@6.8.1(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)): + css-loader@6.8.1(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: icss-utils: 5.1.0(postcss@8.4.41) postcss: 8.4.41 @@ -24899,9 +24891,9 @@ snapshots: postcss-modules-values: 4.0.0(postcss@8.4.41) postcss-value-parser: 4.2.0 semver: 7.3.8 - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) - css-minimizer-webpack-plugin@3.4.1(esbuild@0.17.19)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)): + css-minimizer-webpack-plugin@3.4.1(esbuild@0.17.19)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: cssnano: 5.1.15(postcss@8.4.41) jest-worker: 27.5.1 @@ -24909,7 +24901,7 @@ snapshots: schema-utils: 4.2.0 serialize-javascript: 6.0.1 source-map: 0.6.1 - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) optionalDependencies: esbuild: 0.17.19 @@ -25722,7 +25714,7 @@ snapshots: dependencies: confusing-browser-globals: 1.0.11 eslint: 8.57.0 - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0) object.assign: 4.1.4 object.entries: 1.1.6 semver: 6.3.0 @@ -25733,7 +25725,7 @@ snapshots: '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.4.5) eslint: 8.57.0 eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0) eslint-config-next@14.2.7(eslint@8.57.0)(typescript@5.4.5): dependencies: @@ -25742,7 +25734,7 @@ snapshots: '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.4.5) eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0))(eslint@8.57.0) eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) eslint-plugin-react: 7.35.0(eslint@8.57.0) @@ -25757,7 +25749,7 @@ snapshots: dependencies: eslint: 8.57.0 - eslint-config-react-app@7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.22.5))(@babel/plugin-transform-react-jsx@7.25.2(@babel/core@7.22.5))(eslint@8.57.0)(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10))(typescript@5.4.5): + eslint-config-react-app@7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.22.5))(@babel/plugin-transform-react-jsx@7.25.2(@babel/core@7.22.5))(eslint@8.57.0)(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10))(typescript@5.4.5): dependencies: '@babel/core': 7.22.5 '@babel/eslint-parser': 7.22.5(@babel/core@7.22.5)(eslint@8.57.0) @@ -25769,7 +25761,7 @@ snapshots: eslint: 8.57.0 eslint-plugin-flowtype: 8.0.3(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.22.5))(@babel/plugin-transform-react-jsx@7.25.2(@babel/core@7.22.5))(eslint@8.57.0) eslint-plugin-import: 2.26.0(@typescript-eslint/parser@5.59.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0) - eslint-plugin-jest: 25.7.0(@typescript-eslint/eslint-plugin@5.59.0(@typescript-eslint/parser@5.59.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10))(typescript@5.4.5) + eslint-plugin-jest: 25.7.0(@typescript-eslint/eslint-plugin@5.59.0(@typescript-eslint/parser@5.59.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10))(typescript@5.4.5) eslint-plugin-jsx-a11y: 6.6.1(eslint@8.57.0) eslint-plugin-react: 7.35.0(eslint@8.57.0) eslint-plugin-react-hooks: 4.6.2(eslint@8.57.0) @@ -25792,6 +25784,23 @@ snapshots: transitivePeerDependencies: - supports-color + eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0))(eslint@8.57.0): + dependencies: + debug: 4.3.6 + enhanced-resolve: 5.17.1 + eslint: 8.57.0 + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + fast-glob: 3.3.2 + get-tsconfig: 4.7.6 + is-core-module: 2.15.0 + is-glob: 4.0.3 + transitivePeerDependencies: + - '@typescript-eslint/parser' + - eslint-import-resolver-node + - eslint-import-resolver-webpack + - supports-color + eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0): dependencies: debug: 4.3.6 @@ -25808,6 +25817,7 @@ snapshots: - eslint-import-resolver-node - eslint-import-resolver-webpack - supports-color + optional: true eslint-module-utils@2.8.0(@typescript-eslint/parser@5.59.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint@8.57.0): dependencies: @@ -25819,6 +25829,17 @@ snapshots: transitivePeerDependencies: - supports-color + eslint-module-utils@2.8.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): + dependencies: + debug: 3.2.7 + optionalDependencies: + '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.4.5) + eslint: 8.57.0 + eslint-import-resolver-node: 0.3.9 + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0))(eslint@8.57.0) + transitivePeerDependencies: + - supports-color + eslint-module-utils@2.8.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0): dependencies: debug: 3.2.7 @@ -25868,6 +25889,33 @@ snapshots: - supports-color eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): + dependencies: + array-includes: 3.1.8 + array.prototype.findlastindex: 1.2.3 + array.prototype.flat: 1.3.2 + array.prototype.flatmap: 1.3.2 + debug: 3.2.7 + doctrine: 2.1.0 + eslint: 8.57.0 + eslint-import-resolver-node: 0.3.9 + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + hasown: 2.0.2 + is-core-module: 2.15.0 + is-glob: 4.0.3 + minimatch: 3.1.2 + object.fromentries: 2.0.8 + object.groupby: 1.0.1 + object.values: 1.2.0 + semver: 6.3.1 + tsconfig-paths: 3.15.0 + optionalDependencies: + '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.4.5) + transitivePeerDependencies: + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - supports-color + + eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0): dependencies: array-includes: 3.1.8 array.prototype.findlastindex: 1.2.3 @@ -25894,13 +25942,13 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-jest@25.7.0(@typescript-eslint/eslint-plugin@5.59.0(@typescript-eslint/parser@5.59.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10))(typescript@5.4.5): + eslint-plugin-jest@25.7.0(@typescript-eslint/eslint-plugin@5.59.0(@typescript-eslint/parser@5.59.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10))(typescript@5.4.5): dependencies: '@typescript-eslint/experimental-utils': 5.60.1(eslint@8.57.0)(typescript@5.4.5) eslint: 8.57.0 optionalDependencies: '@typescript-eslint/eslint-plugin': 5.59.0(@typescript-eslint/parser@5.59.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5) - jest: 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10) + jest: 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10) transitivePeerDependencies: - supports-color - typescript @@ -26024,7 +26072,7 @@ snapshots: eslint-visitor-keys@3.4.3: {} - eslint-webpack-plugin@3.2.0(eslint@8.57.0)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)): + eslint-webpack-plugin@3.2.0(eslint@8.57.0)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: '@types/eslint': 8.40.2 eslint: 8.57.0 @@ -26032,7 +26080,7 @@ snapshots: micromatch: 4.0.7 normalize-path: 3.0.0 schema-utils: 4.2.0 - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) eslint@8.57.0: dependencies: @@ -26392,11 +26440,11 @@ snapshots: dependencies: flat-cache: 3.0.4 - file-loader@6.2.0(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)): + file-loader@6.2.0(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: loader-utils: 2.0.4 schema-utils: 3.3.0 - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) file-uri-to-path@1.0.0: {} @@ -26516,7 +26564,7 @@ snapshots: cross-spawn: 7.0.3 signal-exit: 4.1.0 - fork-ts-checker-webpack-plugin@6.5.3(eslint@8.57.0)(typescript@5.4.5)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)): + fork-ts-checker-webpack-plugin@6.5.3(eslint@8.57.0)(typescript@5.4.5)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: '@babel/code-frame': 7.24.6 '@types/json-schema': 7.0.12 @@ -26532,7 +26580,7 @@ snapshots: semver: 7.6.3 tapable: 1.1.3 typescript: 5.4.5 - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) optionalDependencies: eslint: 8.57.0 @@ -27020,14 +27068,14 @@ snapshots: relateurl: 0.2.7 terser: 5.18.2 - html-webpack-plugin@5.5.3(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)): + html-webpack-plugin@5.5.3(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: '@types/html-minifier-terser': 6.1.0 html-minifier-terser: 6.1.0 lodash: 4.17.21 pretty-error: 4.0.0 tapable: 2.2.1 - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) htmlparser2@6.1.0: dependencies: @@ -27680,16 +27728,16 @@ snapshots: transitivePeerDependencies: - supports-color - jest-cli@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10): + jest-cli@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10): dependencies: - '@jest/core': 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10) + '@jest/core': 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10) '@jest/test-result': 27.5.1 '@jest/types': 27.5.1 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 import-local: 3.1.0 - jest-config: 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10) + jest-config: 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10) jest-util: 27.5.1 jest-validate: 27.5.1 prompts: 2.4.2 @@ -27701,7 +27749,7 @@ snapshots: - ts-node - utf-8-validate - jest-config@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10): + jest-config@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10): dependencies: '@babel/core': 7.24.4 '@jest/test-sequencer': 27.5.1 @@ -27728,7 +27776,7 @@ snapshots: slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - ts-node: 10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.2.0)(typescript@5.4.5) + ts-node: 10.9.1(@swc/core@1.7.14)(@types/node@22.2.0)(typescript@5.4.5) transitivePeerDependencies: - bufferutil - canvas @@ -28088,11 +28136,11 @@ snapshots: leven: 3.1.0 pretty-format: 29.7.0 - jest-watch-typeahead@1.1.0(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10)): + jest-watch-typeahead@1.1.0(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10)): dependencies: ansi-escapes: 4.3.2 chalk: 4.1.2 - jest: 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10) + jest: 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10) jest-regex-util: 28.0.2 jest-watcher: 28.1.3 slash: 4.0.0 @@ -28145,11 +28193,11 @@ snapshots: merge-stream: 2.0.0 supports-color: 8.1.1 - jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10): + jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10): dependencies: - '@jest/core': 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10) + '@jest/core': 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10) import-local: 3.1.0 - jest-cli: 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10) + jest-cli: 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - canvas @@ -29150,10 +29198,10 @@ snapshots: mimic-response@4.0.0: {} - mini-css-extract-plugin@2.7.6(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)): + mini-css-extract-plugin@2.7.6(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: schema-utils: 4.2.0 - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) minimalistic-assert@1.0.1: {} @@ -30167,29 +30215,29 @@ snapshots: postcss: 8.4.41 postcss-value-parser: 4.2.0 - postcss-load-config@3.1.4(postcss@8.4.41)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.2.0)(typescript@5.4.5)): + postcss-load-config@3.1.4(postcss@8.4.41)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.2.0)(typescript@5.4.5)): dependencies: lilconfig: 2.1.0 yaml: 1.10.2 optionalDependencies: postcss: 8.4.41 - ts-node: 10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.2.0)(typescript@5.4.5) + ts-node: 10.9.1(@swc/core@1.7.14)(@types/node@22.2.0)(typescript@5.4.5) - postcss-load-config@4.0.1(postcss@8.4.41)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.2.0)(typescript@5.4.5)): + postcss-load-config@4.0.1(postcss@8.4.41)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.2.0)(typescript@5.4.5)): dependencies: lilconfig: 2.1.0 yaml: 2.5.0 optionalDependencies: postcss: 8.4.41 - ts-node: 10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.2.0)(typescript@5.4.5) + ts-node: 10.9.1(@swc/core@1.7.14)(@types/node@22.2.0)(typescript@5.4.5) - postcss-load-config@4.0.1(postcss@8.4.41)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.0)(typescript@5.4.5)): + postcss-load-config@4.0.1(postcss@8.4.41)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.0)(typescript@5.4.5)): dependencies: lilconfig: 2.1.0 yaml: 2.5.0 optionalDependencies: postcss: 8.4.41 - ts-node: 10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.0)(typescript@5.4.5) + ts-node: 10.9.1(@swc/core@1.7.14)(@types/node@22.5.0)(typescript@5.4.5) postcss-load-config@6.0.1(jiti@1.21.6)(postcss@8.4.41)(tsx@4.17.0)(yaml@2.5.0): dependencies: @@ -30200,13 +30248,13 @@ snapshots: tsx: 4.17.0 yaml: 2.5.0 - postcss-loader@6.2.1(postcss@8.4.41)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)): + postcss-loader@6.2.1(postcss@8.4.41)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: cosmiconfig: 7.1.0 klona: 2.0.6 postcss: 8.4.41 semver: 7.3.8 - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) postcss-logical@5.0.4(postcss@8.4.41): dependencies: @@ -30630,21 +30678,6 @@ snapshots: punycode@2.3.0: {} - puppeteer-core@21.11.0(bufferutil@4.0.8)(utf-8-validate@5.0.10): - dependencies: - '@puppeteer/browsers': 1.9.1 - chromium-bidi: 0.5.8(devtools-protocol@0.0.1232444) - cross-fetch: 4.0.0 - debug: 4.3.4 - devtools-protocol: 0.0.1232444 - ws: 8.16.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - transitivePeerDependencies: - - bufferutil - - encoding - - supports-color - - utf-8-validate - optional: true - puppeteer-core@21.11.0(bufferutil@4.0.8)(utf-8-validate@6.0.4): dependencies: '@puppeteer/browsers': 1.9.1 @@ -30773,7 +30806,7 @@ snapshots: regenerator-runtime: 0.13.11 whatwg-fetch: 3.6.2 - react-dev-utils@12.0.1(eslint@8.57.0)(typescript@5.4.5)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)): + react-dev-utils@12.0.1(eslint@8.57.0)(typescript@5.4.5)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: '@babel/code-frame': 7.22.5 address: 1.2.2 @@ -30784,7 +30817,7 @@ snapshots: escape-string-regexp: 4.0.0 filesize: 8.0.7 find-up: 5.0.0 - fork-ts-checker-webpack-plugin: 6.5.3(eslint@8.57.0)(typescript@5.4.5)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) + fork-ts-checker-webpack-plugin: 6.5.3(eslint@8.57.0)(typescript@5.4.5)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) global-modules: 2.0.0 globby: 11.1.0 gzip-size: 6.0.0 @@ -30799,7 +30832,7 @@ snapshots: shell-quote: 1.8.1 strip-ansi: 6.0.1 text-table: 0.2.0 - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) optionalDependencies: typescript: 5.4.5 transitivePeerDependencies: @@ -30917,56 +30950,56 @@ snapshots: optionalDependencies: '@types/react': 18.3.1 - react-scripts@5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.22.5))(@babel/plugin-transform-react-jsx@7.25.2(@babel/core@7.22.5))(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.17.19)(eslint@8.57.0)(react@18.3.1)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.2.0)(typescript@5.4.5))(type-fest@3.1.0)(typescript@5.4.5)(utf-8-validate@5.0.10): + react-scripts@5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.22.5))(@babel/plugin-transform-react-jsx@7.25.2(@babel/core@7.22.5))(@swc/core@1.7.14)(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.17.19)(eslint@8.57.0)(react@18.3.1)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.2.0)(typescript@5.4.5))(type-fest@3.1.0)(typescript@5.4.5)(utf-8-validate@5.0.10): dependencies: '@babel/core': 7.22.5 - '@pmmmwh/react-refresh-webpack-plugin': 0.5.10(react-refresh@0.11.0)(type-fest@3.1.0)(webpack-dev-server@4.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)))(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) + '@pmmmwh/react-refresh-webpack-plugin': 0.5.10(react-refresh@0.11.0)(type-fest@3.1.0)(webpack-dev-server@4.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)))(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) '@svgr/webpack': 5.5.0 babel-jest: 27.5.1(@babel/core@7.22.5) - babel-loader: 8.3.0(@babel/core@7.22.5)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) + babel-loader: 8.3.0(@babel/core@7.22.5)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) babel-plugin-named-asset-import: 0.3.8(@babel/core@7.22.5) babel-preset-react-app: 10.0.1 bfj: 7.0.2 browserslist: 4.21.9 camelcase: 6.3.0 case-sensitive-paths-webpack-plugin: 2.4.0 - css-loader: 6.8.1(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) - css-minimizer-webpack-plugin: 3.4.1(esbuild@0.17.19)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) + css-loader: 6.8.1(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) + css-minimizer-webpack-plugin: 3.4.1(esbuild@0.17.19)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) dotenv: 10.0.0 dotenv-expand: 5.1.0 eslint: 8.57.0 - eslint-config-react-app: 7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.22.5))(@babel/plugin-transform-react-jsx@7.25.2(@babel/core@7.22.5))(eslint@8.57.0)(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10))(typescript@5.4.5) - eslint-webpack-plugin: 3.2.0(eslint@8.57.0)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) - file-loader: 6.2.0(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) + eslint-config-react-app: 7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.22.5))(@babel/plugin-transform-react-jsx@7.25.2(@babel/core@7.22.5))(eslint@8.57.0)(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10))(typescript@5.4.5) + eslint-webpack-plugin: 3.2.0(eslint@8.57.0)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) + file-loader: 6.2.0(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) fs-extra: 10.1.0 - html-webpack-plugin: 5.5.3(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) + html-webpack-plugin: 5.5.3(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) identity-obj-proxy: 3.0.0 - jest: 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10) + jest: 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10) jest-resolve: 27.5.1 - jest-watch-typeahead: 1.1.0(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10)) - mini-css-extract-plugin: 2.7.6(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) + jest-watch-typeahead: 1.1.0(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.2.0)(typescript@5.4.5))(utf-8-validate@5.0.10)) + mini-css-extract-plugin: 2.7.6(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) postcss: 8.4.41 postcss-flexbugs-fixes: 5.0.2(postcss@8.4.41) - postcss-loader: 6.2.1(postcss@8.4.41)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) + postcss-loader: 6.2.1(postcss@8.4.41)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) postcss-normalize: 10.0.1(browserslist@4.21.9)(postcss@8.4.41) postcss-preset-env: 7.8.3(postcss@8.4.41) prompts: 2.4.2 react: 18.3.1 react-app-polyfill: 3.0.0 - react-dev-utils: 12.0.1(eslint@8.57.0)(typescript@5.4.5)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) + react-dev-utils: 12.0.1(eslint@8.57.0)(typescript@5.4.5)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) react-refresh: 0.11.0 resolve: 1.22.2 resolve-url-loader: 4.0.0 - sass-loader: 12.6.0(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) + sass-loader: 12.6.0(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) semver: 7.3.8 - source-map-loader: 3.0.2(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) - style-loader: 3.3.3(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) - tailwindcss: 3.4.10(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.2.0)(typescript@5.4.5)) - terser-webpack-plugin: 5.3.9(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) - webpack-dev-server: 4.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) - webpack-manifest-plugin: 4.1.1(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) - workbox-webpack-plugin: 6.6.0(@types/babel__core@7.20.5)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) + source-map-loader: 3.0.2(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) + style-loader: 3.3.3(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) + tailwindcss: 3.4.10(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.2.0)(typescript@5.4.5)) + terser-webpack-plugin: 5.3.9(@swc/core@1.7.14)(esbuild@0.17.19)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) + webpack-dev-server: 4.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) + webpack-manifest-plugin: 4.1.1(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) + workbox-webpack-plugin: 6.6.0(@types/babel__core@7.20.5)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) optionalDependencies: fsevents: 2.3.3 typescript: 5.4.5 @@ -31446,11 +31479,11 @@ snapshots: sanitize.css@13.0.0: {} - sass-loader@12.6.0(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)): + sass-loader@12.6.0(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: klona: 2.0.6 neo-async: 2.6.2 - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) sax@1.2.4: {} @@ -31765,12 +31798,12 @@ snapshots: source-map-js@1.2.0: {} - source-map-loader@3.0.2(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)): + source-map-loader@3.0.2(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: abab: 2.0.6 iconv-lite: 0.6.3 source-map-js: 1.2.0 - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) source-map-support@0.5.21: dependencies: @@ -32083,9 +32116,9 @@ snapshots: dependencies: boundary: 2.0.0 - style-loader@3.3.3(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)): + style-loader@3.3.3(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) styled-jsx@5.1.1(@babel/core@7.24.4)(react@18.3.1): dependencies: @@ -32223,7 +32256,7 @@ snapshots: string-width: 4.2.3 strip-ansi: 6.0.1 - tailwindcss@3.4.10(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.2.0)(typescript@5.4.5)): + tailwindcss@3.4.10(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.2.0)(typescript@5.4.5)): dependencies: '@alloc/quick-lru': 5.2.0 arg: 5.0.2 @@ -32242,7 +32275,7 @@ snapshots: postcss: 8.4.41 postcss-import: 15.1.0(postcss@8.4.41) postcss-js: 4.0.1(postcss@8.4.41) - postcss-load-config: 4.0.1(postcss@8.4.41)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.2.0)(typescript@5.4.5)) + postcss-load-config: 4.0.1(postcss@8.4.41)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.2.0)(typescript@5.4.5)) postcss-nested: 6.0.1(postcss@8.4.41) postcss-selector-parser: 6.0.13 resolve: 1.22.8 @@ -32250,7 +32283,7 @@ snapshots: transitivePeerDependencies: - ts-node - tailwindcss@3.4.10(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.0)(typescript@5.4.5)): + tailwindcss@3.4.10(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.0)(typescript@5.4.5)): dependencies: '@alloc/quick-lru': 5.2.0 arg: 5.0.2 @@ -32269,7 +32302,7 @@ snapshots: postcss: 8.4.41 postcss-import: 15.1.0(postcss@8.4.41) postcss-js: 4.0.1(postcss@8.4.41) - postcss-load-config: 4.0.1(postcss@8.4.41)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.0)(typescript@5.4.5)) + postcss-load-config: 4.0.1(postcss@8.4.41)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.0)(typescript@5.4.5)) postcss-nested: 6.0.1(postcss@8.4.41) postcss-selector-parser: 6.0.13 resolve: 1.22.8 @@ -32321,14 +32354,14 @@ snapshots: ansi-escapes: 4.3.2 supports-hyperlinks: 2.3.0 - terser-webpack-plugin@5.3.9(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)): + terser-webpack-plugin@5.3.9(@swc/core@1.7.14)(esbuild@0.17.19)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: '@jridgewell/trace-mapping': 0.3.18 jest-worker: 27.5.1 schema-utils: 3.3.0 serialize-javascript: 6.0.1 terser: 5.18.2 - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) optionalDependencies: '@swc/core': 1.7.14(@swc/helpers@0.5.12) esbuild: 0.17.19 @@ -32557,7 +32590,7 @@ snapshots: ts-log@2.2.5: {} - ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.2.0)(typescript@5.4.5): + ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.2.0)(typescript@5.4.5): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 @@ -32578,7 +32611,7 @@ snapshots: '@swc/core': 1.7.14(@swc/helpers@0.5.12) optional: true - ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.0)(typescript@5.4.5): + ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.0)(typescript@5.4.5): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 @@ -32627,7 +32660,7 @@ snapshots: tslib@2.7.0: {} - tsup@6.7.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(postcss@8.4.41)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.2.0)(typescript@5.4.5))(typescript@5.4.5): + tsup@6.7.0(@swc/core@1.7.14)(postcss@8.4.41)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.2.0)(typescript@5.4.5))(typescript@5.4.5): dependencies: bundle-require: 4.0.1(esbuild@0.17.19) cac: 6.7.14 @@ -32637,7 +32670,7 @@ snapshots: execa: 5.1.1 globby: 11.1.0 joycon: 3.1.1 - postcss-load-config: 3.1.4(postcss@8.4.41)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.2.0)(typescript@5.4.5)) + postcss-load-config: 3.1.4(postcss@8.4.41)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.2.0)(typescript@5.4.5)) resolve-from: 5.0.0 rollup: 3.25.3 source-map: 0.8.0-beta.0 @@ -33266,7 +33299,7 @@ snapshots: why-is-node-running: 2.2.2 optionalDependencies: '@types/node': 22.2.0 - '@vitest/browser': 1.6.0(playwright@1.46.1)(vitest@1.6.0)(webdriverio@8.40.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + '@vitest/browser': 1.6.0(playwright@1.46.1)(vitest@1.6.0)(webdriverio@8.40.2(bufferutil@4.0.8)(utf-8-validate@6.0.4)) jsdom: 16.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - less @@ -33338,7 +33371,7 @@ snapshots: why-is-node-running: 2.2.2 optionalDependencies: '@types/node': 22.5.0 - '@vitest/browser': 1.6.0(playwright@1.46.1)(vitest@1.6.0)(webdriverio@8.40.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + '@vitest/browser': 1.6.0(playwright@1.46.1)(vitest@1.6.0)(webdriverio@8.40.2(bufferutil@4.0.8)(utf-8-validate@6.0.4)) jsdom: 16.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - less @@ -33454,25 +33487,6 @@ snapshots: pvtsutils: 1.3.2 tslib: 2.7.0 - webdriver@8.40.2(bufferutil@4.0.8)(utf-8-validate@5.0.10): - dependencies: - '@types/node': 20.14.15 - '@types/ws': 8.5.12 - '@wdio/config': 8.40.2 - '@wdio/logger': 8.38.0 - '@wdio/protocols': 8.38.0 - '@wdio/types': 8.39.0 - '@wdio/utils': 8.40.2 - deepmerge-ts: 5.1.0 - got: 12.6.1 - ky: 0.33.3 - ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - optional: true - webdriver@8.40.2(bufferutil@4.0.8)(utf-8-validate@6.0.4): dependencies: '@types/node': 20.14.15 @@ -33491,40 +33505,6 @@ snapshots: - supports-color - utf-8-validate - webdriverio@8.40.2(bufferutil@4.0.8)(utf-8-validate@5.0.10): - dependencies: - '@types/node': 20.14.15 - '@wdio/config': 8.40.2 - '@wdio/logger': 8.38.0 - '@wdio/protocols': 8.38.0 - '@wdio/repl': 8.24.12 - '@wdio/types': 8.39.0 - '@wdio/utils': 8.40.2 - archiver: 7.0.1 - aria-query: 5.3.0 - css-shorthand-properties: 1.1.1 - css-value: 0.0.1 - devtools-protocol: 0.0.1335233 - grapheme-splitter: 1.0.4 - import-meta-resolve: 4.1.0 - is-plain-obj: 4.1.0 - jszip: 3.10.1 - lodash.clonedeep: 4.5.0 - lodash.zip: 4.2.0 - minimatch: 9.0.5 - puppeteer-core: 21.11.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - query-selector-shadow-dom: 1.0.1 - resq: 1.11.0 - rgb2hex: 0.2.5 - serialize-error: 11.0.3 - webdriver: 8.40.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) - transitivePeerDependencies: - - bufferutil - - encoding - - supports-color - - utf-8-validate - optional: true - webdriverio@8.40.2(bufferutil@4.0.8)(utf-8-validate@6.0.4): dependencies: '@types/node': 20.14.15 @@ -33568,16 +33548,16 @@ snapshots: webidl-conversions@6.1.0: {} - webpack-dev-middleware@5.3.3(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)): + webpack-dev-middleware@5.3.3(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: colorette: 2.0.20 memfs: 3.5.3 mime-types: 2.1.35 range-parser: 1.2.1 schema-utils: 4.2.0 - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) - webpack-dev-server@4.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)): + webpack-dev-server@4.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: '@types/bonjour': 3.5.10 '@types/connect-history-api-fallback': 1.5.0 @@ -33607,20 +33587,20 @@ snapshots: serve-index: 1.9.1 sockjs: 0.3.24 spdy: 4.0.2 - webpack-dev-middleware: 5.3.3(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) + webpack-dev-middleware: 5.3.3(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) ws: 8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) optionalDependencies: - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) transitivePeerDependencies: - bufferutil - debug - supports-color - utf-8-validate - webpack-manifest-plugin@4.1.1(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)): + webpack-manifest-plugin@4.1.1(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: tapable: 2.2.1 - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) webpack-sources: 2.3.1 webpack-sources@1.4.3: @@ -33637,7 +33617,7 @@ snapshots: webpack-virtual-modules@0.6.2: {} - webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19): + webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19): dependencies: '@types/eslint-scope': 3.7.4 '@types/estree': 1.0.1 @@ -33660,7 +33640,7 @@ snapshots: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.9(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)) + terser-webpack-plugin: 5.3.9(@swc/core@1.7.14)(esbuild@0.17.19)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) watchpack: 2.4.0 webpack-sources: 3.2.3 transitivePeerDependencies: @@ -33875,12 +33855,12 @@ snapshots: workbox-sw@6.6.0: {} - workbox-webpack-plugin@6.6.0(@types/babel__core@7.20.5)(webpack@5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19)): + workbox-webpack-plugin@6.6.0(@types/babel__core@7.20.5)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: fast-json-stable-stringify: 2.1.0 pretty-bytes: 5.6.0 upath: 1.2.0 - webpack: 5.88.0(@swc/core@1.7.14(@swc/helpers@0.5.12))(esbuild@0.17.19) + webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) webpack-sources: 1.4.3 workbox-build: 6.6.0(@types/babel__core@7.20.5) transitivePeerDependencies: @@ -33953,12 +33933,6 @@ snapshots: utf-8-validate: 6.0.4 optional: true - ws@8.16.0(bufferutil@4.0.8)(utf-8-validate@5.0.10): - optionalDependencies: - bufferutil: 4.0.8 - utf-8-validate: 5.0.10 - optional: true - ws@8.16.0(bufferutil@4.0.8)(utf-8-validate@6.0.4): optionalDependencies: bufferutil: 4.0.8 From 882a0a243704959ac7bda296dd3e5965b57ea73d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nedim=20Salki=C4=87?= Date: Thu, 12 Sep 2024 16:01:41 +0200 Subject: [PATCH 09/26] feat: sway type matchers (#3137) * add matchers and PoC * add "full" flow * extract relevant regexes into variables * update generics * fix tupleRegex * Update sway-type-matchers.ts * refactor out parameterized tests * add test tags * Update packages/abi/src/matchers/sway-type-matchers.ts Co-authored-by: Peter Smith * add `createMatcher` utility * remove typers and coders * remove irrelevant changes * fix test * rename `empty` to `void` * Update packages/abi/src/matchers/sway-type-matchers.ts Co-authored-by: Anderson Arboleya * fix compilation --------- Co-authored-by: Peter Smith Co-authored-by: Anderson Arboleya --- .../src/matchers/sway-type-matchers.test.ts | 247 ++++++++++++++++++ .../abi/src/matchers/sway-type-matchers.ts | 117 +++++++++ 2 files changed, 364 insertions(+) create mode 100644 packages/abi/src/matchers/sway-type-matchers.test.ts create mode 100644 packages/abi/src/matchers/sway-type-matchers.ts diff --git a/packages/abi/src/matchers/sway-type-matchers.test.ts b/packages/abi/src/matchers/sway-type-matchers.test.ts new file mode 100644 index 00000000000..314d01e70af --- /dev/null +++ b/packages/abi/src/matchers/sway-type-matchers.test.ts @@ -0,0 +1,247 @@ +import type { SwayType, swayTypeMatchers } from './sway-type-matchers'; +import { createMatcher } from './sway-type-matchers'; + +const testMappings: Record = { + string: 'string-matched', + void: 'void-matched', + bool: 'bool-matched', + u8: 'u8-matched', + u16: 'u16-matched', + u32: 'u32-matched', + u64: 'u64-matched', + u256: 'u256-matched', + b256: 'b256-matched', + generic: 'generic-matched', + stdString: 'stdString-matched', + option: 'option-matched', + result: 'result-matched', + enum: 'enum-matched', + struct: 'struct-matched', + b512: 'b512-matched', + bytes: 'bytes-matched', + vector: 'vector-matched', + tuple: 'tuple-matched', + array: 'array-matched', + assetId: 'assetId-matched', + evmAddress: 'evmAddress-matched', + rawUntypedPtr: 'rawUntypedPtr-matched', + rawUntypedSlice: 'rawUntypedSlice-matched', +}; + +const matcher = createMatcher(testMappings); + +function verifyOtherMatchersDontMatch(key: keyof typeof testMappings, swayType: string) { + const testMappingsWithoutKey = Object.fromEntries( + Object.entries(testMappings).filter(([k]) => k !== key) + ); + + const verifier = createMatcher(testMappingsWithoutKey as Record); + + expect(() => verifier({ swayType })).toThrow(`Matcher not found for sway type ${swayType}.`); +} + +/** + * @group node + * @group browser + */ +describe('sway type matchers', () => { + test('void', () => { + const key = 'void'; + const swayType = '()'; + + expect(matcher({ swayType })).toEqual(`${key}-matched`); + verifyOtherMatchersDontMatch(key, swayType); + }); + + test('bool', () => { + const key = 'bool'; + const swayType = 'bool'; + + expect(matcher({ swayType })).toEqual(`${key}-matched`); + verifyOtherMatchersDontMatch(key, swayType); + }); + + test('u8', () => { + const key = 'u8'; + const swayType = 'u8'; + + expect(matcher({ swayType })).toEqual(`${key}-matched`); + verifyOtherMatchersDontMatch(key, swayType); + }); + + test('u16', () => { + const key = 'u16'; + const swayType = 'u16'; + + expect(matcher({ swayType })).toEqual(`${key}-matched`); + verifyOtherMatchersDontMatch(key, swayType); + }); + + test('u32', () => { + const key = 'u32'; + const swayType = 'u32'; + + expect(matcher({ swayType })).toEqual(`${key}-matched`); + verifyOtherMatchersDontMatch(key, swayType); + }); + + test('u64', () => { + const key = 'u64'; + const swayType = 'u64'; + + expect(matcher({ swayType })).toEqual(`${key}-matched`); + verifyOtherMatchersDontMatch(key, swayType); + }); + + test('u256', () => { + const key = 'u256'; + const swayType = 'u256'; + + expect(matcher({ swayType })).toEqual(`${key}-matched`); + verifyOtherMatchersDontMatch(key, swayType); + }); + + test('b256', () => { + const key = 'b256'; + const swayType = 'b256'; + + expect(matcher({ swayType })).toEqual(`${key}-matched`); + verifyOtherMatchersDontMatch(key, swayType); + }); + + test('string', () => { + const key = 'string'; + const swayType = 'str[5]'; + + expect(matcher({ swayType })).toEqual(`${key}-matched`); + verifyOtherMatchersDontMatch(key, swayType); + }); + + test('array', () => { + const key = 'array'; + const swayType = '[_; 3]'; + + expect(matcher({ swayType })).toEqual(`${key}-matched`); + verifyOtherMatchersDontMatch(key, swayType); + }); + + test('tuple', () => { + const key = 'tuple'; + const swayType = '(_, _, _)'; + + expect(matcher({ swayType })).toEqual(`${key}-matched`); + verifyOtherMatchersDontMatch(key, swayType); + }); + + test('struct', () => { + const key = 'struct'; + const swayType = 'struct MyStruct'; + + expect(matcher({ swayType })).toEqual(`${key}-matched`); + verifyOtherMatchersDontMatch(key, swayType); + }); + + test('assetId', () => { + const key = 'assetId'; + const swayType = 'struct std::asset_id::AssetId'; + + expect(matcher({ swayType })).toEqual(`${key}-matched`); + verifyOtherMatchersDontMatch(key, swayType); + }); + + test('b512', () => { + const key = 'b512'; + const swayType = 'struct std::b512::B512'; + + expect(matcher({ swayType })).toEqual(`${key}-matched`); + verifyOtherMatchersDontMatch(key, swayType); + }); + + test('assetId', () => { + const key = 'assetId'; + const swayType = 'struct std::asset_id::AssetId'; + + expect(matcher({ swayType })).toEqual(`${key}-matched`); + verifyOtherMatchersDontMatch(key, swayType); + }); + + test('bytes', () => { + const key = 'bytes'; + const swayType = 'struct std::bytes::Bytes'; + + expect(matcher({ swayType })).toEqual(`${key}-matched`); + verifyOtherMatchersDontMatch(key, swayType); + }); + + test('stdString', () => { + const key = 'stdString'; + const swayType = 'struct std::string::String'; + + expect(matcher({ swayType })).toEqual(`${key}-matched`); + verifyOtherMatchersDontMatch(key, swayType); + }); + + test('evmAddress', () => { + const key = 'evmAddress'; + const swayType = 'struct std::vm::evm::evm_address::EvmAddress'; + + expect(matcher({ swayType })).toEqual(`${key}-matched`); + verifyOtherMatchersDontMatch(key, swayType); + }); + + test('vector', () => { + const key = 'vector'; + const swayType = 'struct std::vec::Vec'; + + expect(matcher({ swayType })).toEqual(`${key}-matched`); + verifyOtherMatchersDontMatch(key, swayType); + }); + + test('enum', () => { + const key = 'enum'; + const swayType = 'enum MyEnum'; + + expect(matcher({ swayType })).toEqual(`${key}-matched`); + verifyOtherMatchersDontMatch(key, swayType); + }); + + test('option', () => { + const key = 'option'; + const swayType = 'enum std::option::Option'; + + expect(matcher({ swayType })).toEqual(`${key}-matched`); + verifyOtherMatchersDontMatch(key, swayType); + }); + + test('result', () => { + const key = 'result'; + const swayType = 'enum std::result::Result'; + + expect(matcher({ swayType })).toEqual(`${key}-matched`); + verifyOtherMatchersDontMatch(key, swayType); + }); + + test('rawUntypedPtr', () => { + const key = 'rawUntypedPtr'; + const swayType = 'raw untyped ptr'; + + expect(matcher({ swayType })).toEqual(`${key}-matched`); + verifyOtherMatchersDontMatch(key, swayType); + }); + + test('rawUntypedSlice', () => { + const key = 'rawUntypedSlice'; + const swayType = 'raw untyped slice'; + + expect(matcher({ swayType })).toEqual(`${key}-matched`); + verifyOtherMatchersDontMatch(key, swayType); + }); + + test('generic', () => { + const key = 'generic'; + const swayType = 'generic T'; + + expect(matcher({ swayType })).toEqual(`${key}-matched`); + verifyOtherMatchersDontMatch(key, swayType); + }); +}); diff --git a/packages/abi/src/matchers/sway-type-matchers.ts b/packages/abi/src/matchers/sway-type-matchers.ts new file mode 100644 index 00000000000..22d68d6804a --- /dev/null +++ b/packages/abi/src/matchers/sway-type-matchers.ts @@ -0,0 +1,117 @@ +export type SwayType = + | 'void' + | 'bool' + | 'u8' + | 'u16' + | 'u32' + | 'u64' + | 'u256' + | 'b256' + | 'generic' + | 'string' + | 'stdString' + | 'option' + | 'result' + | 'enum' + | 'struct' + | 'b512' + | 'bytes' + | 'vector' + | 'tuple' + | 'array' + | 'assetId' + | 'evmAddress' + | 'rawUntypedPtr' // might not need it + | 'rawUntypedSlice'; // might not need it + +type Matcher = (type: string) => boolean; + +const voidMatcher: Matcher = (type) => type === '()'; +const bool: Matcher = (type) => type === 'bool'; +const u8: Matcher = (type) => type === 'u8'; +const u16: Matcher = (type) => type === 'u16'; +const u32: Matcher = (type) => type === 'u32'; +const u64: Matcher = (type) => type === 'u64'; +const u256: Matcher = (type) => type === 'u256'; +const b256: Matcher = (type) => type === 'b256'; + +export const GENERIC_REGEX = /^generic ([^\s]+)$/m; +const generic: Matcher = (type) => GENERIC_REGEX.test(type); + +export const STRING_REGEX = /str\[(?[0-9]+)\]/; +const string: Matcher = (type) => STRING_REGEX.test(type); + +export const TUPLE_REGEX = /^\((?.+)\)$/m; +const tuple: Matcher = (type) => TUPLE_REGEX.test(type); + +export const ARRAY_REGEX = /\[(?[\w\s\\[\]]+);\s*(?[0-9]+)\]/; +const array: Matcher = (type) => ARRAY_REGEX.test(type); + +const STRUCT_REGEX = /^struct .+$/m; +const STRUCT_STD_REGEX = + /^struct std::.*(AssetId|B512|Vec|RawVec|EvmAddress|Bytes|String|RawBytes)$/m; +const struct: Matcher = (type) => STRUCT_REGEX.test(type) && !STRUCT_STD_REGEX.test(type); +const assetId: Matcher = (type) => type === 'struct std::asset_id::AssetId'; +const b512: Matcher = (type) => type === 'struct std::b512::B512'; +const bytes: Matcher = (type) => type === 'struct std::bytes::Bytes'; +const evmAddress: Matcher = (type) => type === 'struct std::vm::evm::evm_address::EvmAddress'; +const stdString: Matcher = (type) => type === 'struct std::string::String'; +const vector: Matcher = (type) => type === 'struct std::vec::Vec'; + +const option: Matcher = (type) => type === 'enum std::option::Option'; +const result: Matcher = (type) => type === 'enum std::result::Result'; +const enumMatcher: Matcher = (type) => !option(type) && !result(type) && /^enum .*$/m.test(type); + +const rawUntypedPtr: Matcher = (type) => type === 'raw untyped ptr'; +const rawUntypedSlice: Matcher = (type) => type === 'raw untyped slice'; + +export const swayTypeMatchers: Record = { + void: voidMatcher, + generic, + bool, + u8, + u16, + u32, + u64, + u256, + b256, + + string, + tuple, + array, + + struct, + assetId, + b512, + bytes, + evmAddress, + stdString, + vector, + + enum: enumMatcher, + option, + result, + + rawUntypedPtr, + rawUntypedSlice, +}; + +const swayTypeMatcherEntries = Object.entries(swayTypeMatchers); + +export function createMatcher(mappings: Record) { + return (opts: { swayType: string }): T => { + const { swayType } = opts; + + for (const [key, matcher] of swayTypeMatcherEntries) { + if (matcher(swayType)) { + const mapping = mappings[key as SwayType]; + if (mapping) { + return mapping; + } + break; + } + } + + throw new Error(`Matcher not found for sway type ${swayType}.`); + }; +} From c3a9b6fbd6040b15fbc52004472b20464131f0b4 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Fri, 13 Sep 2024 14:53:26 +0100 Subject: [PATCH 10/26] chore: added start of line to ABI regex matchers (#3163) --- packages/abi/src/matchers/sway-type-matchers.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/abi/src/matchers/sway-type-matchers.ts b/packages/abi/src/matchers/sway-type-matchers.ts index 22d68d6804a..fb73d766c9d 100644 --- a/packages/abi/src/matchers/sway-type-matchers.ts +++ b/packages/abi/src/matchers/sway-type-matchers.ts @@ -38,13 +38,13 @@ const b256: Matcher = (type) => type === 'b256'; export const GENERIC_REGEX = /^generic ([^\s]+)$/m; const generic: Matcher = (type) => GENERIC_REGEX.test(type); -export const STRING_REGEX = /str\[(?[0-9]+)\]/; +export const STRING_REGEX = /^str\[(?[0-9]+)\]/; const string: Matcher = (type) => STRING_REGEX.test(type); export const TUPLE_REGEX = /^\((?.+)\)$/m; const tuple: Matcher = (type) => TUPLE_REGEX.test(type); -export const ARRAY_REGEX = /\[(?[\w\s\\[\]]+);\s*(?[0-9]+)\]/; +export const ARRAY_REGEX = /^\[(?[\w\s\\[\]]+);\s*(?[0-9]+)\]/; const array: Matcher = (type) => ARRAY_REGEX.test(type); const STRUCT_REGEX = /^struct .+$/m; From 8eb93165c404eabf5530cb0bdadf26eba04e922f Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Mon, 16 Sep 2024 16:47:17 +0100 Subject: [PATCH 11/26] chore: consolidate all ABI Sway programs (#3171) * chore: consolidated all ABI Sway programs * chore: added missing `abi-library` * Update packages/fuel-gauge/test/fixtures/forc-projects/abi-contract/Forc.toml --- .../forc-projects/abi-contract/Forc.toml | 3 + .../forc-projects/abi-contract/src/main.sw | 501 +++++++++++++++++- .../forc-projects/abi-library/Forc.toml | 7 + .../forc-projects/abi-library/src/lib.sw | 11 + .../forc-projects/abi-predicate/src/main.sw | 33 +- .../forc-projects/abi-script/src/main.sw | 33 +- 6 files changed, 580 insertions(+), 8 deletions(-) create mode 100644 packages/fuel-gauge/test/fixtures/forc-projects/abi-library/Forc.toml create mode 100644 packages/fuel-gauge/test/fixtures/forc-projects/abi-library/src/lib.sw diff --git a/packages/fuel-gauge/test/fixtures/forc-projects/abi-contract/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/abi-contract/Forc.toml index d1ae3bcb75a..7e941f84b42 100644 --- a/packages/fuel-gauge/test/fixtures/forc-projects/abi-contract/Forc.toml +++ b/packages/fuel-gauge/test/fixtures/forc-projects/abi-contract/Forc.toml @@ -2,3 +2,6 @@ authors = ["Fuel Labs "] license = "Apache-2.0" name = "abi-contract" + +[dependencies] +abi-library = { path = "../abi-library" } diff --git a/packages/fuel-gauge/test/fixtures/forc-projects/abi-contract/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/abi-contract/src/main.sw index 6abaa813e43..4edc95f5c14 100644 --- a/packages/fuel-gauge/test/fixtures/forc-projects/abi-contract/src/main.sw +++ b/packages/fuel-gauge/test/fixtures/forc-projects/abi-contract/src/main.sw @@ -1,11 +1,504 @@ contract; +use abi_library::ExternalStruct; +use abi_library::ExternalEnum; +use std::vm::evm::evm_address::EvmAddress; +use std::b512::B512; +use std::string::String; +use std::bytes::Bytes; -abi AbiContract { - fn types_u8() -> u8; +enum EnumWithNative { + Checked: (), + Pending: (), } -impl AbiContract for Contract { - fn types_u8() -> u8 { +enum EnumWithVector { + num: u8, + vec: Vec, +} + +enum EnumWithBuiltinType { + a: bool, + b: u64, +} + +enum EnumDoubleGeneric { + a: T1, + b: T2, +} + +enum EnumWithStructs { + a: EnumWithNative, + b: StructSimple, + c: EnumDoubleGeneric, +} + +struct StructSimple { + a: bool, + b: u32, +} + +struct StructWithEnumArray { + a: [EnumWithNative; 3], +} + +struct StructWithMultiOption { + multiple: [Option; 5], +} + +struct StructWithSingleOption { + single: Option, +} + +struct StructWithVector { + num: u8, + vec: Vec, +} + +struct StructSingleGeneric { + a: T, +} + +struct StructDoubleGeneric { + a: T1, + b: T2, +} + +struct StructGenericWithEnum { + a: T1, + b: EnumDoubleGeneric, +} + +struct StructWithImplicitGenerics { + arr: [E; 3], + tuple: (E, F), + string: str[5], + array: [u8; 2], +} + +struct StructWithGenericArray { + a: [StructDoubleGeneric; 3], +} + +struct StructWithNestedArray { + a: [StructDoubleGeneric, str[1]>; 2], +} + +struct StructWithNestedTuple { + a: (u8, StructSingleGeneric>, str[3]), +} + +struct StructWithNestedStruct { + a: StructDoubleGeneric, u16>, +} + +struct StructA { + propA1: u8, +} + +struct StructB { + propB1: StructA, + propB2: u16, +} + +struct StructC { + propC1: StructA, + propC2: Vec, + propC3: StructD>, + propC4: Vec>>, + propC5: Vec>>>, +} + +struct StructD { + propD1: Vec>, + propD2: U, + propD3: V, +} + +struct StructE { + propE1: StructA, + propE2: StructB, + propE3: T, +} + +struct StructF { + propF1: u64, + propF2: T, +} + +struct StructG { + propG1: u8, +} + +enum MyContractError { + DivisionByZero: (), +} + +type TupleWithNativeAssets = (AssetId, AssetId, bool); + +fn divide(numerator: u64, denominator: u64) -> Result { + if (denominator == 0) { + return Err(MyContractError::DivisionByZero); + } else { + Ok(numerator / denominator) + } +} + +struct Configurables { + U8_VALUE: u8, + BOOL_VALUE: bool, + B256_VALUE: b256, + OPTION_U8_VALUE: Option, + GENERIC_STRUCT_VALUE: StructDoubleGeneric, u32>, +} + +configurable { + U8_VALUE: u8 = 10, + BOOL_VALUE: bool = true, + B256_VALUE: b256 = 0x38966262edb5997574be45f94c665aedb41a1663f5b0528e765f355086eebf96, + OPTION_U8_VALUE: Option = Option::None, + GENERIC_STRUCT_VALUE: StructDoubleGeneric, u32> = StructDoubleGeneric { + a: StructDoubleGeneric { a: 4, b: 257 }, + b: 57000, + }, +} + +abi MyContract { + fn configurables() -> Configurables; + + fn types_u8(x: u8) -> u8; + fn types_u16(x: u16) -> u16; + fn types_u32(x: u32) -> u32; + fn types_u64(x: u64) -> u64; + fn types_u256(x: u256) -> u256; + fn types_bool(x: bool) -> bool; + fn types_b256(x: b256) -> b256; + fn types_b512(x: B512) -> B512; + fn types_bytes(x: Bytes) -> Bytes; + + fn types_str(x: str[5]) -> str[5]; + fn types_str_slice(x: str) -> str; + fn types_raw_slice(x: raw_slice) -> raw_slice; + fn types_std_string(x: String) -> String; + + fn types_array(x: [u8; 4]) -> [u8; 4]; + fn types_array_struct(x: [StructSimple; 3]) -> [StructSimple; 3]; + fn types_array_with_generic_struct( + x: [StructDoubleGeneric, str[1]>; 2], + ) -> [StructDoubleGeneric, str[1]>; 2]; + + fn types_struct_simple(x: StructSimple) -> StructSimple; + fn types_struct_generic(x: StructSingleGeneric) -> StructSingleGeneric; + fn types_struct_with_tuple( + x: StructSingleGeneric<(bool, u64)>, + ) -> StructSingleGeneric<(bool, u64)>; + fn types_struct_double_generic( + x: StructGenericWithEnum, + ) -> StructGenericWithEnum; + fn type_struct_external(x: ExternalStruct) -> ExternalStruct; + fn types_struct_with_implicit_generics( + x: StructWithImplicitGenerics, + ) -> StructWithImplicitGenerics; + fn types_struct_with_array(x: StructWithGenericArray) -> StructWithGenericArray; + fn types_struct_with_vector(x: StructWithVector) -> StructWithVector; + fn types_struct_with_array_of_enums(x: StructWithEnumArray) -> StructWithEnumArray; + fn types_struct_with_nested_array(x: StructWithNestedArray) -> StructWithNestedArray; + fn types_struct_with_nested_tuple(x: StructWithNestedTuple) -> StructWithNestedTuple; + fn types_struct_with_nested_struct(x: StructWithNestedStruct) -> StructWithNestedStruct; + fn types_struct_with_multiple_struct_params(x: StructA, y: StructB, z: StructC) -> bool; + fn types_struct_with_complex_nested_struct(x: StructD>>) -> bool; + fn types_struct_with_single_option(x: StructWithSingleOption) -> StructWithSingleOption; + + fn types_tuple(x: (u8, u8, u8)) -> (u8, u8, u8); + fn types_tuple_complex( + x: (u8, StructSingleGeneric>, str[3]), + ) -> (u8, StructSingleGeneric>, str[3]); + fn types_tuple_with_native_types(x: (AssetId, AssetId, bool)) -> (AssetId, AssetId, bool); + fn types_alias_tuple_with_native_types(x: TupleWithNativeAssets) -> TupleWithNativeAssets; + + fn types_enum(x: EnumWithNative) -> EnumWithNative; + fn types_enum_with_builtin_type(x: EnumWithBuiltinType) -> EnumWithBuiltinType; + fn types_enum_with_vector(x: EnumWithVector) -> EnumWithVector; + fn types_generic_enum(x: EnumDoubleGeneric) -> EnumDoubleGeneric; + fn types_enum_external(x: ExternalEnum) -> ExternalEnum; + fn types_enum_with_structs(x: EnumWithStructs) -> EnumWithStructs; + + fn types_vector_u8(x: Vec) -> Vec; + fn types_vector_boolean(x: Vec) -> Vec; + fn types_vector_geo(x: Vec) -> Vec; + fn types_vector_inside_vector(x: Vec>) -> Vec>; + fn types_vector_inside_array(x: [Vec; 1]) -> [Vec; 1]; + fn types_vector_option(x: Vec) -> Vec; + + fn types_option(x: Option) -> Option; + fn types_option_geo(x: Option) -> Option; + + fn type_identity(x: Identity) -> Identity; + fn type_address(x: Address) -> Address; + fn type_contract_id(x: ContractId) -> ContractId; + fn types_asset_id(x: AssetId) -> AssetId; + fn types_evm_address(x: EvmAddress) -> EvmAddress; + fn types_result(x: Result) -> Result; + + fn types_void(x: ()) -> (); + fn types_void_then_value(x: (), y: u8) -> (); + fn types_value_then_void(x: u8, y: ()) -> (); + fn types_value_then_void_then_value(x: u8, y: (), z: u8) -> (); + fn types_value_then_value_then_void_then_void(x: u8, y: u8, z: (), a: ()) -> (); + + fn multi_arg_u64_u64(x: u64, y: u64) -> u64; + fn multi_arg_b256_bool(x: b256, y: bool) -> (b256, bool); + fn multi_arg_vector_vector(x: Vec, y: Vec) -> (Vec, Vec); + fn multi_arg_vector_b256(x: Vec, y: b256) -> (Vec, b256); + fn multi_arg_struct_vector(x: StructSimple, y: Vec) -> (StructSimple, Vec); + fn multi_arg_u64_struct(x: u64, y: StructSimple) -> (u64, StructSimple); + fn multi_arg_str_str(x: str[5], y: str[5]) -> (str[5], str[5]); + fn multi_arg_u32_vector_vector(x: u32, y: Vec, z: Vec) -> (u32, Vec, Vec); + fn multi_arg_complex( + x: StructDoubleGeneric<[b256; 3], u8>, + y: [StructDoubleGeneric; 4], + z: (str[5], bool), + a: StructSimple, + ); +} + +impl MyContract for Contract { + fn configurables() -> Configurables { + Configurables { + U8_VALUE: U8_VALUE, + BOOL_VALUE: BOOL_VALUE, + B256_VALUE: B256_VALUE, + OPTION_U8_VALUE: OPTION_U8_VALUE, + GENERIC_STRUCT_VALUE: GENERIC_STRUCT_VALUE, + } + } + fn types_u8(x: u8) -> u8 { + 255 + } + fn types_u16(x: u16) -> u16 { + 65535 + } + fn types_u32(x: u32) -> u32 { + 4294967295 + } + fn types_u64(x: u64) -> u64 { + 4294967295000 + } + fn types_u256(x: u256) -> u256 { + 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFu256 + } + fn types_str(x: str[5]) -> str[5] { + __to_str_array("Hello") + } + fn types_bool(x: bool) -> bool { + true + } + fn types_asset_id(x: AssetId) -> AssetId { + x + } + fn types_b256(x: b256) -> b256 { + 0x0000000000000000000000000000000000000000000000000000000000000000 + } + fn types_b512(x: B512) -> B512 { + x + } + fn types_array(x: [u8; 4]) -> [u8; 4] { + x + } + fn types_array_struct(x: [StructSimple; 3]) -> [StructSimple; 3] { + x + } + fn types_array_with_generic_struct( + x: [StructDoubleGeneric, str[1]>; 2], + ) -> [StructDoubleGeneric, str[1]>; 2] { + x + } + fn types_tuple(x: (u8, u8, u8)) -> (u8, u8, u8) { + (x.0, x.1, x.2) + } + fn types_tuple_complex( + x: (u8, StructSingleGeneric>, str[3]), + ) -> (u8, StructSingleGeneric>, str[3]) { + (x.0, x.1, x.2) + } + fn types_tuple_with_native_types(x: (AssetId, AssetId, bool)) -> (AssetId, AssetId, bool) { + (x.0, x.1, x.2) + } + fn types_alias_tuple_with_native_types(x: TupleWithNativeAssets) -> TupleWithNativeAssets { + (x.0, x.1, x.2) + } + fn types_struct_simple(x: StructSimple) -> StructSimple { + x + } + fn types_struct_generic(x: StructSingleGeneric) -> StructSingleGeneric { + x + } + fn types_struct_with_tuple( + x: StructSingleGeneric<(bool, u64)>, + ) -> StructSingleGeneric<(bool, u64)> { + x + } + fn types_struct_with_nested_array(x: StructWithNestedArray) -> StructWithNestedArray { + x + } + fn types_struct_with_nested_tuple(x: StructWithNestedTuple) -> StructWithNestedTuple { + x + } + fn types_struct_with_nested_struct(x: StructWithNestedStruct) -> StructWithNestedStruct { + x + } + fn types_struct_with_multiple_struct_params(x: StructA, y: StructB, z: StructC) -> bool { + true + } + fn types_struct_with_complex_nested_struct(x: StructD>>) -> bool { + false + } + fn types_struct_with_single_option(x: StructWithSingleOption) -> StructWithSingleOption { + x + } + fn types_enum(x: EnumWithNative) -> EnumWithNative { + x + } + fn types_enum_with_builtin_type(x: EnumWithBuiltinType) -> EnumWithBuiltinType { + x + } + fn types_enum_with_vector(x: EnumWithVector) -> EnumWithVector { + x + } + fn types_vector_u8(x: Vec) -> Vec { + x + } + fn types_vector_boolean(x: Vec) -> Vec { + x + } + fn types_vector_inside_vector(x: Vec>) -> Vec> { + x + } + fn types_vector_inside_array(x: [Vec; 1]) -> [Vec; 1] { + x + } + fn types_vector_geo(x: Vec) -> Vec { + x + } + fn types_vector_option(x: Vec) -> Vec { + x + } + fn types_option(x: Option) -> Option { + x + } + fn types_option_geo(x: Option) -> Option { + x + } + fn types_evm_address(x: EvmAddress) -> EvmAddress { + EvmAddress::from(0x0606060606060606060606060606060606060606060606060606060606060606) + } + fn types_bytes(x: Bytes) -> Bytes { + x + } + fn types_raw_slice(x: raw_slice) -> raw_slice { + x + } + fn types_str_slice(x: str) -> str { + x + } + fn types_std_string(x: String) -> String { + x + } + fn types_result(x: Result) -> Result { + if (x.is_err()) { + return Err(__to_str_array("InputError")); + } + + let result = divide(20, x.unwrap()); + match result { + Ok(value) => Ok(value), + Err(MyContractError::DivisionByZero) => Err(__to_str_array("DivisError")), + } + } + fn type_address(x: Address) -> Address { + x + } + fn type_contract_id(x: ContractId) -> ContractId { + x + } + fn type_identity(x: Identity) -> Identity { + x + } + fn types_enum_external(x: ExternalEnum) -> ExternalEnum { + x + } + fn types_enum_with_structs(x: EnumWithStructs) -> EnumWithStructs { + x + } + fn type_struct_external(x: ExternalStruct) -> ExternalStruct { + x + } + fn types_struct_with_implicit_generics( + x: StructWithImplicitGenerics, + ) -> StructWithImplicitGenerics { + x + } + fn types_struct_with_array(x: StructWithGenericArray) -> StructWithGenericArray { + x + } + fn types_struct_with_vector(x: StructWithVector) -> StructWithVector { + x + } + fn types_struct_with_array_of_enums(x: StructWithEnumArray) -> StructWithEnumArray { + x + } + fn types_generic_enum(x: EnumDoubleGeneric) -> EnumDoubleGeneric { + x + } + fn types_struct_double_generic( + x: StructGenericWithEnum, + ) -> StructGenericWithEnum { + x + } + fn types_void(x: ()) -> () { + x + } + fn types_void_then_value(x: (), y: u8) -> () { + () + } + fn types_value_then_void(x: u8, y: ()) -> () { + () + } + fn types_value_then_void_then_value(x: u8, y: (), z: u8) -> () { + () + } + fn types_value_then_value_then_void_then_void(x: u8, y: u8, z: (), a: ()) -> () { + () + } + fn multi_arg_u64_u64(x: u64, y: u64) -> u64 { 0 } + fn multi_arg_b256_bool(x: b256, y: bool) -> (b256, bool) { + (x, y) + } + fn multi_arg_vector_vector(x: Vec, y: Vec) -> (Vec, Vec) { + (x, y) + } + fn multi_arg_vector_b256(x: Vec, y: b256) -> (Vec, b256) { + (x, y) + } + fn multi_arg_struct_vector(x: StructSimple, y: Vec) -> (StructSimple, Vec) { + (x, y) + } + fn multi_arg_u64_struct(x: u64, y: StructSimple) -> (u64, StructSimple) { + (x, y) + } + fn multi_arg_str_str(x: str[5], y: str[5]) -> (str[5], str[5]) { + (x, y) + } + fn multi_arg_u32_vector_vector(x: u32, y: Vec, z: Vec) -> (u32, Vec, Vec) { + (x, y, z) + } + fn multi_arg_complex( + x: StructDoubleGeneric<[b256; 3], u8>, + y: [StructDoubleGeneric; 4], + z: (str[5], bool), + a: StructSimple, + ) { + () + } } diff --git a/packages/fuel-gauge/test/fixtures/forc-projects/abi-library/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/abi-library/Forc.toml new file mode 100644 index 00000000000..d28ab3240d9 --- /dev/null +++ b/packages/fuel-gauge/test/fixtures/forc-projects/abi-library/Forc.toml @@ -0,0 +1,7 @@ +[project] +authors = ["Fuel Labs "] +entry = "lib.sw" +license = "Apache-2.0" +name = "abi-library" + +[dependencies] diff --git a/packages/fuel-gauge/test/fixtures/forc-projects/abi-library/src/lib.sw b/packages/fuel-gauge/test/fixtures/forc-projects/abi-library/src/lib.sw new file mode 100644 index 00000000000..dd28f6c5470 --- /dev/null +++ b/packages/fuel-gauge/test/fixtures/forc-projects/abi-library/src/lib.sw @@ -0,0 +1,11 @@ +library; + +// anything `pub` here will be exported as a part of this library's API +pub struct ExternalStruct { + pub value: u64, +} + +pub enum ExternalEnum { + A: (), + B: (), +} diff --git a/packages/fuel-gauge/test/fixtures/forc-projects/abi-predicate/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/abi-predicate/src/main.sw index d529f4e1893..1759925ec32 100644 --- a/packages/fuel-gauge/test/fixtures/forc-projects/abi-predicate/src/main.sw +++ b/packages/fuel-gauge/test/fixtures/forc-projects/abi-predicate/src/main.sw @@ -1,5 +1,34 @@ predicate; -fn main() -> bool { - false +struct Validation { + has_account: bool, + total_complete: u64, +} + +enum MyGenericEnum { + a: T, +} + +struct MyGenericStruct { + a: T, +} + +struct Configurables { + U8_VALUE: u8, + B256_VALUE: b256, +} + +configurable { + U8_VALUE: u8 = 10, + B256_VALUE: b256 = 0x38966262edb5997574be45f94c665aedb41a1663f5b0528e765f355086eebf96, +} + +fn main( + configurables: Configurables, + vec: Vec, + enm: MyGenericEnum, + opt: Option, + res: Result, u64>, +) -> bool { + U8_VALUE == configurables.U8_VALUE && B256_VALUE == configurables.B256_VALUE } diff --git a/packages/fuel-gauge/test/fixtures/forc-projects/abi-script/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/abi-script/src/main.sw index 097ee2e7de5..e57711aa736 100644 --- a/packages/fuel-gauge/test/fixtures/forc-projects/abi-script/src/main.sw +++ b/packages/fuel-gauge/test/fixtures/forc-projects/abi-script/src/main.sw @@ -1,5 +1,34 @@ script; -fn main() -> bool { - false +struct Validation { + has_account: bool, + total_complete: u64, +} + +enum MyGenericEnum { + a: T, +} + +struct MyGenericStruct { + a: T, +} + +struct Configurables { + U8_VALUE: u8, + B256_VALUE: b256, +} + +configurable { + U8_VALUE: u8 = 10, + B256_VALUE: b256 = 0x38966262edb5997574be45f94c665aedb41a1663f5b0528e765f355086eebf96, +} + +fn main( + configurables: Configurables, + vec: Vec, + enm: MyGenericEnum, + opt: Option, + res: Result, u64>, +) -> bool { + U8_VALUE == configurables.U8_VALUE && B256_VALUE == configurables.B256_VALUE } From 8235b4e9140d4d004761535819803f9b1a686246 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Mon, 16 Sep 2024 12:59:08 +0100 Subject: [PATCH 12/26] chore: separate minor and major versions (#3170) --- .github/dependabot.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index ab421fc0c46..537434b4435 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -12,11 +12,14 @@ updates: prefix: "build(deps):" versioning-strategy: "increase" groups: - deps: + deps-major: applies-to: "version-updates" update-types: - "major" - - "minor" + deps-minor: + applies-to: "version-updates" + update-types: + - "patch" deps-patch: applies-to: "version-updates" update-types: From 5e55da8b4ce257fb3b41d7063e125551660632c1 Mon Sep 17 00:00:00 2001 From: Dhaiwat Date: Mon, 16 Sep 2024 18:08:37 +0530 Subject: [PATCH 13/26] chore: inform users if their `fuels` version is outdated (#3108) * test `reportUserVersion` * move util to `versions` package * export via cli and not index * log fuels version * fetch latest version * log out comparison * add changeset * fix tests * disable pr release * add tests * re-use `getBuiltinVersions` * move to `fuels` CLI from `versions` * revert test changes * revert tests * add tests * add testing group * add changeset * add a test case * print a msg if fetch fails * add error msg in one more place * fix test --------- Co-authored-by: Chad Nehemiah --- .changeset/eleven-jeans-matter.md | 6 ++ .../utils/checkForAndDisplayUpdates.test.ts | 68 +++++++++++++++++++ .../cli/utils/checkForAndDisplayUpdates.ts | 43 ++++++++++++ packages/fuels/src/run.ts | 4 +- packages/versions/src/index.ts | 1 + 5 files changed, 121 insertions(+), 1 deletion(-) create mode 100644 .changeset/eleven-jeans-matter.md create mode 100644 packages/fuels/src/cli/utils/checkForAndDisplayUpdates.test.ts create mode 100644 packages/fuels/src/cli/utils/checkForAndDisplayUpdates.ts diff --git a/.changeset/eleven-jeans-matter.md b/.changeset/eleven-jeans-matter.md new file mode 100644 index 00000000000..d422de2b9bd --- /dev/null +++ b/.changeset/eleven-jeans-matter.md @@ -0,0 +1,6 @@ +--- +"@fuel-ts/versions": patch +"fuels": patch +--- + +chore: inform users if their `fuels` version is outdated diff --git a/packages/fuels/src/cli/utils/checkForAndDisplayUpdates.test.ts b/packages/fuels/src/cli/utils/checkForAndDisplayUpdates.test.ts new file mode 100644 index 00000000000..107027e9d59 --- /dev/null +++ b/packages/fuels/src/cli/utils/checkForAndDisplayUpdates.test.ts @@ -0,0 +1,68 @@ +import * as versionsMod from '@fuel-ts/versions'; + +import * as checkForAndDisplayUpdatesMod from './checkForAndDisplayUpdates'; +import * as loggerMod from './logger'; + +/** + * @group node + */ +describe('checkForAndDisplayUpdates', () => { + beforeEach(() => { + vi.resetAllMocks(); + }); + + afterEach(() => { + vi.restoreAllMocks(); + }); + + const mockDeps = (params: { latestVersion: string; userVersion: string }) => { + const { latestVersion, userVersion } = params; + vi.spyOn(Promise, 'race').mockReturnValue(Promise.resolve(latestVersion)); + + vi.spyOn(versionsMod, 'versions', 'get').mockReturnValue({ + FUELS: userVersion, + FORC: '1.0.0', + FUEL_CORE: '1.0.0', + }); + + const log = vi.spyOn(loggerMod, 'log'); + const warn = vi.spyOn(loggerMod, 'warn'); + + return { log, warn }; + }; + + test('should fail gracefully if the fetch fails', async () => { + vi.spyOn(global, 'fetch').mockImplementation(() => + Promise.reject(new Error('Failed to fetch')) + ); + const log = vi.spyOn(loggerMod, 'log'); + await expect(checkForAndDisplayUpdatesMod.checkForAndDisplayUpdates()).resolves.not.toThrow(); + expect(log).toHaveBeenCalledWith('\n Unable to fetch latest fuels version. Skipping...\n'); + }); + + test('should log a warning if the version is outdated', async () => { + const { warn } = mockDeps({ latestVersion: '1.0.1', userVersion: '1.0.0' }); + await checkForAndDisplayUpdatesMod.checkForAndDisplayUpdates(); + expect(warn).toHaveBeenCalledWith( + '\n⚠️ There is a newer version of fuels available: 1.0.1. Your version is: 1.0.0\n' + ); + }); + + test('should log a success message if the version is up to date', async () => { + const { log } = mockDeps({ latestVersion: '1.0.0', userVersion: '1.0.0' }); + await checkForAndDisplayUpdatesMod.checkForAndDisplayUpdates(); + expect(log).toHaveBeenCalledWith('\n✅ Your fuels version is up to date: 1.0.0\n'); + }); + + test('should handle fetch timing out', async () => { + vi.spyOn(global, 'fetch').mockImplementation( + () => + new Promise((resolve) => { + setTimeout(resolve, 5000); + }) + ); + const log = vi.spyOn(loggerMod, 'log'); + await expect(checkForAndDisplayUpdatesMod.checkForAndDisplayUpdates()).resolves.not.toThrow(); + expect(log).toHaveBeenCalledWith('\n Unable to fetch latest fuels version. Skipping...\n'); + }); +}); diff --git a/packages/fuels/src/cli/utils/checkForAndDisplayUpdates.ts b/packages/fuels/src/cli/utils/checkForAndDisplayUpdates.ts new file mode 100644 index 00000000000..32294045b2e --- /dev/null +++ b/packages/fuels/src/cli/utils/checkForAndDisplayUpdates.ts @@ -0,0 +1,43 @@ +import { versions, gt, eq } from '@fuel-ts/versions'; + +import { warn, log } from './logger'; + +export const getLatestFuelsVersion = async () => { + const response = await fetch('https://registry.npmjs.org/fuels/latest'); + const data = await response.json(); + return data.version as string; +}; + +export const checkForAndDisplayUpdates = async () => { + try { + const { FUELS: userFuelsVersion } = versions; + + const latestFuelsVersion = await Promise.race([ + new Promise((resolve) => { + setTimeout(resolve, 3000); + }), + getLatestFuelsVersion(), + ]); + + if (!latestFuelsVersion) { + log(`\n Unable to fetch latest fuels version. Skipping...\n`); + return; + } + + const isFuelsVersionOutdated = gt(latestFuelsVersion, userFuelsVersion); + const isFuelsVersionUpToDate = eq(latestFuelsVersion, userFuelsVersion); + + if (isFuelsVersionOutdated) { + warn( + `\n⚠️ There is a newer version of fuels available: ${latestFuelsVersion}. Your version is: ${userFuelsVersion}\n` + ); + return; + } + + if (isFuelsVersionUpToDate) { + log(`\n✅ Your fuels version is up to date: ${userFuelsVersion}\n`); + } + } catch { + log(`\n Unable to fetch latest fuels version. Skipping...\n`); + } +}; diff --git a/packages/fuels/src/run.ts b/packages/fuels/src/run.ts index e6bf972037d..2fadc25ad0f 100644 --- a/packages/fuels/src/run.ts +++ b/packages/fuels/src/run.ts @@ -1,6 +1,8 @@ import { configureCli } from './cli'; +import { checkForAndDisplayUpdates } from './cli/utils/checkForAndDisplayUpdates'; +import { error } from './cli/utils/logger'; export const run = async (argv: string[]) => { const program = configureCli(); - return program.parseAsync(argv); + return Promise.all([await checkForAndDisplayUpdates().catch(error), program.parseAsync(argv)]); }; diff --git a/packages/versions/src/index.ts b/packages/versions/src/index.ts index 8b918f41f73..0c566912914 100644 --- a/packages/versions/src/index.ts +++ b/packages/versions/src/index.ts @@ -41,3 +41,4 @@ export const versions = getBuiltinVersions(); export * from './lib/types'; export * from './lib/checkFuelCoreVersionCompatibility'; +export * from './lib/semver'; From 70967915266a37453baefaea86f7bd07355eef83 Mon Sep 17 00:00:00 2001 From: Luiz Gomes <8636507+LuizAsFight@users.noreply.github.com> Date: Mon, 16 Sep 2024 11:07:22 -0300 Subject: [PATCH 14/26] fix: some assets got assetId, contractId and decimals incorrect (#3167) --- .changeset/cool-vans-attend.md | 5 ++ .../account/src/providers/assets/assets.ts | 87 +++++-------------- 2 files changed, 28 insertions(+), 64 deletions(-) create mode 100644 .changeset/cool-vans-attend.md diff --git a/.changeset/cool-vans-attend.md b/.changeset/cool-vans-attend.md new file mode 100644 index 00000000000..ac84441c799 --- /dev/null +++ b/.changeset/cool-vans-attend.md @@ -0,0 +1,5 @@ +--- +"@fuel-ts/account": patch +--- + +fix: removed sepolia assets and adjust decimal config diff --git a/packages/account/src/providers/assets/assets.ts b/packages/account/src/providers/assets/assets.ts index b678dac9c5b..f8e2601ec57 100644 --- a/packages/account/src/providers/assets/assets.ts +++ b/packages/account/src/providers/assets/assets.ts @@ -62,7 +62,7 @@ export const rawAssets: Assets = [ '0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8', assetId: '0xa38a5a8beeb08d95744bc7f58528073f4052b254def59eba20c99c202b5acaa3', - decimals: 18, + decimals: 9, }, ], }, @@ -84,7 +84,7 @@ export const rawAssets: Assets = [ '0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8', assetId: '0x239ed6e12b7ce4089ee245244e3bf906999a6429c2a9a445a1e1faf56914a4ab', - decimals: 18, + decimals: 9, }, ], }, @@ -106,7 +106,7 @@ export const rawAssets: Assets = [ '0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8', assetId: '0xbae80f7fb8aa6b90d9b01ef726ec847cc4f59419c4d5f2ea88fec785d1b0e849', - decimals: 18, + decimals: 9, }, ], }, @@ -128,7 +128,7 @@ export const rawAssets: Assets = [ '0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8', assetId: '0xf3f9a0ed0ce8eac5f89d6b83e41b3848212d5b5f56108c54a205bb228ca30c16', - decimals: 18, + decimals: 9, }, ], }, @@ -150,7 +150,7 @@ export const rawAssets: Assets = [ '0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8', assetId: '0x7843c74bef935e837f2bcf67b5d64ecb46dd53ff86375530b0caf3699e8ffafe', - decimals: 18, + decimals: 9, }, ], }, @@ -172,7 +172,7 @@ export const rawAssets: Assets = [ '0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8', assetId: '0x962792286fbc9b1d5860b4551362a12249362c21594c77abf4b3fe2bbe8d977a', - decimals: 18, + decimals: 9, }, ], }, @@ -194,7 +194,7 @@ export const rawAssets: Assets = [ '0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8', assetId: '0x05fc623e57bd7bc1258efa8e4f62b05af5471d73df6f2c2dc11ecc81134c4f36', - decimals: 18, + decimals: 9, }, ], }, @@ -216,7 +216,7 @@ export const rawAssets: Assets = [ '0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8', assetId: '0xaf3111a248ff7a3238cdeea845bb2d43cf3835f1f6b8c9d28360728b55b9ce5b', - decimals: 18, + decimals: 9, }, ], }, @@ -238,7 +238,7 @@ export const rawAssets: Assets = [ '0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8', assetId: '0xafd219f513317b1750783c6581f55530d6cf189a5863fd18bd1b3ffcec1714b4', - decimals: 18, + decimals: 9, }, ], }, @@ -260,7 +260,7 @@ export const rawAssets: Assets = [ '0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8', assetId: '0x89cb9401e55d49c3269654dd1cdfb0e80e57823a4a7db98ba8fc5953b120fef4', - decimals: 18, + decimals: 9, }, ], }, @@ -326,7 +326,7 @@ export const rawAssets: Assets = [ '0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8', assetId: '0x1186afea9affb88809c210e13e2330b5258c2cef04bb8fff5eff372b7bd3f40f', - decimals: 18, + decimals: 9, }, ], }, @@ -348,7 +348,7 @@ export const rawAssets: Assets = [ '0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8', assetId: '0x7a4f087c957d30218223c2baaaa365355c9ca81b6ea49004cfb1590a5399216f', - decimals: 18, + decimals: 9, }, ], }, @@ -370,7 +370,7 @@ export const rawAssets: Assets = [ '0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8', assetId: '0x642a5db59ec323c2f846d4d4cf3e58d78aff64accf4f8f6455ba0aa3ef000a3b', - decimals: 18, + decimals: 9, }, ], }, @@ -392,7 +392,7 @@ export const rawAssets: Assets = [ '0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8', assetId: '0x9e46f919fbf978f3cad7cd34cca982d5613af63ff8aab6c379e4faa179552958', - decimals: 18, + decimals: 9, }, ], }, @@ -451,12 +451,6 @@ export const rawAssets: Assets = [ address: '0x4c9edd5852cd905f086c759e8383e09bff1e68b3', decimals: 18, }, - { - type: 'ethereum', - chainId: CHAIN_IDS.eth.sepolia, - address: '0xc6387efad0f184a90b34f397c3d6fd63135ef790', - decimals: 18, - }, { type: 'fuel', chainId: CHAIN_IDS.fuel.mainnet, @@ -464,15 +458,7 @@ export const rawAssets: Assets = [ '0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8', assetId: '0xb6133b2ef9f6153eb869125d23dcf20d1e735331b5e41b15a6a7a6cec70e8651', - decimals: 18, - }, - { - type: 'fuel', - chainId: CHAIN_IDS.fuel.testnet, - contractId: '0xC6387efAD0F184a90B34f397C3d6Fd63135ef790', - assetId: - '0xf5c6d72d0f2c782fa47d8e228c198a08654e9fc66ca60ad85902b1d09046a7ab', - decimals: 18, + decimals: 9, }, ], }, @@ -487,12 +473,6 @@ export const rawAssets: Assets = [ address: '0x9d39a5de30e57443bff2a8307a4256c8797a3497', decimals: 18, }, - { - type: 'ethereum', - chainId: CHAIN_IDS.eth.sepolia, - address: '0xb8f4f4eafc1d2a3c0a4d519bbf1114c311cc9b1b', - decimals: 18, - }, { type: 'fuel', chainId: CHAIN_IDS.fuel.mainnet, @@ -500,15 +480,7 @@ export const rawAssets: Assets = [ '0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8', assetId: '0xd05563025104fc36496c15c7021ad6b31034b0e89a356f4f818045d1f48808bc', - decimals: 18, - }, - { - type: 'fuel', - chainId: CHAIN_IDS.fuel.testnet, - contractId: '0xC6387efAD0F184a90B34f397C3d6Fd63135ef790', - assetId: - '0xa86e37d385c08beddbb02c8260f9ec535d484c8ea908fc19d4e6dc8d5141fb2e', - decimals: 18, + decimals: 9, }, ], }, @@ -530,7 +502,7 @@ export const rawAssets: Assets = [ '0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8', assetId: '0x78d4522ec607f6e8efb66ea49439d1ee48623cf763f9688a8eada025def033d9', - decimals: 18, + decimals: 9, }, ], }, @@ -545,12 +517,6 @@ export const rawAssets: Assets = [ address: '0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0', decimals: 18, }, - { - type: 'ethereum', - chainId: CHAIN_IDS.eth.sepolia, - address: '0xB82381A3fBD3FaFA77B3a7bE693342618240067b', - decimals: 18, - }, { type: 'fuel', chainId: CHAIN_IDS.fuel.mainnet, @@ -558,15 +524,7 @@ export const rawAssets: Assets = [ '0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8', assetId: '0x1a7815cc9f75db5c24a5b0814bfb706bb9fe485333e98254015de8f48f84c67b', - decimals: 18, - }, - { - type: 'fuel', - chainId: CHAIN_IDS.fuel.testnet, - contractId: '0xC6387efAD0F184a90B34f397C3d6Fd63135ef790', - assetId: - '0x4c467e3fd4f32179e1aad3b92ebbdaa6ff6aeda5b8da5f8e64e96405eb52a7f5', - decimals: 18, + decimals: 9, }, ], }, @@ -588,7 +546,7 @@ export const rawAssets: Assets = [ '0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8', assetId: '0x91b3559edb2619cde8ffb2aa7b3c3be97efd794ea46700db7092abeee62281b0', - decimals: 18, + decimals: 9, }, ], }, @@ -610,7 +568,7 @@ export const rawAssets: Assets = [ '0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8', assetId: '0x1493d4ec82124de8f9b625682de69dcccda79e882b89a55a8c737b12de67bd68', - decimals: 18, + decimals: 9, }, ], }, @@ -632,7 +590,7 @@ export const rawAssets: Assets = [ '0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8', assetId: '0xf2fc648c23a5db24610a1cf696acc4f0f6d9a7d6028dd9944964ab23f6e35995', - decimals: 18, + decimals: 9, }, ], }, @@ -654,9 +612,10 @@ export const rawAssets: Assets = [ '0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e8', assetId: '0x4fc8ac9f101df07e2c2dec4a53c8c42c439bdbe5e36ea2d863a61ff60afafc30', - decimals: 18, + decimals: 9, }, ], }, ]; + export const assets = resolveIconPaths(rawAssets, fuelAssetsBaseUrl); \ No newline at end of file From dc0db2000a7b74d4836f6546005800f7e39943c1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 15:00:44 +0000 Subject: [PATCH 15/26] build(deps): bump the deps-patch group (#3173) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Peter Smith Co-authored-by: Chad Nehemiah --- .changeset/sweet-wasps-thank.md | 7 + apps/create-fuels-counter-guide/package.json | 18 +- apps/demo-bun-fuels/package.json | 2 +- apps/demo-nextjs/package.json | 6 +- apps/demo-react-cra/package.json | 6 +- apps/demo-react-vite/package.json | 6 +- apps/demo-wallet-sdk-react/package.json | 12 +- apps/docs/package.json | 4 +- package.json | 20 +- packages/abi-typegen/package.json | 2 +- packages/fuels/package.json | 2 +- packages/math/package.json | 2 +- pnpm-lock.yaml | 2844 ++++++++---------- templates/nextjs/package.json | 18 +- templates/vite/package.json | 16 +- 15 files changed, 1329 insertions(+), 1636 deletions(-) create mode 100644 .changeset/sweet-wasps-thank.md diff --git a/.changeset/sweet-wasps-thank.md b/.changeset/sweet-wasps-thank.md new file mode 100644 index 00000000000..13358669c93 --- /dev/null +++ b/.changeset/sweet-wasps-thank.md @@ -0,0 +1,7 @@ +--- +"create-fuels": patch +"@fuel-ts/abi-typegen": patch +"@fuel-ts/math": patch +--- + +build(deps): bump the deps-patch group diff --git a/apps/create-fuels-counter-guide/package.json b/apps/create-fuels-counter-guide/package.json index b6103de27a1..20cf05e8891 100644 --- a/apps/create-fuels-counter-guide/package.json +++ b/apps/create-fuels-counter-guide/package.json @@ -19,8 +19,8 @@ "@tanstack/react-query": "^5.55.4", "@tanstack/react-router": "^1.56.5", "fuels": "workspace:*", - "@wagmi/connectors": "^5.1.9", - "@wagmi/core": "^2.13.4", + "@wagmi/connectors": "^5.1.10", + "@wagmi/core": "^2.13.5", "dotenv": "^16.4.5", "react": "^18.3.1", "react-dom": "^18.3.1", @@ -30,21 +30,21 @@ "devDependencies": { "@eslint/js": "^9.10.0", "@tanstack/router-plugin": "^1.56.4", - "@types/node": "^22.5.4", - "@playwright/test": "^1.47.0", - "@types/react": "^18.3.5", + "@types/node": "^22.5.5", + "@playwright/test": "^1.47.1", + "@types/react": "^18.3.6", "@types/react-dom": "^18.3", "@vitejs/plugin-react-swc": "^3.7.0", "autoprefixer": "^10.4.20", "eslint": "^8.57.0", "eslint-plugin-react-hooks": "^4.6.2", - "eslint-plugin-react-refresh": "^0.4.11", + "eslint-plugin-react-refresh": "^0.4.12", "globals": "^15.9.0", - "postcss": "^8.4.45", - "tailwindcss": "^3.4.10", + "postcss": "^8.4.47", + "tailwindcss": "^3.4.11", "typescript": "~5.6.2", "typescript-eslint": "^8.5.0", - "vite": "^5.4.3", + "vite": "^5.4.5", "vitest": "^2.0.5" } } diff --git a/apps/demo-bun-fuels/package.json b/apps/demo-bun-fuels/package.json index 70ebdd5c1fe..92872433cb3 100644 --- a/apps/demo-bun-fuels/package.json +++ b/apps/demo-bun-fuels/package.json @@ -14,6 +14,6 @@ "fuels": "workspace:*" }, "devDependencies": { - "bun": "^1.1.26" + "bun": "^1.1.27" } } diff --git a/apps/demo-nextjs/package.json b/apps/demo-nextjs/package.json index d2fd6a60627..3c463cea9c3 100644 --- a/apps/demo-nextjs/package.json +++ b/apps/demo-nextjs/package.json @@ -11,11 +11,11 @@ }, "dependencies": { "@fuels/vm-asm": "0.56.0", - "@types/node": "^22.5.4", + "@types/node": "^22.5.5", "@types/react-dom": "^18.3", - "@types/react": "^18.3.5", + "@types/react": "^18.3.6", "fuels": "workspace:*", - "next": "14.2.9", + "next": "14.2.11", "react-dom": "^18.3.1", "react": "^18.3.1", "typescript": "~5.6.2" diff --git a/apps/demo-react-cra/package.json b/apps/demo-react-cra/package.json index 0d6fa381bc0..0782ad78828 100644 --- a/apps/demo-react-cra/package.json +++ b/apps/demo-react-cra/package.json @@ -5,8 +5,8 @@ "dependencies": { "@fuels/vm-asm": "0.56.0", "@testing-library/react": "^16.0.1", - "@types/node": "^22.5.4", - "@types/react": "^18.3.5", + "@types/node": "^22.5.5", + "@types/react": "^18.3.6", "@types/react-dom": "^18.3", "eslint-config-react-app": "^7.0.1", "fuels": "workspace:*", @@ -42,6 +42,6 @@ ] }, "devDependencies": { - "@types/jest": "^29.5.12" + "@types/jest": "^29.5.13" } } diff --git a/apps/demo-react-vite/package.json b/apps/demo-react-vite/package.json index 9951269f125..b48d6cdbe2d 100644 --- a/apps/demo-react-vite/package.json +++ b/apps/demo-react-vite/package.json @@ -17,15 +17,15 @@ "react": "^18.3.1" }, "devDependencies": { - "@types/react": "^18.3.5", + "@types/react": "^18.3.6", "@types/react-dom": "^18.3", "@typescript-eslint/eslint-plugin": "^6.9.1", "@typescript-eslint/parser": "^6.21.0", "@vitejs/plugin-react": "^4.3.1", "eslint": "^8.57.0", "eslint-plugin-react-hooks": "^4.6.2", - "eslint-plugin-react-refresh": "^0.4.11", + "eslint-plugin-react-refresh": "^0.4.12", "typescript": "~5.6.2", - "vite": "^5.4.3" + "vite": "^5.4.5" } } diff --git a/apps/demo-wallet-sdk-react/package.json b/apps/demo-wallet-sdk-react/package.json index ac78bfbeaca..960ad560c33 100644 --- a/apps/demo-wallet-sdk-react/package.json +++ b/apps/demo-wallet-sdk-react/package.json @@ -13,19 +13,19 @@ "@fuels/react": "^0.27.1", "@tanstack/react-query": "^5.55.4", "fuels": "workspace:*", - "next": "14.2.9", + "next": "14.2.11", "react": "^18.3.1", "react-dom": "^18.3.1" }, "devDependencies": { - "@types/node": "^22.5.4", - "@types/react": "^18.3.5", + "@types/node": "^22.5.5", + "@types/react": "^18.3.6", "@types/react-dom": "^18.3", "eslint": "^8.57.0", - "eslint-config-next": "14.2.9", - "postcss": "^8.4.45", + "eslint-config-next": "14.2.11", + "postcss": "^8.4.47", "postcss-load-config": "^6.0.1", - "tailwindcss": "^3.4.10", + "tailwindcss": "^3.4.11", "typescript": "~5.6.2" } } diff --git a/apps/docs/package.json b/apps/docs/package.json index b01ed5b9ce2..9f7ec66a896 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -17,7 +17,7 @@ "@fuel-ts/errors": "workspace:*", "@fuel-ts/versions": "workspace:*", "fuels": "workspace:*", - "typedoc-plugin-markdown": "^4.2.0" + "typedoc-plugin-markdown": "^4.2.7" }, "devDependencies": { "@types/markdown-it": "^14.1.2", @@ -30,6 +30,6 @@ "typedoc-plugin-merge-modules": "^6.0.0", "vitepress-plugin-search": "1.0.4-alpha.22", "vitepress": "1.3.4", - "vue": "^3.5.3" + "vue": "^3.5.6" } } diff --git a/package.json b/package.json index 7e01a77c5da..90944e6da14 100644 --- a/package.json +++ b/package.json @@ -73,9 +73,9 @@ "devDependencies": { "@actions/core": "^1.10.1", "@actions/github": "^6.0.0", - "@changesets/cli": "^2.27.7", + "@changesets/cli": "^2.27.8", "@changesets/get-github-info": "^0.6.0", - "@changesets/read": "^0.6.0", + "@changesets/read": "^0.6.1", "@changesets/types": "^6.0.0", "@codspeed/vitest-plugin": "^3.1.1", "@elasticpath/textlint-rule-no-dead-relative-link": "^1.1.1", @@ -84,10 +84,10 @@ "@internal/fuel-core": "workspace:*", "@internal/tsup": "workspace:*", "@istanbuljs/nyc-config-typescript": "^1.0.2", - "@playwright/test": "^1.47.0", - "@types/node": "^22.5.4", + "@playwright/test": "^1.47.1", + "@types/node": "^22.5.5", "@types/node-fetch": "^2.6.11", - "@types/web": "^0.0.159", + "@types/web": "^0.0.163", "@typescript-eslint/eslint-plugin": "^6.9.1", "@typescript-eslint/parser": "^6.21.0", "@vitest/browser": "^2.0.5", @@ -109,23 +109,23 @@ "eslint-plugin-react-hooks": "^4.6.2", "eslint-plugin-tsdoc": "^0.3.0", "glob": "^10.4.5", - "knip": "^5.30.0", + "knip": "^5.30.2", "memfs": "^4.11.1", "nodemon": "^3.1.4", "npm-run-all": "^4.1.5", "nyc": "^17.0.0", "open": "^10.1.0", "prettier": "^3.3.3", - "rimraf": "^5.0.8", + "rimraf": "^5.0.10", "textlint": "^14.2.0", "syncpack": "12.3.3", "textlint-rule-no-dead-link": "^5.2.0", "ts-generator": "^0.1.1", "tsup": "^6.7.0", - "tsx": "^4.19.0", - "turbo": "^2.1.1", + "tsx": "^4.19.1", + "turbo": "^2.1.2", "typescript": "~5.6.2", - "vite": "^5.4.3", + "vite": "^5.4.5", "vite-plugin-json5": "^1.1.2", "vite-plugin-node-polyfills": "^0.22.0", "vite-plugin-plain-text": "^1.4.2", diff --git a/packages/abi-typegen/package.json b/packages/abi-typegen/package.json index ab533ea8d6a..be726bf89e6 100644 --- a/packages/abi-typegen/package.json +++ b/packages/abi-typegen/package.json @@ -61,7 +61,7 @@ "handlebars": "^4.7.8", "mkdirp": "^3.0.1", "ramda": "^0.30.1", - "rimraf": "^5.0.8" + "rimraf": "^5.0.10" }, "devDependencies": { "@internal/forc": "workspace:*", diff --git a/packages/fuels/package.json b/packages/fuels/package.json index 3df83b6ce3c..22f21099541 100644 --- a/packages/fuels/package.json +++ b/packages/fuels/package.json @@ -95,7 +95,7 @@ "devDependencies": { "@types/lodash.camelcase": "^4.3.9", "@types/rimraf": "^3.0.2", - "vite": "^5.4.3" + "vite": "^5.4.5" }, "keywords": [ "ethereum", diff --git a/packages/math/package.json b/packages/math/package.json index f3179e69ccf..b5b1199b998 100644 --- a/packages/math/package.json +++ b/packages/math/package.json @@ -37,7 +37,7 @@ }, "license": "Apache-2.0", "dependencies": { - "@types/bn.js": "^5.1.5", + "@types/bn.js": "^5.1.6", "@fuel-ts/errors": "workspace:*", "bn.js": "^5.2.1" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b7cd3ba549f..7961a86acd4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,20 +18,20 @@ importers: specifier: ^6.0.0 version: 6.0.0 '@changesets/cli': - specifier: ^2.27.7 - version: 2.27.7 + specifier: ^2.27.8 + version: 2.27.8 '@changesets/get-github-info': specifier: ^0.6.0 version: 0.6.0 '@changesets/read': - specifier: ^0.6.0 - version: 0.6.0 + specifier: ^0.6.1 + version: 0.6.1 '@changesets/types': specifier: ^6.0.0 version: 6.0.0 '@codspeed/vitest-plugin': specifier: ^3.1.1 - version: 3.1.1(vite@5.4.3(@types/node@22.5.4)(terser@5.31.6))(vitest@2.0.5(@types/node@22.5.4)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.31.6)) + version: 3.1.1(vite@5.4.5(@types/node@22.5.5)(terser@5.32.0))(vitest@2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.32.0)) '@elasticpath/textlint-rule-no-dead-relative-link': specifier: ^1.1.1 version: 1.1.1 @@ -51,17 +51,17 @@ importers: specifier: ^1.0.2 version: 1.0.2(nyc@17.0.0) '@playwright/test': - specifier: ^1.47.0 - version: 1.47.0 + specifier: ^1.47.1 + version: 1.47.1 '@types/node': - specifier: ^22.5.4 - version: 22.5.4 + specifier: ^22.5.5 + version: 22.5.5 '@types/node-fetch': specifier: ^2.6.11 version: 2.6.11 '@types/web': - specifier: ^0.0.159 - version: 0.0.159 + specifier: ^0.0.163 + version: 0.0.163 '@typescript-eslint/eslint-plugin': specifier: ^6.9.1 version: 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0)(typescript@5.6.2) @@ -70,10 +70,10 @@ importers: version: 6.21.0(eslint@8.57.0)(typescript@5.6.2) '@vitest/browser': specifier: ^2.0.5 - version: 2.0.5(bufferutil@4.0.8)(playwright@1.47.0)(typescript@5.6.2)(utf-8-validate@6.0.4)(vitest@2.0.5)(webdriverio@9.0.9(bufferutil@4.0.8)(utf-8-validate@6.0.4)) + version: 2.0.5(bufferutil@4.0.8)(playwright@1.47.1)(typescript@5.6.2)(utf-8-validate@6.0.4)(vitest@2.0.5)(webdriverio@9.0.9(bufferutil@4.0.8)(utf-8-validate@6.0.4)) '@vitest/coverage-istanbul': specifier: ^2.0.5 - version: 2.0.5(vitest@2.0.5(@types/node@22.5.4)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.31.6)) + version: 2.0.5(vitest@2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.32.0)) autocannon: specifier: ^7.15.0 version: 7.15.0 @@ -103,7 +103,7 @@ importers: version: 3.2.0(eslint@8.57.0) eslint-plugin-import: specifier: ^2.29.1 - version: 2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0) + version: 2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) eslint-plugin-jsdoc: specifier: ^46.8.2 version: 46.10.1(eslint@8.57.0) @@ -126,8 +126,8 @@ importers: specifier: ^10.4.5 version: 10.4.5 knip: - specifier: ^5.30.0 - version: 5.30.0(@types/node@22.5.4)(typescript@5.6.2) + specifier: ^5.30.2 + version: 5.30.2(@types/node@22.5.5)(typescript@5.6.2) memfs: specifier: ^4.11.1 version: 4.11.1 @@ -147,8 +147,8 @@ importers: specifier: ^3.3.3 version: 3.3.3 rimraf: - specifier: ^5.0.8 - version: 5.0.9 + specifier: ^5.0.10 + version: 5.0.10 syncpack: specifier: 12.3.3 version: 12.3.3(typescript@5.6.2) @@ -163,31 +163,31 @@ importers: version: 0.1.1 tsup: specifier: ^6.7.0 - version: 6.7.0(@swc/core@1.7.14)(postcss@8.4.45)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2))(typescript@5.6.2) + version: 6.7.0(@swc/core@1.7.14)(postcss@8.4.47)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2))(typescript@5.6.2) tsx: - specifier: ^4.19.0 - version: 4.19.0 + specifier: ^4.19.1 + version: 4.19.1 turbo: - specifier: ^2.1.1 - version: 2.1.1 + specifier: ^2.1.2 + version: 2.1.2 typescript: specifier: ~5.6.2 version: 5.6.2 vite: - specifier: ^5.4.3 - version: 5.4.3(@types/node@22.5.4)(terser@5.31.6) + specifier: ^5.4.5 + version: 5.4.5(@types/node@22.5.5)(terser@5.32.0) vite-plugin-json5: specifier: ^1.1.2 - version: 1.1.2(@rollup/pluginutils@5.1.0(rollup@4.21.2))(vite@5.4.3(@types/node@22.5.4)(terser@5.31.6)) + version: 1.1.2(@rollup/pluginutils@5.1.0(rollup@4.21.3))(vite@5.4.5(@types/node@22.5.5)(terser@5.32.0)) vite-plugin-node-polyfills: specifier: ^0.22.0 - version: 0.22.0(rollup@4.21.2)(vite@5.4.3(@types/node@22.5.4)(terser@5.31.6)) + version: 0.22.0(rollup@4.21.3)(vite@5.4.5(@types/node@22.5.5)(terser@5.32.0)) vite-plugin-plain-text: specifier: ^1.4.2 version: 1.4.2 vitest: specifier: ^2.0.5 - version: 2.0.5(@types/node@22.5.4)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.31.6) + version: 2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.32.0) webdriverio: specifier: ^9.0.9 version: 9.0.9(bufferutil@4.0.8)(utf-8-validate@6.0.4) @@ -196,7 +196,7 @@ importers: dependencies: '@fuels/connectors': specifier: ^0.27.1 - version: 0.27.1(@tanstack/query-core@5.55.4)(@types/react@18.3.5)(@wagmi/connectors@5.1.9(@types/react@18.3.5)(@wagmi/core@2.13.4(@tanstack/query-core@5.55.4)(@types/react@18.3.5)(immer@9.0.21)(react@18.3.1)(typescript@5.6.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.5)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.21.2)(typescript@5.6.2)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8))(bufferutil@4.0.8)(fuels@packages+fuels)(immer@9.0.21)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.2)(utf-8-validate@5.0.10)(vue@3.5.3(typescript@5.6.2))(zod@3.23.8) + version: 0.27.1(@tanstack/query-core@5.55.4)(@types/react@18.3.6)(@wagmi/connectors@5.1.10(@types/react@18.3.6)(@wagmi/core@2.13.5(@tanstack/query-core@5.55.4)(@types/react@18.3.6)(immer@9.0.21)(react@18.3.1)(typescript@5.6.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.6)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.21.3)(typescript@5.6.2)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8))(bufferutil@4.0.8)(fuels@packages+fuels)(immer@9.0.21)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.2)(utf-8-validate@5.0.10)(vue@3.5.6(typescript@5.6.2))(zod@3.23.8) '@fuels/react': specifier: ^0.27.1 version: 0.27.1(@tanstack/react-query@5.55.4(react@18.3.1))(@types/react-dom@18.3.0)(fuels@packages+fuels)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -207,11 +207,11 @@ importers: specifier: ^1.56.5 version: 1.56.5(@tanstack/router-generator@1.56.4)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@wagmi/connectors': - specifier: ^5.1.9 - version: 5.1.9(@types/react@18.3.5)(@wagmi/core@2.13.4(@tanstack/query-core@5.55.4)(@types/react@18.3.5)(immer@9.0.21)(react@18.3.1)(typescript@5.6.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.5)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.21.2)(typescript@5.6.2)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) + specifier: ^5.1.10 + version: 5.1.10(@types/react@18.3.6)(@wagmi/core@2.13.5(@tanstack/query-core@5.55.4)(@types/react@18.3.6)(immer@9.0.21)(react@18.3.1)(typescript@5.6.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.6)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.21.3)(typescript@5.6.2)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) '@wagmi/core': - specifier: ^2.13.4 - version: 2.13.4(@tanstack/query-core@5.55.4)(@types/react@18.3.5)(immer@9.0.21)(react@18.3.1)(typescript@5.6.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8)) + specifier: ^2.13.5 + version: 2.13.5(@tanstack/query-core@5.55.4)(@types/react@18.3.6)(immer@9.0.21)(react@18.3.1)(typescript@5.6.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8)) dotenv: specifier: ^16.4.5 version: 16.4.5 @@ -235,26 +235,26 @@ importers: specifier: ^9.10.0 version: 9.10.0 '@playwright/test': - specifier: ^1.47.0 - version: 1.47.0 + specifier: ^1.47.1 + version: 1.47.1 '@tanstack/router-plugin': specifier: ^1.56.4 - version: 1.56.4(vite@5.4.3(@types/node@22.5.4)(terser@5.31.6)) + version: 1.56.4(vite@5.4.5(@types/node@22.5.5)(terser@5.32.0)) '@types/node': - specifier: ^22.5.4 - version: 22.5.4 + specifier: ^22.5.5 + version: 22.5.5 '@types/react': - specifier: ^18.3.5 - version: 18.3.5 + specifier: ^18.3.6 + version: 18.3.6 '@types/react-dom': specifier: ^18.3 version: 18.3.0 '@vitejs/plugin-react-swc': specifier: ^3.7.0 - version: 3.7.0(@swc/helpers@0.5.12)(vite@5.4.3(@types/node@22.5.4)(terser@5.31.6)) + version: 3.7.0(@swc/helpers@0.5.12)(vite@5.4.5(@types/node@22.5.5)(terser@5.32.0)) autoprefixer: specifier: ^10.4.20 - version: 10.4.20(postcss@8.4.45) + version: 10.4.20(postcss@8.4.47) eslint: specifier: ^8.57.0 version: 8.57.0 @@ -262,17 +262,17 @@ importers: specifier: ^4.6.2 version: 4.6.2(eslint@8.57.0) eslint-plugin-react-refresh: - specifier: ^0.4.11 - version: 0.4.11(eslint@8.57.0) + specifier: ^0.4.12 + version: 0.4.12(eslint@8.57.0) globals: specifier: ^15.9.0 version: 15.9.0 postcss: - specifier: ^8.4.45 - version: 8.4.45 + specifier: ^8.4.47 + version: 8.4.47 tailwindcss: - specifier: ^3.4.10 - version: 3.4.10(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2)) + specifier: ^3.4.11 + version: 3.4.11(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2)) typescript: specifier: ~5.6.2 version: 5.6.2 @@ -280,11 +280,11 @@ importers: specifier: ^8.5.0 version: 8.5.0(eslint@8.57.0)(typescript@5.6.2) vite: - specifier: ^5.4.3 - version: 5.4.3(@types/node@22.5.4)(terser@5.31.6) + specifier: ^5.4.5 + version: 5.4.5(@types/node@22.5.5)(terser@5.32.0) vitest: specifier: ^2.0.5 - version: 2.0.5(@types/node@22.5.4)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.31.6) + version: 2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.32.0) apps/demo-bun-fuels: dependencies: @@ -299,8 +299,8 @@ importers: version: link:../../packages/fuels devDependencies: bun: - specifier: ^1.1.26 - version: 1.1.26 + specifier: ^1.1.27 + version: 1.1.27 apps/demo-fuels: dependencies: @@ -320,11 +320,11 @@ importers: specifier: 0.56.0 version: 0.56.0 '@types/node': - specifier: ^22.5.4 - version: 22.5.4 + specifier: ^22.5.5 + version: 22.5.5 '@types/react': - specifier: ^18.3.5 - version: 18.3.5 + specifier: ^18.3.6 + version: 18.3.6 '@types/react-dom': specifier: ^18.3 version: 18.3.0 @@ -332,8 +332,8 @@ importers: specifier: workspace:* version: link:../../packages/fuels next: - specifier: 14.2.9 - version: 14.2.9(@babel/core@7.25.2)(@playwright/test@1.47.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: 14.2.11 + version: 14.2.11(@babel/core@7.25.2)(@playwright/test@1.47.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: specifier: ^18.3.1 version: 18.3.1 @@ -357,19 +357,19 @@ importers: version: 0.56.0 '@testing-library/react': specifier: ^16.0.1 - version: 16.0.1(@testing-library/dom@10.4.0)(@types/react-dom@18.3.0)(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 16.0.1(@testing-library/dom@10.4.0)(@types/react-dom@18.3.0)(@types/react@18.3.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@types/node': - specifier: ^22.5.4 - version: 22.5.4 + specifier: ^22.5.5 + version: 22.5.5 '@types/react': - specifier: ^18.3.5 - version: 18.3.5 + specifier: ^18.3.6 + version: 18.3.6 '@types/react-dom': specifier: ^18.3 version: 18.3.0 eslint-config-react-app: specifier: ^7.0.1 - version: 7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.22.5))(@babel/plugin-transform-react-jsx@7.25.2(@babel/core@7.22.5))(eslint@9.10.0(jiti@1.21.6))(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2) + version: 7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.22.5))(@babel/plugin-transform-react-jsx@7.25.2(@babel/core@7.22.5))(eslint@9.10.0(jiti@1.21.6))(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2) fuels: specifier: workspace:* version: link:../../packages/fuels @@ -381,7 +381,7 @@ importers: version: 18.3.1(react@18.3.1) react-scripts: specifier: 5.0.1 - version: 5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.22.5))(@babel/plugin-transform-react-jsx@7.25.2(@babel/core@7.22.5))(@swc/core@1.7.14)(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.17.19)(eslint@9.10.0(jiti@1.21.6))(react@18.3.1)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2))(type-fest@3.1.0)(typescript@5.6.2)(utf-8-validate@5.0.10) + version: 5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.22.5))(@babel/plugin-transform-react-jsx@7.25.2(@babel/core@7.22.5))(@swc/core@1.7.14)(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.17.19)(eslint@9.10.0(jiti@1.21.6))(react@18.3.1)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2))(type-fest@3.1.0)(typescript@5.6.2)(utf-8-validate@5.0.10) typescript: specifier: ~5.6.2 version: 5.6.2 @@ -390,8 +390,8 @@ importers: version: 2.1.4 devDependencies: '@types/jest': - specifier: ^29.5.12 - version: 29.5.12 + specifier: ^29.5.13 + version: 29.5.13 apps/demo-react-vite: dependencies: @@ -409,8 +409,8 @@ importers: version: 18.3.1(react@18.3.1) devDependencies: '@types/react': - specifier: ^18.3.5 - version: 18.3.5 + specifier: ^18.3.6 + version: 18.3.6 '@types/react-dom': specifier: ^18.3 version: 18.3.0 @@ -422,7 +422,7 @@ importers: version: 6.21.0(eslint@8.57.0)(typescript@5.6.2) '@vitejs/plugin-react': specifier: ^4.3.1 - version: 4.3.1(vite@5.4.3(@types/node@22.5.4)(terser@5.31.6)) + version: 4.3.1(vite@5.4.5(@types/node@22.5.5)(terser@5.32.0)) eslint: specifier: ^8.57.0 version: 8.57.0 @@ -430,14 +430,14 @@ importers: specifier: ^4.6.2 version: 4.6.2(eslint@8.57.0) eslint-plugin-react-refresh: - specifier: ^0.4.11 - version: 0.4.11(eslint@8.57.0) + specifier: ^0.4.12 + version: 0.4.12(eslint@8.57.0) typescript: specifier: ~5.6.2 version: 5.6.2 vite: - specifier: ^5.4.3 - version: 5.4.3(@types/node@22.5.4)(terser@5.31.6) + specifier: ^5.4.5 + version: 5.4.5(@types/node@22.5.5)(terser@5.32.0) apps/demo-typegen: dependencies: @@ -459,7 +459,7 @@ importers: dependencies: '@fuels/connectors': specifier: ^0.27.1 - version: 0.27.1(@tanstack/query-core@5.55.4)(@types/react@18.3.5)(@wagmi/connectors@5.1.9(@types/react@18.3.5)(@wagmi/core@2.13.4(@tanstack/query-core@5.55.4)(@types/react@18.3.5)(immer@9.0.21)(react@18.3.1)(typescript@5.6.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.5)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.21.2)(typescript@5.6.2)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8))(bufferutil@4.0.8)(fuels@packages+fuels)(immer@9.0.21)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.2)(utf-8-validate@5.0.10)(vue@3.5.3(typescript@5.6.2))(zod@3.23.8) + version: 0.27.1(@tanstack/query-core@5.55.4)(@types/react@18.3.6)(@wagmi/connectors@5.1.10(@types/react@18.3.6)(@wagmi/core@2.13.5(@tanstack/query-core@5.55.4)(@types/react@18.3.6)(immer@9.0.21)(react@18.3.1)(typescript@5.6.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.6)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.21.3)(typescript@5.6.2)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8))(bufferutil@4.0.8)(fuels@packages+fuels)(immer@9.0.21)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.2)(utf-8-validate@5.0.10)(vue@3.5.6(typescript@5.6.2))(zod@3.23.8) '@fuels/react': specifier: ^0.27.1 version: 0.27.1(@tanstack/react-query@5.55.4(react@18.3.1))(@types/react-dom@18.3.0)(fuels@packages+fuels)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -470,8 +470,8 @@ importers: specifier: workspace:* version: link:../../packages/fuels next: - specifier: 14.2.9 - version: 14.2.9(@babel/core@7.25.2)(@playwright/test@1.47.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: 14.2.11 + version: 14.2.11(@babel/core@7.25.2)(@playwright/test@1.47.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: specifier: ^18.3.1 version: 18.3.1 @@ -480,11 +480,11 @@ importers: version: 18.3.1(react@18.3.1) devDependencies: '@types/node': - specifier: ^22.5.4 - version: 22.5.4 + specifier: ^22.5.5 + version: 22.5.5 '@types/react': - specifier: ^18.3.5 - version: 18.3.5 + specifier: ^18.3.6 + version: 18.3.6 '@types/react-dom': specifier: ^18.3 version: 18.3.0 @@ -492,17 +492,17 @@ importers: specifier: ^8.57.0 version: 8.57.0 eslint-config-next: - specifier: 14.2.9 - version: 14.2.9(eslint@8.57.0)(typescript@5.6.2) + specifier: 14.2.11 + version: 14.2.11(eslint@8.57.0)(typescript@5.6.2) postcss: - specifier: ^8.4.45 - version: 8.4.45 + specifier: ^8.4.47 + version: 8.4.47 postcss-load-config: specifier: ^6.0.1 - version: 6.0.1(jiti@1.21.6)(postcss@8.4.45)(tsx@4.19.0)(yaml@2.5.1) + version: 6.0.1(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(yaml@2.5.1) tailwindcss: - specifier: ^3.4.10 - version: 3.4.10(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2)) + specifier: ^3.4.11 + version: 3.4.11(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2)) typescript: specifier: ~5.6.2 version: 5.6.2 @@ -519,8 +519,8 @@ importers: specifier: workspace:* version: link:../../packages/fuels typedoc-plugin-markdown: - specifier: ^4.2.0 - version: 4.2.6(typedoc@0.26.6(typescript@5.6.2)) + specifier: ^4.2.7 + version: 4.2.7(typedoc@0.26.6(typescript@5.6.2)) devDependencies: '@types/markdown-it': specifier: ^14.1.2 @@ -548,13 +548,13 @@ importers: version: 6.0.0(typedoc@0.26.6(typescript@5.6.2)) vitepress: specifier: 1.3.4 - version: 1.3.4(@algolia/client-search@4.22.1)(@types/node@22.5.4)(@types/react@18.3.5)(axios@1.7.7)(idb-keyval@6.2.1)(postcss@8.4.45)(qrcode@1.5.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.11.0)(terser@5.31.6)(typescript@5.6.2) + version: 1.3.4(@algolia/client-search@4.22.1)(@types/node@22.5.5)(@types/react@18.3.6)(axios@1.7.7)(idb-keyval@6.2.1)(postcss@8.4.47)(qrcode@1.5.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.11.0)(terser@5.32.0)(typescript@5.6.2) vitepress-plugin-search: specifier: 1.0.4-alpha.22 - version: 1.0.4-alpha.22(flexsearch@0.7.43)(vitepress@1.3.4(@algolia/client-search@4.22.1)(@types/node@22.5.4)(@types/react@18.3.5)(axios@1.7.7)(idb-keyval@6.2.1)(postcss@8.4.45)(qrcode@1.5.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.11.0)(terser@5.31.6)(typescript@5.6.2))(vue@3.5.3(typescript@5.6.2)) + version: 1.0.4-alpha.22(flexsearch@0.7.43)(vitepress@1.3.4(@algolia/client-search@4.22.1)(@types/node@22.5.5)(@types/react@18.3.6)(axios@1.7.7)(idb-keyval@6.2.1)(postcss@8.4.47)(qrcode@1.5.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.11.0)(terser@5.32.0)(typescript@5.6.2))(vue@3.5.6(typescript@5.6.2)) vue: - specifier: ^3.5.3 - version: 3.5.3(typescript@5.6.2) + specifier: ^3.5.6 + version: 3.5.6(typescript@5.6.2) apps/docs-snippets: devDependencies: @@ -575,7 +575,7 @@ importers: version: link:../../packages/fuels vitest: specifier: ^2.0.5 - version: 2.0.5(@types/node@22.5.4)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.31.6) + version: 2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.32.0) internal/benchmarks: dependencies: @@ -715,8 +715,8 @@ importers: specifier: ^0.30.1 version: 0.30.1 rimraf: - specifier: ^5.0.8 - version: 5.0.9 + specifier: ^5.0.10 + version: 5.0.10 devDependencies: '@internal/forc': specifier: workspace:* @@ -790,7 +790,7 @@ importers: devDependencies: '@graphql-codegen/cli': specifier: ^5.0.2 - version: 5.0.2(@parcel/watcher@2.4.1)(@types/node@22.5.4)(bufferutil@4.0.8)(cosmiconfig-toml-loader@1.0.0)(enquirer@2.4.1)(graphql@16.9.0)(typescript@5.6.2)(utf-8-validate@6.0.4) + version: 5.0.2(@parcel/watcher@2.4.1)(@types/node@22.5.5)(bufferutil@4.0.8)(cosmiconfig-toml-loader@1.0.0)(enquirer@2.4.1)(graphql@16.9.0)(typescript@5.6.2)(utf-8-validate@6.0.4) '@graphql-codegen/typescript': specifier: ^4.0.9 version: 4.0.9(graphql@16.9.0) @@ -1066,8 +1066,8 @@ importers: specifier: ^3.0.2 version: 3.0.2 vite: - specifier: ^5.4.3 - version: 5.4.3(@types/node@22.5.4)(terser@5.31.6) + specifier: ^5.4.5 + version: 5.4.5(@types/node@22.5.5)(terser@5.32.0) packages/hasher: dependencies: @@ -1111,8 +1111,8 @@ importers: specifier: workspace:* version: link:../errors '@types/bn.js': - specifier: ^5.1.5 - version: 5.1.5 + specifier: ^5.1.6 + version: 5.1.6 bn.js: specifier: ^5.2.1 version: 5.2.1 @@ -1256,7 +1256,7 @@ importers: dependencies: '@fuels/connectors': specifier: ^0.27.1 - version: 0.27.1(@tanstack/query-core@5.55.4)(@types/react@18.3.5)(@wagmi/connectors@5.1.9(@types/react@18.3.5)(@wagmi/core@2.13.4(@tanstack/query-core@5.55.4)(@types/react@18.3.5)(immer@9.0.21)(react@18.3.1)(typescript@5.6.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.5)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.21.2)(typescript@5.6.2)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8))(bufferutil@4.0.8)(fuels@packages+fuels)(immer@9.0.21)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.2)(utf-8-validate@5.0.10)(vue@3.5.3(typescript@5.6.2))(zod@3.23.8) + version: 0.27.1(@tanstack/query-core@5.55.4)(@types/react@18.3.6)(@wagmi/connectors@5.1.10(@types/react@18.3.6)(@wagmi/core@2.13.5(@tanstack/query-core@5.55.4)(@types/react@18.3.6)(immer@9.0.21)(react@18.3.1)(typescript@5.6.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.6)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.21.3)(typescript@5.6.2)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8))(bufferutil@4.0.8)(fuels@packages+fuels)(immer@9.0.21)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.2)(utf-8-validate@5.0.10)(vue@3.5.6(typescript@5.6.2))(zod@3.23.8) '@fuels/react': specifier: ^0.27.1 version: 0.27.1(@tanstack/react-query@5.55.4(react@18.3.1))(@types/react-dom@18.3.0)(fuels@packages+fuels)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -1264,11 +1264,11 @@ importers: specifier: ^5.55.4 version: 5.55.4(react@18.3.1) '@wagmi/connectors': - specifier: ^5.1.9 - version: 5.1.9(@types/react@18.3.5)(@wagmi/core@2.13.4(@tanstack/query-core@5.55.4)(@types/react@18.3.5)(immer@9.0.21)(react@18.3.1)(typescript@5.6.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.5)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.21.2)(typescript@5.6.2)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) + specifier: ^5.1.10 + version: 5.1.10(@types/react@18.3.6)(@wagmi/core@2.13.5(@tanstack/query-core@5.55.4)(@types/react@18.3.6)(immer@9.0.21)(react@18.3.1)(typescript@5.6.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.6)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.21.3)(typescript@5.6.2)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) '@wagmi/core': - specifier: ^2.13.4 - version: 2.13.4(@tanstack/query-core@5.55.4)(@types/react@18.3.5)(immer@9.0.21)(react@18.3.1)(typescript@5.6.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8)) + specifier: ^2.13.5 + version: 2.13.5(@tanstack/query-core@5.55.4)(@types/react@18.3.6)(immer@9.0.21)(react@18.3.1)(typescript@5.6.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8)) dotenv: specifier: ^16.4.5 version: 16.4.5 @@ -1276,8 +1276,8 @@ importers: specifier: workspace:* version: link:../../packages/fuels next: - specifier: 14.2.9 - version: 14.2.9(@babel/core@7.25.2)(@playwright/test@1.47.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: 14.2.11 + version: 14.2.11(@babel/core@7.25.2)(@playwright/test@1.47.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: specifier: ^18.3.1 version: 18.3.1 @@ -1292,44 +1292,44 @@ importers: version: 17.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) devDependencies: '@playwright/test': - specifier: ^1.47.0 - version: 1.47.0 + specifier: ^1.47.1 + version: 1.47.1 '@types/node': - specifier: ^22.5.4 - version: 22.5.4 + specifier: ^22.5.5 + version: 22.5.5 '@types/react': - specifier: ^18.3.5 - version: 18.3.5 + specifier: ^18.3.6 + version: 18.3.6 '@types/react-dom': specifier: ^18.3 version: 18.3.0 autoprefixer: specifier: ^10.4.20 - version: 10.4.20(postcss@8.4.45) + version: 10.4.20(postcss@8.4.47) eslint: specifier: ^8.57.0 version: 8.57.0 eslint-config-next: - specifier: 14.2.9 - version: 14.2.9(eslint@8.57.0)(typescript@5.6.2) + specifier: 14.2.11 + version: 14.2.11(eslint@8.57.0)(typescript@5.6.2) postcss: - specifier: ^8.4.45 - version: 8.4.45 + specifier: ^8.4.47 + version: 8.4.47 tailwindcss: - specifier: ^3.4.10 - version: 3.4.10(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2)) + specifier: ^3.4.11 + version: 3.4.11(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2)) typescript: specifier: ~5.6.2 version: 5.6.2 vitest: specifier: ^2.0.5 - version: 2.0.5(@types/node@22.5.4)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.31.6) + version: 2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.32.0) templates/vite: dependencies: '@fuels/connectors': specifier: ^0.27.1 - version: 0.27.1(@tanstack/query-core@5.55.4)(@types/react@18.3.5)(@wagmi/connectors@5.1.9(@types/react@18.3.5)(@wagmi/core@2.13.4(@tanstack/query-core@5.55.4)(@types/react@18.3.5)(immer@9.0.21)(react@18.3.1)(typescript@5.6.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.5)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.21.2)(typescript@5.6.2)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8))(bufferutil@4.0.8)(fuels@packages+fuels)(immer@9.0.21)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.2)(utf-8-validate@5.0.10)(vue@3.5.3(typescript@5.6.2))(zod@3.23.8) + version: 0.27.1(@tanstack/query-core@5.55.4)(@types/react@18.3.6)(@wagmi/connectors@5.1.10(@types/react@18.3.6)(@wagmi/core@2.13.5(@tanstack/query-core@5.55.4)(@types/react@18.3.6)(immer@9.0.21)(react@18.3.1)(typescript@5.6.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.6)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.21.3)(typescript@5.6.2)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8))(bufferutil@4.0.8)(fuels@packages+fuels)(immer@9.0.21)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.2)(utf-8-validate@5.0.10)(vue@3.5.6(typescript@5.6.2))(zod@3.23.8) '@fuels/react': specifier: ^0.27.1 version: 0.27.1(@tanstack/react-query@5.55.4(react@18.3.1))(@types/react-dom@18.3.0)(fuels@packages+fuels)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -1340,11 +1340,11 @@ importers: specifier: ^1.56.5 version: 1.56.5(@tanstack/router-generator@1.56.4)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@wagmi/connectors': - specifier: ^5.1.9 - version: 5.1.9(@types/react@18.3.5)(@wagmi/core@2.13.4(@tanstack/query-core@5.55.4)(@types/react@18.3.5)(immer@9.0.21)(react@18.3.1)(typescript@5.6.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.5)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.21.2)(typescript@5.6.2)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) + specifier: ^5.1.10 + version: 5.1.10(@types/react@18.3.6)(@wagmi/core@2.13.5(@tanstack/query-core@5.55.4)(@types/react@18.3.6)(immer@9.0.21)(react@18.3.1)(typescript@5.6.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.6)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.21.3)(typescript@5.6.2)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) '@wagmi/core': - specifier: ^2.13.4 - version: 2.13.4(@tanstack/query-core@5.55.4)(@types/react@18.3.5)(immer@9.0.21)(react@18.3.1)(typescript@5.6.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8)) + specifier: ^2.13.5 + version: 2.13.5(@tanstack/query-core@5.55.4)(@types/react@18.3.6)(immer@9.0.21)(react@18.3.1)(typescript@5.6.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8)) dotenv: specifier: ^16.4.5 version: 16.4.5 @@ -1368,23 +1368,23 @@ importers: specifier: ^9.10.0 version: 9.10.0 '@playwright/test': - specifier: ^1.47.0 - version: 1.47.0 + specifier: ^1.47.1 + version: 1.47.1 '@tanstack/router-plugin': specifier: ^1.56.4 - version: 1.56.4(vite@5.4.3(@types/node@22.5.4)(terser@5.31.6)) + version: 1.56.4(vite@5.4.5(@types/node@22.5.5)(terser@5.32.0)) '@types/react': - specifier: ^18.3.5 - version: 18.3.5 + specifier: ^18.3.6 + version: 18.3.6 '@types/react-dom': specifier: ^18.3 version: 18.3.0 '@vitejs/plugin-react-swc': specifier: ^3.7.0 - version: 3.7.0(@swc/helpers@0.5.12)(vite@5.4.3(@types/node@22.5.4)(terser@5.31.6)) + version: 3.7.0(@swc/helpers@0.5.12)(vite@5.4.5(@types/node@22.5.5)(terser@5.32.0)) autoprefixer: specifier: ^10.4.20 - version: 10.4.20(postcss@8.4.45) + version: 10.4.20(postcss@8.4.47) eslint: specifier: ^8.57.0 version: 8.57.0 @@ -1392,17 +1392,17 @@ importers: specifier: ^4.6.2 version: 4.6.2(eslint@8.57.0) eslint-plugin-react-refresh: - specifier: ^0.4.11 - version: 0.4.11(eslint@8.57.0) + specifier: ^0.4.12 + version: 0.4.12(eslint@8.57.0) globals: specifier: ^15.9.0 version: 15.9.0 postcss: - specifier: ^8.4.45 - version: 8.4.45 + specifier: ^8.4.47 + version: 8.4.47 tailwindcss: - specifier: ^3.4.10 - version: 3.4.10(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2)) + specifier: ^3.4.11 + version: 3.4.11(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2)) typescript: specifier: ~5.6.2 version: 5.6.2 @@ -1410,11 +1410,11 @@ importers: specifier: ^8.5.0 version: 8.5.0(eslint@8.57.0)(typescript@5.6.2) vite: - specifier: ^5.4.3 - version: 5.4.3(@types/node@22.5.4)(terser@5.31.6) + specifier: ^5.4.5 + version: 5.4.5(@types/node@22.5.5)(terser@5.32.0) vitest: specifier: ^2.0.5 - version: 2.0.5(@types/node@22.5.4)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.31.6) + version: 2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.32.0) packages: @@ -2675,54 +2675,54 @@ packages: '@bundled-es-modules/tough-cookie@0.1.6': resolution: {integrity: sha512-dvMHbL464C0zI+Yqxbz6kZ5TOEp7GLW+pry/RWndAR8MJQAXZ2rPmIs8tziTZjeIyhSNZgZbCePtfSbdWqStJw==} - '@changesets/apply-release-plan@7.0.4': - resolution: {integrity: sha512-HLFwhKWayKinWAul0Vj+76jVx1Pc2v55MGPVjZ924Y/ROeSsBMFutv9heHmCUj48lJyRfOTJG5+ar+29FUky/A==} + '@changesets/apply-release-plan@7.0.5': + resolution: {integrity: sha512-1cWCk+ZshEkSVEZrm2fSj1Gz8sYvxgUL4Q78+1ZZqeqfuevPTPk033/yUZ3df8BKMohkqqHfzj0HOOrG0KtXTw==} - '@changesets/assemble-release-plan@6.0.3': - resolution: {integrity: sha512-bLNh9/Lgl1VwkjWZTq8JmRqH+hj7/Yzfz0jsQ/zJJ+FTmVqmqPj3szeKOri8O/hEM8JmHW019vh2gTO9iq5Cuw==} + '@changesets/assemble-release-plan@6.0.4': + resolution: {integrity: sha512-nqICnvmrwWj4w2x0fOhVj2QEGdlUuwVAwESrUo5HLzWMI1rE5SWfsr9ln+rDqWB6RQ2ZyaMZHUcU7/IRaUJS+Q==} '@changesets/changelog-git@0.2.0': resolution: {integrity: sha512-bHOx97iFI4OClIT35Lok3sJAwM31VbUM++gnMBV16fdbtBhgYu4dxsphBF/0AZZsyAHMrnM0yFcj5gZM1py6uQ==} - '@changesets/cli@2.27.7': - resolution: {integrity: sha512-6lr8JltiiXPIjDeYg4iM2MeePP6VN/JkmqBsVA5XRiy01hGS3y629LtSDvKcycj/w/5Eur1rEwby/MjcYS+e2A==} + '@changesets/cli@2.27.8': + resolution: {integrity: sha512-gZNyh+LdSsI82wBSHLQ3QN5J30P4uHKJ4fXgoGwQxfXwYFTJzDdvIJasZn8rYQtmKhyQuiBj4SSnLuKlxKWq4w==} hasBin: true - '@changesets/config@3.0.2': - resolution: {integrity: sha512-cdEhS4t8woKCX2M8AotcV2BOWnBp09sqICxKapgLHf9m5KdENpWjyrFNMjkLqGJtUys9U+w93OxWT0czorVDfw==} + '@changesets/config@3.0.3': + resolution: {integrity: sha512-vqgQZMyIcuIpw9nqFIpTSNyc/wgm/Lu1zKN5vECy74u95Qx/Wa9g27HdgO4NkVAaq+BGA8wUc/qvbvVNs93n6A==} '@changesets/errors@0.2.0': resolution: {integrity: sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow==} - '@changesets/get-dependents-graph@2.1.1': - resolution: {integrity: sha512-LRFjjvigBSzfnPU2n/AhFsuWR5DK++1x47aq6qZ8dzYsPtS/I5mNhIGAS68IAxh1xjO9BTtz55FwefhANZ+FCA==} + '@changesets/get-dependents-graph@2.1.2': + resolution: {integrity: sha512-sgcHRkiBY9i4zWYBwlVyAjEM9sAzs4wYVwJUdnbDLnVG3QwAaia1Mk5P8M7kraTOZN+vBET7n8KyB0YXCbFRLQ==} '@changesets/get-github-info@0.6.0': resolution: {integrity: sha512-v/TSnFVXI8vzX9/w3DU2Ol+UlTZcu3m0kXTjTT4KlAdwSvwutcByYwyYn9hwerPWfPkT2JfpoX0KgvCEi8Q/SA==} - '@changesets/get-release-plan@4.0.3': - resolution: {integrity: sha512-6PLgvOIwTSdJPTtpdcr3sLtGatT+Jr22+cQwEBJBy6wP0rjB4yJ9lv583J9fVpn1bfQlBkDa8JxbS2g/n9lIyA==} + '@changesets/get-release-plan@4.0.4': + resolution: {integrity: sha512-SicG/S67JmPTrdcc9Vpu0wSQt7IiuN0dc8iR5VScnnTVPfIaLvKmEGRvIaF0kcn8u5ZqLbormZNTO77bCEvyWw==} '@changesets/get-version-range-type@0.4.0': resolution: {integrity: sha512-hwawtob9DryoGTpixy1D3ZXbGgJu1Rhr+ySH2PvTLHvkZuQ7sRT4oQwMh0hbqZH1weAooedEjRsbrWcGLCeyVQ==} - '@changesets/git@3.0.0': - resolution: {integrity: sha512-vvhnZDHe2eiBNRFHEgMiGd2CT+164dfYyrJDhwwxTVD/OW0FUD6G7+4DIx1dNwkwjHyzisxGAU96q0sVNBns0w==} + '@changesets/git@3.0.1': + resolution: {integrity: sha512-pdgHcYBLCPcLd82aRcuO0kxCDbw/yISlOtkmwmE8Odo1L6hSiZrBOsRl84eYG7DRCab/iHnOkWqExqc4wxk2LQ==} - '@changesets/logger@0.1.0': - resolution: {integrity: sha512-pBrJm4CQm9VqFVwWnSqKEfsS2ESnwqwH+xR7jETxIErZcfd1u2zBSqrHbRHR7xjhSgep9x2PSKFKY//FAshA3g==} + '@changesets/logger@0.1.1': + resolution: {integrity: sha512-OQtR36ZlnuTxKqoW4Sv6x5YIhOmClRd5pWsjZsddYxpWs517R0HkyiefQPIytCVh4ZcC5x9XaG8KTdd5iRQUfg==} '@changesets/parse@0.4.0': resolution: {integrity: sha512-TS/9KG2CdGXS27S+QxbZXgr8uPsP4yNJYb4BC2/NeFUj80Rni3TeD2qwWmabymxmrLo7JEsytXH1FbpKTbvivw==} - '@changesets/pre@2.0.0': - resolution: {integrity: sha512-HLTNYX/A4jZxc+Sq8D1AMBsv+1qD6rmmJtjsCJa/9MSRybdxh0mjbTvE6JYZQ/ZiQ0mMlDOlGPXTm9KLTU3jyw==} + '@changesets/pre@2.0.1': + resolution: {integrity: sha512-vvBJ/If4jKM4tPz9JdY2kGOgWmCowUYOi5Ycv8dyLnEE8FgpYYUo1mgJZxcdtGGP3aG8rAQulGLyyXGSLkIMTQ==} - '@changesets/read@0.6.0': - resolution: {integrity: sha512-ZypqX8+/im1Fm98K4YcZtmLKgjs1kDQ5zHpc2U1qdtNBmZZfo/IBiG162RoP0CUF05tvp2y4IspH11PLnPxuuw==} + '@changesets/read@0.6.1': + resolution: {integrity: sha512-jYMbyXQk3nwP25nRzQQGa1nKLY0KfoOV7VLgwucI0bUO8t8ZLCr6LZmgjXsiKuRDc+5A6doKPr9w2d+FEJ55zQ==} - '@changesets/should-skip-package@0.1.0': - resolution: {integrity: sha512-FxG6Mhjw7yFStlSM7Z0Gmg3RiyQ98d/9VpQAZ3Fzr59dCOM9G6ZdYbjiSAt0XtFr9JR5U2tBaJWPjrkGGc618g==} + '@changesets/should-skip-package@0.1.1': + resolution: {integrity: sha512-H9LjLbF6mMHLtJIc/eHR9Na+MifJ3VxtgP/Y+XLn4BF7tDTEN1HNYtH6QMcjP1uxp9sjaFYmW8xqloaCi/ckTg==} '@changesets/types@4.1.0': resolution: {integrity: sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw==} @@ -2730,8 +2730,8 @@ packages: '@changesets/types@6.0.0': resolution: {integrity: sha512-b1UkfNulgKoWfqyHtzKS5fOZYSJO+77adgL7DLRDr+/7jhChN+QcHnbjiQVOz/U+Ts3PGNySq7diAItzDgugfQ==} - '@changesets/write@0.3.1': - resolution: {integrity: sha512-SyGtMXzH3qFqlHKcvFY2eX+6b0NGiFcNav8AFsYwy5l8hejOeoeTDemu5Yjmke2V5jpzY+pBvM0vCCQ3gdZpfw==} + '@changesets/write@0.3.2': + resolution: {integrity: sha512-kDxDrPNpUgsjDbWBvUo27PzKX4gqeKOlhibaOXDJA6kuBisGqNHv/HwGJrAu8U/dSf8ZEFIeHIPtvSlZI1kULw==} '@clinic/bubbleprof@10.0.0': resolution: {integrity: sha512-7Y0uYO4cz7+Y1advV891uMJLXbZMIriLsV1IHSSVJxmf8tEFm8vogKi/GdYyi4CY0D5heuqOFze/WNrv+U3LRw==} @@ -3333,6 +3333,10 @@ packages: resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + '@eslint-community/regexpp@4.11.1': + resolution: {integrity: sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + '@eslint/config-array@0.18.0': resolution: {integrity: sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -3828,10 +3832,6 @@ packages: resolution: {integrity: sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} - '@jest/types@29.5.0': - resolution: {integrity: sha512-qbu7kN6czmVRc3xWFQcAN03RAUamgppVUdXrvl1Wr3jlNF93o9mJbGcDWrwGB6ht44u7efB1qCFgVQmca24Uog==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - '@jest/types@29.6.3': resolution: {integrity: sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -4127,62 +4127,62 @@ packages: resolution: {integrity: sha512-846CWyq3Ky5rzcl8Z3S+VT3z6GQSlYD1G/dqbtANu29NUHoCO+W7tOZRK6eA6FjLHnNX0DvP1Mrt2oFBPnkxLw==} engines: {node: '>= 12.13.0'} - '@next/env@14.2.9': - resolution: {integrity: sha512-hnDAoDPMii31V0ivibI8p6b023jOF1XblWTVjsDUoZKwnZlaBtJFZKDwFqi22R8r9i6W08dThUWU7Bsh2Rg8Ww==} + '@next/env@14.2.11': + resolution: {integrity: sha512-HYsQRSIXwiNqvzzYThrBwq6RhXo3E0n8j8nQnAs8i4fCEo2Zf/3eS0IiRA8XnRg9Ha0YnpkyJZIZg1qEwemrHw==} - '@next/eslint-plugin-next@14.2.9': - resolution: {integrity: sha512-tmLXuDNfPTqoFuSfsd9Q4R96SS/UCKTPtBnnR+cKDcbh8xZU+126vZnRWH1WEpOmS4Vl2Hy/X6SPmgOGZzn+hA==} + '@next/eslint-plugin-next@14.2.11': + resolution: {integrity: sha512-7mw+xW7Y03Ph4NTCcAzYe+vu4BNjEHZUfZayyF3Y1D9RX6c5NIe25m1grHEAkyUuaqjRxOYhnCNeglOkIqLkBA==} - '@next/swc-darwin-arm64@14.2.9': - resolution: {integrity: sha512-/kfQifl3uLYi3DlwFlzCkgxe6fprJNLzzTUFknq3M5wGYicDIbdGlxUl6oHpVLJpBB/CBY3Y//gO6alz/K4NWA==} + '@next/swc-darwin-arm64@14.2.11': + resolution: {integrity: sha512-eiY9u7wEJZWp/Pga07Qy3ZmNEfALmmSS1HtsJF3y1QEyaExu7boENz11fWqDmZ3uvcyAxCMhTrA1jfVxITQW8g==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] - '@next/swc-darwin-x64@14.2.9': - resolution: {integrity: sha512-tK/RyhCmOCiXQ9IVdFrBbZOf4/1+0RSuJkebXU2uMEsusS51TjIJO4l8ZmEijH9gZa0pJClvmApRHi7JuBqsRw==} + '@next/swc-darwin-x64@14.2.11': + resolution: {integrity: sha512-lnB0zYCld4yE0IX3ANrVMmtAbziBb7MYekcmR6iE9bujmgERl6+FK+b0MBq0pl304lYe7zO4yxJus9H/Af8jbg==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] - '@next/swc-linux-arm64-gnu@14.2.9': - resolution: {integrity: sha512-tS5eqwsp2nO7mzywRUuFYmefNZsUKM/mTG3exK2jIHv9TEVklE1SByB1KMhFkqlit1PxS9YK1tV8BOV90Wpbrw==} + '@next/swc-linux-arm64-gnu@14.2.11': + resolution: {integrity: sha512-Ulo9TZVocYmUAtzvZ7FfldtwUoQY0+9z3BiXZCLSUwU2bp7GqHA7/bqrfsArDlUb2xeGwn3ZuBbKtNK8TR0A8w==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@next/swc-linux-arm64-musl@14.2.9': - resolution: {integrity: sha512-8svpeTFNAMTUMKQbEzE8qRAwl9o7mNBv7LR1bmSkQvo1oy4WrNyZbhWsldOiKrc4mZ5dfQkGYsI9T75mIFMfeA==} + '@next/swc-linux-arm64-musl@14.2.11': + resolution: {integrity: sha512-fH377DnKGyUnkWlmUpFF1T90m0dADBfK11dF8sOQkiELF9M+YwDRCGe8ZyDzvQcUd20Rr5U7vpZRrAxKwd3Rzg==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@next/swc-linux-x64-gnu@14.2.9': - resolution: {integrity: sha512-0HNulLWpKTB7H5BhHCkEhcRAnWUHeAYCftrrGw3QC18+ZywTdAoPv/zEqKy/0adqt+ks4JDdlgSQ1lNKOKjo0A==} + '@next/swc-linux-x64-gnu@14.2.11': + resolution: {integrity: sha512-a0TH4ZZp4NS0LgXP/488kgvWelNpwfgGTUCDXVhPGH6pInb7yIYNgM4kmNWOxBFt+TIuOH6Pi9NnGG4XWFUyXQ==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@next/swc-linux-x64-musl@14.2.9': - resolution: {integrity: sha512-hhVFViPHLAVUJRNtwwm609p9ozWajOmRvzOZzzKXgiVGwx/CALxlMUeh+M+e0Zj6orENhWLZeilOPHpptuENsA==} + '@next/swc-linux-x64-musl@14.2.11': + resolution: {integrity: sha512-DYYZcO4Uir2gZxA4D2JcOAKVs8ZxbOFYPpXSVIgeoQbREbeEHxysVsg3nY4FrQy51e5opxt5mOHl/LzIyZBoKA==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@next/swc-win32-arm64-msvc@14.2.9': - resolution: {integrity: sha512-p/v6XlOdrk06xfN9z4evLNBqftVQUWiyduQczCwSj7hNh8fWTbzdVxsEiNOcajMXJbQiaX/ZzZdFgKVmmJnnGQ==} + '@next/swc-win32-arm64-msvc@14.2.11': + resolution: {integrity: sha512-PwqHeKG3/kKfPpM6of1B9UJ+Er6ySUy59PeFu0Un0LBzJTRKKAg2V6J60Yqzp99m55mLa+YTbU6xj61ImTv9mg==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] - '@next/swc-win32-ia32-msvc@14.2.9': - resolution: {integrity: sha512-IcW9dynWDjMK/0M05E3zopbRen7v0/yEaMZbHFOSS1J/w+8YG3jKywOGZWNp/eCUVtUUXs0PW+7Lpz8uLu+KQA==} + '@next/swc-win32-ia32-msvc@14.2.11': + resolution: {integrity: sha512-0U7PWMnOYIvM74GY6rbH6w7v+vNPDVH1gUhlwHpfInJnNe5LkmUZqhp7FNWeNa5wbVgRcRi1F1cyxp4dmeLLvA==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] - '@next/swc-win32-x64-msvc@14.2.9': - resolution: {integrity: sha512-gcbpoXyWZdVOBgNa5BRzynrL5UR1nb2ZT38yKgnphYU9UHjeecnylMHntrQiMg/QtONDcJPFC/PmsS47xIRYoA==} + '@next/swc-win32-x64-msvc@14.2.11': + resolution: {integrity: sha512-gQpS7mcgovWoaTG1FbS5/ojF7CGfql1Q0ZLsMrhcsi2Sr9HEqsUZ70MPJyaYBXbk6iEAP7UXMD9HC8KY1qNwvA==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -4278,43 +4278,43 @@ packages: '@open-draft/until@2.1.0': resolution: {integrity: sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==} - '@oven/bun-darwin-aarch64@1.1.26': - resolution: {integrity: sha512-E8/3i0RIvsIWS+kyeIlbwBh+4qB5DsQIfcO6xr4p3t7tEzvRWnrFkJrbJthru/eB1UsVV9PJ/hsxTrp3m3za4A==} + '@oven/bun-darwin-aarch64@1.1.27': + resolution: {integrity: sha512-h5Mf2+AESEtHHGRdSDQgDU7TY2vMPMeAuwkf/XPMDpaS+EoIUFayj1CXShB25gT16uw/ww/Pl3LaN0sN0tcWhQ==} cpu: [arm64] os: [darwin] - '@oven/bun-darwin-x64-baseline@1.1.26': - resolution: {integrity: sha512-36HQlQfbrwP//xOS5VFN9AR/iH6BDQo3y8j5282DmRO+h6jylwlg+2+Sfz+1uXDOLDQWCbnNv3Mpl8+Ltso6cQ==} + '@oven/bun-darwin-x64-baseline@1.1.27': + resolution: {integrity: sha512-Ld+FBW3VUzGOI9QhsQKnaiYinGcOQg83NpagoeyMASozFJEMyDEr/jxA5KxoSEJRChQrGZowq/7IfoPIcJZIUA==} cpu: [x64] os: [darwin] - '@oven/bun-darwin-x64@1.1.26': - resolution: {integrity: sha512-ENRAAGBr2zh0VfETZXqcNPO3ZnnKDX3U6E/oWY+J70uWa9dJqRlRaj1oLB63AGoYJBNdhEcsSmTAk7toCJ+PGQ==} + '@oven/bun-darwin-x64@1.1.27': + resolution: {integrity: sha512-l+uAcE0kh4+c2VUwKvSpsHFQbzR2eLxGKhONa4AJBNVW4UXIpSdH12Qj9fG4Xqgq7s26zs32jPsl2C2NQsmRag==} cpu: [x64] os: [darwin] - '@oven/bun-linux-aarch64@1.1.26': - resolution: {integrity: sha512-MqE/ClaEMW6B5i5UIYJnHbadWLt6QQQHV3NBlXd78Mhx1OiZY0YmARQmAItPUp9mxIEgGuA2QyrKvgGD3pzWPQ==} + '@oven/bun-linux-aarch64@1.1.27': + resolution: {integrity: sha512-4oaNlx07SFxhO26Lm2cfRjozEQX/qRoWFhnz+EFLlGPUPLB2cNmXCVMtmXJep0u4Jub5pGK9yISwNT1voZ6KMg==} cpu: [arm64] os: [linux] - '@oven/bun-linux-x64-baseline@1.1.26': - resolution: {integrity: sha512-jQeSLodwfQu5pG529jYG73VSFq26hdrTspxo9E/1B1WvwKrs2Vtz3w32zv+JWH+gvZqc28A/yK6pAmzQMiscNg==} + '@oven/bun-linux-x64-baseline@1.1.27': + resolution: {integrity: sha512-495DOwgzpr/0ta/AaSRYb7EJeAEAf38cBOUO6oJzCxT5NdWRbZeAo5bmqcrBke1AexnKPA7RUN9Z5+t1TvqjtQ==} cpu: [x64] os: [linux] - '@oven/bun-linux-x64@1.1.26': - resolution: {integrity: sha512-sD/ZegJpnBg93qsKsiGnJgTROc68CWONwZpvtL65cBROLBqKb965ofhPUaM5oV8HckfaTDmT37cks59hG+tHvw==} + '@oven/bun-linux-x64@1.1.27': + resolution: {integrity: sha512-ktplW245+ke0GIKdBEzZisZ4mwAqdPYmW3RzhDPGB7193jVmaAE1YVUscrWkTAdfl6YMGb99IXThrhcXSddeAw==} cpu: [x64] os: [linux] - '@oven/bun-windows-x64-baseline@1.1.26': - resolution: {integrity: sha512-qb593xu9WIKBCHd47z7ZaZTC9h8r4T6qDbBV/XGLhxdZEJb24ePWdhW8WoHxa9hsATio9SByozqwblXb2tJncw==} + '@oven/bun-windows-x64-baseline@1.1.27': + resolution: {integrity: sha512-Qfn80kb9eDZaecCVVVxFpNfuHvo7h4yQlh278u9Vs0vSrHTYG4dxoH4SWkZSzHa44ZwKRpa1TmMfDVhX/HE+mA==} cpu: [x64] os: [win32] - '@oven/bun-windows-x64@1.1.26': - resolution: {integrity: sha512-EkyW6JYnZPFxD9XsdEDqFxVCnWnAoyacUAiOEUYAiz8LsnbHLMlOfbdw7KYzvm7UPFoEkUZKD78eSdpg6q6c+Q==} + '@oven/bun-windows-x64@1.1.27': + resolution: {integrity: sha512-LIZRqlyLpMEkmbsA+d/GmQnEdJzMGlFRlVtdQnyjTskW+uMv+lBHmWu7CkdcCCVPtf6wRDYgdkjpQOAw1wle5g==} cpu: [x64] os: [win32] @@ -4419,8 +4419,8 @@ packages: resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} - '@playwright/test@1.47.0': - resolution: {integrity: sha512-SgAdlSwYVpToI4e/IH19IHHWvoijAYH5hu2MWSXptRypLSnzj51PcGD+rsOXFayde4P9ZLi+loXVwArg6IUkCA==} + '@playwright/test@1.47.1': + resolution: {integrity: sha512-dbWpcNQZ5nj16m+A5UNScYx7HX5trIy7g4phrcitn+Nk83S32EBX/CLU4hiF4RGKX/yRc93AAqtfaXB7JWBd4Q==} engines: {node: '>=18'} hasBin: true @@ -4774,83 +4774,83 @@ packages: rollup: optional: true - '@rollup/rollup-android-arm-eabi@4.21.2': - resolution: {integrity: sha512-fSuPrt0ZO8uXeS+xP3b+yYTCBUd05MoSp2N/MFOgjhhUhMmchXlpTQrTpI8T+YAwAQuK7MafsCOxW7VrPMrJcg==} + '@rollup/rollup-android-arm-eabi@4.21.3': + resolution: {integrity: sha512-MmKSfaB9GX+zXl6E8z4koOr/xU63AMVleLEa64v7R0QF/ZloMs5vcD1sHgM64GXXS1csaJutG+ddtzcueI/BLg==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.21.2': - resolution: {integrity: sha512-xGU5ZQmPlsjQS6tzTTGwMsnKUtu0WVbl0hYpTPauvbRAnmIvpInhJtgjj3mcuJpEiuUw4v1s4BimkdfDWlh7gA==} + '@rollup/rollup-android-arm64@4.21.3': + resolution: {integrity: sha512-zrt8ecH07PE3sB4jPOggweBjJMzI1JG5xI2DIsUbkA+7K+Gkjys6eV7i9pOenNSDJH3eOr/jLb/PzqtmdwDq5g==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.21.2': - resolution: {integrity: sha512-99AhQ3/ZMxU7jw34Sq8brzXqWH/bMnf7ZVhvLk9QU2cOepbQSVTns6qoErJmSiAvU3InRqC2RRZ5ovh1KN0d0Q==} + '@rollup/rollup-darwin-arm64@4.21.3': + resolution: {integrity: sha512-P0UxIOrKNBFTQaXTxOH4RxuEBVCgEA5UTNV6Yz7z9QHnUJ7eLX9reOd/NYMO3+XZO2cco19mXTxDMXxit4R/eQ==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.21.2': - resolution: {integrity: sha512-ZbRaUvw2iN/y37x6dY50D8m2BnDbBjlnMPotDi/qITMJ4sIxNY33HArjikDyakhSv0+ybdUxhWxE6kTI4oX26w==} + '@rollup/rollup-darwin-x64@4.21.3': + resolution: {integrity: sha512-L1M0vKGO5ASKntqtsFEjTq/fD91vAqnzeaF6sfNAy55aD+Hi2pBI5DKwCO+UNDQHWsDViJLqshxOahXyLSh3EA==} cpu: [x64] os: [darwin] - '@rollup/rollup-linux-arm-gnueabihf@4.21.2': - resolution: {integrity: sha512-ztRJJMiE8nnU1YFcdbd9BcH6bGWG1z+jP+IPW2oDUAPxPjo9dverIOyXz76m6IPA6udEL12reYeLojzW2cYL7w==} + '@rollup/rollup-linux-arm-gnueabihf@4.21.3': + resolution: {integrity: sha512-btVgIsCjuYFKUjopPoWiDqmoUXQDiW2A4C3Mtmp5vACm7/GnyuprqIDPNczeyR5W8rTXEbkmrJux7cJmD99D2g==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.21.2': - resolution: {integrity: sha512-flOcGHDZajGKYpLV0JNc0VFH361M7rnV1ee+NTeC/BQQ1/0pllYcFmxpagltANYt8FYf9+kL6RSk80Ziwyhr7w==} + '@rollup/rollup-linux-arm-musleabihf@4.21.3': + resolution: {integrity: sha512-zmjbSphplZlau6ZTkxd3+NMtE4UKVy7U4aVFMmHcgO5CUbw17ZP6QCgyxhzGaU/wFFdTfiojjbLG3/0p9HhAqA==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.21.2': - resolution: {integrity: sha512-69CF19Kp3TdMopyteO/LJbWufOzqqXzkrv4L2sP8kfMaAQ6iwky7NoXTp7bD6/irKgknDKM0P9E/1l5XxVQAhw==} + '@rollup/rollup-linux-arm64-gnu@4.21.3': + resolution: {integrity: sha512-nSZfcZtAnQPRZmUkUQwZq2OjQciR6tEoJaZVFvLHsj0MF6QhNMg0fQ6mUOsiCUpTqxTx0/O6gX0V/nYc7LrgPw==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.21.2': - resolution: {integrity: sha512-48pD/fJkTiHAZTnZwR0VzHrao70/4MlzJrq0ZsILjLW/Ab/1XlVUStYyGt7tdyIiVSlGZbnliqmult/QGA2O2w==} + '@rollup/rollup-linux-arm64-musl@4.21.3': + resolution: {integrity: sha512-MnvSPGO8KJXIMGlQDYfvYS3IosFN2rKsvxRpPO2l2cum+Z3exiExLwVU+GExL96pn8IP+GdH8Tz70EpBhO0sIQ==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-powerpc64le-gnu@4.21.2': - resolution: {integrity: sha512-cZdyuInj0ofc7mAQpKcPR2a2iu4YM4FQfuUzCVA2u4HI95lCwzjoPtdWjdpDKyHxI0UO82bLDoOaLfpZ/wviyQ==} + '@rollup/rollup-linux-powerpc64le-gnu@4.21.3': + resolution: {integrity: sha512-+W+p/9QNDr2vE2AXU0qIy0qQE75E8RTwTwgqS2G5CRQ11vzq0tbnfBd6brWhS9bCRjAjepJe2fvvkvS3dno+iw==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.21.2': - resolution: {integrity: sha512-RL56JMT6NwQ0lXIQmMIWr1SW28z4E4pOhRRNqwWZeXpRlykRIlEpSWdsgNWJbYBEWD84eocjSGDu/XxbYeCmwg==} + '@rollup/rollup-linux-riscv64-gnu@4.21.3': + resolution: {integrity: sha512-yXH6K6KfqGXaxHrtr+Uoy+JpNlUlI46BKVyonGiaD74ravdnF9BUNC+vV+SIuB96hUMGShhKV693rF9QDfO6nQ==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.21.2': - resolution: {integrity: sha512-PMxkrWS9z38bCr3rWvDFVGD6sFeZJw4iQlhrup7ReGmfn7Oukrr/zweLhYX6v2/8J6Cep9IEA/SmjXjCmSbrMQ==} + '@rollup/rollup-linux-s390x-gnu@4.21.3': + resolution: {integrity: sha512-R8cwY9wcnApN/KDYWTH4gV/ypvy9yZUHlbJvfaiXSB48JO3KpwSpjOGqO4jnGkLDSk1hgjYkTbTt6Q7uvPf8eg==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.21.2': - resolution: {integrity: sha512-B90tYAUoLhU22olrafY3JQCFLnT3NglazdwkHyxNDYF/zAxJt5fJUB/yBoWFoIQ7SQj+KLe3iL4BhOMa9fzgpw==} + '@rollup/rollup-linux-x64-gnu@4.21.3': + resolution: {integrity: sha512-kZPbX/NOPh0vhS5sI+dR8L1bU2cSO9FgxwM8r7wHzGydzfSjLRCFAT87GR5U9scj2rhzN3JPYVC7NoBbl4FZ0g==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.21.2': - resolution: {integrity: sha512-7twFizNXudESmC9oneLGIUmoHiiLppz/Xs5uJQ4ShvE6234K0VB1/aJYU3f/4g7PhssLGKBVCC37uRkkOi8wjg==} + '@rollup/rollup-linux-x64-musl@4.21.3': + resolution: {integrity: sha512-S0Yq+xA1VEH66uiMNhijsWAafffydd2X5b77eLHfRmfLsRSpbiAWiRHV6DEpz6aOToPsgid7TI9rGd6zB1rhbg==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.21.2': - resolution: {integrity: sha512-9rRero0E7qTeYf6+rFh3AErTNU1VCQg2mn7CQcI44vNUWM9Ze7MSRS/9RFuSsox+vstRt97+x3sOhEey024FRQ==} + '@rollup/rollup-win32-arm64-msvc@4.21.3': + resolution: {integrity: sha512-9isNzeL34yquCPyerog+IMCNxKR8XYmGd0tHSV+OVx0TmE0aJOo9uw4fZfUuk2qxobP5sug6vNdZR6u7Mw7Q+Q==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.21.2': - resolution: {integrity: sha512-5rA4vjlqgrpbFVVHX3qkrCo/fZTj1q0Xxpg+Z7yIo3J2AilW7t2+n6Q8Jrx+4MrYpAnjttTYF8rr7bP46BPzRw==} + '@rollup/rollup-win32-ia32-msvc@4.21.3': + resolution: {integrity: sha512-nMIdKnfZfzn1Vsk+RuOvl43ONTZXoAPUUxgcU0tXooqg4YrAqzfKzVenqqk2g5efWh46/D28cKFrOzDSW28gTA==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.21.2': - resolution: {integrity: sha512-6UUxd0+SKomjdzuAcp+HAmxw1FlGBnl1v2yEPSabtx4lBfdXHDVsW7+lQkgz9cNFJGY3AWR7+V8P5BqkD9L9nA==} + '@rollup/rollup-win32-x64-msvc@4.21.3': + resolution: {integrity: sha512-fOvu7PCQjAj4eWDEuD8Xz5gpzFqXzGlxHZozHP4b9Jxv9APtdxL6STqztDzMLuRXEc4UpXGGhx029Xgm91QBeA==} cpu: [x64] os: [win32] @@ -5374,8 +5374,8 @@ packages: '@types/babel__traverse@7.20.6': resolution: {integrity: sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==} - '@types/bn.js@5.1.5': - resolution: {integrity: sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A==} + '@types/bn.js@5.1.6': + resolution: {integrity: sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==} '@types/body-parser@1.19.2': resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} @@ -5461,8 +5461,8 @@ packages: '@types/istanbul-reports@3.0.4': resolution: {integrity: sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==} - '@types/jest@29.5.12': - resolution: {integrity: sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==} + '@types/jest@29.5.13': + resolution: {integrity: sha512-wd+MVEZCHt23V0/L642O5APvspWply/rGY5BcW4SUETo2UzPU3Z26qr8jC2qxpimI2jjx9h7+2cj2FwIr01bXg==} '@types/js-cookie@2.2.7': resolution: {integrity: sha512-aLkWa0C0vO5b4Sr798E26QgOkss68Un0bLjs7u9qxzPT5CG+8DuNTffWES58YzJs3hrVAOs1wonycqEBqNJubA==} @@ -5539,11 +5539,8 @@ packages: '@types/node@20.16.5': resolution: {integrity: sha512-VwYCweNo3ERajwy0IUlqqcyZ8/A7Zwa9ZP3MnENWcB11AejO+tLy3pu850goUW2FC/IJMdZUfKpX/yxL1gymCA==} - '@types/node@22.5.2': - resolution: {integrity: sha512-acJsPTEqYqulZS/Yp/S3GgeE6GZ0qYODUR8aVr/DkhHQ8l9nd4j5x1/ZJy9/gHrRlFMqkO6i0I3E27Alu4jjPg==} - - '@types/node@22.5.4': - resolution: {integrity: sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg==} + '@types/node@22.5.5': + resolution: {integrity: sha512-Xjs4y5UPO/CLdzpgR6GirZJx36yScjh73+2NlLlkFRSoQN8B0DpfXPdZGnvVmLRLOsqDpOfTNv7D9trgGhmOIA==} '@types/offscreencanvas@2019.3.0': resolution: {integrity: sha512-esIJx9bQg+QYF0ra8GnvfianIY8qWB0GBx54PK5Eps6m+xTj86KLavHv6qDhzKcu5UUOgNfJ2pWaIIV7TRUd9Q==} @@ -5578,8 +5575,8 @@ packages: '@types/react@18.3.1': resolution: {integrity: sha512-V0kuGBX3+prX+DQ/7r2qsv1NsdfnCLnTgnRJ1pYnxykBhGMz+qj+box5lq7XsO5mtZsBqpjwwTu/7wszPfMBcw==} - '@types/react@18.3.5': - resolution: {integrity: sha512-WeqMfGJLGuLCqHGYRGHxnKrXcTitc6L/nBUWfWPcTarG3t9PsquqUMuVeXZeca+mglY4Vo5GZjCi0A3Or2lnxA==} + '@types/react@18.3.6': + resolution: {integrity: sha512-CnGaRYNu2iZlkGXGrOYtdg5mLK8neySj0woZ4e2wF/eli2E6Sazmq5X+Nrj6OBrrFVQfJWTUFeqAzoRhWQXYvg==} '@types/resolve@0.0.8': resolution: {integrity: sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==} @@ -5602,8 +5599,8 @@ packages: '@types/seedrandom@2.4.34': resolution: {integrity: sha512-ytDiArvrn/3Xk6/vtylys5tlY6eo7Ane0hvcx++TKo6RxQXuVfW0AF/oeWqAj9dN29SyhtawuXstgmPlwNcv/A==} - '@types/semver@7.5.4': - resolution: {integrity: sha512-MMzuxN3GdFwskAnb6fz0orFvhfqi752yjaXylr0Rp4oDg5H0Zn1IuyRhDVvYOwAXoJirx2xuS16I3WjxnAIHiQ==} + '@types/semver@7.5.8': + resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} '@types/send@0.17.1': resolution: {integrity: sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==} @@ -5620,9 +5617,6 @@ packages: '@types/sockjs@0.3.33': resolution: {integrity: sha512-f0KEEe05NvUnat+boPTZ0dgaLZ4SfSouXUgv5noUiefG2ajgKjmETo9ZJyuqsl7dfl2aHlLJUiki6B4ZYldiiw==} - '@types/stack-utils@2.0.1': - resolution: {integrity: sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==} - '@types/stack-utils@2.0.3': resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==} @@ -5653,8 +5647,8 @@ packages: '@types/web-bluetooth@0.0.20': resolution: {integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==} - '@types/web@0.0.159': - resolution: {integrity: sha512-BHPaU+yHqHOrua8iFksPmgLCXEt1LE/2sPB+MPTRuxDFm4z6gBgmDiXUCGleyHiOLT6R+fklgR99hq/iFGVO1w==} + '@types/web@0.0.163': + resolution: {integrity: sha512-5Pg2gKfulo186wFnv+YXx0luJGWQ94cCY2/Dy8lU5WAE50FdBoOK45uBbp8FceOSpLJ4UW3dmTW5tvsN9uuX7A==} '@types/webgl-ext@0.0.30': resolution: {integrity: sha512-LKVgNmBxN0BbljJrVUwkxwRYqzsAEPcZOe6S2T6ZaBDIrFp0qu4FNlpc5sM1tGbXUYFgdVQIoeLk1Y1UoblyEg==} @@ -5960,17 +5954,17 @@ packages: '@vitest/utils@2.0.5': resolution: {integrity: sha512-d8HKbqIcya+GR67mkZbrzhS5kKhtp8dQLcmRZLGTscGVg7yImT82cIrhtn2L8+VujWcy6KZweApgNmPsTAO/UQ==} - '@vue/compiler-core@3.5.3': - resolution: {integrity: sha512-adAfy9boPkP233NTyvLbGEqVuIfK/R0ZsBsIOW4BZNfb4BRpRW41Do1u+ozJpsb+mdoy80O20IzAsHaihRb5qA==} + '@vue/compiler-core@3.5.6': + resolution: {integrity: sha512-r+gNu6K4lrvaQLQGmf+1gc41p3FO2OUJyWmNqaIITaJU6YFiV5PtQSFZt8jfztYyARwqhoCayjprC7KMvT3nRA==} - '@vue/compiler-dom@3.5.3': - resolution: {integrity: sha512-wnzFArg9zpvk/811CDOZOadJRugf1Bgl/TQ3RfV4nKfSPok4hi0w10ziYUQR6LnnBAUlEXYLUfZ71Oj9ds/+QA==} + '@vue/compiler-dom@3.5.6': + resolution: {integrity: sha512-xRXqxDrIqK8v8sSScpistyYH0qYqxakpsIvqMD2e5sV/PXQ1mTwtXp4k42yHK06KXxKSmitop9e45Ui/3BrTEw==} - '@vue/compiler-sfc@3.5.3': - resolution: {integrity: sha512-P3uATLny2tfyvMB04OQFe7Sczteno7SLFxwrOA/dw01pBWQHB5HL15a8PosoNX2aG/EAMGqnXTu+1LnmzFhpTQ==} + '@vue/compiler-sfc@3.5.6': + resolution: {integrity: sha512-pjWJ8Kj9TDHlbF5LywjVso+BIxCY5wVOLhkEXRhuCHDxPFIeX1zaFefKs8RYoHvkSMqRWt93a0f2gNJVJixHwg==} - '@vue/compiler-ssr@3.5.3': - resolution: {integrity: sha512-F/5f+r2WzL/2YAPl7UlKcJWHrvoZN8XwEBLnT7S4BXwncH25iDOabhO2M2DWioyTguJAGavDOawejkFXj8EM1w==} + '@vue/compiler-ssr@3.5.6': + resolution: {integrity: sha512-VpWbaZrEOCqnmqjE83xdwegtr5qO/2OPUC6veWgvNqTJ3bYysz6vY3VqMuOijubuUYPRpG3OOKIh9TD0Stxb9A==} '@vue/devtools-api@6.6.3': resolution: {integrity: sha512-0MiMsFma/HqA6g3KLKn+AGpL1kgKhFWszC9U29NfpWK5LE7bjeXxySWJrOJ77hBz+TBrBQ7o4QJqbPbqbs8rJw==} @@ -5984,25 +5978,25 @@ packages: '@vue/devtools-shared@7.3.8': resolution: {integrity: sha512-1NiJbn7Yp47nPDWhFZyEKpB2+5/+7JYv8IQnU0ccMrgslPR2dL7u1DIyI7mLqy4HN1ll36gQy0k8GqBYSFgZJw==} - '@vue/reactivity@3.5.3': - resolution: {integrity: sha512-2w61UnRWTP7+rj1H/j6FH706gRBHdFVpIqEkSDAyIpafBXYH8xt4gttstbbCWdU3OlcSWO8/3mbKl/93/HSMpw==} + '@vue/reactivity@3.5.6': + resolution: {integrity: sha512-shZ+KtBoHna5GyUxWfoFVBCVd7k56m6lGhk5e+J9AKjheHF6yob5eukssHRI+rzvHBiU1sWs/1ZhNbLExc5oYQ==} - '@vue/runtime-core@3.5.3': - resolution: {integrity: sha512-5b2AQw5OZlmCzSsSBWYoZOsy75N4UdMWenTfDdI5bAzXnuVR7iR8Q4AOzQm2OGoA41xjk53VQKrqQhOz2ktWaw==} + '@vue/runtime-core@3.5.6': + resolution: {integrity: sha512-FpFULR6+c2lI+m1fIGONLDqPQO34jxV8g6A4wBOgne8eSRHP6PQL27+kWFIx5wNhhjkO7B4rgtsHAmWv7qKvbg==} - '@vue/runtime-dom@3.5.3': - resolution: {integrity: sha512-wPR1DEGc3XnQ7yHbmkTt3GoY0cEnVGQnARRdAkDzZ8MbUKEs26gogCQo6AOvvgahfjIcnvWJzkZArQ1fmWjcSg==} + '@vue/runtime-dom@3.5.6': + resolution: {integrity: sha512-SDPseWre45G38ENH2zXRAHL1dw/rr5qp91lS4lt/nHvMr0MhsbCbihGAWLXNB/6VfFOJe2O+RBRkXU+CJF7/sw==} - '@vue/server-renderer@3.5.3': - resolution: {integrity: sha512-28volmaZVG2PGO3V3+gBPKoSHvLlE8FGfG/GKXKkjjfxLuj/50B/0OQGakM/g6ehQeqCrZYM4eHC4Ks48eig1Q==} + '@vue/server-renderer@3.5.6': + resolution: {integrity: sha512-zivnxQnOnwEXVaT9CstJ64rZFXMS5ZkKxCjDQKiMSvUhXRzFLWZVbaBiNF4HGDqGNNsTgmjcCSmU6TB/0OOxLA==} peerDependencies: - vue: 3.5.3 + vue: 3.5.6 '@vue/shared@3.4.38': resolution: {integrity: sha512-q0xCiLkuWWQLzVrecPb0RMsNWyxICOjPrcrwxTUEHb1fsnvni4dcuyG7RT/Ie7VPTvnjzIaWzRMUBsrqNj/hhw==} - '@vue/shared@3.5.3': - resolution: {integrity: sha512-Jp2v8nylKBT+PlOUjun2Wp/f++TfJVFjshLzNtJDdmFJabJa7noGMncqXRM1vXGX+Yo2V7WykQFNxusSim8SCA==} + '@vue/shared@3.5.6': + resolution: {integrity: sha512-eidH0HInnL39z6wAt6SFIwBrvGOpDWsDxlw3rCgo1B+CQ1781WzQUSU3YjxgdkcJo9Q8S6LmXTkvI+cLHGkQfA==} '@vueuse/core@11.0.0': resolution: {integrity: sha512-shibzNGjmRjZucEm97B8V0NO5J3vPHMCE/mltxQ3vHezbDoFQBMtK11XsfwfPionxSbo+buqPmsCljtYuXIBpw==} @@ -6054,10 +6048,10 @@ packages: '@vueuse/shared@11.0.0': resolution: {integrity: sha512-i4ZmOrIEjSsL94uAEt3hz88UCz93fMyP/fba9S+vypX90fKg3uYX9cThqvWc9aXxuTzR0UGhOKOTQd//Goh1nQ==} - '@wagmi/connectors@5.1.9': - resolution: {integrity: sha512-e0UNVuTmHFHfMZmTx0BOTLe/db74SdYT7Z90HwKV3kKDfggvDNqr1RKljvuNvx2pq4bRmgO2sAS1I0N5kMkwVQ==} + '@wagmi/connectors@5.1.10': + resolution: {integrity: sha512-ybgKV09PIhgUgQ4atXTs2KOy4Hevd6f972SXfx6HTgsnFXlzxzN6o0aWjhavZOYjvx5tjuL3+8Mgqo0R7uP5Cg==} peerDependencies: - '@wagmi/core': 2.13.4 + '@wagmi/core': 2.13.5 typescript: '>=5.0.4' viem: 2.x peerDependenciesMeta: @@ -6076,6 +6070,18 @@ packages: typescript: optional: true + '@wagmi/core@2.13.5': + resolution: {integrity: sha512-lvX/hApJTSA/H2kOklokjIYiUpnT8CpBH80GeOiKxU0CGK1wNHTu20GRTCy0GF1t7jkNwPSG3m0SmnXmgYMmHw==} + peerDependencies: + '@tanstack/query-core': '>=5.0.0' + typescript: '>=5.0.4' + viem: 2.x + peerDependenciesMeta: + '@tanstack/query-core': + optional: true + typescript: + optional: true + '@wallet-standard/base@1.0.1': resolution: {integrity: sha512-1To3ekMfzhYxe0Yhkpri+Fedq0SYcfrOfJi3vbLjMwF2qiKPjTGLwZkf2C9ftdQmxES+hmxhBzTwF4KgcOwf8w==} engines: {node: '>=16'} @@ -6097,12 +6103,8 @@ packages: '@walletconnect/core@2.13.0': resolution: {integrity: sha512-blDuZxQenjeXcVJvHxPznTNl6c/2DO4VNrFnus+qHmO6OtT5lZRowdMtlCaCNb1q0OxzgrmBDcTOCbFcCpio/g==} - '@walletconnect/core@2.15.2': - resolution: {integrity: sha512-u4BGuazSNAQ48QBY7EphanBuBN6EJWyD5MXi83n1wXwfPQWAu0XNvmOjjF+xmMI5TsYH9N6Y78O6HP/VX9EOvg==} - engines: {node: '>=18'} - - '@walletconnect/core@2.15.3': - resolution: {integrity: sha512-W1syg0sVTlO9C4XSc1aEI6W7FzK0eydXxUBhCRF2IgiZkTlVQArS4bR6ArVDNWWzmXm1fN4Tr040fw11y4zXTw==} + '@walletconnect/core@2.16.1': + resolution: {integrity: sha512-UlsnEMT5wwFvmxEjX8s4oju7R3zadxNbZgsFeHEsjh7uknY2zgmUe1Lfc5XU6zyPb1Jx7Nqpdx1KN485ee8ogw==} engines: {node: '>=18'} '@walletconnect/environment@1.0.1': @@ -6111,8 +6113,8 @@ packages: '@walletconnect/ethereum-provider@2.13.0': resolution: {integrity: sha512-dnpW8mmLpWl1AZUYGYZpaAfGw1HFkL0WSlhk5xekx3IJJKn4pLacX2QeIOo0iNkzNQxZfux1AK4Grl1DvtzZEA==} - '@walletconnect/ethereum-provider@2.15.3': - resolution: {integrity: sha512-dzJQp0OZC+TZqKEoLvpy6NdhOFXAD8Oyz3OYZmWwYEaw+R7P2lbXRbYV22fTKyewLYVtNb/P+HJfwmVaiEdp0w==} + '@walletconnect/ethereum-provider@2.16.1': + resolution: {integrity: sha512-oD7DNCssUX3plS5gGUZ9JQ63muQB/vxO68X6RzD2wd8gBsYtSPw4BqYFc7KTO6dUizD6gfPirw32yW2pTvy92w==} '@walletconnect/events@1.0.1': resolution: {integrity: sha512-NPTqaoi0oPBVNuLv7qPaJazmGHs5JGyO8eEAk5VGKmJzDR7AHzD4k6ilox5kxk1iwiOnFopBOOMLs86Oa76HpQ==} @@ -6193,11 +6195,8 @@ packages: '@walletconnect/sign-client@2.13.0': resolution: {integrity: sha512-En7KSvNUlQFx20IsYGsFgkNJ2lpvDvRsSFOT5PTdGskwCkUfOpB33SQJ6nCrN19gyoKPNvWg80Cy6MJI0TjNYA==} - '@walletconnect/sign-client@2.15.2': - resolution: {integrity: sha512-Yp4/z3IdTMngbjr7Zy7Qi1X6EZDH4nxY91X6K2KpA3MjLW0yPTGalEJgJ4p9WH7fmHRlwvfR4hjwM5eQcLo5Zg==} - - '@walletconnect/sign-client@2.15.3': - resolution: {integrity: sha512-JVArnlCMW1OC9LuzW31HdneioUIqQ7nSTPiXyvSe7QhuQOo+ltNRdunk/A3TD795Y9nALCHPm9z6EexFHHmIpA==} + '@walletconnect/sign-client@2.16.1': + resolution: {integrity: sha512-s2Tx2n2duxt+sHtuWXrN9yZVaHaYqcEcjwlTD+55/vs5NUPlISf+fFmZLwSeX1kUlrSBrAuxPUcqQuRTKcjLOA==} '@walletconnect/time@1.0.2': resolution: {integrity: sha512-uzdd9woDcJ1AaBZRhqy5rNC9laqWGErfc4dxA9a87mPdKOgWMD85mcFo9dIYIts/Jwocfwn07EC6EzclKubk/g==} @@ -6215,11 +6214,8 @@ packages: '@walletconnect/types@2.13.0': resolution: {integrity: sha512-MWaVT0FkZwzYbD3tvk8F+2qpPlz1LUSWHuqbINUtMXnSzJtXN49Y99fR7FuBhNFtDalfuWsEK17GrNA+KnAsPQ==} - '@walletconnect/types@2.15.2': - resolution: {integrity: sha512-TGnQZYWZJJ3I8dqgpMPwhO1IRXDuY8/tWPI0nNWJDyTK7b3E9prDGugnPmDDjpTYVoETnUTgW/jQaHNTq4yV7Q==} - - '@walletconnect/types@2.15.3': - resolution: {integrity: sha512-z3NJ14f3WVWsyQTSQYaPuSvBfGGiKEKEaldeCZecsOVtMCtjfTrDzj8HDbz6+werogS7joFDPyB/1UdcCDmqjw==} + '@walletconnect/types@2.16.1': + resolution: {integrity: sha512-9P4RG4VoDEF+yBF/n2TF12gsvT/aTaeZTVDb/AOayafqiPnmrQZMKmNCJJjq1sfdsDcHXFcZWMGsuCeSJCmrXA==} '@walletconnect/universal-provider@2.11.2': resolution: {integrity: sha512-cNtIn5AVoDxKAJ4PmB8m5adnf5mYQMUamEUPKMVvOPscfGtIMQEh9peKsh2AN5xcRVDbgluC01Id545evFyymw==} @@ -6227,8 +6223,8 @@ packages: '@walletconnect/universal-provider@2.13.0': resolution: {integrity: sha512-B5QvO8pnk5Bqn4aIt0OukGEQn2Auk9VbHfhQb9cGwgmSCd1GlprX/Qblu4gyT5+TjHMb1Gz5UssUaZWTWbDhBg==} - '@walletconnect/universal-provider@2.15.3': - resolution: {integrity: sha512-KfrtQo/kKu4CtbTbsjMUZvHlViPh9dMuPRnlIltlJc5csdGosjeEt9EC7OIDDBTCgP59A0LV4dQXIcL7azH5DA==} + '@walletconnect/universal-provider@2.16.1': + resolution: {integrity: sha512-q/tyWUVNenizuClEiaekx9FZj/STU1F3wpDK4PUIh3xh+OmUI5fw2dY3MaNDjyb5AyrS0M8BuQDeuoSuOR/Q7w==} '@walletconnect/utils@2.11.2': resolution: {integrity: sha512-LyfdmrnZY6dWqlF4eDrx5jpUwsB2bEPjoqR5Z6rXPiHJKUOdJt7az+mNOn5KTSOlRpd1DmozrBrWr+G9fFLYVw==} @@ -6239,11 +6235,8 @@ packages: '@walletconnect/utils@2.13.0': resolution: {integrity: sha512-q1eDCsRHj5iLe7fF8RroGoPZpdo2CYMZzQSrw1iqL+2+GOeqapxxuJ1vaJkmDUkwgklfB22ufqG6KQnz78sD4w==} - '@walletconnect/utils@2.15.2': - resolution: {integrity: sha512-H+fNH9cHDezdaEiEsO7/3URSIzqhumuacwB/+0PX0sSCoktmU9AfTqA8fJGG43zOPixleBqOymzO6owB1Y7jtQ==} - - '@walletconnect/utils@2.15.3': - resolution: {integrity: sha512-MNNdAnaF8XdvJQmUzLDbs+mX+PSL1kWeMY5bpLPF9PJZqtElB5ZtDfZNi4MBqG7vUhuM6eRAHwCe1vdiY+ZdRQ==} + '@walletconnect/utils@2.16.1': + resolution: {integrity: sha512-aoQirVoDoiiEtYeYDtNtQxFzwO/oCrz9zqeEEXYJaAwXlGVTS34KFe7W3/Rxd/pldTYKFOZsku2EzpISfH8Wsw==} '@walletconnect/window-getters@1.0.0': resolution: {integrity: sha512-xB0SQsLaleIYIkSsl43vm8EwETpBzJ2gnzk7e0wMF3ktqiTGS6TFHxcprMl5R44KKh4tCcHCJwolMCaDSwtAaA==} @@ -6490,8 +6483,8 @@ packages: resolution: {integrity: sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==} engines: {node: '>=0.4.0'} - acorn-walk@8.3.3: - resolution: {integrity: sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==} + acorn-walk@8.3.4: + resolution: {integrity: sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==} engines: {node: '>=0.4.0'} acorn@7.4.1: @@ -6612,8 +6605,8 @@ packages: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} - ansi-regex@6.0.1: - resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} + ansi-regex@6.1.0: + resolution: {integrity: sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==} engines: {node: '>=12'} ansi-styles@2.2.1: @@ -7181,8 +7174,9 @@ packages: builtin-status-codes@3.0.0: resolution: {integrity: sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==} - bun@1.1.26: - resolution: {integrity: sha512-dWSewAqE7sVbYmflJxgG47dW4vmsbar7VAnQ4ao45y3ulr3n7CwdsMLFnzd28jhPRtF+rsaVK2y4OLIkP3OD4A==} + bun@1.1.27: + resolution: {integrity: sha512-FLnMaOuVVuhjPIfmlRtAE42B2x+oSWO6jW8MZ/Ss179qokN//nzIhuj/07bdA016U6d11HyLvvGb6eaH0HKhBQ==} + cpu: [arm64, x64] os: [darwin, linux, win32] hasBin: true @@ -7385,10 +7379,6 @@ packages: ci-info@2.0.0: resolution: {integrity: sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==} - ci-info@3.8.0: - resolution: {integrity: sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==} - engines: {node: '>=8'} - ci-info@3.9.0: resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} engines: {node: '>=8'} @@ -8508,6 +8498,10 @@ packages: resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} engines: {node: '>= 0.8'} + encodeurl@2.0.0: + resolution: {integrity: sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==} + engines: {node: '>= 0.8'} + encoding-sniffer@0.2.0: resolution: {integrity: sha512-ju7Wq1kg04I3HtiYIOrUrdfdDvkyO9s5XM8QAj/bN61Yo/Vb4vgJxy5vi4Yxk01gWHbrofpPtpxM8bKger9jhg==} @@ -8528,10 +8522,6 @@ packages: resolution: {integrity: sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==} engines: {node: '>=10.13.0'} - enquirer@2.3.6: - resolution: {integrity: sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==} - engines: {node: '>=8.6'} - enquirer@2.4.1: resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} engines: {node: '>=8.6'} @@ -8554,8 +8544,8 @@ packages: env-string@1.0.1: resolution: {integrity: sha512-/DhCJDf5DSFK32joQiWRpWrT0h7p3hVQfMKxiBb7Nt8C8IF8BYyPtclDnuGGLOoj16d/8udKeiE7JbkotDmorQ==} - envinfo@7.13.0: - resolution: {integrity: sha512-cvcaMr7KqXVh4nyzGTVqTum+gAiL265x5jUWQIDLq//zOGbW+gSW/C+OWLleY/rs9Qole6AZLMXPbtIFQbqu+Q==} + envinfo@7.14.0: + resolution: {integrity: sha512-CO40UI41xDQzhLB1hWyqUKgFhs250pNcGbyGKe1l/e4FSaI/+YE4IMG76GDt0In67WLPACIITC+sOi08x4wIvg==} engines: {node: '>=4'} hasBin: true @@ -8707,8 +8697,8 @@ packages: eslint: ^7.32.0 || ^8.2.0 eslint-plugin-import: ^2.25.3 - eslint-config-next@14.2.9: - resolution: {integrity: sha512-aNgGqWBp2KFcuEf9zNqmv+8dBkOrdyOlCIbdtyw7fiCQioLqXNcXmalAyeNtVyE95Kwgg11bgXvuVqdxpbR79g==} + eslint-config-next@14.2.11: + resolution: {integrity: sha512-gGIoBoHCJuLn6vaV1Ke8UurVvgb7JjQv6oRlWmI6RAAxz7KwJOYxxm2blctavA0a3eofbE9TdgKvvTb2G55OHQ==} peerDependencies: eslint: ^7.23.0 || ^8.0.0 typescript: '>=3.3.1' @@ -8763,27 +8753,6 @@ packages: eslint-import-resolver-webpack: optional: true - eslint-module-utils@2.8.0: - resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} - engines: {node: '>=4'} - peerDependencies: - '@typescript-eslint/parser': '*' - eslint: '*' - eslint-import-resolver-node: '*' - eslint-import-resolver-typescript: '*' - eslint-import-resolver-webpack: '*' - peerDependenciesMeta: - '@typescript-eslint/parser': - optional: true - eslint: - optional: true - eslint-import-resolver-node: - optional: true - eslint-import-resolver-typescript: - optional: true - eslint-import-resolver-webpack: - optional: true - eslint-plugin-eslint-comments@3.2.0: resolution: {integrity: sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==} engines: {node: '>=6.5.0'} @@ -8853,8 +8822,8 @@ packages: peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 - eslint-plugin-react-refresh@0.4.11: - resolution: {integrity: sha512-wrAKxMbVr8qhXTtIKfXqAn5SAtRZt0aXxe5P23Fh4pUAdC6XEsybGLB8P0PI4j1yYqOgUEUlzKAGDfo7rJOjcw==} + eslint-plugin-react-refresh@0.4.12: + resolution: {integrity: sha512-9neVjoGv20FwYtCP6CB1dzR1vr57ZDNOXst21wd2xJ/cTlM2xLq0GWVlSNTdMn/4BtP6cHYBMCSp1wFBJ9jBsg==} peerDependencies: eslint: '>=7' @@ -9269,9 +9238,6 @@ packages: resolution: {integrity: sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - find-yarn-workspace-root2@1.2.16: - resolution: {integrity: sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA==} - flame-gradient@1.0.0: resolution: {integrity: sha512-9ejk16/DqvQJ4dHsh68W/4N0zmVQ60zukyUuEHrTbf5pJvP4JqlIdke86Z9174PZokRCXAntY5+H1txSyC7mUA==} @@ -9302,8 +9268,8 @@ packages: flow-enums-runtime@0.0.6: resolution: {integrity: sha512-3PYnM29RFXwvAN6Pc/scUfkI7RwhQ/xqyLUyPNlXUp9S40zI8nup9tUSrTLSVnWGBN38FNiGWbwZOB6uR4OGdw==} - flow-parser@0.245.2: - resolution: {integrity: sha512-FU4yuqC1j2IeWWicpzG0YJrXHJgKjK/AU8QKK/7MvQaNhcoGisDoE7FJLGCtbvnifzsgDWdm9/jtTF7Mp+PJXQ==} + flow-parser@0.246.0: + resolution: {integrity: sha512-WHRizzSrWFTcKo7cVcbP3wzZVhzsoYxoWqbnH4z+JXGqrjVmnsld6kBZWVlB200PwD5ur8r+HV3KUDxv3cHhOQ==} engines: {node: '>=0.4.0'} focus-trap@7.5.4: @@ -9321,6 +9287,7 @@ packages: follow-redirects@1.15.8: resolution: {integrity: sha512-xgrmBhBToVKay1q2Tao5LI26B83UhrB/vM1avwVSDzt8rx3rO6AizBAaF46EgksTVr+rFTQaqZZ9MVBfUe4nig==} engines: {node: '>=4.0'} + deprecated: Browser detection issues fixed in v1.15.9 peerDependencies: debug: '*' peerDependenciesMeta: @@ -9532,8 +9499,8 @@ packages: resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==} engines: {node: '>= 0.4'} - get-tsconfig@4.8.0: - resolution: {integrity: sha512-Pgba6TExTZ0FJAn1qkJAjIeKoDJ3CsI2ChuLohJnZl/tTU8MVrq3b+2t5UOPfRa4RMsorClBjJALkJUMjG1PAw==} + get-tsconfig@4.8.1: + resolution: {integrity: sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==} get-uri@6.0.3: resolution: {integrity: sha512-BzUrJBS9EcUb4cFol8r4W3v1cPsSyajLSthNkz5BxbpDcHN5tIrM10E2eNvfnvBn3DaT3DUgx0OpsBKkaOpanw==} @@ -9568,10 +9535,6 @@ packages: resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==} hasBin: true - glob@7.1.6: - resolution: {integrity: sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==} - deprecated: Glob versions prior to v9 are no longer supported - glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} deprecated: Glob versions prior to v9 are no longer supported @@ -10605,10 +10568,6 @@ packages: resolution: {integrity: sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} - jest-get-type@29.4.3: - resolution: {integrity: sha512-J5Xez4nRRMjk8emnTpWrlkyb9pfRQQanDrvWHhsR1+VUfbwxi30eVcZFlcdGInRibU4G5LwHXpI7IRHU0CY+gg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - jest-get-type@29.6.3: resolution: {integrity: sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -10641,10 +10600,6 @@ packages: resolution: {integrity: sha512-PFdn9Iewbt575zKPf1286Ht9EPoJmYT7P0kY+RibeYZ2XtOr53pDLEFoTWXbd1h4JiGiWpTBC84fc8xMXQMb7g==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} - jest-message-util@29.5.0: - resolution: {integrity: sha512-Kijeg9Dag6CKtIDA7O21zNTACqD5MD/8HfIV8pdD94vFyFuer52SigdC3IQMhab3vACxXMiFk+yMHNdbqtyTGA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - jest-message-util@29.7.0: resolution: {integrity: sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -10706,10 +10661,6 @@ packages: resolution: {integrity: sha512-XdqfpHwpcSRko/C35uLYFM2emRAltIIKZiJ9eAmhjsj0CqZMa0p1ib0R5fWIqGhn1a103DebTbpqIaP1qCQ6tQ==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} - jest-util@29.5.0: - resolution: {integrity: sha512-RYMgG/MTadOr5t8KdhejfvUU82MxsCu5MF6KuDUHl+NuwzUt+Sm6jJWxTJVrDR1j5M/gJVCPKQEpWXY+yIQ6lQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - jest-util@29.7.0: resolution: {integrity: sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -10942,8 +10893,8 @@ packages: resolution: {integrity: sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==} engines: {node: '>= 8'} - knip@5.30.0: - resolution: {integrity: sha512-QDpxtXosXK3OBnmWC2LJudjJROozAXyGzSi+aTuEx/Pf9/OKjmegQWix+X6uBYhPbMb8YEFcKWvI7qBnQCkIEA==} + knip@5.30.2: + resolution: {integrity: sha512-UuUwuTN+6Aa6mjxufWwidayGX/tPJsxZSlwUo8q4R+Gf/0aNYuhHsUH/GccuKtRPfFnf3r+ZU/7BV0dNfC7OEQ==} engines: {node: '>=18.6.0'} hasBin: true peerDependencies: @@ -11053,10 +11004,6 @@ packages: resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - load-yaml-file@0.2.0: - resolution: {integrity: sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw==} - engines: {node: '>=6'} - loader-runner@4.3.0: resolution: {integrity: sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==} engines: {node: '>=6.11.5'} @@ -11477,10 +11424,6 @@ packages: resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} engines: {node: '>=8.6'} - micromatch@4.0.7: - resolution: {integrity: sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==} - engines: {node: '>=8.6'} - micromatch@4.0.8: resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} engines: {node: '>=8.6'} @@ -11782,8 +11725,8 @@ packages: next-tick@1.1.0: resolution: {integrity: sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==} - next@14.2.9: - resolution: {integrity: sha512-3CzBNo6BuJnRjcQvRw+irnU1WiuJNZEp+dkzkt91y4jeIDN/Emg95F+takSYiLpJ/HkxClVQRyqiTwYce5IVqw==} + next@14.2.11: + resolution: {integrity: sha512-8MDFqHBhdmR2wdfaWc8+lW3A/hppFe1ggQ9vgIu/g2/2QEMYJrPoQP6b+VNk56gIug/bStysAmrpUKtj3XN8Bw==} engines: {node: '>=18.17.0'} hasBin: true peerDependencies: @@ -12237,6 +12180,9 @@ packages: resolution: {integrity: sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==} engines: {node: '>=8'} + package-manager-detector@0.2.0: + resolution: {integrity: sha512-E385OSk9qDcXhcM9LNSe4sdhx8a9mAPrZ4sMLW+tmxl5ZuGtPUcdFu+MPP2jbgiWAZ6Pfe5soGFMd+0Db5Vrog==} + pako@1.0.11: resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==} @@ -12472,13 +12418,13 @@ packages: resolution: {integrity: sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==} engines: {node: '>=8'} - playwright-core@1.47.0: - resolution: {integrity: sha512-1DyHT8OqkcfCkYUD9zzUTfg7EfTd+6a8MkD/NWOvjo0u/SCNd5YmY/lJwFvUZOxJbWNds+ei7ic2+R/cRz/PDg==} + playwright-core@1.47.1: + resolution: {integrity: sha512-i1iyJdLftqtt51mEk6AhYFaAJCDx0xQ/O5NU8EKaWFgMjItPVma542Nh/Aq8aLCjIJSzjaiEQGW/nyqLkGF1OQ==} engines: {node: '>=18'} hasBin: true - playwright@1.47.0: - resolution: {integrity: sha512-jOWiRq2pdNAX/mwLiwFYnPHpEZ4rM+fRSQpRHwEwZlP2PUANvL3+aJOF/bvISMhFD30rqMxUB4RJx9aQbfh4Ww==} + playwright@1.47.1: + resolution: {integrity: sha512-SUEKi6947IqYbKxRiqnbUobVZY4bF1uu+ZnZNJX9DfU1tlf2UhWfvVjLf01pQx9URsOr18bFVUKXmanYWhbfkw==} engines: {node: '>=18'} hasBin: true @@ -12967,20 +12913,19 @@ packages: resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==} engines: {node: ^10 || ^12 || >=14} - postcss@8.4.45: - resolution: {integrity: sha512-7KTLTdzdZZYscUc65XmjFiB73vBhBfbPztCYdUNvlaso9PrzjzcmjqBPR0lNGkcVlcO4BjiO5rK/qNz+XAen1Q==} + postcss@8.4.47: + resolution: {integrity: sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==} engines: {node: ^10 || ^12 || >=14} preact@10.23.2: resolution: {integrity: sha512-kKYfePf9rzKnxOAKDpsWhg/ysrHPqT+yQ7UW4JjdnqjFIeNUnNcEJvhuA8fDenxAGWzUqtd51DfVg7xp/8T9NA==} + preact@10.24.0: + resolution: {integrity: sha512-aK8Cf+jkfyuZ0ZZRG9FbYqwmEiGQ4y/PUO4SuTWoyWL244nZZh7bd5h2APd4rSNDYTBNghg1L+5iJN3Skxtbsw==} + preact@10.4.1: resolution: {integrity: sha512-WKrRpCSwL2t3tpOOGhf2WfTpcmbpxaWtDbdJdKdjd0aEiTkvOmS4NBkG6kzlaAHI9AkQ3iVqbFWM3Ei7mZ4o1Q==} - preferred-pm@3.0.3: - resolution: {integrity: sha512-+wZgbxNES/KlJs9q40F/1sfOd/j7f1O9JaHcW5Dsn3aUUOZg3L2bjpVUcKV2jvtElYfoTuQiNeMfQJ4kwUAhCQ==} - engines: {node: '>=10'} - prelude-ls@1.1.2: resolution: {integrity: sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==} engines: {node: '>= 0.8.0'} @@ -13148,6 +13093,7 @@ packages: engines: {node: '>=0.6.0', teleport: '>=0.2.0'} deprecated: |- You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other. + (For a CapTP with native promises, see @endo/eventual-send and @endo/captp) qr-code-styling@1.6.0-rc.1: @@ -13646,9 +13592,8 @@ packages: deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true - rimraf@5.0.9: - resolution: {integrity: sha512-3i7b8OcswU6CpU8Ej89quJD4O98id7TtVM5U4Mybh84zQXdrFmDLouWBEEaD/QfO3gDDfH+AGFCGsR7kngzQnA==} - engines: {node: 14 >=14.20 || 16 >=16.20 || >=18} + rimraf@5.0.10: + resolution: {integrity: sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==} hasBin: true ripemd160@2.0.2: @@ -13680,8 +13625,8 @@ packages: engines: {node: '>=14.18.0', npm: '>=8.0.0'} hasBin: true - rollup@4.21.2: - resolution: {integrity: sha512-e3TapAgYf9xjdLvKQCkQTnbTKd4a6jwlpQSJJFokHGaX2IVjoEqkIIhiQfqsi0cdwlOD+tQGuOd5AJkc5RngBw==} + rollup@4.21.3: + resolution: {integrity: sha512-7sqRtBNnEbcBtMeRVc6VRsJMmpI+JU1z9VTvW8D4gXIYQFz0aLcsE6rRkyghZkLfEgUZgVvOG7A5CVz/VW5GIA==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -13859,6 +13804,10 @@ packages: resolution: {integrity: sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==} engines: {node: '>= 0.8.0'} + send@0.19.0: + resolution: {integrity: sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==} + engines: {node: '>= 0.8.0'} + sentence-case@3.0.4: resolution: {integrity: sha512-8LS0JInaQMCRoQ7YUytAo/xUu5W2XnQxV2HI/6uM6U7CITS1RqPElr30V6uIqyMKM9lJGRVFy5/4CuzcixNYSg==} @@ -13884,6 +13833,10 @@ packages: resolution: {integrity: sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==} engines: {node: '>= 0.8.0'} + serve-static@1.16.2: + resolution: {integrity: sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==} + engines: {node: '>= 0.8.0'} + set-blocking@2.0.0: resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} @@ -14417,11 +14370,6 @@ packages: subarg@1.0.0: resolution: {integrity: sha512-RIrIdRY0X1xojthNcVtgT9sjpOGagEUKpZdgBUi054OEPFo282yg+zE+t1Rj3+RqKq2xStL7uUHhY+AjbC4BXg==} - sucrase@3.32.0: - resolution: {integrity: sha512-ydQOU34rpSyj2TGyz4D2p8rbktIOZ8QY9s+DGLvFU1i5pWJE8vkpruCjGCMHsdXwnD7JDcS+noSwM/a7zyNFDQ==} - engines: {node: '>=8'} - hasBin: true - sucrase@3.35.0: resolution: {integrity: sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==} engines: {node: '>=16 || 14 >=14.17'} @@ -14514,8 +14462,8 @@ packages: tachyons@4.12.0: resolution: {integrity: sha512-2nA2IrYFy3raCM9fxJ2KODRGHVSZNTW3BR0YnlGsLUf1DA3pk3YfWZ/DdfbnZK6zLZS+jUenlUGJsKcA5fUiZg==} - tailwindcss@3.4.10: - resolution: {integrity: sha512-KWZkVPm7yJRhdu4SRSl9d4AK2wM3a50UsvgHZO7xY77NQr2V+fIrEuoDGQcbvswWvFGbS2f6e+jC/6WJm1Dl0w==} + tailwindcss@3.4.11: + resolution: {integrity: sha512-qhEuBcLemjSJk5ajccN9xJFtM/h0AVCPaA6C92jNP+M2J8kX+eMJHI7R2HFKUvvAsMpcfLILMCFYSeDwpMmlUg==} engines: {node: '>=14.0.0'} hasBin: true @@ -14579,8 +14527,8 @@ packages: engines: {node: '>=10'} hasBin: true - terser@5.31.6: - resolution: {integrity: sha512-PQ4DAriWzKj+qgehQ7LK5bQqCFNMmlhjR2PFFLuqGCpuCAauxemVBWwWOxo3UIwWQx8+Pr61Df++r76wDmkQBg==} + terser@5.32.0: + resolution: {integrity: sha512-v3Gtw3IzpBJ0ugkxEX8U0W6+TnPKRRCWGh1jC/iM/e3Ki5+qvO1L1EAZ56bZasc64aXHwRHNIQEzm6//i5cemQ==} engines: {node: '>=10'} hasBin: true @@ -14872,8 +14820,8 @@ packages: peerDependencies: typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' - tsx@4.19.0: - resolution: {integrity: sha512-bV30kM7bsLZKZIOCHeMNVMJ32/LuJzLVajkQI/qf92J2Qr08ueLQvW00PUZGiuLPP760UINwupgUj8qrSCPUKg==} + tsx@4.19.1: + resolution: {integrity: sha512-0flMz1lh74BR4wOvBjuh9olbnwqCPc35OOlfyzHba0Dc+QNUeWX/Gq2YTbnwcWPO3BMd8fkzRVrHcsR+a7z7rA==} engines: {node: '>=18.0.0'} hasBin: true @@ -14890,41 +14838,41 @@ packages: resolution: {integrity: sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==} engines: {node: '>=0.6.11 <=0.7.0 || >=0.7.3'} - turbo-darwin-64@2.1.1: - resolution: {integrity: sha512-aYNuJpZlCoi0Htd79fl/2DywpewGKijdXeOfg9KzNuPVKzSMYlAXuAlNGh0MKjiOcyqxQGL7Mq9LFhwA0VpDpQ==} + turbo-darwin-64@2.1.2: + resolution: {integrity: sha512-3TEBxHWh99h2yIzkuIigMEOXt/ItYQp0aPiJjPd1xN4oDcsKK5AxiFKPH9pdtfIBzYsY59kQhZiFj0ELnSP7Bw==} cpu: [x64] os: [darwin] - turbo-darwin-arm64@2.1.1: - resolution: {integrity: sha512-tifJKD8yHY48rHXPMcM8o1jI/Jk2KCaXiNjTKvvy9Zsim61BZksNVLelIbrRoCGwAN6PUBZO2lGU5iL/TQJ5Pw==} + turbo-darwin-arm64@2.1.2: + resolution: {integrity: sha512-he0miWNq2WxJzsH82jS2Z4MXpnkzn9SH8a79iPXiJkq25QREImucscM4RPasXm8wARp91pyysJMq6aasD45CeA==} cpu: [arm64] os: [darwin] turbo-json-parse@2.3.0: resolution: {integrity: sha512-f1CWo4TNqwicXXUAOU5K9RZX6MhEdtOPT+FmgPhiet0a698+46KiXzMHpl8V4fieUa6qXr968uuNbHDSfXjkcQ==} - turbo-linux-64@2.1.1: - resolution: {integrity: sha512-Js6d/bSQe9DuV9c7ITXYpsU/ADzFHABdz1UIHa7Oqjj9VOEbFeA9WpAn0c+mdJrVD+IXJFbbDZUjN7VYssmtcg==} + turbo-linux-64@2.1.2: + resolution: {integrity: sha512-fKUBcc0rK8Vdqv5a/E3CSpMBLG1bzwv+Q0Q83F8fG2ZfNCNKGbcEYABdonNZkkx141Rj03cZQFCgxu3MVEGU+A==} cpu: [x64] os: [linux] - turbo-linux-arm64@2.1.1: - resolution: {integrity: sha512-LidzTCq0yvQ+N8w8Qub9FmhQ/mmEIeoqFi7DSupekEV2EjvE9jw/zYc9Pk67X+g7dHVfgOnvVzmrjChdxpFePw==} + turbo-linux-arm64@2.1.2: + resolution: {integrity: sha512-sV8Bpmm0WiuxgbhxymcC7wSsuxfBBieI98GegSwbr/bs1ANAgzCg93urIrdKdQ3/b31zZxQwcaP4FBF1wx1Qdg==} cpu: [arm64] os: [linux] - turbo-windows-64@2.1.1: - resolution: {integrity: sha512-GKc9ZywKwy4xLDhwXd6H07yzl0TB52HjXMrFLyHGhCVnf/w0oq4sLJv2sjbvuarPjsyx4xnCBJ3m3oyL2XmFtA==} + turbo-windows-64@2.1.2: + resolution: {integrity: sha512-wcmIJZI9ORT9ykHGliFE6kWRQrlH930QGSjSgWC8uFChFFuOyUlvC7ttcxuSvU9VqC7NF4C+GVAcFJQ8lTjN7g==} cpu: [x64] os: [win32] - turbo-windows-arm64@2.1.1: - resolution: {integrity: sha512-oFKkMj11KKUv3xSK9/fhAEQTxLUp1Ol1EOktwc32+SFtEU0uls7kosAz0b+qe8k3pJGEMFdDPdqoEjyJidbxtQ==} + turbo-windows-arm64@2.1.2: + resolution: {integrity: sha512-zdnXjrhk7YO6CP+Q5wPueEvOCLH4lDa6C4rrwiakcWcPgcQGbVozJlo4uaQ6awo8HLWQEvOwu84RkWTdLAc/Hw==} cpu: [arm64] os: [win32] - turbo@2.1.1: - resolution: {integrity: sha512-u9gUDkmR9dFS8b5kAYqIETK4OnzsS4l2ragJ0+soSMHh6VEeNHjTfSjk1tKxCqLyziCrPogadxP680J+v6yGHw==} + turbo@2.1.2: + resolution: {integrity: sha512-Jb0rbU4iHEVQ18An/YfakdIv9rKnd3zUfSE117EngrfWXFHo3RndVH96US3GsT8VHpwTncPePDBT2t06PaFLrw==} hasBin: true tweetnacl@0.14.5: @@ -15016,8 +14964,8 @@ packages: typedarray@0.0.6: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} - typedoc-plugin-markdown@4.2.6: - resolution: {integrity: sha512-k33o2lZSGpL3GjH28eW+RsujzCYFP0L5GNqpK+wa4CBcMOxpj8WV7SydNRLS6eSa2UvaPvNVJTaAZ6Tm+8GXoA==} + typedoc-plugin-markdown@4.2.7: + resolution: {integrity: sha512-bLsQdweSm48P9j6kGqQ3/4GCH5zu2EnURSkkxqirNc+uVFE9YK825ogDw+WbNkRHIV6eZK/1U43gT7YfglyYOg==} engines: {node: '>= 18'} peerDependencies: typedoc: 0.26.x @@ -15455,8 +15403,8 @@ packages: vite-plugin-plain-text@1.4.2: resolution: {integrity: sha512-nkCWW16lkTidaGZ9kItwMZ5OEkUeXMrY4Okc9IQXrN/p6SAuDYmEiGqMRKl1rnhm6CR1h98uJtn+ODkv0cL7DA==} - vite@5.4.3: - resolution: {integrity: sha512-IH+nl64eq9lJjFqU+/yrRnrHPVTlgy42/+IzbOdaFDVlyLgI/wDlf+FCobXLX1cT0X5+7LMyH1mIy2xJdLfo8Q==} + vite@5.4.5: + resolution: {integrity: sha512-pXqR0qtb2bTwLkev4SE3r4abCNioP3GkjvIDLlzziPpXtHgiJIjuKl+1GN6ESOT3wMjG3JTeARopj2SwYaHTOA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -15548,8 +15496,8 @@ packages: '@vue/composition-api': optional: true - vue@3.5.3: - resolution: {integrity: sha512-xvRbd0HpuLovYbOHXRHlSBsSvmUJbo0pzbkKTApWnQGf3/cu5Z39mQeA5cZdLRVIoNf3zI6MSoOgHUT5i2jO+Q==} + vue@3.5.6: + resolution: {integrity: sha512-zv+20E2VIYbcJOzJPUWp03NOGFhMmpCKOfSxVTmCYyYFFko48H9tmuQFzYj7tu4qX1AeXlp9DmhIP89/sSxxhw==} peerDependencies: typescript: '*' peerDependenciesMeta: @@ -15729,10 +15677,6 @@ packages: which-module@2.0.1: resolution: {integrity: sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==} - which-pm@2.0.0: - resolution: {integrity: sha512-Lhs9Pmyph0p5n5Z3mVnN0yWcbQYUAD7rbQUiMsQxOJ3T57k7RFe35SUwWMf7dsbDZks1uOmw4AecB/JMDj3v/w==} - engines: {node: '>=8.15'} - which-typed-array@1.1.15: resolution: {integrity: sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==} engines: {node: '>= 0.4'} @@ -16021,8 +15965,8 @@ packages: resolution: {integrity: sha512-zK7YHHz4ZXpW89AHXUPbQVGKI7uvkd3hzusTdotCg1UxyaVtg0zFJSTfW/Dq5f7OBBVnq6cZIaC8Ti4hb6dtCA==} engines: {node: '>= 14'} - zod-validation-error@3.3.1: - resolution: {integrity: sha512-uFzCZz7FQis256dqw4AhPQgD6f3pzNca/Zh62RNELavlumQB3nDIUFbF5JQfFLcMbO1s02Q7Xg/gpcOBlEnYZA==} + zod-validation-error@3.4.0: + resolution: {integrity: sha512-ZOPR9SVY6Pb2qqO5XHt+MkkTRxGXb4EVtnjc9JpXUOtUB1T9Ru7mZOT361AN3MsetVe7R0a1KZshJDZdgp9miQ==} engines: {node: '>=18.0.0'} peerDependencies: zod: ^3.18.0 @@ -17811,13 +17755,12 @@ snapshots: '@types/tough-cookie': 4.0.5 tough-cookie: 4.1.4 - '@changesets/apply-release-plan@7.0.4': + '@changesets/apply-release-plan@7.0.5': dependencies: - '@babel/runtime': 7.24.7 - '@changesets/config': 3.0.2 + '@changesets/config': 3.0.3 '@changesets/get-version-range-type': 0.4.0 - '@changesets/git': 3.0.0 - '@changesets/should-skip-package': 0.1.0 + '@changesets/git': 3.0.1 + '@changesets/should-skip-package': 0.1.1 '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 detect-indent: 6.1.0 @@ -17826,78 +17769,74 @@ snapshots: outdent: 0.5.0 prettier: 2.8.8 resolve-from: 5.0.0 - semver: 7.5.4 + semver: 7.6.3 - '@changesets/assemble-release-plan@6.0.3': + '@changesets/assemble-release-plan@6.0.4': dependencies: - '@babel/runtime': 7.24.7 '@changesets/errors': 0.2.0 - '@changesets/get-dependents-graph': 2.1.1 - '@changesets/should-skip-package': 0.1.0 + '@changesets/get-dependents-graph': 2.1.2 + '@changesets/should-skip-package': 0.1.1 '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 - semver: 7.5.4 + semver: 7.6.3 '@changesets/changelog-git@0.2.0': dependencies: '@changesets/types': 6.0.0 - '@changesets/cli@2.27.7': + '@changesets/cli@2.27.8': dependencies: - '@babel/runtime': 7.24.7 - '@changesets/apply-release-plan': 7.0.4 - '@changesets/assemble-release-plan': 6.0.3 + '@changesets/apply-release-plan': 7.0.5 + '@changesets/assemble-release-plan': 6.0.4 '@changesets/changelog-git': 0.2.0 - '@changesets/config': 3.0.2 + '@changesets/config': 3.0.3 '@changesets/errors': 0.2.0 - '@changesets/get-dependents-graph': 2.1.1 - '@changesets/get-release-plan': 4.0.3 - '@changesets/git': 3.0.0 - '@changesets/logger': 0.1.0 - '@changesets/pre': 2.0.0 - '@changesets/read': 0.6.0 - '@changesets/should-skip-package': 0.1.0 + '@changesets/get-dependents-graph': 2.1.2 + '@changesets/get-release-plan': 4.0.4 + '@changesets/git': 3.0.1 + '@changesets/logger': 0.1.1 + '@changesets/pre': 2.0.1 + '@changesets/read': 0.6.1 + '@changesets/should-skip-package': 0.1.1 '@changesets/types': 6.0.0 - '@changesets/write': 0.3.1 + '@changesets/write': 0.3.2 '@manypkg/get-packages': 1.1.3 - '@types/semver': 7.5.4 + '@types/semver': 7.5.8 ansi-colors: 4.1.3 - chalk: 2.4.2 - ci-info: 3.8.0 - enquirer: 2.3.6 + ci-info: 3.9.0 + enquirer: 2.4.1 external-editor: 3.1.0 fs-extra: 7.0.1 - human-id: 1.0.2 mri: 1.2.0 outdent: 0.5.0 p-limit: 2.3.0 - preferred-pm: 3.0.3 + package-manager-detector: 0.2.0 + picocolors: 1.1.0 resolve-from: 5.0.0 - semver: 7.5.4 + semver: 7.6.3 spawndamnit: 2.0.0 term-size: 2.2.1 - '@changesets/config@3.0.2': + '@changesets/config@3.0.3': dependencies: '@changesets/errors': 0.2.0 - '@changesets/get-dependents-graph': 2.1.1 - '@changesets/logger': 0.1.0 + '@changesets/get-dependents-graph': 2.1.2 + '@changesets/logger': 0.1.1 '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 fs-extra: 7.0.1 - micromatch: 4.0.7 + micromatch: 4.0.8 '@changesets/errors@0.2.0': dependencies: extendable-error: 0.1.7 - '@changesets/get-dependents-graph@2.1.1': + '@changesets/get-dependents-graph@2.1.2': dependencies: '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 - chalk: 2.4.2 - fs-extra: 7.0.1 - semver: 7.5.4 + picocolors: 1.1.0 + semver: 7.6.3 '@changesets/get-github-info@0.6.0': dependencies: @@ -17906,59 +17845,53 @@ snapshots: transitivePeerDependencies: - encoding - '@changesets/get-release-plan@4.0.3': + '@changesets/get-release-plan@4.0.4': dependencies: - '@babel/runtime': 7.24.7 - '@changesets/assemble-release-plan': 6.0.3 - '@changesets/config': 3.0.2 - '@changesets/pre': 2.0.0 - '@changesets/read': 0.6.0 + '@changesets/assemble-release-plan': 6.0.4 + '@changesets/config': 3.0.3 + '@changesets/pre': 2.0.1 + '@changesets/read': 0.6.1 '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 '@changesets/get-version-range-type@0.4.0': {} - '@changesets/git@3.0.0': + '@changesets/git@3.0.1': dependencies: - '@babel/runtime': 7.24.7 '@changesets/errors': 0.2.0 - '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 is-subdir: 1.2.0 - micromatch: 4.0.7 + micromatch: 4.0.8 spawndamnit: 2.0.0 - '@changesets/logger@0.1.0': + '@changesets/logger@0.1.1': dependencies: - chalk: 2.4.2 + picocolors: 1.1.0 '@changesets/parse@0.4.0': dependencies: '@changesets/types': 6.0.0 js-yaml: 3.14.1 - '@changesets/pre@2.0.0': + '@changesets/pre@2.0.1': dependencies: - '@babel/runtime': 7.24.7 '@changesets/errors': 0.2.0 '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 fs-extra: 7.0.1 - '@changesets/read@0.6.0': + '@changesets/read@0.6.1': dependencies: - '@babel/runtime': 7.24.7 - '@changesets/git': 3.0.0 - '@changesets/logger': 0.1.0 + '@changesets/git': 3.0.1 + '@changesets/logger': 0.1.1 '@changesets/parse': 0.4.0 '@changesets/types': 6.0.0 - chalk: 2.4.2 fs-extra: 7.0.1 p-filter: 2.1.0 + picocolors: 1.1.0 - '@changesets/should-skip-package@0.1.0': + '@changesets/should-skip-package@0.1.1': dependencies: - '@babel/runtime': 7.24.7 '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 @@ -17966,9 +17899,8 @@ snapshots: '@changesets/types@6.0.0': {} - '@changesets/write@0.3.1': + '@changesets/write@0.3.2': dependencies: - '@babel/runtime': 7.24.7 '@changesets/types': 6.0.0 fs-extra: 7.0.1 human-id: 1.0.2 @@ -18008,8 +17940,8 @@ snapshots: chalk: 4.1.2 lodash.debounce: 4.0.8 loose-envify: 1.4.0 - postcss: 8.4.45 - postcss-import: 13.0.0(postcss@8.4.45) + postcss: 8.4.47 + postcss-import: 13.0.0(postcss@8.4.47) stream-template: 0.0.10 webfontloader: 1.6.28 @@ -18100,11 +18032,11 @@ snapshots: transitivePeerDependencies: - debug - '@codspeed/vitest-plugin@3.1.1(vite@5.4.3(@types/node@22.5.4)(terser@5.31.6))(vitest@2.0.5(@types/node@22.5.4)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.31.6))': + '@codspeed/vitest-plugin@3.1.1(vite@5.4.5(@types/node@22.5.5)(terser@5.32.0))(vitest@2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.32.0))': dependencies: '@codspeed/core': 3.1.1 - vite: 5.4.3(@types/node@22.5.4)(terser@5.31.6) - vitest: 2.0.5(@types/node@22.5.4)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.31.6) + vite: 5.4.5(@types/node@22.5.5)(terser@5.32.0) + vitest: 2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.32.0) transitivePeerDependencies: - debug @@ -18117,7 +18049,7 @@ snapshots: eth-json-rpc-filters: 6.0.1 eventemitter3: 5.0.1 keccak: 3.0.4 - preact: 10.23.2 + preact: 10.24.0 sha.js: 2.4.11 transitivePeerDependencies: - supports-color @@ -18128,7 +18060,7 @@ snapshots: clsx: 1.2.1 eventemitter3: 5.0.1 keccak: 3.0.4 - preact: 10.23.2 + preact: 10.24.0 sha.js: 2.4.11 '@colors/colors@1.5.0': @@ -18141,79 +18073,79 @@ snapshots: '@csstools/normalize.css@12.0.0': {} - '@csstools/postcss-cascade-layers@1.1.1(postcss@8.4.45)': + '@csstools/postcss-cascade-layers@1.1.1(postcss@8.4.47)': dependencies: '@csstools/selector-specificity': 2.2.0(postcss-selector-parser@6.0.13) - postcss: 8.4.45 + postcss: 8.4.47 postcss-selector-parser: 6.0.13 - '@csstools/postcss-color-function@1.1.1(postcss@8.4.45)': + '@csstools/postcss-color-function@1.1.1(postcss@8.4.47)': dependencies: - '@csstools/postcss-progressive-custom-properties': 1.3.0(postcss@8.4.45) - postcss: 8.4.45 + '@csstools/postcss-progressive-custom-properties': 1.3.0(postcss@8.4.47) + postcss: 8.4.47 postcss-value-parser: 4.2.0 - '@csstools/postcss-font-format-keywords@1.0.1(postcss@8.4.45)': + '@csstools/postcss-font-format-keywords@1.0.1(postcss@8.4.47)': dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 - '@csstools/postcss-hwb-function@1.0.2(postcss@8.4.45)': + '@csstools/postcss-hwb-function@1.0.2(postcss@8.4.47)': dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 - '@csstools/postcss-ic-unit@1.0.1(postcss@8.4.45)': + '@csstools/postcss-ic-unit@1.0.1(postcss@8.4.47)': dependencies: - '@csstools/postcss-progressive-custom-properties': 1.3.0(postcss@8.4.45) - postcss: 8.4.45 + '@csstools/postcss-progressive-custom-properties': 1.3.0(postcss@8.4.47) + postcss: 8.4.47 postcss-value-parser: 4.2.0 - '@csstools/postcss-is-pseudo-class@2.0.7(postcss@8.4.45)': + '@csstools/postcss-is-pseudo-class@2.0.7(postcss@8.4.47)': dependencies: '@csstools/selector-specificity': 2.2.0(postcss-selector-parser@6.0.13) - postcss: 8.4.45 + postcss: 8.4.47 postcss-selector-parser: 6.0.13 - '@csstools/postcss-nested-calc@1.0.0(postcss@8.4.45)': + '@csstools/postcss-nested-calc@1.0.0(postcss@8.4.47)': dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 - '@csstools/postcss-normalize-display-values@1.0.1(postcss@8.4.45)': + '@csstools/postcss-normalize-display-values@1.0.1(postcss@8.4.47)': dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 - '@csstools/postcss-oklab-function@1.1.1(postcss@8.4.45)': + '@csstools/postcss-oklab-function@1.1.1(postcss@8.4.47)': dependencies: - '@csstools/postcss-progressive-custom-properties': 1.3.0(postcss@8.4.45) - postcss: 8.4.45 + '@csstools/postcss-progressive-custom-properties': 1.3.0(postcss@8.4.47) + postcss: 8.4.47 postcss-value-parser: 4.2.0 - '@csstools/postcss-progressive-custom-properties@1.3.0(postcss@8.4.45)': + '@csstools/postcss-progressive-custom-properties@1.3.0(postcss@8.4.47)': dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 - '@csstools/postcss-stepped-value-functions@1.0.1(postcss@8.4.45)': + '@csstools/postcss-stepped-value-functions@1.0.1(postcss@8.4.47)': dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 - '@csstools/postcss-text-decoration-shorthand@1.0.0(postcss@8.4.45)': + '@csstools/postcss-text-decoration-shorthand@1.0.0(postcss@8.4.47)': dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 - '@csstools/postcss-trigonometric-functions@1.0.2(postcss@8.4.45)': + '@csstools/postcss-trigonometric-functions@1.0.2(postcss@8.4.47)': dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 - '@csstools/postcss-unset-value@1.0.2(postcss@8.4.45)': + '@csstools/postcss-unset-value@1.0.2(postcss@8.4.47)': dependencies: - postcss: 8.4.45 + postcss: 8.4.47 '@csstools/selector-specificity@2.2.0(postcss-selector-parser@6.0.13)': dependencies: @@ -18221,9 +18153,9 @@ snapshots: '@docsearch/css@3.6.1': {} - '@docsearch/js@3.6.1(@algolia/client-search@4.22.1)(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.11.0)': + '@docsearch/js@3.6.1(@algolia/client-search@4.22.1)(@types/react@18.3.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.11.0)': dependencies: - '@docsearch/react': 3.6.1(@algolia/client-search@4.22.1)(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.11.0) + '@docsearch/react': 3.6.1(@algolia/client-search@4.22.1)(@types/react@18.3.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.11.0) preact: 10.23.2 transitivePeerDependencies: - '@algolia/client-search' @@ -18232,14 +18164,14 @@ snapshots: - react-dom - search-insights - '@docsearch/react@3.6.1(@algolia/client-search@4.22.1)(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.11.0)': + '@docsearch/react@3.6.1(@algolia/client-search@4.22.1)(@types/react@18.3.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.11.0)': dependencies: '@algolia/autocomplete-core': 1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1)(search-insights@2.11.0) '@algolia/autocomplete-preset-algolia': 1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1) '@docsearch/css': 3.6.1 algoliasearch: 4.22.1 optionalDependencies: - '@types/react': 18.3.5 + '@types/react': 18.3.6 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) search-insights: 2.11.0 @@ -18482,6 +18414,8 @@ snapshots: '@eslint-community/regexpp@4.11.0': {} + '@eslint-community/regexpp@4.11.1': {} + '@eslint/config-array@0.18.0': dependencies: '@eslint/object-schema': 2.1.4 @@ -18569,16 +18503,16 @@ snapshots: '@fastify/busboy@2.1.1': {} - '@fuels/connectors@0.27.1(@tanstack/query-core@5.55.4)(@types/react@18.3.5)(@wagmi/connectors@5.1.9(@types/react@18.3.5)(@wagmi/core@2.13.4(@tanstack/query-core@5.55.4)(@types/react@18.3.5)(immer@9.0.21)(react@18.3.1)(typescript@5.6.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.5)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.21.2)(typescript@5.6.2)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8))(bufferutil@4.0.8)(fuels@packages+fuels)(immer@9.0.21)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.2)(utf-8-validate@5.0.10)(vue@3.5.3(typescript@5.6.2))(zod@3.23.8)': + '@fuels/connectors@0.27.1(@tanstack/query-core@5.55.4)(@types/react@18.3.6)(@wagmi/connectors@5.1.10(@types/react@18.3.6)(@wagmi/core@2.13.5(@tanstack/query-core@5.55.4)(@types/react@18.3.6)(immer@9.0.21)(react@18.3.1)(typescript@5.6.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.6)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.21.3)(typescript@5.6.2)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8))(bufferutil@4.0.8)(fuels@packages+fuels)(immer@9.0.21)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.2)(utf-8-validate@5.0.10)(vue@3.5.6(typescript@5.6.2))(zod@3.23.8)': dependencies: '@ethereumjs/util': 9.0.3 '@ethersproject/bytes': 5.7.0 '@solana/web3.js': 1.93.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@wagmi/core': 2.13.4(@tanstack/query-core@5.55.4)(@types/react@18.3.5)(immer@9.0.21)(react@18.3.1)(typescript@5.6.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8)) - '@web3modal/core': 5.0.0(@types/react@18.3.5)(react@18.3.1) - '@web3modal/scaffold': 5.0.0(@types/react@18.3.5)(react@18.3.1) - '@web3modal/solana': 5.0.0(@types/react@18.3.5)(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(utf-8-validate@5.0.10)(vue@3.5.3(typescript@5.6.2)) - '@web3modal/wagmi': 5.0.0(qnqm5fqu36se3alxnv42h2vieq) + '@wagmi/core': 2.13.4(@tanstack/query-core@5.55.4)(@types/react@18.3.6)(immer@9.0.21)(react@18.3.1)(typescript@5.6.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8)) + '@web3modal/core': 5.0.0(@types/react@18.3.6)(react@18.3.1) + '@web3modal/scaffold': 5.0.0(@types/react@18.3.6)(react@18.3.1) + '@web3modal/solana': 5.0.0(@types/react@18.3.6)(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(utf-8-validate@5.0.10)(vue@3.5.6(typescript@5.6.2)) + '@web3modal/wagmi': 5.0.0(jndftfy7222tuqncvhtozh2d74) fuels: link:packages/fuels rpc-websockets: 7.11.0 socket.io-client: 4.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -18632,7 +18566,7 @@ snapshots: graphql: 16.9.0 tslib: 2.6.3 - '@graphql-codegen/cli@5.0.2(@parcel/watcher@2.4.1)(@types/node@22.5.4)(bufferutil@4.0.8)(cosmiconfig-toml-loader@1.0.0)(enquirer@2.4.1)(graphql@16.9.0)(typescript@5.6.2)(utf-8-validate@6.0.4)': + '@graphql-codegen/cli@5.0.2(@parcel/watcher@2.4.1)(@types/node@22.5.5)(bufferutil@4.0.8)(cosmiconfig-toml-loader@1.0.0)(enquirer@2.4.1)(graphql@16.9.0)(typescript@5.6.2)(utf-8-validate@6.0.4)': dependencies: '@babel/generator': 7.24.4 '@babel/template': 7.24.6 @@ -18643,12 +18577,12 @@ snapshots: '@graphql-tools/apollo-engine-loader': 8.0.1(graphql@16.9.0) '@graphql-tools/code-file-loader': 8.1.2(graphql@16.9.0) '@graphql-tools/git-loader': 8.0.6(graphql@16.9.0) - '@graphql-tools/github-loader': 8.0.1(@types/node@22.5.4)(graphql@16.9.0) + '@graphql-tools/github-loader': 8.0.1(@types/node@22.5.5)(graphql@16.9.0) '@graphql-tools/graphql-file-loader': 8.0.1(graphql@16.9.0) '@graphql-tools/json-file-loader': 8.0.1(graphql@16.9.0) '@graphql-tools/load': 8.0.2(graphql@16.9.0) - '@graphql-tools/prisma-loader': 8.0.4(@types/node@22.5.4)(bufferutil@4.0.8)(graphql@16.9.0)(utf-8-validate@6.0.4) - '@graphql-tools/url-loader': 8.0.2(@types/node@22.5.4)(bufferutil@4.0.8)(graphql@16.9.0)(utf-8-validate@6.0.4) + '@graphql-tools/prisma-loader': 8.0.4(@types/node@22.5.5)(bufferutil@4.0.8)(graphql@16.9.0)(utf-8-validate@6.0.4) + '@graphql-tools/url-loader': 8.0.2(@types/node@22.5.5)(bufferutil@4.0.8)(graphql@16.9.0)(utf-8-validate@6.0.4) '@graphql-tools/utils': 10.2.2(graphql@16.9.0) '@whatwg-node/fetch': 0.8.8 chalk: 4.1.2 @@ -18656,7 +18590,7 @@ snapshots: debounce: 1.2.1 detect-indent: 6.1.0 graphql: 16.9.0 - graphql-config: 5.0.3(@types/node@22.5.4)(bufferutil@4.0.8)(cosmiconfig-toml-loader@1.0.0)(graphql@16.9.0)(typescript@5.6.2)(utf-8-validate@6.0.4) + graphql-config: 5.0.3(@types/node@22.5.5)(bufferutil@4.0.8)(cosmiconfig-toml-loader@1.0.0)(graphql@16.9.0)(typescript@5.6.2)(utf-8-validate@6.0.4) inquirer: 8.2.5 is-glob: 4.0.3 jiti: 1.21.0 @@ -18916,14 +18850,14 @@ snapshots: - bufferutil - utf-8-validate - '@graphql-tools/executor-http@1.0.9(@types/node@22.5.4)(graphql@16.9.0)': + '@graphql-tools/executor-http@1.0.9(@types/node@22.5.5)(graphql@16.9.0)': dependencies: '@graphql-tools/utils': 10.2.2(graphql@16.9.0) '@repeaterjs/repeater': 3.0.4 '@whatwg-node/fetch': 0.9.18 extract-files: 11.0.0 graphql: 16.9.0 - meros: 1.3.0(@types/node@22.5.4) + meros: 1.3.0(@types/node@22.5.5) tslib: 2.7.0 value-or-promise: 1.0.12 transitivePeerDependencies: @@ -18956,16 +18890,16 @@ snapshots: '@graphql-tools/utils': 10.2.2(graphql@16.9.0) graphql: 16.9.0 is-glob: 4.0.3 - micromatch: 4.0.7 + micromatch: 4.0.8 tslib: 2.6.3 unixify: 1.0.0 transitivePeerDependencies: - supports-color - '@graphql-tools/github-loader@8.0.1(@types/node@22.5.4)(graphql@16.9.0)': + '@graphql-tools/github-loader@8.0.1(@types/node@22.5.5)(graphql@16.9.0)': dependencies: '@ardatan/sync-fetch': 0.0.1 - '@graphql-tools/executor-http': 1.0.9(@types/node@22.5.4)(graphql@16.9.0) + '@graphql-tools/executor-http': 1.0.9(@types/node@22.5.5)(graphql@16.9.0) '@graphql-tools/graphql-tag-pluck': 8.3.1(graphql@16.9.0) '@graphql-tools/utils': 10.2.2(graphql@16.9.0) '@whatwg-node/fetch': 0.9.18 @@ -19038,9 +18972,9 @@ snapshots: graphql: 16.9.0 tslib: 2.7.0 - '@graphql-tools/prisma-loader@8.0.4(@types/node@22.5.4)(bufferutil@4.0.8)(graphql@16.9.0)(utf-8-validate@6.0.4)': + '@graphql-tools/prisma-loader@8.0.4(@types/node@22.5.5)(bufferutil@4.0.8)(graphql@16.9.0)(utf-8-validate@6.0.4)': dependencies: - '@graphql-tools/url-loader': 8.0.2(@types/node@22.5.4)(bufferutil@4.0.8)(graphql@16.9.0)(utf-8-validate@6.0.4) + '@graphql-tools/url-loader': 8.0.2(@types/node@22.5.5)(bufferutil@4.0.8)(graphql@16.9.0)(utf-8-validate@6.0.4) '@graphql-tools/utils': 10.2.2(graphql@16.9.0) '@types/js-yaml': 4.0.5 '@whatwg-node/fetch': 0.9.18 @@ -19092,12 +19026,12 @@ snapshots: tslib: 2.7.0 value-or-promise: 1.0.12 - '@graphql-tools/url-loader@8.0.2(@types/node@22.5.4)(bufferutil@4.0.8)(graphql@16.9.0)(utf-8-validate@6.0.4)': + '@graphql-tools/url-loader@8.0.2(@types/node@22.5.5)(bufferutil@4.0.8)(graphql@16.9.0)(utf-8-validate@6.0.4)': dependencies: '@ardatan/sync-fetch': 0.0.1 '@graphql-tools/delegate': 10.0.11(graphql@16.9.0) '@graphql-tools/executor-graphql-ws': 1.1.2(bufferutil@4.0.8)(graphql@16.9.0)(utf-8-validate@6.0.4) - '@graphql-tools/executor-http': 1.0.9(@types/node@22.5.4)(graphql@16.9.0) + '@graphql-tools/executor-http': 1.0.9(@types/node@22.5.5)(graphql@16.9.0) '@graphql-tools/executor-legacy-ws': 1.0.6(bufferutil@4.0.8)(graphql@16.9.0)(utf-8-validate@6.0.4) '@graphql-tools/utils': 10.2.2(graphql@16.9.0) '@graphql-tools/wrap': 10.0.5(graphql@16.9.0) @@ -19178,7 +19112,7 @@ snapshots: '@inquirer/figures': 1.0.5 '@inquirer/type': 1.5.3 '@types/mute-stream': 0.0.4 - '@types/node': 22.5.4 + '@types/node': 22.5.5 '@types/wrap-ansi': 3.0.0 ansi-escapes: 4.3.2 cli-spinners: 2.9.2 @@ -19224,7 +19158,7 @@ snapshots: '@jest/console@27.5.1': dependencies: '@jest/types': 27.5.1 - '@types/node': 22.5.4 + '@types/node': 22.5.5 chalk: 4.1.2 jest-message-util: 27.5.1 jest-util: 27.5.1 @@ -19233,27 +19167,27 @@ snapshots: '@jest/console@28.1.3': dependencies: '@jest/types': 28.1.3 - '@types/node': 22.5.4 + '@types/node': 22.5.5 chalk: 4.1.2 jest-message-util: 28.1.3 jest-util: 28.1.3 slash: 3.0.0 - '@jest/core@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2))(utf-8-validate@5.0.10)': + '@jest/core@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2))(utf-8-validate@5.0.10)': dependencies: '@jest/console': 27.5.1 '@jest/reporters': 27.5.1 '@jest/test-result': 27.5.1 '@jest/transform': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 22.5.4 + '@types/node': 22.5.5 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.8.1 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 27.5.1 - jest-config: 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2))(utf-8-validate@5.0.10) + jest-config: 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2))(utf-8-validate@5.0.10) jest-haste-map: 27.5.1 jest-message-util: 27.5.1 jest-regex-util: 27.5.1 @@ -19284,25 +19218,25 @@ snapshots: dependencies: '@jest/fake-timers': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 22.5.4 + '@types/node': 22.5.5 jest-mock: 27.5.1 '@jest/environment@29.7.0': dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.5.4 + '@types/node': 22.5.5 jest-mock: 29.7.0 '@jest/expect-utils@29.5.0': dependencies: - jest-get-type: 29.4.3 + jest-get-type: 29.6.3 '@jest/fake-timers@27.5.1': dependencies: '@jest/types': 27.5.1 '@sinonjs/fake-timers': 8.1.0 - '@types/node': 22.5.4 + '@types/node': 22.5.5 jest-message-util: 27.5.1 jest-mock: 27.5.1 jest-util: 27.5.1 @@ -19311,7 +19245,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 22.5.4 + '@types/node': 22.5.5 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -19329,7 +19263,7 @@ snapshots: '@jest/test-result': 27.5.1 '@jest/transform': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 22.5.4 + '@types/node': 22.5.5 chalk: 4.1.2 collect-v8-coverage: 1.0.1 exit: 0.1.2 @@ -19413,7 +19347,7 @@ snapshots: dependencies: '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.5.4 + '@types/node': 22.5.5 '@types/yargs': 15.0.19 chalk: 4.1.2 @@ -19421,7 +19355,7 @@ snapshots: dependencies: '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 22.5.4 + '@types/node': 22.5.5 '@types/yargs': 16.0.5 chalk: 4.1.2 @@ -19430,16 +19364,7 @@ snapshots: '@jest/schemas': 28.1.3 '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 22.5.4 - '@types/yargs': 17.0.24 - chalk: 4.1.2 - - '@jest/types@29.5.0': - dependencies: - '@jest/schemas': 29.6.3 - '@types/istanbul-lib-coverage': 2.0.4 - '@types/istanbul-reports': 3.0.1 - '@types/node': 22.5.4 + '@types/node': 22.5.5 '@types/yargs': 17.0.24 chalk: 4.1.2 @@ -19448,7 +19373,7 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.5.4 + '@types/node': 22.5.5 '@types/yargs': 17.0.33 chalk: 4.1.2 @@ -19456,8 +19381,8 @@ snapshots: dependencies: '@solana/web3.js': 1.91.7(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@walletconnect/qrcode-modal': 1.8.0 - '@walletconnect/sign-client': 2.15.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@walletconnect/utils': 2.15.2 + '@walletconnect/sign-client': 2.16.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@walletconnect/utils': 2.16.1 bs58: 5.0.0 transitivePeerDependencies: - '@azure/app-configuration' @@ -19558,7 +19483,7 @@ snapshots: '@manypkg/get-packages@1.1.3': dependencies: - '@babel/runtime': 7.24.7 + '@babel/runtime': 7.25.6 '@changesets/types': 4.1.0 '@manypkg/find-root': 1.1.0 fs-extra: 8.1.0 @@ -19650,21 +19575,21 @@ snapshots: transitivePeerDependencies: - supports-color - '@metamask/sdk-install-modal-web@0.28.1(i18next@23.11.5)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.5)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)': + '@metamask/sdk-install-modal-web@0.28.1(i18next@23.11.5)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.6)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)': dependencies: i18next: 23.11.5 qr-code-styling: 1.6.0-rc.1 optionalDependencies: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - react-native: 0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.5)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) + react-native: 0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.6)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) - '@metamask/sdk@0.28.2(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.5)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.21.2)(utf-8-validate@5.0.10)': + '@metamask/sdk@0.28.2(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.6)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.21.3)(utf-8-validate@5.0.10)': dependencies: '@metamask/onboarding': 1.0.1 '@metamask/providers': 16.1.0 '@metamask/sdk-communication-layer': 0.28.2(cross-fetch@4.0.0)(eciesjs@0.3.20)(eventemitter2@6.4.9)(readable-stream@3.6.2)(socket.io-client@4.7.5(bufferutil@4.0.8)(utf-8-validate@5.0.10)) - '@metamask/sdk-install-modal-web': 0.28.1(i18next@23.11.5)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.5)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) + '@metamask/sdk-install-modal-web': 0.28.1(i18next@23.11.5)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.6)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) '@types/dom-screen-wake-lock': 1.0.3 '@types/uuid': 10.0.0 bowser: 2.11.0 @@ -19678,9 +19603,9 @@ snapshots: obj-multiplex: 1.0.0 pump: 3.0.0 qrcode-terminal-nooctal: 0.12.1 - react-native-webview: 11.26.1(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.5)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) + react-native-webview: 11.26.1(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.6)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) readable-stream: 3.6.2 - rollup-plugin-visualizer: 5.12.0(rollup@4.21.2) + rollup-plugin-visualizer: 5.12.0(rollup@4.21.3) socket.io-client: 4.7.5(bufferutil@4.0.8)(utf-8-validate@5.0.10) util: 0.12.5 uuid: 8.3.2 @@ -19858,37 +19783,37 @@ snapshots: abort-controller: 3.0.0 sonic-boom: 1.4.1 - '@next/env@14.2.9': {} + '@next/env@14.2.11': {} - '@next/eslint-plugin-next@14.2.9': + '@next/eslint-plugin-next@14.2.11': dependencies: glob: 10.3.10 - '@next/swc-darwin-arm64@14.2.9': + '@next/swc-darwin-arm64@14.2.11': optional: true - '@next/swc-darwin-x64@14.2.9': + '@next/swc-darwin-x64@14.2.11': optional: true - '@next/swc-linux-arm64-gnu@14.2.9': + '@next/swc-linux-arm64-gnu@14.2.11': optional: true - '@next/swc-linux-arm64-musl@14.2.9': + '@next/swc-linux-arm64-musl@14.2.11': optional: true - '@next/swc-linux-x64-gnu@14.2.9': + '@next/swc-linux-x64-gnu@14.2.11': optional: true - '@next/swc-linux-x64-musl@14.2.9': + '@next/swc-linux-x64-musl@14.2.11': optional: true - '@next/swc-win32-arm64-msvc@14.2.9': + '@next/swc-win32-arm64-msvc@14.2.11': optional: true - '@next/swc-win32-ia32-msvc@14.2.9': + '@next/swc-win32-ia32-msvc@14.2.11': optional: true - '@next/swc-win32-x64-msvc@14.2.9': + '@next/swc-win32-x64-msvc@14.2.11': optional: true '@nicolo-ribaudo/eslint-scope-5-internals@5.1.1-v1': @@ -19990,28 +19915,28 @@ snapshots: '@open-draft/until@2.1.0': {} - '@oven/bun-darwin-aarch64@1.1.26': + '@oven/bun-darwin-aarch64@1.1.27': optional: true - '@oven/bun-darwin-x64-baseline@1.1.26': + '@oven/bun-darwin-x64-baseline@1.1.27': optional: true - '@oven/bun-darwin-x64@1.1.26': + '@oven/bun-darwin-x64@1.1.27': optional: true - '@oven/bun-linux-aarch64@1.1.26': + '@oven/bun-linux-aarch64@1.1.27': optional: true - '@oven/bun-linux-x64-baseline@1.1.26': + '@oven/bun-linux-x64-baseline@1.1.27': optional: true - '@oven/bun-linux-x64@1.1.26': + '@oven/bun-linux-x64@1.1.27': optional: true - '@oven/bun-windows-x64-baseline@1.1.26': + '@oven/bun-windows-x64-baseline@1.1.27': optional: true - '@oven/bun-windows-x64@1.1.26': + '@oven/bun-windows-x64@1.1.27': optional: true '@parcel/watcher-android-arm64@2.4.1': @@ -20098,9 +20023,9 @@ snapshots: '@pkgr/core@0.1.1': {} - '@playwright/test@1.47.0': + '@playwright/test@1.47.1': dependencies: - playwright: 1.47.0 + playwright: 1.47.1 '@pmmmwh/react-refresh-webpack-plugin@0.5.10(react-refresh@0.11.0)(type-fest@3.1.0)(webpack-dev-server@4.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)))(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19))': dependencies: @@ -20311,7 +20236,7 @@ snapshots: '@react-native-community/cli-debugger-ui@13.6.6': dependencies: - serve-static: 1.15.0 + serve-static: 1.16.2 transitivePeerDependencies: - supports-color @@ -20325,7 +20250,7 @@ snapshots: chalk: 4.1.2 command-exists: 1.2.9 deepmerge: 4.3.1 - envinfo: 7.13.0 + envinfo: 7.14.0 execa: 5.1.1 hermes-profile-transformer: 0.0.6 node-stream-zip: 1.15.0 @@ -20383,7 +20308,7 @@ snapshots: errorhandler: 1.5.1 nocache: 3.0.4 pretty-format: 26.6.2 - serve-static: 1.15.0 + serve-static: 1.16.2 ws: 6.2.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil @@ -20543,7 +20468,7 @@ snapshots: nullthrows: 1.1.1 open: 7.4.2 selfsigned: 2.4.1 - serve-static: 1.15.0 + serve-static: 1.16.2 temp-dir: 2.0.0 ws: 6.2.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: @@ -20568,14 +20493,14 @@ snapshots: '@react-native/normalize-colors@0.74.83': {} - '@react-native/virtualized-lists@0.74.83(@types/react@18.3.5)(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.5)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)': + '@react-native/virtualized-lists@0.74.83(@types/react@18.3.6)(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.6)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)': dependencies: invariant: 2.2.4 nullthrows: 1.1.1 react: 18.3.1 - react-native: 0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.5)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) + react-native: 0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.6)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) optionalDependencies: - '@types/react': 18.3.5 + '@types/react': 18.3.6 '@repeaterjs/repeater@3.0.4': {} @@ -20601,13 +20526,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@rollup/plugin-inject@5.0.5(rollup@4.21.2)': + '@rollup/plugin-inject@5.0.5(rollup@4.21.3)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.21.2) + '@rollup/pluginutils': 5.1.0(rollup@4.21.3) estree-walker: 2.0.2 magic-string: 0.30.11 optionalDependencies: - rollup: 4.21.2 + rollup: 4.21.3 '@rollup/plugin-node-resolve@11.2.1(rollup@2.79.1)': dependencies: @@ -20632,60 +20557,60 @@ snapshots: picomatch: 2.3.1 rollup: 2.79.1 - '@rollup/pluginutils@5.1.0(rollup@4.21.2)': + '@rollup/pluginutils@5.1.0(rollup@4.21.3)': dependencies: '@types/estree': 1.0.5 estree-walker: 2.0.2 picomatch: 2.3.1 optionalDependencies: - rollup: 4.21.2 + rollup: 4.21.3 - '@rollup/rollup-android-arm-eabi@4.21.2': + '@rollup/rollup-android-arm-eabi@4.21.3': optional: true - '@rollup/rollup-android-arm64@4.21.2': + '@rollup/rollup-android-arm64@4.21.3': optional: true - '@rollup/rollup-darwin-arm64@4.21.2': + '@rollup/rollup-darwin-arm64@4.21.3': optional: true - '@rollup/rollup-darwin-x64@4.21.2': + '@rollup/rollup-darwin-x64@4.21.3': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.21.2': + '@rollup/rollup-linux-arm-gnueabihf@4.21.3': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.21.2': + '@rollup/rollup-linux-arm-musleabihf@4.21.3': optional: true - '@rollup/rollup-linux-arm64-gnu@4.21.2': + '@rollup/rollup-linux-arm64-gnu@4.21.3': optional: true - '@rollup/rollup-linux-arm64-musl@4.21.2': + '@rollup/rollup-linux-arm64-musl@4.21.3': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.21.2': + '@rollup/rollup-linux-powerpc64le-gnu@4.21.3': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.21.2': + '@rollup/rollup-linux-riscv64-gnu@4.21.3': optional: true - '@rollup/rollup-linux-s390x-gnu@4.21.2': + '@rollup/rollup-linux-s390x-gnu@4.21.3': optional: true - '@rollup/rollup-linux-x64-gnu@4.21.2': + '@rollup/rollup-linux-x64-gnu@4.21.3': optional: true - '@rollup/rollup-linux-x64-musl@4.21.2': + '@rollup/rollup-linux-x64-musl@4.21.3': optional: true - '@rollup/rollup-win32-arm64-msvc@4.21.2': + '@rollup/rollup-win32-arm64-msvc@4.21.3': optional: true - '@rollup/rollup-win32-ia32-msvc@4.21.2': + '@rollup/rollup-win32-ia32-msvc@4.21.3': optional: true - '@rollup/rollup-win32-x64-msvc@4.21.2': + '@rollup/rollup-win32-x64-msvc@4.21.3': optional: true '@rtsao/scc@1.1.0': {} @@ -21155,10 +21080,10 @@ snapshots: dependencies: '@tanstack/virtual-file-routes': 1.56.0 prettier: 3.3.3 - tsx: 4.19.0 + tsx: 4.19.1 zod: 3.23.8 - '@tanstack/router-plugin@1.56.4(vite@5.4.3(@types/node@22.5.4)(terser@5.31.6))': + '@tanstack/router-plugin@1.56.4(vite@5.4.5(@types/node@22.5.5)(terser@5.32.0))': dependencies: '@babel/core': 7.25.2 '@babel/generator': 7.25.6 @@ -21179,7 +21104,7 @@ snapshots: unplugin: 1.12.2 zod: 3.23.8 optionalDependencies: - vite: 5.4.3(@types/node@22.5.4)(terser@5.31.6) + vite: 5.4.5(@types/node@22.5.5)(terser@5.32.0) transitivePeerDependencies: - supports-color @@ -21217,14 +21142,14 @@ snapshots: lz-string: 1.5.0 pretty-format: 27.5.1 - '@testing-library/react@16.0.1(@testing-library/dom@10.4.0)(@types/react-dom@18.3.0)(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@testing-library/react@16.0.1(@testing-library/dom@10.4.0)(@types/react-dom@18.3.0)(@types/react@18.3.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@babel/runtime': 7.25.4 '@testing-library/dom': 10.4.0 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) optionalDependencies: - '@types/react': 18.3.5 + '@types/react': 18.3.6 '@types/react-dom': 18.3.0 '@testing-library/user-event@14.5.2(@testing-library/dom@10.4.0)': @@ -21392,29 +21317,29 @@ snapshots: dependencies: '@babel/types': 7.25.6 - '@types/bn.js@5.1.5': + '@types/bn.js@5.1.6': dependencies: - '@types/node': 22.5.4 + '@types/node': 22.5.5 '@types/body-parser@1.19.2': dependencies: '@types/connect': 3.4.35 - '@types/node': 22.5.4 + '@types/node': 22.5.5 '@types/bonjour@3.5.10': dependencies: - '@types/node': 22.5.4 + '@types/node': 22.5.5 '@types/cli-table@0.3.4': {} '@types/connect-history-api-fallback@1.5.0': dependencies: '@types/express-serve-static-core': 4.17.35 - '@types/node': 22.5.4 + '@types/node': 22.5.5 '@types/connect@3.4.35': dependencies: - '@types/node': 22.5.4 + '@types/node': 22.5.5 '@types/cookie@0.6.0': {} @@ -21427,7 +21352,7 @@ snapshots: '@types/eslint-scope@3.7.4': dependencies: '@types/eslint': 8.40.2 - '@types/estree': 1.0.1 + '@types/estree': 1.0.5 '@types/eslint@8.40.2': dependencies: @@ -21442,7 +21367,7 @@ snapshots: '@types/express-serve-static-core@4.17.35': dependencies: - '@types/node': 22.5.4 + '@types/node': 22.5.5 '@types/qs': 6.9.7 '@types/range-parser': 1.2.4 '@types/send': 0.17.1 @@ -21459,11 +21384,11 @@ snapshots: '@types/glob@8.1.0': dependencies: '@types/minimatch': 5.1.2 - '@types/node': 22.5.4 + '@types/node': 22.5.5 '@types/graceful-fs@4.1.6': dependencies: - '@types/node': 22.5.4 + '@types/node': 22.5.5 '@types/hast@3.0.4': dependencies: @@ -21475,7 +21400,7 @@ snapshots: '@types/http-proxy@1.17.11': dependencies: - '@types/node': 22.5.4 + '@types/node': 22.5.5 '@types/istanbul-lib-coverage@2.0.4': {} @@ -21483,7 +21408,7 @@ snapshots: '@types/istanbul-lib-report@3.0.0': dependencies: - '@types/istanbul-lib-coverage': 2.0.4 + '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-lib-report@3.0.3': dependencies: @@ -21497,7 +21422,7 @@ snapshots: dependencies: '@types/istanbul-lib-report': 3.0.3 - '@types/jest@29.5.12': + '@types/jest@29.5.13': dependencies: expect: 29.5.0 pretty-format: 29.7.0 @@ -21512,7 +21437,7 @@ snapshots: '@types/keyv@3.1.4': dependencies: - '@types/node': 22.5.2 + '@types/node': 22.5.5 '@types/linkify-it@5.0.0': {} @@ -21548,22 +21473,22 @@ snapshots: '@types/mkdirp@0.5.2': dependencies: - '@types/node': 22.5.4 + '@types/node': 22.5.5 '@types/ms@0.7.34': {} '@types/mute-stream@0.0.4': dependencies: - '@types/node': 22.5.4 + '@types/node': 22.5.5 '@types/node-fetch@2.6.11': dependencies: - '@types/node': 22.5.4 + '@types/node': 22.5.5 form-data: 4.0.0 '@types/node-forge@1.3.11': dependencies: - '@types/node': 22.5.4 + '@types/node': 22.5.5 '@types/node@12.20.55': {} @@ -21577,11 +21502,7 @@ snapshots: dependencies: undici-types: 6.19.8 - '@types/node@22.5.2': - dependencies: - undici-types: 6.19.8 - - '@types/node@22.5.4': + '@types/node@22.5.5': dependencies: undici-types: 6.19.8 @@ -21593,7 +21514,7 @@ snapshots: '@types/prompts@2.4.9': dependencies: - '@types/node': 22.5.4 + '@types/node': 22.5.5 kleur: 3.0.3 '@types/prop-types@15.7.5': {} @@ -21610,49 +21531,49 @@ snapshots: '@types/react-dom@18.3.0': dependencies: - '@types/react': 18.3.5 + '@types/react': 18.3.6 '@types/react@18.3.1': dependencies: '@types/prop-types': 15.7.5 csstype: 3.1.3 - '@types/react@18.3.5': + '@types/react@18.3.6': dependencies: '@types/prop-types': 15.7.5 csstype: 3.1.3 '@types/resolve@0.0.8': dependencies: - '@types/node': 22.5.4 + '@types/node': 22.5.5 '@types/resolve@1.17.1': dependencies: - '@types/node': 22.5.4 + '@types/node': 22.5.5 '@types/responselike@1.0.3': dependencies: - '@types/node': 22.5.2 + '@types/node': 22.5.5 '@types/retry@0.12.0': {} '@types/rimraf@3.0.2': dependencies: '@types/glob': 8.1.0 - '@types/node': 22.5.4 + '@types/node': 22.5.5 '@types/secp256k1@4.0.6': dependencies: - '@types/node': 22.5.4 + '@types/node': 22.5.5 '@types/seedrandom@2.4.34': {} - '@types/semver@7.5.4': {} + '@types/semver@7.5.8': {} '@types/send@0.17.1': dependencies: '@types/mime': 1.3.2 - '@types/node': 22.5.4 + '@types/node': 22.5.5 '@types/serve-index@1.9.1': dependencies: @@ -21662,15 +21583,13 @@ snapshots: dependencies: '@types/http-errors': 2.0.1 '@types/mime': 3.0.1 - '@types/node': 22.5.4 + '@types/node': 22.5.5 '@types/sinonjs__fake-timers@8.1.5': {} '@types/sockjs@0.3.33': dependencies: - '@types/node': 22.5.4 - - '@types/stack-utils@2.0.1': {} + '@types/node': 22.5.5 '@types/stack-utils@2.0.3': {} @@ -21692,7 +21611,7 @@ snapshots: '@types/web-bluetooth@0.0.20': {} - '@types/web@0.0.159': {} + '@types/web@0.0.163': {} '@types/webgl-ext@0.0.30': {} @@ -21702,15 +21621,15 @@ snapshots: '@types/ws@7.4.7': dependencies: - '@types/node': 22.5.4 + '@types/node': 22.5.5 '@types/ws@8.5.12': dependencies: - '@types/node': 22.5.4 + '@types/node': 22.5.5 '@types/ws@8.5.5': dependencies: - '@types/node': 22.5.4 + '@types/node': 22.5.5 '@types/yargs-parser@21.0.0': {} @@ -21734,7 +21653,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 22.5.4 + '@types/node': 22.5.5 optional: true '@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2)': @@ -21966,7 +21885,7 @@ snapshots: dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.10.0(jiti@1.21.6)) '@types/json-schema': 7.0.12 - '@types/semver': 7.5.4 + '@types/semver': 7.5.8 '@typescript-eslint/scope-manager': 5.60.1 '@typescript-eslint/types': 5.60.1 '@typescript-eslint/typescript-estree': 5.60.1(typescript@5.6.2) @@ -21981,7 +21900,7 @@ snapshots: dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.10.0(jiti@1.21.6)) '@types/json-schema': 7.0.12 - '@types/semver': 7.5.4 + '@types/semver': 7.5.8 '@typescript-eslint/scope-manager': 5.62.0 '@typescript-eslint/types': 5.62.0 '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.6.2) @@ -21996,7 +21915,7 @@ snapshots: dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@types/json-schema': 7.0.12 - '@types/semver': 7.5.4 + '@types/semver': 7.5.8 '@typescript-eslint/scope-manager': 6.21.0 '@typescript-eslint/types': 6.21.0 '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.6.2) @@ -22039,30 +21958,30 @@ snapshots: '@ungap/structured-clone@1.2.0': {} - '@vitejs/plugin-react-swc@3.7.0(@swc/helpers@0.5.12)(vite@5.4.3(@types/node@22.5.4)(terser@5.31.6))': + '@vitejs/plugin-react-swc@3.7.0(@swc/helpers@0.5.12)(vite@5.4.5(@types/node@22.5.5)(terser@5.32.0))': dependencies: '@swc/core': 1.7.14(@swc/helpers@0.5.12) - vite: 5.4.3(@types/node@22.5.4)(terser@5.31.6) + vite: 5.4.5(@types/node@22.5.5)(terser@5.32.0) transitivePeerDependencies: - '@swc/helpers' - '@vitejs/plugin-react@4.3.1(vite@5.4.3(@types/node@22.5.4)(terser@5.31.6))': + '@vitejs/plugin-react@4.3.1(vite@5.4.5(@types/node@22.5.5)(terser@5.32.0))': dependencies: '@babel/core': 7.24.7 '@babel/plugin-transform-react-jsx-self': 7.24.7(@babel/core@7.24.7) '@babel/plugin-transform-react-jsx-source': 7.24.1(@babel/core@7.24.7) '@types/babel__core': 7.20.5 react-refresh: 0.14.2 - vite: 5.4.3(@types/node@22.5.4)(terser@5.31.6) + vite: 5.4.5(@types/node@22.5.5)(terser@5.32.0) transitivePeerDependencies: - supports-color - '@vitejs/plugin-vue@5.1.2(vite@5.4.3(@types/node@22.5.4)(terser@5.31.6))(vue@3.5.3(typescript@5.6.2))': + '@vitejs/plugin-vue@5.1.2(vite@5.4.5(@types/node@22.5.5)(terser@5.32.0))(vue@3.5.6(typescript@5.6.2))': dependencies: - vite: 5.4.3(@types/node@22.5.4)(terser@5.31.6) - vue: 3.5.3(typescript@5.6.2) + vite: 5.4.5(@types/node@22.5.5)(terser@5.32.0) + vue: 3.5.6(typescript@5.6.2) - '@vitest/browser@2.0.5(bufferutil@4.0.8)(playwright@1.47.0)(typescript@5.6.2)(utf-8-validate@5.0.10)(vitest@2.0.5)(webdriverio@9.0.9(bufferutil@4.0.8)(utf-8-validate@6.0.4))': + '@vitest/browser@2.0.5(bufferutil@4.0.8)(playwright@1.47.1)(typescript@5.6.2)(utf-8-validate@5.0.10)(vitest@2.0.5)(webdriverio@9.0.9(bufferutil@4.0.8)(utf-8-validate@6.0.4))': dependencies: '@testing-library/dom': 10.4.0 '@testing-library/user-event': 14.5.2(@testing-library/dom@10.4.0) @@ -22070,10 +21989,10 @@ snapshots: magic-string: 0.30.11 msw: 2.4.4(typescript@5.6.2) sirv: 2.0.4 - vitest: 2.0.5(@types/node@22.5.4)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.31.6) + vitest: 2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.32.0) ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) optionalDependencies: - playwright: 1.47.0 + playwright: 1.47.1 webdriverio: 9.0.9(bufferutil@4.0.8)(utf-8-validate@6.0.4) transitivePeerDependencies: - bufferutil @@ -22081,7 +22000,7 @@ snapshots: - utf-8-validate optional: true - '@vitest/browser@2.0.5(bufferutil@4.0.8)(playwright@1.47.0)(typescript@5.6.2)(utf-8-validate@6.0.4)(vitest@2.0.5)(webdriverio@9.0.9(bufferutil@4.0.8)(utf-8-validate@6.0.4))': + '@vitest/browser@2.0.5(bufferutil@4.0.8)(playwright@1.47.1)(typescript@5.6.2)(utf-8-validate@6.0.4)(vitest@2.0.5)(webdriverio@9.0.9(bufferutil@4.0.8)(utf-8-validate@6.0.4))': dependencies: '@testing-library/dom': 10.4.0 '@testing-library/user-event': 14.5.2(@testing-library/dom@10.4.0) @@ -22089,17 +22008,17 @@ snapshots: magic-string: 0.30.11 msw: 2.4.4(typescript@5.6.2) sirv: 2.0.4 - vitest: 2.0.5(@types/node@22.5.4)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.31.6) + vitest: 2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.32.0) ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4) optionalDependencies: - playwright: 1.47.0 + playwright: 1.47.1 webdriverio: 9.0.9(bufferutil@4.0.8)(utf-8-validate@6.0.4) transitivePeerDependencies: - bufferutil - typescript - utf-8-validate - '@vitest/coverage-istanbul@2.0.5(vitest@2.0.5(@types/node@22.5.4)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.31.6))': + '@vitest/coverage-istanbul@2.0.5(vitest@2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.32.0))': dependencies: '@istanbuljs/schema': 0.1.3 debug: 4.3.7 @@ -22111,7 +22030,7 @@ snapshots: magicast: 0.3.5 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.0.5(@types/node@22.5.4)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.31.6) + vitest: 2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.32.0) transitivePeerDependencies: - supports-color @@ -22148,35 +22067,35 @@ snapshots: loupe: 3.1.1 tinyrainbow: 1.2.0 - '@vue/compiler-core@3.5.3': + '@vue/compiler-core@3.5.6': dependencies: '@babel/parser': 7.25.6 - '@vue/shared': 3.5.3 + '@vue/shared': 3.5.6 entities: 4.5.0 estree-walker: 2.0.2 source-map-js: 1.2.1 - '@vue/compiler-dom@3.5.3': + '@vue/compiler-dom@3.5.6': dependencies: - '@vue/compiler-core': 3.5.3 - '@vue/shared': 3.5.3 + '@vue/compiler-core': 3.5.6 + '@vue/shared': 3.5.6 - '@vue/compiler-sfc@3.5.3': + '@vue/compiler-sfc@3.5.6': dependencies: '@babel/parser': 7.25.6 - '@vue/compiler-core': 3.5.3 - '@vue/compiler-dom': 3.5.3 - '@vue/compiler-ssr': 3.5.3 - '@vue/shared': 3.5.3 + '@vue/compiler-core': 3.5.6 + '@vue/compiler-dom': 3.5.6 + '@vue/compiler-ssr': 3.5.6 + '@vue/shared': 3.5.6 estree-walker: 2.0.2 magic-string: 0.30.11 - postcss: 8.4.45 + postcss: 8.4.47 source-map-js: 1.2.1 - '@vue/compiler-ssr@3.5.3': + '@vue/compiler-ssr@3.5.6': dependencies: - '@vue/compiler-dom': 3.5.3 - '@vue/shared': 3.5.3 + '@vue/compiler-dom': 3.5.6 + '@vue/shared': 3.5.6 '@vue/devtools-api@6.6.3': {} @@ -22198,47 +22117,47 @@ snapshots: dependencies: rfdc: 1.4.1 - '@vue/reactivity@3.5.3': + '@vue/reactivity@3.5.6': dependencies: - '@vue/shared': 3.5.3 + '@vue/shared': 3.5.6 - '@vue/runtime-core@3.5.3': + '@vue/runtime-core@3.5.6': dependencies: - '@vue/reactivity': 3.5.3 - '@vue/shared': 3.5.3 + '@vue/reactivity': 3.5.6 + '@vue/shared': 3.5.6 - '@vue/runtime-dom@3.5.3': + '@vue/runtime-dom@3.5.6': dependencies: - '@vue/reactivity': 3.5.3 - '@vue/runtime-core': 3.5.3 - '@vue/shared': 3.5.3 + '@vue/reactivity': 3.5.6 + '@vue/runtime-core': 3.5.6 + '@vue/shared': 3.5.6 csstype: 3.1.3 - '@vue/server-renderer@3.5.3(vue@3.5.3(typescript@5.6.2))': + '@vue/server-renderer@3.5.6(vue@3.5.6(typescript@5.6.2))': dependencies: - '@vue/compiler-ssr': 3.5.3 - '@vue/shared': 3.5.3 - vue: 3.5.3(typescript@5.6.2) + '@vue/compiler-ssr': 3.5.6 + '@vue/shared': 3.5.6 + vue: 3.5.6(typescript@5.6.2) '@vue/shared@3.4.38': {} - '@vue/shared@3.5.3': {} + '@vue/shared@3.5.6': {} - '@vueuse/core@11.0.0(vue@3.5.3(typescript@5.6.2))': + '@vueuse/core@11.0.0(vue@3.5.6(typescript@5.6.2))': dependencies: '@types/web-bluetooth': 0.0.20 '@vueuse/metadata': 11.0.0 - '@vueuse/shared': 11.0.0(vue@3.5.3(typescript@5.6.2)) - vue-demi: 0.14.10(vue@3.5.3(typescript@5.6.2)) + '@vueuse/shared': 11.0.0(vue@3.5.6(typescript@5.6.2)) + vue-demi: 0.14.10(vue@3.5.6(typescript@5.6.2)) transitivePeerDependencies: - '@vue/composition-api' - vue - '@vueuse/integrations@11.0.0(axios@1.7.7)(focus-trap@7.5.4)(idb-keyval@6.2.1)(qrcode@1.5.3)(vue@3.5.3(typescript@5.6.2))': + '@vueuse/integrations@11.0.0(axios@1.7.7)(focus-trap@7.5.4)(idb-keyval@6.2.1)(qrcode@1.5.3)(vue@3.5.6(typescript@5.6.2))': dependencies: - '@vueuse/core': 11.0.0(vue@3.5.3(typescript@5.6.2)) - '@vueuse/shared': 11.0.0(vue@3.5.3(typescript@5.6.2)) - vue-demi: 0.14.10(vue@3.5.3(typescript@5.6.2)) + '@vueuse/core': 11.0.0(vue@3.5.6(typescript@5.6.2)) + '@vueuse/shared': 11.0.0(vue@3.5.6(typescript@5.6.2)) + vue-demi: 0.14.10(vue@3.5.6(typescript@5.6.2)) optionalDependencies: axios: 1.7.7 focus-trap: 7.5.4 @@ -22250,22 +22169,22 @@ snapshots: '@vueuse/metadata@11.0.0': {} - '@vueuse/shared@11.0.0(vue@3.5.3(typescript@5.6.2))': + '@vueuse/shared@11.0.0(vue@3.5.6(typescript@5.6.2))': dependencies: - vue-demi: 0.14.10(vue@3.5.3(typescript@5.6.2)) + vue-demi: 0.14.10(vue@3.5.6(typescript@5.6.2)) transitivePeerDependencies: - '@vue/composition-api' - vue - '@wagmi/connectors@5.1.9(@types/react@18.3.5)(@wagmi/core@2.13.4(@tanstack/query-core@5.55.4)(@types/react@18.3.5)(immer@9.0.21)(react@18.3.1)(typescript@5.6.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.5)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.21.2)(typescript@5.6.2)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8)': + '@wagmi/connectors@5.1.10(@types/react@18.3.6)(@wagmi/core@2.13.5(@tanstack/query-core@5.55.4)(@types/react@18.3.6)(immer@9.0.21)(react@18.3.1)(typescript@5.6.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.6)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.21.3)(typescript@5.6.2)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8)': dependencies: '@coinbase/wallet-sdk': 4.0.4 - '@metamask/sdk': 0.28.2(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.5)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.21.2)(utf-8-validate@5.0.10) + '@metamask/sdk': 0.28.2(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.6)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.21.3)(utf-8-validate@5.0.10) '@safe-global/safe-apps-provider': 0.18.3(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8) '@safe-global/safe-apps-sdk': 9.1.0(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8) - '@wagmi/core': 2.13.4(@tanstack/query-core@5.55.4)(@types/react@18.3.5)(immer@9.0.21)(react@18.3.1)(typescript@5.6.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8)) - '@walletconnect/ethereum-provider': 2.15.3(@types/react@18.3.5)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) - '@walletconnect/modal': 2.6.2(@types/react@18.3.5)(react@18.3.1) + '@wagmi/core': 2.13.5(@tanstack/query-core@5.55.4)(@types/react@18.3.6)(immer@9.0.21)(react@18.3.1)(typescript@5.6.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8)) + '@walletconnect/ethereum-provider': 2.16.1(@types/react@18.3.6)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) + '@walletconnect/modal': 2.6.2(@types/react@18.3.6)(react@18.3.1) cbw-sdk: '@coinbase/wallet-sdk@3.9.3' viem: 2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8) optionalDependencies: @@ -22296,12 +22215,26 @@ snapshots: - utf-8-validate - zod - '@wagmi/core@2.13.4(@tanstack/query-core@5.55.4)(@types/react@18.3.5)(immer@9.0.21)(react@18.3.1)(typescript@5.6.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8))': + '@wagmi/core@2.13.4(@tanstack/query-core@5.55.4)(@types/react@18.3.6)(immer@9.0.21)(react@18.3.1)(typescript@5.6.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8))': + dependencies: + eventemitter3: 5.0.1 + mipd: 0.0.7(typescript@5.6.2) + viem: 2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8) + zustand: 4.4.1(@types/react@18.3.6)(immer@9.0.21)(react@18.3.1) + optionalDependencies: + '@tanstack/query-core': 5.55.4 + typescript: 5.6.2 + transitivePeerDependencies: + - '@types/react' + - immer + - react + + '@wagmi/core@2.13.5(@tanstack/query-core@5.55.4)(@types/react@18.3.6)(immer@9.0.21)(react@18.3.1)(typescript@5.6.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8))': dependencies: eventemitter3: 5.0.1 mipd: 0.0.7(typescript@5.6.2) viem: 2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8) - zustand: 4.4.1(@types/react@18.3.5)(immer@9.0.21)(react@18.3.1) + zustand: 4.4.1(@types/react@18.3.6)(immer@9.0.21)(react@18.3.1) optionalDependencies: '@tanstack/query-core': 5.55.4 typescript: 5.6.2 @@ -22404,43 +22337,7 @@ snapshots: - uWebSockets.js - utf-8-validate - '@walletconnect/core@2.15.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)': - dependencies: - '@walletconnect/heartbeat': 1.2.2 - '@walletconnect/jsonrpc-provider': 1.0.14 - '@walletconnect/jsonrpc-types': 1.0.4 - '@walletconnect/jsonrpc-utils': 1.0.8 - '@walletconnect/jsonrpc-ws-connection': 1.0.14(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@walletconnect/keyvaluestorage': 1.1.1 - '@walletconnect/logger': 2.1.2 - '@walletconnect/relay-api': 1.0.11 - '@walletconnect/relay-auth': 1.0.4 - '@walletconnect/safe-json': 1.0.2 - '@walletconnect/time': 1.0.2 - '@walletconnect/types': 2.15.2 - '@walletconnect/utils': 2.15.2 - events: 3.3.0 - lodash.isequal: 4.5.0 - uint8arrays: 3.1.0 - transitivePeerDependencies: - - '@azure/app-configuration' - - '@azure/cosmos' - - '@azure/data-tables' - - '@azure/identity' - - '@azure/keyvault-secrets' - - '@azure/storage-blob' - - '@capacitor/preferences' - - '@netlify/blobs' - - '@planetscale/database' - - '@react-native-async-storage/async-storage' - - '@upstash/redis' - - '@vercel/kv' - - bufferutil - - ioredis - - uWebSockets.js - - utf-8-validate - - '@walletconnect/core@2.15.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@walletconnect/core@2.16.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@walletconnect/heartbeat': 1.2.2 '@walletconnect/jsonrpc-provider': 1.0.14 @@ -22453,8 +22350,8 @@ snapshots: '@walletconnect/relay-auth': 1.0.4 '@walletconnect/safe-json': 1.0.2 '@walletconnect/time': 1.0.2 - '@walletconnect/types': 2.15.3 - '@walletconnect/utils': 2.15.3 + '@walletconnect/types': 2.16.1 + '@walletconnect/utils': 2.16.1 events: 3.3.0 lodash.isequal: 4.5.0 uint8arrays: 3.1.0 @@ -22480,13 +22377,13 @@ snapshots: dependencies: tslib: 1.14.1 - '@walletconnect/ethereum-provider@2.13.0(@types/react@18.3.5)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10)': + '@walletconnect/ethereum-provider@2.13.0(@types/react@18.3.6)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10)': dependencies: '@walletconnect/jsonrpc-http-connection': 1.0.8 '@walletconnect/jsonrpc-provider': 1.0.14 '@walletconnect/jsonrpc-types': 1.0.4 '@walletconnect/jsonrpc-utils': 1.0.8 - '@walletconnect/modal': 2.6.2(@types/react@18.3.5)(react@18.3.1) + '@walletconnect/modal': 2.6.2(@types/react@18.3.6)(react@18.3.1) '@walletconnect/sign-client': 2.13.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@walletconnect/types': 2.13.0 '@walletconnect/universal-provider': 2.13.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -22513,17 +22410,17 @@ snapshots: - uWebSockets.js - utf-8-validate - '@walletconnect/ethereum-provider@2.15.3(@types/react@18.3.5)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10)': + '@walletconnect/ethereum-provider@2.16.1(@types/react@18.3.6)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10)': dependencies: '@walletconnect/jsonrpc-http-connection': 1.0.8 '@walletconnect/jsonrpc-provider': 1.0.14 '@walletconnect/jsonrpc-types': 1.0.4 '@walletconnect/jsonrpc-utils': 1.0.8 - '@walletconnect/modal': 2.6.2(@types/react@18.3.5)(react@18.3.1) - '@walletconnect/sign-client': 2.15.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@walletconnect/types': 2.15.3 - '@walletconnect/universal-provider': 2.15.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@walletconnect/utils': 2.15.3 + '@walletconnect/modal': 2.6.2(@types/react@18.3.6)(react@18.3.1) + '@walletconnect/sign-client': 2.16.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@walletconnect/types': 2.16.1 + '@walletconnect/universal-provider': 2.16.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@walletconnect/utils': 2.16.1 events: 3.3.0 transitivePeerDependencies: - '@azure/app-configuration' @@ -22637,16 +22534,16 @@ snapshots: '@walletconnect/mobile-registry@1.4.0': {} - '@walletconnect/modal-core@2.6.2(@types/react@18.3.5)(react@18.3.1)': + '@walletconnect/modal-core@2.6.2(@types/react@18.3.6)(react@18.3.1)': dependencies: - valtio: 1.11.2(@types/react@18.3.5)(react@18.3.1) + valtio: 1.11.2(@types/react@18.3.6)(react@18.3.1) transitivePeerDependencies: - '@types/react' - react - '@walletconnect/modal-ui@2.6.2(@types/react@18.3.5)(react@18.3.1)': + '@walletconnect/modal-ui@2.6.2(@types/react@18.3.6)(react@18.3.1)': dependencies: - '@walletconnect/modal-core': 2.6.2(@types/react@18.3.5)(react@18.3.1) + '@walletconnect/modal-core': 2.6.2(@types/react@18.3.6)(react@18.3.1) lit: 2.8.0 motion: 10.16.2 qrcode: 1.5.3 @@ -22654,10 +22551,10 @@ snapshots: - '@types/react' - react - '@walletconnect/modal@2.6.2(@types/react@18.3.5)(react@18.3.1)': + '@walletconnect/modal@2.6.2(@types/react@18.3.6)(react@18.3.1)': dependencies: - '@walletconnect/modal-core': 2.6.2(@types/react@18.3.5)(react@18.3.1) - '@walletconnect/modal-ui': 2.6.2(@types/react@18.3.5)(react@18.3.1) + '@walletconnect/modal-core': 2.6.2(@types/react@18.3.6)(react@18.3.1) + '@walletconnect/modal-ui': 2.6.2(@types/react@18.3.6)(react@18.3.1) transitivePeerDependencies: - '@types/react' - react @@ -22754,45 +22651,16 @@ snapshots: - uWebSockets.js - utf-8-validate - '@walletconnect/sign-client@2.15.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)': - dependencies: - '@walletconnect/core': 2.15.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@walletconnect/events': 1.0.1 - '@walletconnect/heartbeat': 1.2.2 - '@walletconnect/jsonrpc-utils': 1.0.8 - '@walletconnect/logger': 2.1.2 - '@walletconnect/time': 1.0.2 - '@walletconnect/types': 2.15.2 - '@walletconnect/utils': 2.15.2 - events: 3.3.0 - transitivePeerDependencies: - - '@azure/app-configuration' - - '@azure/cosmos' - - '@azure/data-tables' - - '@azure/identity' - - '@azure/keyvault-secrets' - - '@azure/storage-blob' - - '@capacitor/preferences' - - '@netlify/blobs' - - '@planetscale/database' - - '@react-native-async-storage/async-storage' - - '@upstash/redis' - - '@vercel/kv' - - bufferutil - - ioredis - - uWebSockets.js - - utf-8-validate - - '@walletconnect/sign-client@2.15.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@walletconnect/sign-client@2.16.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: - '@walletconnect/core': 2.15.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@walletconnect/core': 2.16.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@walletconnect/events': 1.0.1 '@walletconnect/heartbeat': 1.2.2 '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/logger': 2.1.2 '@walletconnect/time': 1.0.2 - '@walletconnect/types': 2.15.3 - '@walletconnect/utils': 2.15.3 + '@walletconnect/types': 2.16.1 + '@walletconnect/utils': 2.16.1 events: 3.3.0 transitivePeerDependencies: - '@azure/app-configuration' @@ -22890,31 +22758,7 @@ snapshots: - ioredis - uWebSockets.js - '@walletconnect/types@2.15.2': - dependencies: - '@walletconnect/events': 1.0.1 - '@walletconnect/heartbeat': 1.2.2 - '@walletconnect/jsonrpc-types': 1.0.4 - '@walletconnect/keyvaluestorage': 1.1.1 - '@walletconnect/logger': 2.1.2 - events: 3.3.0 - transitivePeerDependencies: - - '@azure/app-configuration' - - '@azure/cosmos' - - '@azure/data-tables' - - '@azure/identity' - - '@azure/keyvault-secrets' - - '@azure/storage-blob' - - '@capacitor/preferences' - - '@netlify/blobs' - - '@planetscale/database' - - '@react-native-async-storage/async-storage' - - '@upstash/redis' - - '@vercel/kv' - - ioredis - - uWebSockets.js - - '@walletconnect/types@2.15.3': + '@walletconnect/types@2.16.1': dependencies: '@walletconnect/events': 1.0.1 '@walletconnect/heartbeat': 1.2.2 @@ -22998,16 +22842,16 @@ snapshots: - uWebSockets.js - utf-8-validate - '@walletconnect/universal-provider@2.15.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@walletconnect/universal-provider@2.16.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@walletconnect/jsonrpc-http-connection': 1.0.8 '@walletconnect/jsonrpc-provider': 1.0.14 '@walletconnect/jsonrpc-types': 1.0.4 '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/logger': 2.1.2 - '@walletconnect/sign-client': 2.15.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@walletconnect/types': 2.15.3 - '@walletconnect/utils': 2.15.3 + '@walletconnect/sign-client': 2.16.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@walletconnect/types': 2.16.1 + '@walletconnect/utils': 2.16.1 events: 3.3.0 transitivePeerDependencies: - '@azure/app-configuration' @@ -23124,41 +22968,7 @@ snapshots: - ioredis - uWebSockets.js - '@walletconnect/utils@2.15.2': - dependencies: - '@stablelib/chacha20poly1305': 1.0.1 - '@stablelib/hkdf': 1.0.1 - '@stablelib/random': 1.0.2 - '@stablelib/sha256': 1.0.1 - '@stablelib/x25519': 1.0.3 - '@walletconnect/relay-api': 1.0.11 - '@walletconnect/relay-auth': 1.0.4 - '@walletconnect/safe-json': 1.0.2 - '@walletconnect/time': 1.0.2 - '@walletconnect/types': 2.15.2 - '@walletconnect/window-getters': 1.0.1 - '@walletconnect/window-metadata': 1.0.1 - detect-browser: 5.3.0 - elliptic: 6.5.7 - query-string: 7.1.3 - uint8arrays: 3.1.0 - transitivePeerDependencies: - - '@azure/app-configuration' - - '@azure/cosmos' - - '@azure/data-tables' - - '@azure/identity' - - '@azure/keyvault-secrets' - - '@azure/storage-blob' - - '@capacitor/preferences' - - '@netlify/blobs' - - '@planetscale/database' - - '@react-native-async-storage/async-storage' - - '@upstash/redis' - - '@vercel/kv' - - ioredis - - uWebSockets.js - - '@walletconnect/utils@2.15.3': + '@walletconnect/utils@2.16.1': dependencies: '@stablelib/chacha20poly1305': 1.0.1 '@stablelib/hkdf': 1.0.1 @@ -23169,7 +22979,7 @@ snapshots: '@walletconnect/relay-auth': 1.0.4 '@walletconnect/safe-json': 1.0.2 '@walletconnect/time': 1.0.2 - '@walletconnect/types': 2.15.3 + '@walletconnect/types': 2.16.1 '@walletconnect/window-getters': 1.0.1 '@walletconnect/window-metadata': 1.0.1 detect-browser: 5.3.0 @@ -23266,11 +23076,11 @@ snapshots: bignumber.js: 9.1.2 dayjs: 1.11.10 - '@web3modal/core@5.0.0(@types/react@18.3.5)(react@18.3.1)': + '@web3modal/core@5.0.0(@types/react@18.3.6)(react@18.3.1)': dependencies: '@web3modal/common': 5.0.0 '@web3modal/wallet': 5.0.0 - valtio: 1.11.2(@types/react@18.3.5)(react@18.3.1) + valtio: 1.11.2(@types/react@18.3.6)(react@18.3.1) transitivePeerDependencies: - '@types/react' - react @@ -23279,9 +23089,9 @@ snapshots: dependencies: buffer: 6.0.3 - '@web3modal/scaffold-react@5.0.0(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@web3modal/scaffold-react@5.0.0(@types/react@18.3.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@web3modal/scaffold': 5.0.0(@types/react@18.3.5)(react@18.3.1) + '@web3modal/scaffold': 5.0.0(@types/react@18.3.6)(react@18.3.1) optionalDependencies: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) @@ -23302,20 +23112,20 @@ snapshots: - ioredis - uWebSockets.js - '@web3modal/scaffold-utils@5.0.0(@types/react@18.3.5)(react@18.3.1)': + '@web3modal/scaffold-utils@5.0.0(@types/react@18.3.6)(react@18.3.1)': dependencies: - '@web3modal/core': 5.0.0(@types/react@18.3.5)(react@18.3.1) + '@web3modal/core': 5.0.0(@types/react@18.3.6)(react@18.3.1) '@web3modal/polyfills': 5.0.0 - valtio: 1.11.2(@types/react@18.3.5)(react@18.3.1) + valtio: 1.11.2(@types/react@18.3.6)(react@18.3.1) transitivePeerDependencies: - '@types/react' - react - '@web3modal/scaffold-vue@5.0.0(@types/react@18.3.5)(react@18.3.1)(vue@3.5.3(typescript@5.6.2))': + '@web3modal/scaffold-vue@5.0.0(@types/react@18.3.6)(react@18.3.1)(vue@3.5.6(typescript@5.6.2))': dependencies: - '@web3modal/scaffold': 5.0.0(@types/react@18.3.5)(react@18.3.1) + '@web3modal/scaffold': 5.0.0(@types/react@18.3.6)(react@18.3.1) optionalDependencies: - vue: 3.5.3(typescript@5.6.2) + vue: 3.5.6(typescript@5.6.2) transitivePeerDependencies: - '@azure/app-configuration' - '@azure/cosmos' @@ -23334,12 +23144,12 @@ snapshots: - react - uWebSockets.js - '@web3modal/scaffold@5.0.0(@types/react@18.3.5)(react@18.3.1)': + '@web3modal/scaffold@5.0.0(@types/react@18.3.6)(react@18.3.1)': dependencies: '@web3modal/common': 5.0.0 - '@web3modal/core': 5.0.0(@types/react@18.3.5)(react@18.3.1) - '@web3modal/scaffold-utils': 5.0.0(@types/react@18.3.5)(react@18.3.1) - '@web3modal/siwe': 5.0.0(@types/react@18.3.5)(react@18.3.1) + '@web3modal/core': 5.0.0(@types/react@18.3.6)(react@18.3.1) + '@web3modal/scaffold-utils': 5.0.0(@types/react@18.3.6)(react@18.3.1) + '@web3modal/siwe': 5.0.0(@types/react@18.3.6)(react@18.3.1) '@web3modal/ui': 5.0.0 '@web3modal/wallet': 5.0.0 lit: 3.1.0 @@ -23361,13 +23171,13 @@ snapshots: - react - uWebSockets.js - '@web3modal/siwe@5.0.0(@types/react@18.3.5)(react@18.3.1)': + '@web3modal/siwe@5.0.0(@types/react@18.3.6)(react@18.3.1)': dependencies: '@walletconnect/utils': 2.12.0 - '@web3modal/core': 5.0.0(@types/react@18.3.5)(react@18.3.1) - '@web3modal/scaffold-utils': 5.0.0(@types/react@18.3.5)(react@18.3.1) + '@web3modal/core': 5.0.0(@types/react@18.3.6)(react@18.3.1) + '@web3modal/scaffold-utils': 5.0.0(@types/react@18.3.6)(react@18.3.1) lit: 3.1.0 - valtio: 1.11.2(@types/react@18.3.5)(react@18.3.1) + valtio: 1.11.2(@types/react@18.3.6)(react@18.3.1) transitivePeerDependencies: - '@azure/app-configuration' - '@azure/cosmos' @@ -23386,7 +23196,7 @@ snapshots: - react - uWebSockets.js - '@web3modal/solana@5.0.0(@types/react@18.3.5)(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(utf-8-validate@5.0.10)(vue@3.5.3(typescript@5.6.2))': + '@web3modal/solana@5.0.0(@types/react@18.3.6)(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(utf-8-validate@5.0.10)(vue@3.5.6(typescript@5.6.2))': dependencies: '@ethersproject/sha2': 5.7.0 '@solana/wallet-adapter-backpack': 0.1.14(@solana/web3.js@1.91.7(bufferutil@4.0.8)(utf-8-validate@5.0.10)) @@ -23398,16 +23208,16 @@ snapshots: '@solana/web3.js': 1.91.7(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@walletconnect/universal-provider': 2.11.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@web3modal/polyfills': 5.0.0 - '@web3modal/scaffold': 5.0.0(@types/react@18.3.5)(react@18.3.1) - '@web3modal/scaffold-react': 5.0.0(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@web3modal/scaffold-utils': 5.0.0(@types/react@18.3.5)(react@18.3.1) - '@web3modal/scaffold-vue': 5.0.0(@types/react@18.3.5)(react@18.3.1)(vue@3.5.3(typescript@5.6.2)) + '@web3modal/scaffold': 5.0.0(@types/react@18.3.6)(react@18.3.1) + '@web3modal/scaffold-react': 5.0.0(@types/react@18.3.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@web3modal/scaffold-utils': 5.0.0(@types/react@18.3.6)(react@18.3.1) + '@web3modal/scaffold-vue': 5.0.0(@types/react@18.3.6)(react@18.3.1)(vue@3.5.6(typescript@5.6.2)) bn.js: 5.2.1 bs58: 5.0.0 optionalDependencies: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - vue: 3.5.3(typescript@5.6.2) + vue: 3.5.6(typescript@5.6.2) transitivePeerDependencies: - '@azure/app-configuration' - '@azure/cosmos' @@ -23433,22 +23243,22 @@ snapshots: lit: 3.1.0 qrcode: 1.5.3 - '@web3modal/wagmi@5.0.0(qnqm5fqu36se3alxnv42h2vieq)': + '@web3modal/wagmi@5.0.0(jndftfy7222tuqncvhtozh2d74)': dependencies: - '@wagmi/connectors': 5.1.9(@types/react@18.3.5)(@wagmi/core@2.13.4(@tanstack/query-core@5.55.4)(@types/react@18.3.5)(immer@9.0.21)(react@18.3.1)(typescript@5.6.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.5)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.21.2)(typescript@5.6.2)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) - '@wagmi/core': 2.13.4(@tanstack/query-core@5.55.4)(@types/react@18.3.5)(immer@9.0.21)(react@18.3.1)(typescript@5.6.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8)) - '@walletconnect/ethereum-provider': 2.13.0(@types/react@18.3.5)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) + '@wagmi/connectors': 5.1.10(@types/react@18.3.6)(@wagmi/core@2.13.5(@tanstack/query-core@5.55.4)(@types/react@18.3.6)(immer@9.0.21)(react@18.3.1)(typescript@5.6.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.6)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.21.3)(typescript@5.6.2)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) + '@wagmi/core': 2.13.4(@tanstack/query-core@5.55.4)(@types/react@18.3.6)(immer@9.0.21)(react@18.3.1)(typescript@5.6.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8)) + '@walletconnect/ethereum-provider': 2.13.0(@types/react@18.3.6)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) '@web3modal/polyfills': 5.0.0 - '@web3modal/scaffold': 5.0.0(@types/react@18.3.5)(react@18.3.1) - '@web3modal/scaffold-react': 5.0.0(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@web3modal/scaffold-utils': 5.0.0(@types/react@18.3.5)(react@18.3.1) - '@web3modal/scaffold-vue': 5.0.0(@types/react@18.3.5)(react@18.3.1)(vue@3.5.3(typescript@5.6.2)) - '@web3modal/siwe': 5.0.0(@types/react@18.3.5)(react@18.3.1) + '@web3modal/scaffold': 5.0.0(@types/react@18.3.6)(react@18.3.1) + '@web3modal/scaffold-react': 5.0.0(@types/react@18.3.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@web3modal/scaffold-utils': 5.0.0(@types/react@18.3.6)(react@18.3.1) + '@web3modal/scaffold-vue': 5.0.0(@types/react@18.3.6)(react@18.3.1)(vue@3.5.6(typescript@5.6.2)) + '@web3modal/siwe': 5.0.0(@types/react@18.3.6)(react@18.3.1) viem: 2.20.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8) optionalDependencies: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - vue: 3.5.3(typescript@5.6.2) + vue: 3.5.6(typescript@5.6.2) transitivePeerDependencies: - '@azure/app-configuration' - '@azure/cosmos' @@ -23637,7 +23447,7 @@ snapshots: acorn-walk@7.2.0: {} - acorn-walk@8.3.3: + acorn-walk@8.3.4: dependencies: acorn: 8.12.1 optional: true @@ -23765,7 +23575,7 @@ snapshots: ansi-regex@5.0.1: {} - ansi-regex@6.0.1: {} + ansi-regex@6.1.0: {} ansi-styles@2.2.1: {} @@ -24024,14 +23834,14 @@ snapshots: subarg: 1.0.0 timestring: 6.0.0 - autoprefixer@10.4.20(postcss@8.4.45): + autoprefixer@10.4.20(postcss@8.4.47): dependencies: browserslist: 4.23.3 caniuse-lite: 1.0.30001647 fraction.js: 4.3.7 normalize-range: 0.1.2 picocolors: 1.0.1 - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 available-typed-arrays@1.0.7: @@ -24125,7 +23935,7 @@ snapshots: babel-plugin-macros@3.1.0: dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.24.7 cosmiconfig: 7.1.0 resolve: 1.22.8 @@ -24627,16 +24437,16 @@ snapshots: builtin-status-codes@3.0.0: {} - bun@1.1.26: + bun@1.1.27: optionalDependencies: - '@oven/bun-darwin-aarch64': 1.1.26 - '@oven/bun-darwin-x64': 1.1.26 - '@oven/bun-darwin-x64-baseline': 1.1.26 - '@oven/bun-linux-aarch64': 1.1.26 - '@oven/bun-linux-x64': 1.1.26 - '@oven/bun-linux-x64-baseline': 1.1.26 - '@oven/bun-windows-x64': 1.1.26 - '@oven/bun-windows-x64-baseline': 1.1.26 + '@oven/bun-darwin-aarch64': 1.1.27 + '@oven/bun-darwin-x64': 1.1.27 + '@oven/bun-darwin-x64-baseline': 1.1.27 + '@oven/bun-linux-aarch64': 1.1.27 + '@oven/bun-linux-x64': 1.1.27 + '@oven/bun-linux-x64-baseline': 1.1.27 + '@oven/bun-windows-x64': 1.1.27 + '@oven/bun-windows-x64-baseline': 1.1.27 bundle-name@4.1.0: dependencies: @@ -24881,7 +24691,7 @@ snapshots: chrome-launcher@0.15.2: dependencies: - '@types/node': 22.5.4 + '@types/node': 22.5.5 escape-string-regexp: 4.0.0 is-wsl: 2.2.0 lighthouse-logger: 1.4.2 @@ -24892,8 +24702,6 @@ snapshots: ci-info@2.0.0: {} - ci-info@3.8.0: {} - ci-info@3.9.0: {} cipher-base@1.0.4: @@ -25368,18 +25176,18 @@ snapshots: crypto-random-string@2.0.0: {} - css-blank-pseudo@3.0.3(postcss@8.4.45): + css-blank-pseudo@3.0.3(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-selector-parser: 6.0.13 - css-declaration-sorter@6.4.0(postcss@8.4.45): + css-declaration-sorter@6.4.0(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 - css-has-pseudo@3.0.4(postcss@8.4.45): + css-has-pseudo@3.0.4(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-selector-parser: 6.0.13 css-in-js-utils@3.1.0: @@ -25388,21 +25196,21 @@ snapshots: css-loader@6.8.1(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: - icss-utils: 5.1.0(postcss@8.4.45) - postcss: 8.4.45 - postcss-modules-extract-imports: 3.0.0(postcss@8.4.45) - postcss-modules-local-by-default: 4.0.3(postcss@8.4.45) - postcss-modules-scope: 3.0.0(postcss@8.4.45) - postcss-modules-values: 4.0.0(postcss@8.4.45) + icss-utils: 5.1.0(postcss@8.4.47) + postcss: 8.4.47 + postcss-modules-extract-imports: 3.0.0(postcss@8.4.47) + postcss-modules-local-by-default: 4.0.3(postcss@8.4.47) + postcss-modules-scope: 3.0.0(postcss@8.4.47) + postcss-modules-values: 4.0.0(postcss@8.4.47) postcss-value-parser: 4.2.0 semver: 7.3.8 webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) css-minimizer-webpack-plugin@3.4.1(esbuild@0.17.19)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: - cssnano: 5.1.15(postcss@8.4.45) + cssnano: 5.1.15(postcss@8.4.47) jest-worker: 27.5.1 - postcss: 8.4.45 + postcss: 8.4.47 schema-utils: 4.2.0 serialize-javascript: 6.0.1 source-map: 0.6.1 @@ -25410,9 +25218,9 @@ snapshots: optionalDependencies: esbuild: 0.17.19 - css-prefers-color-scheme@6.0.3(postcss@8.4.45): + css-prefers-color-scheme@6.0.3(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 css-select-base-adapter@0.1.1: {} @@ -25461,48 +25269,48 @@ snapshots: cssesc@3.0.0: {} - cssnano-preset-default@5.2.14(postcss@8.4.45): - dependencies: - css-declaration-sorter: 6.4.0(postcss@8.4.45) - cssnano-utils: 3.1.0(postcss@8.4.45) - postcss: 8.4.45 - postcss-calc: 8.2.4(postcss@8.4.45) - postcss-colormin: 5.3.1(postcss@8.4.45) - postcss-convert-values: 5.1.3(postcss@8.4.45) - postcss-discard-comments: 5.1.2(postcss@8.4.45) - postcss-discard-duplicates: 5.1.0(postcss@8.4.45) - postcss-discard-empty: 5.1.1(postcss@8.4.45) - postcss-discard-overridden: 5.1.0(postcss@8.4.45) - postcss-merge-longhand: 5.1.7(postcss@8.4.45) - postcss-merge-rules: 5.1.4(postcss@8.4.45) - postcss-minify-font-values: 5.1.0(postcss@8.4.45) - postcss-minify-gradients: 5.1.1(postcss@8.4.45) - postcss-minify-params: 5.1.4(postcss@8.4.45) - postcss-minify-selectors: 5.2.1(postcss@8.4.45) - postcss-normalize-charset: 5.1.0(postcss@8.4.45) - postcss-normalize-display-values: 5.1.0(postcss@8.4.45) - postcss-normalize-positions: 5.1.1(postcss@8.4.45) - postcss-normalize-repeat-style: 5.1.1(postcss@8.4.45) - postcss-normalize-string: 5.1.0(postcss@8.4.45) - postcss-normalize-timing-functions: 5.1.0(postcss@8.4.45) - postcss-normalize-unicode: 5.1.1(postcss@8.4.45) - postcss-normalize-url: 5.1.0(postcss@8.4.45) - postcss-normalize-whitespace: 5.1.1(postcss@8.4.45) - postcss-ordered-values: 5.1.3(postcss@8.4.45) - postcss-reduce-initial: 5.1.2(postcss@8.4.45) - postcss-reduce-transforms: 5.1.0(postcss@8.4.45) - postcss-svgo: 5.1.0(postcss@8.4.45) - postcss-unique-selectors: 5.1.1(postcss@8.4.45) - - cssnano-utils@3.1.0(postcss@8.4.45): - dependencies: - postcss: 8.4.45 - - cssnano@5.1.15(postcss@8.4.45): - dependencies: - cssnano-preset-default: 5.2.14(postcss@8.4.45) + cssnano-preset-default@5.2.14(postcss@8.4.47): + dependencies: + css-declaration-sorter: 6.4.0(postcss@8.4.47) + cssnano-utils: 3.1.0(postcss@8.4.47) + postcss: 8.4.47 + postcss-calc: 8.2.4(postcss@8.4.47) + postcss-colormin: 5.3.1(postcss@8.4.47) + postcss-convert-values: 5.1.3(postcss@8.4.47) + postcss-discard-comments: 5.1.2(postcss@8.4.47) + postcss-discard-duplicates: 5.1.0(postcss@8.4.47) + postcss-discard-empty: 5.1.1(postcss@8.4.47) + postcss-discard-overridden: 5.1.0(postcss@8.4.47) + postcss-merge-longhand: 5.1.7(postcss@8.4.47) + postcss-merge-rules: 5.1.4(postcss@8.4.47) + postcss-minify-font-values: 5.1.0(postcss@8.4.47) + postcss-minify-gradients: 5.1.1(postcss@8.4.47) + postcss-minify-params: 5.1.4(postcss@8.4.47) + postcss-minify-selectors: 5.2.1(postcss@8.4.47) + postcss-normalize-charset: 5.1.0(postcss@8.4.47) + postcss-normalize-display-values: 5.1.0(postcss@8.4.47) + postcss-normalize-positions: 5.1.1(postcss@8.4.47) + postcss-normalize-repeat-style: 5.1.1(postcss@8.4.47) + postcss-normalize-string: 5.1.0(postcss@8.4.47) + postcss-normalize-timing-functions: 5.1.0(postcss@8.4.47) + postcss-normalize-unicode: 5.1.1(postcss@8.4.47) + postcss-normalize-url: 5.1.0(postcss@8.4.47) + postcss-normalize-whitespace: 5.1.1(postcss@8.4.47) + postcss-ordered-values: 5.1.3(postcss@8.4.47) + postcss-reduce-initial: 5.1.2(postcss@8.4.47) + postcss-reduce-transforms: 5.1.0(postcss@8.4.47) + postcss-svgo: 5.1.0(postcss@8.4.47) + postcss-unique-selectors: 5.1.1(postcss@8.4.47) + + cssnano-utils@3.1.0(postcss@8.4.47): + dependencies: + postcss: 8.4.47 + + cssnano@5.1.15(postcss@8.4.47): + dependencies: + cssnano-preset-default: 5.2.14(postcss@8.4.47) lilconfig: 2.1.0 - postcss: 8.4.45 + postcss: 8.4.47 yaml: 1.10.2 csso@4.2.0: @@ -26069,6 +25877,8 @@ snapshots: encodeurl@1.0.2: {} + encodeurl@2.0.0: {} + encoding-sniffer@0.2.0: dependencies: iconv-lite: 0.6.3 @@ -26101,10 +25911,6 @@ snapshots: graceful-fs: 4.2.11 tapable: 2.2.1 - enquirer@2.3.6: - dependencies: - ansi-colors: 4.1.3 - enquirer@2.4.1: dependencies: ansi-colors: 4.1.3 @@ -26120,7 +25926,7 @@ snapshots: env-string@1.0.1: {} - envinfo@7.13.0: {} + envinfo@7.14.0: {} error-ex@1.3.2: dependencies: @@ -26437,7 +26243,7 @@ snapshots: dependencies: confusing-browser-globals: 1.0.11 eslint: 8.57.0 - eslint-plugin-import: 2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0) + eslint-plugin-import: 2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) object.assign: 4.1.4 object.entries: 1.1.6 semver: 6.3.0 @@ -26448,17 +26254,17 @@ snapshots: '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.6.2) eslint: 8.57.0 eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0) + eslint-plugin-import: 2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) - eslint-config-next@14.2.9(eslint@8.57.0)(typescript@5.6.2): + eslint-config-next@14.2.11(eslint@8.57.0)(typescript@5.6.2): dependencies: - '@next/eslint-plugin-next': 14.2.9 + '@next/eslint-plugin-next': 14.2.11 '@rushstack/eslint-patch': 1.6.1 '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0)(typescript@5.6.2) '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.6.2) eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0)(eslint@8.57.0) eslint-plugin-import: 2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.10.0(eslint@8.57.0) eslint-plugin-react: 7.35.0(eslint@8.57.0) @@ -26473,7 +26279,7 @@ snapshots: dependencies: eslint: 8.57.0 - eslint-config-react-app@7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.22.5))(@babel/plugin-transform-react-jsx@7.25.2(@babel/core@7.22.5))(eslint@9.10.0(jiti@1.21.6))(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2): + eslint-config-react-app@7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.22.5))(@babel/plugin-transform-react-jsx@7.25.2(@babel/core@7.22.5))(eslint@9.10.0(jiti@1.21.6))(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2): dependencies: '@babel/core': 7.22.5 '@babel/eslint-parser': 7.22.5(@babel/core@7.22.5)(eslint@9.10.0(jiti@1.21.6)) @@ -26485,7 +26291,7 @@ snapshots: eslint: 9.10.0(jiti@1.21.6) eslint-plugin-flowtype: 8.0.3(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.22.5))(@babel/plugin-transform-react-jsx@7.25.2(@babel/core@7.22.5))(eslint@9.10.0(jiti@1.21.6)) eslint-plugin-import: 2.30.0(@typescript-eslint/parser@5.62.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.10.0(jiti@1.21.6)) - eslint-plugin-jest: 25.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.10.0(jiti@1.21.6))(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2) + eslint-plugin-jest: 25.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.10.0(jiti@1.21.6))(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2) eslint-plugin-jsx-a11y: 6.10.0(eslint@9.10.0(jiti@1.21.6)) eslint-plugin-react: 7.35.0(eslint@9.10.0(jiti@1.21.6)) eslint-plugin-react-hooks: 4.6.2(eslint@9.10.0(jiti@1.21.6)) @@ -26508,32 +26314,15 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0): - dependencies: - debug: 4.3.7 - enhanced-resolve: 5.17.1 - eslint: 8.57.0 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) - fast-glob: 3.3.2 - get-tsconfig: 4.8.0 - is-core-module: 2.15.1 - is-glob: 4.0.3 - transitivePeerDependencies: - - '@typescript-eslint/parser' - - eslint-import-resolver-node - - eslint-import-resolver-webpack - - supports-color - eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0)(eslint@8.57.0): dependencies: debug: 4.3.7 enhanced-resolve: 5.17.1 eslint: 8.57.0 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0)(eslint@8.57.0))(eslint@8.57.0) + eslint-module-utils: 2.11.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0)(eslint@8.57.0))(eslint@8.57.0) eslint-plugin-import: 2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) fast-glob: 3.3.2 - get-tsconfig: 4.8.0 + get-tsconfig: 4.8.1 is-core-module: 2.15.1 is-glob: 4.0.3 transitivePeerDependencies: @@ -26541,7 +26330,6 @@ snapshots: - eslint-import-resolver-node - eslint-import-resolver-webpack - supports-color - optional: true eslint-module-utils@2.11.0(@typescript-eslint/parser@5.62.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint@9.10.0(jiti@1.21.6)): dependencies: @@ -26553,17 +26341,6 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.11.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): - dependencies: - debug: 3.2.7 - optionalDependencies: - '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.6.2) - eslint: 8.57.0 - eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0) - transitivePeerDependencies: - - supports-color - eslint-module-utils@2.11.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0)(eslint@8.57.0))(eslint@8.57.0): dependencies: debug: 3.2.7 @@ -26575,29 +26352,6 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.8.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): - dependencies: - debug: 3.2.7 - optionalDependencies: - '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.6.2) - eslint: 8.57.0 - eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0) - transitivePeerDependencies: - - supports-color - - eslint-module-utils@2.8.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0)(eslint@8.57.0))(eslint@8.57.0): - dependencies: - debug: 3.2.7 - optionalDependencies: - '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.6.2) - eslint: 8.57.0 - eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0)(eslint@8.57.0) - transitivePeerDependencies: - - supports-color - optional: true - eslint-plugin-eslint-comments@3.2.0(eslint@8.57.0): dependencies: escape-string-regexp: 1.0.5 @@ -26641,34 +26395,6 @@ snapshots: - supports-color eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): - dependencies: - '@rtsao/scc': 1.1.0 - array-includes: 3.1.8 - array.prototype.findlastindex: 1.2.5 - array.prototype.flat: 1.3.2 - array.prototype.flatmap: 1.3.2 - debug: 3.2.7 - doctrine: 2.1.0 - eslint: 8.57.0 - eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.11.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) - hasown: 2.0.2 - is-core-module: 2.15.1 - is-glob: 4.0.3 - minimatch: 3.1.2 - object.fromentries: 2.0.8 - object.groupby: 1.0.3 - object.values: 1.2.0 - semver: 6.3.1 - tsconfig-paths: 3.15.0 - optionalDependencies: - '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.6.2) - transitivePeerDependencies: - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - supports-color - - eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.8 @@ -26696,13 +26422,13 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-jest@25.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.10.0(jiti@1.21.6))(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2): + eslint-plugin-jest@25.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.10.0(jiti@1.21.6))(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2): dependencies: '@typescript-eslint/experimental-utils': 5.60.1(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) eslint: 9.10.0(jiti@1.21.6) optionalDependencies: '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) - jest: 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2))(utf-8-validate@5.0.10) + jest: 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2))(utf-8-validate@5.0.10) transitivePeerDependencies: - supports-color - typescript @@ -26780,7 +26506,7 @@ snapshots: dependencies: eslint: 9.10.0(jiti@1.21.6) - eslint-plugin-react-refresh@0.4.11(eslint@8.57.0): + eslint-plugin-react-refresh@0.4.12(eslint@8.57.0): dependencies: eslint: 8.57.0 @@ -26867,7 +26593,7 @@ snapshots: '@types/eslint': 8.40.2 eslint: 9.10.0(jiti@1.21.6) jest-worker: 28.1.3 - micromatch: 4.0.7 + micromatch: 4.0.8 normalize-path: 3.0.0 schema-utils: 4.2.0 webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) @@ -26918,7 +26644,7 @@ snapshots: eslint@9.10.0(jiti@1.21.6): dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.10.0(jiti@1.21.6)) - '@eslint-community/regexpp': 4.11.0 + '@eslint-community/regexpp': 4.11.1 '@eslint/config-array': 0.18.0 '@eslint/eslintrc': 3.1.0 '@eslint/js': 9.10.0 @@ -27124,10 +26850,10 @@ snapshots: expect@29.5.0: dependencies: '@jest/expect-utils': 29.5.0 - jest-get-type: 29.4.3 + jest-get-type: 29.6.3 jest-matcher-utils: 29.5.0 - jest-message-util: 29.5.0 - jest-util: 29.5.0 + jest-message-util: 29.7.0 + jest-util: 29.7.0 exponential-backoff@3.1.1: {} @@ -27228,7 +26954,7 @@ snapshots: '@nodelib/fs.walk': 1.2.8 glob-parent: 5.1.2 merge2: 1.4.1 - micromatch: 4.0.7 + micromatch: 4.0.8 fast-glob@3.3.2: dependencies: @@ -27406,11 +27132,6 @@ snapshots: locate-path: 7.2.0 path-exists: 5.0.0 - find-yarn-workspace-root2@1.2.16: - dependencies: - micromatch: 4.0.8 - pkg-dir: 4.2.0 - flame-gradient@1.0.0: dependencies: sinusoidal-decimal: 1.0.0 @@ -27442,7 +27163,7 @@ snapshots: flow-enums-runtime@0.0.6: {} - flow-parser@0.245.2: {} + flow-parser@0.246.0: {} focus-trap@7.5.4: dependencies: @@ -27481,7 +27202,7 @@ snapshots: memfs: 3.5.3 minimatch: 3.1.2 schema-utils: 2.7.0 - semver: 7.6.3 + semver: 7.3.8 tapable: 1.1.3 typescript: 5.6.2 webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) @@ -27673,7 +27394,7 @@ snapshots: es-errors: 1.3.0 get-intrinsic: 1.2.4 - get-tsconfig@4.8.0: + get-tsconfig@4.8.1: dependencies: resolve-pkg-maps: 1.0.0 @@ -27721,15 +27442,6 @@ snapshots: package-json-from-dist: 1.0.0 path-scurry: 1.11.1 - glob@7.1.6: - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 - glob@7.2.3: dependencies: fs.realpath: 1.0.0 @@ -27816,17 +27528,17 @@ snapshots: graphemer@1.4.0: {} - graphql-config@5.0.3(@types/node@22.5.4)(bufferutil@4.0.8)(cosmiconfig-toml-loader@1.0.0)(graphql@16.9.0)(typescript@5.6.2)(utf-8-validate@6.0.4): + graphql-config@5.0.3(@types/node@22.5.5)(bufferutil@4.0.8)(cosmiconfig-toml-loader@1.0.0)(graphql@16.9.0)(typescript@5.6.2)(utf-8-validate@6.0.4): dependencies: '@graphql-tools/graphql-file-loader': 8.0.1(graphql@16.9.0) '@graphql-tools/json-file-loader': 8.0.1(graphql@16.9.0) '@graphql-tools/load': 8.0.2(graphql@16.9.0) '@graphql-tools/merge': 9.0.4(graphql@16.9.0) - '@graphql-tools/url-loader': 8.0.2(@types/node@22.5.4)(bufferutil@4.0.8)(graphql@16.9.0)(utf-8-validate@6.0.4) + '@graphql-tools/url-loader': 8.0.2(@types/node@22.5.5)(bufferutil@4.0.8)(graphql@16.9.0)(utf-8-validate@6.0.4) '@graphql-tools/utils': 10.2.2(graphql@16.9.0) cosmiconfig: 8.3.6(typescript@5.6.2) graphql: 16.9.0 - jiti: 1.21.0 + jiti: 1.21.6 minimatch: 4.2.3 string-env-interpolation: 1.0.1 tslib: 2.6.3 @@ -28217,9 +27929,9 @@ snapshots: dependencies: safer-buffer: 2.1.2 - icss-utils@5.1.0(postcss@8.4.45): + icss-utils@5.1.0(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 idb-keyval@6.2.1: {} @@ -28788,7 +28500,7 @@ snapshots: '@jest/environment': 27.5.1 '@jest/test-result': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 22.5.4 + '@types/node': 22.5.5 chalk: 4.1.2 co: 4.6.0 dedent: 0.7.0 @@ -28807,16 +28519,16 @@ snapshots: transitivePeerDependencies: - supports-color - jest-cli@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2))(utf-8-validate@5.0.10): + jest-cli@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2))(utf-8-validate@5.0.10): dependencies: - '@jest/core': 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2))(utf-8-validate@5.0.10) + '@jest/core': 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2))(utf-8-validate@5.0.10) '@jest/test-result': 27.5.1 '@jest/types': 27.5.1 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 import-local: 3.1.0 - jest-config: 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2))(utf-8-validate@5.0.10) + jest-config: 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2))(utf-8-validate@5.0.10) jest-util: 27.5.1 jest-validate: 27.5.1 prompts: 2.4.2 @@ -28828,14 +28540,14 @@ snapshots: - ts-node - utf-8-validate - jest-config@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2))(utf-8-validate@5.0.10): + jest-config@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2))(utf-8-validate@5.0.10): dependencies: '@babel/core': 7.25.2 '@jest/test-sequencer': 27.5.1 '@jest/types': 27.5.1 babel-jest: 27.5.1(@babel/core@7.25.2) chalk: 4.1.2 - ci-info: 3.8.0 + ci-info: 3.9.0 deepmerge: 4.3.1 glob: 7.2.3 graceful-fs: 4.2.11 @@ -28855,7 +28567,7 @@ snapshots: slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - ts-node: 10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2) + ts-node: 10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2) transitivePeerDependencies: - bufferutil - canvas @@ -28873,7 +28585,7 @@ snapshots: dependencies: chalk: 4.1.2 diff-sequences: 29.6.3 - jest-get-type: 29.4.3 + jest-get-type: 29.6.3 pretty-format: 29.7.0 jest-docblock@27.5.1: @@ -28893,7 +28605,7 @@ snapshots: '@jest/environment': 27.5.1 '@jest/fake-timers': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 22.5.4 + '@types/node': 22.5.5 jest-mock: 27.5.1 jest-util: 27.5.1 jsdom: 16.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -28908,7 +28620,7 @@ snapshots: '@jest/environment': 27.5.1 '@jest/fake-timers': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 22.5.4 + '@types/node': 22.5.5 jest-mock: 27.5.1 jest-util: 27.5.1 @@ -28917,21 +28629,19 @@ snapshots: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.5.4 + '@types/node': 22.5.5 jest-mock: 29.7.0 jest-util: 29.7.0 jest-get-type@27.5.1: {} - jest-get-type@29.4.3: {} - jest-get-type@29.6.3: {} jest-haste-map@27.5.1: dependencies: '@jest/types': 27.5.1 '@types/graceful-fs': 4.1.6 - '@types/node': 22.5.4 + '@types/node': 22.5.5 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -28950,7 +28660,7 @@ snapshots: '@jest/source-map': 27.5.1 '@jest/test-result': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 22.5.4 + '@types/node': 22.5.5 chalk: 4.1.2 co: 4.6.0 expect: 27.5.1 @@ -28982,14 +28692,14 @@ snapshots: dependencies: chalk: 4.1.2 jest-diff: 29.5.0 - jest-get-type: 29.4.3 + jest-get-type: 29.6.3 pretty-format: 29.7.0 jest-message-util@27.5.1: dependencies: '@babel/code-frame': 7.24.7 '@jest/types': 27.5.1 - '@types/stack-utils': 2.0.1 + '@types/stack-utils': 2.0.3 chalk: 4.1.2 graceful-fs: 4.2.11 micromatch: 4.0.8 @@ -29001,7 +28711,7 @@ snapshots: dependencies: '@babel/code-frame': 7.24.7 '@jest/types': 28.1.3 - '@types/stack-utils': 2.0.1 + '@types/stack-utils': 2.0.3 chalk: 4.1.2 graceful-fs: 4.2.11 micromatch: 4.0.8 @@ -29009,18 +28719,6 @@ snapshots: slash: 3.0.0 stack-utils: 2.0.6 - jest-message-util@29.5.0: - dependencies: - '@babel/code-frame': 7.24.7 - '@jest/types': 29.5.0 - '@types/stack-utils': 2.0.1 - chalk: 4.1.2 - graceful-fs: 4.2.11 - micromatch: 4.0.8 - pretty-format: 29.7.0 - slash: 3.0.0 - stack-utils: 2.0.6 - jest-message-util@29.7.0: dependencies: '@babel/code-frame': 7.24.7 @@ -29036,12 +28734,12 @@ snapshots: jest-mock@27.5.1: dependencies: '@jest/types': 27.5.1 - '@types/node': 22.5.4 + '@types/node': 22.5.5 jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.5.4 + '@types/node': 22.5.5 jest-util: 29.7.0 jest-pnp-resolver@1.2.3(jest-resolve@27.5.1): @@ -29080,7 +28778,7 @@ snapshots: '@jest/test-result': 27.5.1 '@jest/transform': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 22.5.4 + '@types/node': 22.5.5 chalk: 4.1.2 emittery: 0.8.1 graceful-fs: 4.2.11 @@ -29131,7 +28829,7 @@ snapshots: jest-serializer@27.5.1: dependencies: - '@types/node': 22.5.4 + '@types/node': 22.5.5 graceful-fs: 4.2.11 jest-snapshot@27.5.1: @@ -29157,41 +28855,32 @@ snapshots: jest-util: 27.5.1 natural-compare: 1.4.0 pretty-format: 27.5.1 - semver: 7.6.3 + semver: 7.3.8 transitivePeerDependencies: - supports-color jest-util@27.5.1: dependencies: '@jest/types': 27.5.1 - '@types/node': 22.5.4 + '@types/node': 22.5.5 chalk: 4.1.2 - ci-info: 3.8.0 + ci-info: 3.9.0 graceful-fs: 4.2.11 picomatch: 2.3.1 jest-util@28.1.3: dependencies: '@jest/types': 28.1.3 - '@types/node': 22.5.4 + '@types/node': 22.5.5 chalk: 4.1.2 - ci-info: 3.8.0 - graceful-fs: 4.2.11 - picomatch: 2.3.1 - - jest-util@29.5.0: - dependencies: - '@jest/types': 29.5.0 - '@types/node': 22.5.4 - chalk: 4.1.2 - ci-info: 3.8.0 + ci-info: 3.9.0 graceful-fs: 4.2.11 picomatch: 2.3.1 jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.5.4 + '@types/node': 22.5.5 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -29215,11 +28904,11 @@ snapshots: leven: 3.1.0 pretty-format: 29.7.0 - jest-watch-typeahead@1.1.0(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2))(utf-8-validate@5.0.10)): + jest-watch-typeahead@1.1.0(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2))(utf-8-validate@5.0.10)): dependencies: ansi-escapes: 4.3.2 chalk: 4.1.2 - jest: 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2))(utf-8-validate@5.0.10) + jest: 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2))(utf-8-validate@5.0.10) jest-regex-util: 28.0.2 jest-watcher: 28.1.3 slash: 4.0.0 @@ -29230,7 +28919,7 @@ snapshots: dependencies: '@jest/test-result': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 22.5.4 + '@types/node': 22.5.5 ansi-escapes: 4.3.2 chalk: 4.1.2 jest-util: 27.5.1 @@ -29240,7 +28929,7 @@ snapshots: dependencies: '@jest/test-result': 28.1.3 '@jest/types': 28.1.3 - '@types/node': 22.5.4 + '@types/node': 22.5.5 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.10.2 @@ -29249,34 +28938,34 @@ snapshots: jest-worker@26.6.2: dependencies: - '@types/node': 22.5.4 + '@types/node': 22.5.5 merge-stream: 2.0.0 supports-color: 7.2.0 jest-worker@27.5.1: dependencies: - '@types/node': 22.5.4 + '@types/node': 22.5.5 merge-stream: 2.0.0 supports-color: 8.1.1 jest-worker@28.1.3: dependencies: - '@types/node': 22.5.4 + '@types/node': 22.5.5 merge-stream: 2.0.0 supports-color: 8.1.1 jest-worker@29.7.0: dependencies: - '@types/node': 22.5.4 + '@types/node': 22.5.5 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 - jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2))(utf-8-validate@5.0.10): + jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2))(utf-8-validate@5.0.10): dependencies: - '@jest/core': 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2))(utf-8-validate@5.0.10) + '@jest/core': 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2))(utf-8-validate@5.0.10) import-local: 3.1.0 - jest-cli: 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2))(utf-8-validate@5.0.10) + jest-cli: 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2))(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - canvas @@ -29337,7 +29026,7 @@ snapshots: '@babel/register': 7.24.6(@babel/core@7.25.2) babel-core: 7.0.0-bridge.0(@babel/core@7.25.2) chalk: 4.1.2 - flow-parser: 0.245.2 + flow-parser: 0.246.0 graceful-fs: 4.2.11 micromatch: 4.0.8 neo-async: 2.6.2 @@ -29524,11 +29213,11 @@ snapshots: klona@2.0.6: {} - knip@5.30.0(@types/node@22.5.4)(typescript@5.6.2): + knip@5.30.2(@types/node@22.5.5)(typescript@5.6.2): dependencies: '@nodelib/fs.walk': 1.2.8 '@snyk/github-codeowners': 1.1.0 - '@types/node': 22.5.4 + '@types/node': 22.5.5 easy-table: 1.2.0 enhanced-resolve: 5.17.1 fast-glob: 3.3.2 @@ -29543,7 +29232,7 @@ snapshots: summary: 2.1.0 typescript: 5.6.2 zod: 3.23.8 - zod-validation-error: 3.3.1(zod@3.23.8) + zod-validation-error: 3.4.0(zod@3.23.8) labeled-stream-splicer@2.0.2: dependencies: @@ -29693,13 +29382,6 @@ snapshots: load-tsconfig@0.2.5: {} - load-yaml-file@0.2.0: - dependencies: - graceful-fs: 4.2.11 - js-yaml: 3.14.1 - pify: 4.0.1 - strip-bom: 3.0.0 - loader-runner@4.3.0: {} loader-utils@2.0.4: @@ -30045,9 +29727,9 @@ snapshots: merge2@1.4.1: {} - meros@1.3.0(@types/node@22.5.4): + meros@1.3.0(@types/node@22.5.5): optionalDependencies: - '@types/node': 22.5.4 + '@types/node': 22.5.5 methods@1.1.2: {} @@ -30112,7 +29794,7 @@ snapshots: metro-minify-terser@0.80.12: dependencies: flow-enums-runtime: 0.0.6 - terser: 5.31.6 + terser: 5.32.0 metro-resolver@0.80.12: dependencies: @@ -30290,11 +29972,6 @@ snapshots: braces: 3.0.3 picomatch: 2.3.1 - micromatch@4.0.7: - dependencies: - braces: 3.0.3 - picomatch: 2.3.1 - micromatch@4.0.8: dependencies: braces: 3.0.3 @@ -30626,9 +30303,9 @@ snapshots: next-tick@1.1.0: {} - next@14.2.9(@babel/core@7.25.2)(@playwright/test@1.47.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + next@14.2.11(@babel/core@7.25.2)(@playwright/test@1.47.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@next/env': 14.2.9 + '@next/env': 14.2.11 '@swc/helpers': 0.5.5 busboy: 1.6.0 caniuse-lite: 1.0.30001647 @@ -30638,16 +30315,16 @@ snapshots: react-dom: 18.3.1(react@18.3.1) styled-jsx: 5.1.1(@babel/core@7.25.2)(react@18.3.1) optionalDependencies: - '@next/swc-darwin-arm64': 14.2.9 - '@next/swc-darwin-x64': 14.2.9 - '@next/swc-linux-arm64-gnu': 14.2.9 - '@next/swc-linux-arm64-musl': 14.2.9 - '@next/swc-linux-x64-gnu': 14.2.9 - '@next/swc-linux-x64-musl': 14.2.9 - '@next/swc-win32-arm64-msvc': 14.2.9 - '@next/swc-win32-ia32-msvc': 14.2.9 - '@next/swc-win32-x64-msvc': 14.2.9 - '@playwright/test': 1.47.0 + '@next/swc-darwin-arm64': 14.2.11 + '@next/swc-darwin-x64': 14.2.11 + '@next/swc-linux-arm64-gnu': 14.2.11 + '@next/swc-linux-arm64-musl': 14.2.11 + '@next/swc-linux-x64-gnu': 14.2.11 + '@next/swc-linux-x64-musl': 14.2.11 + '@next/swc-win32-arm64-msvc': 14.2.11 + '@next/swc-win32-ia32-msvc': 14.2.11 + '@next/swc-win32-x64-msvc': 14.2.11 + '@playwright/test': 1.47.1 transitivePeerDependencies: - '@babel/core' - babel-plugin-macros @@ -30783,7 +30460,7 @@ snapshots: dependencies: hosted-git-info: 7.0.2 proc-log: 4.2.0 - semver: 7.6.3 + semver: 7.6.0 validate-npm-package-name: 5.0.1 npm-run-all@4.1.5: @@ -31173,6 +30850,8 @@ snapshots: registry-url: 5.1.0 semver: 6.3.1 + package-manager-detector@0.2.0: {} + pako@1.0.11: {} param-case@3.0.4: @@ -31396,11 +31075,11 @@ snapshots: dependencies: find-up: 3.0.0 - playwright-core@1.47.0: {} + playwright-core@1.47.1: {} - playwright@1.47.0: + playwright@1.47.1: dependencies: - playwright-core: 1.47.0 + playwright-core: 1.47.1 optionalDependencies: fsevents: 2.3.2 @@ -31422,424 +31101,424 @@ snapshots: possible-typed-array-names@1.0.0: {} - postcss-attribute-case-insensitive@5.0.2(postcss@8.4.45): + postcss-attribute-case-insensitive@5.0.2(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-selector-parser: 6.0.13 - postcss-browser-comments@4.0.0(browserslist@4.21.9)(postcss@8.4.45): + postcss-browser-comments@4.0.0(browserslist@4.21.9)(postcss@8.4.47): dependencies: browserslist: 4.21.9 - postcss: 8.4.45 + postcss: 8.4.47 - postcss-calc@8.2.4(postcss@8.4.45): + postcss-calc@8.2.4(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-selector-parser: 6.0.13 postcss-value-parser: 4.2.0 - postcss-clamp@4.1.0(postcss@8.4.45): + postcss-clamp@4.1.0(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 - postcss-color-functional-notation@4.2.4(postcss@8.4.45): + postcss-color-functional-notation@4.2.4(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 - postcss-color-hex-alpha@8.0.4(postcss@8.4.45): + postcss-color-hex-alpha@8.0.4(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 - postcss-color-rebeccapurple@7.1.1(postcss@8.4.45): + postcss-color-rebeccapurple@7.1.1(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 - postcss-colormin@5.3.1(postcss@8.4.45): + postcss-colormin@5.3.1(postcss@8.4.47): dependencies: browserslist: 4.23.3 caniuse-api: 3.0.0 colord: 2.9.3 - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 - postcss-convert-values@5.1.3(postcss@8.4.45): + postcss-convert-values@5.1.3(postcss@8.4.47): dependencies: browserslist: 4.23.3 - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 - postcss-custom-media@8.0.2(postcss@8.4.45): + postcss-custom-media@8.0.2(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 - postcss-custom-properties@12.1.11(postcss@8.4.45): + postcss-custom-properties@12.1.11(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 - postcss-custom-selectors@6.0.3(postcss@8.4.45): + postcss-custom-selectors@6.0.3(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-selector-parser: 6.0.13 - postcss-dir-pseudo-class@6.0.5(postcss@8.4.45): + postcss-dir-pseudo-class@6.0.5(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-selector-parser: 6.0.13 - postcss-discard-comments@5.1.2(postcss@8.4.45): + postcss-discard-comments@5.1.2(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 - postcss-discard-duplicates@5.1.0(postcss@8.4.45): + postcss-discard-duplicates@5.1.0(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 - postcss-discard-empty@5.1.1(postcss@8.4.45): + postcss-discard-empty@5.1.1(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 - postcss-discard-overridden@5.1.0(postcss@8.4.45): + postcss-discard-overridden@5.1.0(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 - postcss-double-position-gradients@3.1.2(postcss@8.4.45): + postcss-double-position-gradients@3.1.2(postcss@8.4.47): dependencies: - '@csstools/postcss-progressive-custom-properties': 1.3.0(postcss@8.4.45) - postcss: 8.4.45 + '@csstools/postcss-progressive-custom-properties': 1.3.0(postcss@8.4.47) + postcss: 8.4.47 postcss-value-parser: 4.2.0 - postcss-env-function@4.0.6(postcss@8.4.45): + postcss-env-function@4.0.6(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 - postcss-flexbugs-fixes@5.0.2(postcss@8.4.45): + postcss-flexbugs-fixes@5.0.2(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 - postcss-focus-visible@6.0.4(postcss@8.4.45): + postcss-focus-visible@6.0.4(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-selector-parser: 6.0.13 - postcss-focus-within@5.0.4(postcss@8.4.45): + postcss-focus-within@5.0.4(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-selector-parser: 6.0.13 - postcss-font-variant@5.0.0(postcss@8.4.45): + postcss-font-variant@5.0.0(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 - postcss-gap-properties@3.0.5(postcss@8.4.45): + postcss-gap-properties@3.0.5(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 - postcss-image-set-function@4.0.7(postcss@8.4.45): + postcss-image-set-function@4.0.7(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 - postcss-import@13.0.0(postcss@8.4.45): + postcss-import@13.0.0(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 read-cache: 1.0.0 resolve: 1.22.8 - postcss-import@15.1.0(postcss@8.4.45): + postcss-import@15.1.0(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 read-cache: 1.0.0 resolve: 1.22.8 - postcss-initial@4.0.1(postcss@8.4.45): + postcss-initial@4.0.1(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 - postcss-js@4.0.1(postcss@8.4.45): + postcss-js@4.0.1(postcss@8.4.47): dependencies: camelcase-css: 2.0.1 - postcss: 8.4.45 + postcss: 8.4.47 - postcss-lab-function@4.2.1(postcss@8.4.45): + postcss-lab-function@4.2.1(postcss@8.4.47): dependencies: - '@csstools/postcss-progressive-custom-properties': 1.3.0(postcss@8.4.45) - postcss: 8.4.45 + '@csstools/postcss-progressive-custom-properties': 1.3.0(postcss@8.4.47) + postcss: 8.4.47 postcss-value-parser: 4.2.0 - postcss-load-config@3.1.4(postcss@8.4.45)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2)): + postcss-load-config@3.1.4(postcss@8.4.47)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2)): dependencies: lilconfig: 2.1.0 yaml: 1.10.2 optionalDependencies: - postcss: 8.4.45 - ts-node: 10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2) + postcss: 8.4.47 + ts-node: 10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2) - postcss-load-config@4.0.1(postcss@8.4.45)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2)): + postcss-load-config@4.0.1(postcss@8.4.47)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2)): dependencies: lilconfig: 2.1.0 - yaml: 2.5.0 + yaml: 2.5.1 optionalDependencies: - postcss: 8.4.45 - ts-node: 10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2) + postcss: 8.4.47 + ts-node: 10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2) - postcss-load-config@6.0.1(jiti@1.21.6)(postcss@8.4.45)(tsx@4.19.0)(yaml@2.5.1): + postcss-load-config@6.0.1(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(yaml@2.5.1): dependencies: lilconfig: 3.1.2 optionalDependencies: jiti: 1.21.6 - postcss: 8.4.45 - tsx: 4.19.0 + postcss: 8.4.47 + tsx: 4.19.1 yaml: 2.5.1 - postcss-loader@6.2.1(postcss@8.4.45)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): + postcss-loader@6.2.1(postcss@8.4.47)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)): dependencies: cosmiconfig: 7.1.0 klona: 2.0.6 - postcss: 8.4.45 + postcss: 8.4.47 semver: 7.3.8 webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) - postcss-logical@5.0.4(postcss@8.4.45): + postcss-logical@5.0.4(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 - postcss-media-minmax@5.0.0(postcss@8.4.45): + postcss-media-minmax@5.0.0(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 - postcss-merge-longhand@5.1.7(postcss@8.4.45): + postcss-merge-longhand@5.1.7(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 - stylehacks: 5.1.1(postcss@8.4.45) + stylehacks: 5.1.1(postcss@8.4.47) - postcss-merge-rules@5.1.4(postcss@8.4.45): + postcss-merge-rules@5.1.4(postcss@8.4.47): dependencies: browserslist: 4.23.3 caniuse-api: 3.0.0 - cssnano-utils: 3.1.0(postcss@8.4.45) - postcss: 8.4.45 + cssnano-utils: 3.1.0(postcss@8.4.47) + postcss: 8.4.47 postcss-selector-parser: 6.0.13 - postcss-minify-font-values@5.1.0(postcss@8.4.45): + postcss-minify-font-values@5.1.0(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 - postcss-minify-gradients@5.1.1(postcss@8.4.45): + postcss-minify-gradients@5.1.1(postcss@8.4.47): dependencies: colord: 2.9.3 - cssnano-utils: 3.1.0(postcss@8.4.45) - postcss: 8.4.45 + cssnano-utils: 3.1.0(postcss@8.4.47) + postcss: 8.4.47 postcss-value-parser: 4.2.0 - postcss-minify-params@5.1.4(postcss@8.4.45): + postcss-minify-params@5.1.4(postcss@8.4.47): dependencies: browserslist: 4.23.3 - cssnano-utils: 3.1.0(postcss@8.4.45) - postcss: 8.4.45 + cssnano-utils: 3.1.0(postcss@8.4.47) + postcss: 8.4.47 postcss-value-parser: 4.2.0 - postcss-minify-selectors@5.2.1(postcss@8.4.45): + postcss-minify-selectors@5.2.1(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-selector-parser: 6.0.13 - postcss-modules-extract-imports@3.0.0(postcss@8.4.45): + postcss-modules-extract-imports@3.0.0(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 - postcss-modules-local-by-default@4.0.3(postcss@8.4.45): + postcss-modules-local-by-default@4.0.3(postcss@8.4.47): dependencies: - icss-utils: 5.1.0(postcss@8.4.45) - postcss: 8.4.45 + icss-utils: 5.1.0(postcss@8.4.47) + postcss: 8.4.47 postcss-selector-parser: 6.0.13 postcss-value-parser: 4.2.0 - postcss-modules-scope@3.0.0(postcss@8.4.45): + postcss-modules-scope@3.0.0(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-selector-parser: 6.0.13 - postcss-modules-values@4.0.0(postcss@8.4.45): + postcss-modules-values@4.0.0(postcss@8.4.47): dependencies: - icss-utils: 5.1.0(postcss@8.4.45) - postcss: 8.4.45 + icss-utils: 5.1.0(postcss@8.4.47) + postcss: 8.4.47 - postcss-nested@6.0.1(postcss@8.4.45): + postcss-nested@6.0.1(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-selector-parser: 6.0.13 - postcss-nesting@10.2.0(postcss@8.4.45): + postcss-nesting@10.2.0(postcss@8.4.47): dependencies: '@csstools/selector-specificity': 2.2.0(postcss-selector-parser@6.0.13) - postcss: 8.4.45 + postcss: 8.4.47 postcss-selector-parser: 6.0.13 - postcss-normalize-charset@5.1.0(postcss@8.4.45): + postcss-normalize-charset@5.1.0(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 - postcss-normalize-display-values@5.1.0(postcss@8.4.45): + postcss-normalize-display-values@5.1.0(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 - postcss-normalize-positions@5.1.1(postcss@8.4.45): + postcss-normalize-positions@5.1.1(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 - postcss-normalize-repeat-style@5.1.1(postcss@8.4.45): + postcss-normalize-repeat-style@5.1.1(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 - postcss-normalize-string@5.1.0(postcss@8.4.45): + postcss-normalize-string@5.1.0(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 - postcss-normalize-timing-functions@5.1.0(postcss@8.4.45): + postcss-normalize-timing-functions@5.1.0(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 - postcss-normalize-unicode@5.1.1(postcss@8.4.45): + postcss-normalize-unicode@5.1.1(postcss@8.4.47): dependencies: browserslist: 4.23.3 - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 - postcss-normalize-url@5.1.0(postcss@8.4.45): + postcss-normalize-url@5.1.0(postcss@8.4.47): dependencies: normalize-url: 6.1.0 - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 - postcss-normalize-whitespace@5.1.1(postcss@8.4.45): + postcss-normalize-whitespace@5.1.1(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 - postcss-normalize@10.0.1(browserslist@4.21.9)(postcss@8.4.45): + postcss-normalize@10.0.1(browserslist@4.21.9)(postcss@8.4.47): dependencies: '@csstools/normalize.css': 12.0.0 browserslist: 4.21.9 - postcss: 8.4.45 - postcss-browser-comments: 4.0.0(browserslist@4.21.9)(postcss@8.4.45) + postcss: 8.4.47 + postcss-browser-comments: 4.0.0(browserslist@4.21.9)(postcss@8.4.47) sanitize.css: 13.0.0 - postcss-opacity-percentage@1.1.3(postcss@8.4.45): + postcss-opacity-percentage@1.1.3(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 - postcss-ordered-values@5.1.3(postcss@8.4.45): + postcss-ordered-values@5.1.3(postcss@8.4.47): dependencies: - cssnano-utils: 3.1.0(postcss@8.4.45) - postcss: 8.4.45 + cssnano-utils: 3.1.0(postcss@8.4.47) + postcss: 8.4.47 postcss-value-parser: 4.2.0 - postcss-overflow-shorthand@3.0.4(postcss@8.4.45): + postcss-overflow-shorthand@3.0.4(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 - postcss-page-break@3.0.4(postcss@8.4.45): + postcss-page-break@3.0.4(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 - postcss-place@7.0.5(postcss@8.4.45): + postcss-place@7.0.5(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 - postcss-preset-env@7.8.3(postcss@8.4.45): - dependencies: - '@csstools/postcss-cascade-layers': 1.1.1(postcss@8.4.45) - '@csstools/postcss-color-function': 1.1.1(postcss@8.4.45) - '@csstools/postcss-font-format-keywords': 1.0.1(postcss@8.4.45) - '@csstools/postcss-hwb-function': 1.0.2(postcss@8.4.45) - '@csstools/postcss-ic-unit': 1.0.1(postcss@8.4.45) - '@csstools/postcss-is-pseudo-class': 2.0.7(postcss@8.4.45) - '@csstools/postcss-nested-calc': 1.0.0(postcss@8.4.45) - '@csstools/postcss-normalize-display-values': 1.0.1(postcss@8.4.45) - '@csstools/postcss-oklab-function': 1.1.1(postcss@8.4.45) - '@csstools/postcss-progressive-custom-properties': 1.3.0(postcss@8.4.45) - '@csstools/postcss-stepped-value-functions': 1.0.1(postcss@8.4.45) - '@csstools/postcss-text-decoration-shorthand': 1.0.0(postcss@8.4.45) - '@csstools/postcss-trigonometric-functions': 1.0.2(postcss@8.4.45) - '@csstools/postcss-unset-value': 1.0.2(postcss@8.4.45) - autoprefixer: 10.4.20(postcss@8.4.45) + postcss-preset-env@7.8.3(postcss@8.4.47): + dependencies: + '@csstools/postcss-cascade-layers': 1.1.1(postcss@8.4.47) + '@csstools/postcss-color-function': 1.1.1(postcss@8.4.47) + '@csstools/postcss-font-format-keywords': 1.0.1(postcss@8.4.47) + '@csstools/postcss-hwb-function': 1.0.2(postcss@8.4.47) + '@csstools/postcss-ic-unit': 1.0.1(postcss@8.4.47) + '@csstools/postcss-is-pseudo-class': 2.0.7(postcss@8.4.47) + '@csstools/postcss-nested-calc': 1.0.0(postcss@8.4.47) + '@csstools/postcss-normalize-display-values': 1.0.1(postcss@8.4.47) + '@csstools/postcss-oklab-function': 1.1.1(postcss@8.4.47) + '@csstools/postcss-progressive-custom-properties': 1.3.0(postcss@8.4.47) + '@csstools/postcss-stepped-value-functions': 1.0.1(postcss@8.4.47) + '@csstools/postcss-text-decoration-shorthand': 1.0.0(postcss@8.4.47) + '@csstools/postcss-trigonometric-functions': 1.0.2(postcss@8.4.47) + '@csstools/postcss-unset-value': 1.0.2(postcss@8.4.47) + autoprefixer: 10.4.20(postcss@8.4.47) browserslist: 4.23.3 - css-blank-pseudo: 3.0.3(postcss@8.4.45) - css-has-pseudo: 3.0.4(postcss@8.4.45) - css-prefers-color-scheme: 6.0.3(postcss@8.4.45) + css-blank-pseudo: 3.0.3(postcss@8.4.47) + css-has-pseudo: 3.0.4(postcss@8.4.47) + css-prefers-color-scheme: 6.0.3(postcss@8.4.47) cssdb: 7.6.0 - postcss: 8.4.45 - postcss-attribute-case-insensitive: 5.0.2(postcss@8.4.45) - postcss-clamp: 4.1.0(postcss@8.4.45) - postcss-color-functional-notation: 4.2.4(postcss@8.4.45) - postcss-color-hex-alpha: 8.0.4(postcss@8.4.45) - postcss-color-rebeccapurple: 7.1.1(postcss@8.4.45) - postcss-custom-media: 8.0.2(postcss@8.4.45) - postcss-custom-properties: 12.1.11(postcss@8.4.45) - postcss-custom-selectors: 6.0.3(postcss@8.4.45) - postcss-dir-pseudo-class: 6.0.5(postcss@8.4.45) - postcss-double-position-gradients: 3.1.2(postcss@8.4.45) - postcss-env-function: 4.0.6(postcss@8.4.45) - postcss-focus-visible: 6.0.4(postcss@8.4.45) - postcss-focus-within: 5.0.4(postcss@8.4.45) - postcss-font-variant: 5.0.0(postcss@8.4.45) - postcss-gap-properties: 3.0.5(postcss@8.4.45) - postcss-image-set-function: 4.0.7(postcss@8.4.45) - postcss-initial: 4.0.1(postcss@8.4.45) - postcss-lab-function: 4.2.1(postcss@8.4.45) - postcss-logical: 5.0.4(postcss@8.4.45) - postcss-media-minmax: 5.0.0(postcss@8.4.45) - postcss-nesting: 10.2.0(postcss@8.4.45) - postcss-opacity-percentage: 1.1.3(postcss@8.4.45) - postcss-overflow-shorthand: 3.0.4(postcss@8.4.45) - postcss-page-break: 3.0.4(postcss@8.4.45) - postcss-place: 7.0.5(postcss@8.4.45) - postcss-pseudo-class-any-link: 7.1.6(postcss@8.4.45) - postcss-replace-overflow-wrap: 4.0.0(postcss@8.4.45) - postcss-selector-not: 6.0.1(postcss@8.4.45) + postcss: 8.4.47 + postcss-attribute-case-insensitive: 5.0.2(postcss@8.4.47) + postcss-clamp: 4.1.0(postcss@8.4.47) + postcss-color-functional-notation: 4.2.4(postcss@8.4.47) + postcss-color-hex-alpha: 8.0.4(postcss@8.4.47) + postcss-color-rebeccapurple: 7.1.1(postcss@8.4.47) + postcss-custom-media: 8.0.2(postcss@8.4.47) + postcss-custom-properties: 12.1.11(postcss@8.4.47) + postcss-custom-selectors: 6.0.3(postcss@8.4.47) + postcss-dir-pseudo-class: 6.0.5(postcss@8.4.47) + postcss-double-position-gradients: 3.1.2(postcss@8.4.47) + postcss-env-function: 4.0.6(postcss@8.4.47) + postcss-focus-visible: 6.0.4(postcss@8.4.47) + postcss-focus-within: 5.0.4(postcss@8.4.47) + postcss-font-variant: 5.0.0(postcss@8.4.47) + postcss-gap-properties: 3.0.5(postcss@8.4.47) + postcss-image-set-function: 4.0.7(postcss@8.4.47) + postcss-initial: 4.0.1(postcss@8.4.47) + postcss-lab-function: 4.2.1(postcss@8.4.47) + postcss-logical: 5.0.4(postcss@8.4.47) + postcss-media-minmax: 5.0.0(postcss@8.4.47) + postcss-nesting: 10.2.0(postcss@8.4.47) + postcss-opacity-percentage: 1.1.3(postcss@8.4.47) + postcss-overflow-shorthand: 3.0.4(postcss@8.4.47) + postcss-page-break: 3.0.4(postcss@8.4.47) + postcss-place: 7.0.5(postcss@8.4.47) + postcss-pseudo-class-any-link: 7.1.6(postcss@8.4.47) + postcss-replace-overflow-wrap: 4.0.0(postcss@8.4.47) + postcss-selector-not: 6.0.1(postcss@8.4.47) postcss-value-parser: 4.2.0 - postcss-pseudo-class-any-link@7.1.6(postcss@8.4.45): + postcss-pseudo-class-any-link@7.1.6(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-selector-parser: 6.0.13 - postcss-reduce-initial@5.1.2(postcss@8.4.45): + postcss-reduce-initial@5.1.2(postcss@8.4.47): dependencies: browserslist: 4.23.3 caniuse-api: 3.0.0 - postcss: 8.4.45 + postcss: 8.4.47 - postcss-reduce-transforms@5.1.0(postcss@8.4.45): + postcss-reduce-transforms@5.1.0(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 - postcss-replace-overflow-wrap@4.0.0(postcss@8.4.45): + postcss-replace-overflow-wrap@4.0.0(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 - postcss-selector-not@6.0.1(postcss@8.4.45): + postcss-selector-not@6.0.1(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-selector-parser: 6.0.13 postcss-selector-parser@6.0.13: @@ -31847,15 +31526,15 @@ snapshots: cssesc: 3.0.0 util-deprecate: 1.0.2 - postcss-svgo@5.1.0(postcss@8.4.45): + postcss-svgo@5.1.0(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-value-parser: 4.2.0 svgo: 2.8.0 - postcss-unique-selectors@5.1.1(postcss@8.4.45): + postcss-unique-selectors@5.1.1(postcss@8.4.47): dependencies: - postcss: 8.4.45 + postcss: 8.4.47 postcss-selector-parser: 6.0.13 postcss-value-parser@4.2.0: {} @@ -31871,7 +31550,7 @@ snapshots: picocolors: 1.1.0 source-map-js: 1.2.1 - postcss@8.4.45: + postcss@8.4.47: dependencies: nanoid: 3.3.7 picocolors: 1.1.0 @@ -31879,14 +31558,9 @@ snapshots: preact@10.23.2: {} - preact@10.4.1: {} + preact@10.24.0: {} - preferred-pm@3.0.3: - dependencies: - find-up: 5.0.0 - find-yarn-workspace-root2: 1.2.16 - path-exists: 4.0.0 - which-pm: 2.0.0 + preact@10.4.1: {} prelude-ls@1.1.2: {} @@ -32242,14 +31916,14 @@ snapshots: react-is@18.3.1: {} - react-native-webview@11.26.1(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.5)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1): + react-native-webview@11.26.1(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.6)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1): dependencies: escape-string-regexp: 2.0.0 invariant: 2.2.4 react: 18.3.1 - react-native: 0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.5)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) + react-native: 0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.6)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) - react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.5)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10): + react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.6)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10): dependencies: '@jest/create-cache-key-function': 29.7.0 '@react-native-community/cli': 13.6.6(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -32261,7 +31935,7 @@ snapshots: '@react-native/gradle-plugin': 0.74.83 '@react-native/js-polyfills': 0.74.83 '@react-native/normalize-colors': 0.74.83 - '@react-native/virtualized-lists': 0.74.83(@types/react@18.3.5)(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.5)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) + '@react-native/virtualized-lists': 0.74.83(@types/react@18.3.6)(react-native@0.74.1(@babel/core@7.25.2)(@babel/preset-env@7.22.5(@babel/core@7.25.2))(@types/react@18.3.6)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) abort-controller: 3.0.0 anser: 1.4.10 ansi-regex: 5.0.1 @@ -32290,7 +31964,7 @@ snapshots: ws: 6.2.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) yargs: 17.7.2 optionalDependencies: - '@types/react': 18.3.5 + '@types/react': 18.3.6 transitivePeerDependencies: - '@babel/core' - '@babel/preset-env' @@ -32322,7 +31996,7 @@ snapshots: optionalDependencies: '@types/react': 18.3.1 - react-scripts@5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.22.5))(@babel/plugin-transform-react-jsx@7.25.2(@babel/core@7.22.5))(@swc/core@1.7.14)(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.17.19)(eslint@9.10.0(jiti@1.21.6))(react@18.3.1)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2))(type-fest@3.1.0)(typescript@5.6.2)(utf-8-validate@5.0.10): + react-scripts@5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.22.5))(@babel/plugin-transform-react-jsx@7.25.2(@babel/core@7.22.5))(@swc/core@1.7.14)(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.17.19)(eslint@9.10.0(jiti@1.21.6))(react@18.3.1)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2))(type-fest@3.1.0)(typescript@5.6.2)(utf-8-validate@5.0.10): dependencies: '@babel/core': 7.22.5 '@pmmmwh/react-refresh-webpack-plugin': 0.5.10(react-refresh@0.11.0)(type-fest@3.1.0)(webpack-dev-server@4.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)))(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) @@ -32340,21 +32014,21 @@ snapshots: dotenv: 10.0.0 dotenv-expand: 5.1.0 eslint: 9.10.0(jiti@1.21.6) - eslint-config-react-app: 7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.22.5))(@babel/plugin-transform-react-jsx@7.25.2(@babel/core@7.22.5))(eslint@9.10.0(jiti@1.21.6))(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2) + eslint-config-react-app: 7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.22.5))(@babel/plugin-transform-react-jsx@7.25.2(@babel/core@7.22.5))(eslint@9.10.0(jiti@1.21.6))(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2) eslint-webpack-plugin: 3.2.0(eslint@9.10.0(jiti@1.21.6))(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) file-loader: 6.2.0(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) fs-extra: 10.1.0 html-webpack-plugin: 5.5.3(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) identity-obj-proxy: 3.0.0 - jest: 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2))(utf-8-validate@5.0.10) + jest: 27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2))(utf-8-validate@5.0.10) jest-resolve: 27.5.1 - jest-watch-typeahead: 1.1.0(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2))(utf-8-validate@5.0.10)) + jest-watch-typeahead: 1.1.0(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2))(utf-8-validate@5.0.10)) mini-css-extract-plugin: 2.7.6(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) - postcss: 8.4.45 - postcss-flexbugs-fixes: 5.0.2(postcss@8.4.45) - postcss-loader: 6.2.1(postcss@8.4.45)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) - postcss-normalize: 10.0.1(browserslist@4.21.9)(postcss@8.4.45) - postcss-preset-env: 7.8.3(postcss@8.4.45) + postcss: 8.4.47 + postcss-flexbugs-fixes: 5.0.2(postcss@8.4.47) + postcss-loader: 6.2.1(postcss@8.4.47)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) + postcss-normalize: 10.0.1(browserslist@4.21.9)(postcss@8.4.47) + postcss-preset-env: 7.8.3(postcss@8.4.47) prompts: 2.4.2 react: 18.3.1 react-app-polyfill: 3.0.0 @@ -32366,7 +32040,7 @@ snapshots: semver: 7.3.8 source-map-loader: 3.0.2(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) style-loader: 3.3.3(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) - tailwindcss: 3.4.10(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2)) + tailwindcss: 3.4.11(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2)) terser-webpack-plugin: 5.3.9(@swc/core@1.7.14)(esbuild@0.17.19)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) webpack: 5.88.0(@swc/core@1.7.14)(esbuild@0.17.19) webpack-dev-server: 4.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.88.0(@swc/core@1.7.14)(esbuild@0.17.19)) @@ -32770,7 +32444,7 @@ snapshots: dependencies: glob: 7.2.3 - rimraf@5.0.9: + rimraf@5.0.10: dependencies: glob: 10.4.5 @@ -32787,14 +32461,14 @@ snapshots: serialize-javascript: 4.0.0 terser: 5.18.2 - rollup-plugin-visualizer@5.12.0(rollup@4.21.2): + rollup-plugin-visualizer@5.12.0(rollup@4.21.3): dependencies: open: 8.4.2 picomatch: 2.3.1 source-map: 0.7.4 yargs: 17.7.2 optionalDependencies: - rollup: 4.21.2 + rollup: 4.21.3 rollup@2.79.1: optionalDependencies: @@ -32804,26 +32478,26 @@ snapshots: optionalDependencies: fsevents: 2.3.3 - rollup@4.21.2: + rollup@4.21.3: dependencies: '@types/estree': 1.0.5 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.21.2 - '@rollup/rollup-android-arm64': 4.21.2 - '@rollup/rollup-darwin-arm64': 4.21.2 - '@rollup/rollup-darwin-x64': 4.21.2 - '@rollup/rollup-linux-arm-gnueabihf': 4.21.2 - '@rollup/rollup-linux-arm-musleabihf': 4.21.2 - '@rollup/rollup-linux-arm64-gnu': 4.21.2 - '@rollup/rollup-linux-arm64-musl': 4.21.2 - '@rollup/rollup-linux-powerpc64le-gnu': 4.21.2 - '@rollup/rollup-linux-riscv64-gnu': 4.21.2 - '@rollup/rollup-linux-s390x-gnu': 4.21.2 - '@rollup/rollup-linux-x64-gnu': 4.21.2 - '@rollup/rollup-linux-x64-musl': 4.21.2 - '@rollup/rollup-win32-arm64-msvc': 4.21.2 - '@rollup/rollup-win32-ia32-msvc': 4.21.2 - '@rollup/rollup-win32-x64-msvc': 4.21.2 + '@rollup/rollup-android-arm-eabi': 4.21.3 + '@rollup/rollup-android-arm64': 4.21.3 + '@rollup/rollup-darwin-arm64': 4.21.3 + '@rollup/rollup-darwin-x64': 4.21.3 + '@rollup/rollup-linux-arm-gnueabihf': 4.21.3 + '@rollup/rollup-linux-arm-musleabihf': 4.21.3 + '@rollup/rollup-linux-arm64-gnu': 4.21.3 + '@rollup/rollup-linux-arm64-musl': 4.21.3 + '@rollup/rollup-linux-powerpc64le-gnu': 4.21.3 + '@rollup/rollup-linux-riscv64-gnu': 4.21.3 + '@rollup/rollup-linux-s390x-gnu': 4.21.3 + '@rollup/rollup-linux-x64-gnu': 4.21.3 + '@rollup/rollup-linux-x64-musl': 4.21.3 + '@rollup/rollup-win32-arm64-msvc': 4.21.3 + '@rollup/rollup-win32-ia32-msvc': 4.21.3 + '@rollup/rollup-win32-x64-msvc': 4.21.3 fsevents: 2.3.3 rpc-websockets@7.11.0: @@ -33015,6 +32689,24 @@ snapshots: transitivePeerDependencies: - supports-color + send@0.19.0: + dependencies: + debug: 2.6.9 + depd: 2.0.0 + destroy: 1.2.0 + encodeurl: 1.0.2 + escape-html: 1.0.3 + etag: 1.8.1 + fresh: 0.5.2 + http-errors: 2.0.0 + mime: 1.6.0 + ms: 2.1.3 + on-finished: 2.4.1 + range-parser: 1.2.1 + statuses: 2.0.1 + transitivePeerDependencies: + - supports-color + sentence-case@3.0.4: dependencies: no-case: 3.0.4 @@ -33056,6 +32748,15 @@ snapshots: transitivePeerDependencies: - supports-color + serve-static@1.16.2: + dependencies: + encodeurl: 2.0.0 + escape-html: 1.0.3 + parseurl: 1.3.3 + send: 0.19.0 + transitivePeerDependencies: + - supports-color + set-blocking@2.0.0: {} set-function-length@1.2.2: @@ -33624,7 +33325,7 @@ snapshots: strip-ansi@7.1.0: dependencies: - ansi-regex: 6.0.1 + ansi-regex: 6.1.0 strip-bom@2.0.0: dependencies: @@ -33663,10 +33364,10 @@ snapshots: optionalDependencies: '@babel/core': 7.25.2 - stylehacks@5.1.1(postcss@8.4.45): + stylehacks@5.1.1(postcss@8.4.47): dependencies: browserslist: 4.23.3 - postcss: 8.4.45 + postcss: 8.4.47 postcss-selector-parser: 6.0.13 stylis@4.3.1: {} @@ -33675,16 +33376,6 @@ snapshots: dependencies: minimist: 1.2.8 - sucrase@3.32.0: - dependencies: - '@jridgewell/gen-mapping': 0.3.5 - commander: 4.1.1 - glob: 7.1.6 - lines-and-columns: 1.2.4 - mz: 2.7.0 - pirates: 4.0.6 - ts-interface-checker: 0.1.13 - sucrase@3.35.0: dependencies: '@jridgewell/gen-mapping': 0.3.5 @@ -33807,7 +33498,7 @@ snapshots: tachyons@4.12.0: {} - tailwindcss@3.4.10(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2)): + tailwindcss@3.4.11(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2)): dependencies: '@alloc/quick-lru': 5.2.0 arg: 5.0.2 @@ -33819,18 +33510,18 @@ snapshots: is-glob: 4.0.3 jiti: 1.21.6 lilconfig: 2.1.0 - micromatch: 4.0.7 + micromatch: 4.0.8 normalize-path: 3.0.0 object-hash: 3.0.0 - picocolors: 1.0.1 - postcss: 8.4.45 - postcss-import: 15.1.0(postcss@8.4.45) - postcss-js: 4.0.1(postcss@8.4.45) - postcss-load-config: 4.0.1(postcss@8.4.45)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2)) - postcss-nested: 6.0.1(postcss@8.4.45) + picocolors: 1.1.0 + postcss: 8.4.47 + postcss-import: 15.1.0(postcss@8.4.47) + postcss-js: 4.0.1(postcss@8.4.47) + postcss-load-config: 4.0.1(postcss@8.4.47)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2)) + postcss-nested: 6.0.1(postcss@8.4.47) postcss-selector-parser: 6.0.13 resolve: 1.22.8 - sucrase: 3.32.0 + sucrase: 3.35.0 transitivePeerDependencies: - ts-node @@ -33898,7 +33589,7 @@ snapshots: commander: 2.20.3 source-map-support: 0.5.21 - terser@5.31.6: + terser@5.32.0: dependencies: '@jridgewell/source-map': 0.3.6 acorn: 8.12.1 @@ -34155,16 +33846,16 @@ snapshots: ts-log@2.2.5: {} - ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2): + ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 22.5.4 + '@types/node': 22.5.5 acorn: 8.12.1 - acorn-walk: 8.3.3 + acorn-walk: 8.3.4 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 @@ -34197,7 +33888,7 @@ snapshots: tslib@2.7.0: {} - tsup@6.7.0(@swc/core@1.7.14)(postcss@8.4.45)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2))(typescript@5.6.2): + tsup@6.7.0(@swc/core@1.7.14)(postcss@8.4.47)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2))(typescript@5.6.2): dependencies: bundle-require: 4.2.1(esbuild@0.17.19) cac: 6.7.14 @@ -34207,7 +33898,7 @@ snapshots: execa: 5.1.1 globby: 11.1.0 joycon: 3.1.1 - postcss-load-config: 3.1.4(postcss@8.4.45)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.4)(typescript@5.6.2)) + postcss-load-config: 3.1.4(postcss@8.4.47)(ts-node@10.9.1(@swc/core@1.7.14)(@types/node@22.5.5)(typescript@5.6.2)) resolve-from: 5.0.0 rollup: 3.29.4 source-map: 0.8.0-beta.0 @@ -34215,7 +33906,7 @@ snapshots: tree-kill: 1.2.2 optionalDependencies: '@swc/core': 1.7.14(@swc/helpers@0.5.12) - postcss: 8.4.45 + postcss: 8.4.47 typescript: 5.6.2 transitivePeerDependencies: - supports-color @@ -34226,10 +33917,10 @@ snapshots: tslib: 1.14.1 typescript: 5.6.2 - tsx@4.19.0: + tsx@4.19.1: dependencies: esbuild: 0.23.1 - get-tsconfig: 4.8.0 + get-tsconfig: 4.8.1 optionalDependencies: fsevents: 2.3.3 @@ -34246,36 +33937,36 @@ snapshots: tunnel@0.0.6: {} - turbo-darwin-64@2.1.1: + turbo-darwin-64@2.1.2: optional: true - turbo-darwin-arm64@2.1.1: + turbo-darwin-arm64@2.1.2: optional: true turbo-json-parse@2.3.0: dependencies: generate-function: 2.3.1 - turbo-linux-64@2.1.1: + turbo-linux-64@2.1.2: optional: true - turbo-linux-arm64@2.1.1: + turbo-linux-arm64@2.1.2: optional: true - turbo-windows-64@2.1.1: + turbo-windows-64@2.1.2: optional: true - turbo-windows-arm64@2.1.1: + turbo-windows-arm64@2.1.2: optional: true - turbo@2.1.1: + turbo@2.1.2: optionalDependencies: - turbo-darwin-64: 2.1.1 - turbo-darwin-arm64: 2.1.1 - turbo-linux-64: 2.1.1 - turbo-linux-arm64: 2.1.1 - turbo-windows-64: 2.1.1 - turbo-windows-arm64: 2.1.1 + turbo-darwin-64: 2.1.2 + turbo-darwin-arm64: 2.1.2 + turbo-linux-64: 2.1.2 + turbo-linux-arm64: 2.1.2 + turbo-windows-64: 2.1.2 + turbo-windows-arm64: 2.1.2 tweetnacl@0.14.5: {} @@ -34366,7 +34057,7 @@ snapshots: typedarray@0.0.6: {} - typedoc-plugin-markdown@4.2.6(typedoc@0.26.6(typescript@5.6.2)): + typedoc-plugin-markdown@4.2.7(typedoc@0.26.6(typescript@5.6.2)): dependencies: typedoc: 0.26.6(typescript@5.6.2) @@ -34573,7 +34264,7 @@ snapshots: dependencies: browserslist: 4.23.3 escalade: 3.1.2 - picocolors: 1.0.1 + picocolors: 1.1.0 update-notifier@5.1.0: dependencies: @@ -34700,7 +34391,7 @@ snapshots: v8-to-istanbul@8.1.1: dependencies: - '@types/istanbul-lib-coverage': 2.0.4 + '@types/istanbul-lib-coverage': 2.0.6 convert-source-map: 1.9.0 source-map: 0.7.4 @@ -34711,12 +34402,12 @@ snapshots: validate-npm-package-name@5.0.1: {} - valtio@1.11.2(@types/react@18.3.5)(react@18.3.1): + valtio@1.11.2(@types/react@18.3.6)(react@18.3.1): dependencies: proxy-compare: 2.5.1 use-sync-external-store: 1.2.0(react@18.3.1) optionalDependencies: - '@types/react': 18.3.5 + '@types/react': 18.3.6 react: 18.3.1 value-or-promise@1.0.12: {} @@ -34763,13 +34454,13 @@ snapshots: - utf-8-validate - zod - vite-node@2.0.5(@types/node@22.5.4)(terser@5.31.6): + vite-node@2.0.5(@types/node@22.5.5)(terser@5.32.0): dependencies: cac: 6.7.14 debug: 4.3.7 pathe: 1.1.2 tinyrainbow: 1.2.0 - vite: 5.4.3(@types/node@22.5.4)(terser@5.31.6) + vite: 5.4.5(@types/node@22.5.5)(terser@5.32.0) transitivePeerDependencies: - '@types/node' - less @@ -34781,17 +34472,17 @@ snapshots: - supports-color - terser - vite-plugin-json5@1.1.2(@rollup/pluginutils@5.1.0(rollup@4.21.2))(vite@5.4.3(@types/node@22.5.4)(terser@5.31.6)): + vite-plugin-json5@1.1.2(@rollup/pluginutils@5.1.0(rollup@4.21.3))(vite@5.4.5(@types/node@22.5.5)(terser@5.32.0)): dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.21.2) + '@rollup/pluginutils': 5.1.0(rollup@4.21.3) json5: 2.2.3 - vite: 5.4.3(@types/node@22.5.4)(terser@5.31.6) + vite: 5.4.5(@types/node@22.5.5)(terser@5.32.0) - vite-plugin-node-polyfills@0.22.0(rollup@4.21.2)(vite@5.4.3(@types/node@22.5.4)(terser@5.31.6)): + vite-plugin-node-polyfills@0.22.0(rollup@4.21.3)(vite@5.4.5(@types/node@22.5.5)(terser@5.32.0)): dependencies: - '@rollup/plugin-inject': 5.0.5(rollup@4.21.2) + '@rollup/plugin-inject': 5.0.5(rollup@4.21.3) node-stdlib-browser: 1.2.0 - vite: 5.4.3(@types/node@22.5.4)(terser@5.31.6) + vite: 5.4.5(@types/node@22.5.5)(terser@5.32.0) transitivePeerDependencies: - rollup @@ -34801,46 +34492,46 @@ snapshots: fast-glob: 3.3.1 minimatch: 6.2.0 - vite@5.4.3(@types/node@22.5.4)(terser@5.31.6): + vite@5.4.5(@types/node@22.5.5)(terser@5.32.0): dependencies: esbuild: 0.21.5 - postcss: 8.4.45 - rollup: 4.21.2 + postcss: 8.4.47 + rollup: 4.21.3 optionalDependencies: - '@types/node': 22.5.4 + '@types/node': 22.5.5 fsevents: 2.3.3 - terser: 5.31.6 + terser: 5.32.0 - vitepress-plugin-search@1.0.4-alpha.22(flexsearch@0.7.43)(vitepress@1.3.4(@algolia/client-search@4.22.1)(@types/node@22.5.4)(@types/react@18.3.5)(axios@1.7.7)(idb-keyval@6.2.1)(postcss@8.4.45)(qrcode@1.5.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.11.0)(terser@5.31.6)(typescript@5.6.2))(vue@3.5.3(typescript@5.6.2)): + vitepress-plugin-search@1.0.4-alpha.22(flexsearch@0.7.43)(vitepress@1.3.4(@algolia/client-search@4.22.1)(@types/node@22.5.5)(@types/react@18.3.6)(axios@1.7.7)(idb-keyval@6.2.1)(postcss@8.4.47)(qrcode@1.5.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.11.0)(terser@5.32.0)(typescript@5.6.2))(vue@3.5.6(typescript@5.6.2)): dependencies: '@types/flexsearch': 0.7.3 '@types/markdown-it': 12.2.3 flexsearch: 0.7.43 glob-to-regexp: 0.4.1 markdown-it: 13.0.1 - vitepress: 1.3.4(@algolia/client-search@4.22.1)(@types/node@22.5.4)(@types/react@18.3.5)(axios@1.7.7)(idb-keyval@6.2.1)(postcss@8.4.45)(qrcode@1.5.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.11.0)(terser@5.31.6)(typescript@5.6.2) - vue: 3.5.3(typescript@5.6.2) + vitepress: 1.3.4(@algolia/client-search@4.22.1)(@types/node@22.5.5)(@types/react@18.3.6)(axios@1.7.7)(idb-keyval@6.2.1)(postcss@8.4.47)(qrcode@1.5.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.11.0)(terser@5.32.0)(typescript@5.6.2) + vue: 3.5.6(typescript@5.6.2) - vitepress@1.3.4(@algolia/client-search@4.22.1)(@types/node@22.5.4)(@types/react@18.3.5)(axios@1.7.7)(idb-keyval@6.2.1)(postcss@8.4.45)(qrcode@1.5.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.11.0)(terser@5.31.6)(typescript@5.6.2): + vitepress@1.3.4(@algolia/client-search@4.22.1)(@types/node@22.5.5)(@types/react@18.3.6)(axios@1.7.7)(idb-keyval@6.2.1)(postcss@8.4.47)(qrcode@1.5.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.11.0)(terser@5.32.0)(typescript@5.6.2): dependencies: '@docsearch/css': 3.6.1 - '@docsearch/js': 3.6.1(@algolia/client-search@4.22.1)(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.11.0) + '@docsearch/js': 3.6.1(@algolia/client-search@4.22.1)(@types/react@18.3.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.11.0) '@shikijs/core': 1.14.1 '@shikijs/transformers': 1.14.1 '@types/markdown-it': 14.1.2 - '@vitejs/plugin-vue': 5.1.2(vite@5.4.3(@types/node@22.5.4)(terser@5.31.6))(vue@3.5.3(typescript@5.6.2)) + '@vitejs/plugin-vue': 5.1.2(vite@5.4.5(@types/node@22.5.5)(terser@5.32.0))(vue@3.5.6(typescript@5.6.2)) '@vue/devtools-api': 7.3.8 '@vue/shared': 3.4.38 - '@vueuse/core': 11.0.0(vue@3.5.3(typescript@5.6.2)) - '@vueuse/integrations': 11.0.0(axios@1.7.7)(focus-trap@7.5.4)(idb-keyval@6.2.1)(qrcode@1.5.3)(vue@3.5.3(typescript@5.6.2)) + '@vueuse/core': 11.0.0(vue@3.5.6(typescript@5.6.2)) + '@vueuse/integrations': 11.0.0(axios@1.7.7)(focus-trap@7.5.4)(idb-keyval@6.2.1)(qrcode@1.5.3)(vue@3.5.6(typescript@5.6.2)) focus-trap: 7.5.4 mark.js: 8.11.1 minisearch: 7.1.0 shiki: 1.14.1 - vite: 5.4.3(@types/node@22.5.4)(terser@5.31.6) - vue: 3.5.3(typescript@5.6.2) + vite: 5.4.5(@types/node@22.5.5)(terser@5.32.0) + vue: 3.5.6(typescript@5.6.2) optionalDependencies: - postcss: 8.4.45 + postcss: 8.4.47 transitivePeerDependencies: - '@algolia/client-search' - '@types/node' @@ -34869,7 +34560,7 @@ snapshots: - typescript - universal-cookie - vitest@2.0.5(@types/node@22.5.4)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.31.6): + vitest@2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.32.0): dependencies: '@ampproject/remapping': 2.3.0 '@vitest/expect': 2.0.5 @@ -34887,12 +34578,12 @@ snapshots: tinybench: 2.9.0 tinypool: 1.0.1 tinyrainbow: 1.2.0 - vite: 5.4.3(@types/node@22.5.4)(terser@5.31.6) - vite-node: 2.0.5(@types/node@22.5.4)(terser@5.31.6) + vite: 5.4.5(@types/node@22.5.5)(terser@5.32.0) + vite-node: 2.0.5(@types/node@22.5.5)(terser@5.32.0) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.5.4 - '@vitest/browser': 2.0.5(bufferutil@4.0.8)(playwright@1.47.0)(typescript@5.6.2)(utf-8-validate@5.0.10)(vitest@2.0.5)(webdriverio@9.0.9(bufferutil@4.0.8)(utf-8-validate@6.0.4)) + '@types/node': 22.5.5 + '@vitest/browser': 2.0.5(bufferutil@4.0.8)(playwright@1.47.1)(typescript@5.6.2)(utf-8-validate@5.0.10)(vitest@2.0.5)(webdriverio@9.0.9(bufferutil@4.0.8)(utf-8-validate@6.0.4)) jsdom: 16.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - less @@ -34904,7 +34595,7 @@ snapshots: - supports-color - terser - vitest@2.0.5(@types/node@22.5.4)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.31.6): + vitest@2.0.5(@types/node@22.5.5)(@vitest/browser@2.0.5)(jsdom@16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4))(terser@5.32.0): dependencies: '@ampproject/remapping': 2.3.0 '@vitest/expect': 2.0.5 @@ -34922,12 +34613,12 @@ snapshots: tinybench: 2.9.0 tinypool: 1.0.1 tinyrainbow: 1.2.0 - vite: 5.4.3(@types/node@22.5.4)(terser@5.31.6) - vite-node: 2.0.5(@types/node@22.5.4)(terser@5.31.6) + vite: 5.4.5(@types/node@22.5.5)(terser@5.32.0) + vite-node: 2.0.5(@types/node@22.5.5)(terser@5.32.0) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.5.4 - '@vitest/browser': 2.0.5(bufferutil@4.0.8)(playwright@1.47.0)(typescript@5.6.2)(utf-8-validate@6.0.4)(vitest@2.0.5)(webdriverio@9.0.9(bufferutil@4.0.8)(utf-8-validate@6.0.4)) + '@types/node': 22.5.5 + '@vitest/browser': 2.0.5(bufferutil@4.0.8)(playwright@1.47.1)(typescript@5.6.2)(utf-8-validate@6.0.4)(vitest@2.0.5)(webdriverio@9.0.9(bufferutil@4.0.8)(utf-8-validate@6.0.4)) jsdom: 16.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4) transitivePeerDependencies: - less @@ -34943,17 +34634,17 @@ snapshots: vm-browserify@1.1.2: {} - vue-demi@0.14.10(vue@3.5.3(typescript@5.6.2)): + vue-demi@0.14.10(vue@3.5.6(typescript@5.6.2)): dependencies: - vue: 3.5.3(typescript@5.6.2) + vue: 3.5.6(typescript@5.6.2) - vue@3.5.3(typescript@5.6.2): + vue@3.5.6(typescript@5.6.2): dependencies: - '@vue/compiler-dom': 3.5.3 - '@vue/compiler-sfc': 3.5.3 - '@vue/runtime-dom': 3.5.3 - '@vue/server-renderer': 3.5.3(vue@3.5.3(typescript@5.6.2)) - '@vue/shared': 3.5.3 + '@vue/compiler-dom': 3.5.6 + '@vue/compiler-sfc': 3.5.6 + '@vue/runtime-dom': 3.5.6 + '@vue/server-renderer': 3.5.6(vue@3.5.6(typescript@5.6.2)) + '@vue/shared': 3.5.6 optionalDependencies: typescript: 5.6.2 @@ -35242,11 +34933,6 @@ snapshots: which-module@2.0.1: {} - which-pm@2.0.0: - dependencies: - load-yaml-file: 0.2.0 - path-exists: 4.0.0 - which-typed-array@1.1.15: dependencies: available-typed-arrays: 1.0.7 @@ -35627,7 +35313,7 @@ snapshots: compress-commons: 6.0.2 readable-stream: 4.5.2 - zod-validation-error@3.3.1(zod@3.23.8): + zod-validation-error@3.4.0(zod@3.23.8): dependencies: zod: 3.23.8 @@ -35635,11 +35321,11 @@ snapshots: zod@3.23.8: {} - zustand@4.4.1(@types/react@18.3.5)(immer@9.0.21)(react@18.3.1): + zustand@4.4.1(@types/react@18.3.6)(immer@9.0.21)(react@18.3.1): dependencies: use-sync-external-store: 1.2.0(react@18.3.1) optionalDependencies: - '@types/react': 18.3.5 + '@types/react': 18.3.6 immer: 9.0.21 react: 18.3.1 diff --git a/templates/nextjs/package.json b/templates/nextjs/package.json index 85d447ba77c..2ab6a13d468 100644 --- a/templates/nextjs/package.json +++ b/templates/nextjs/package.json @@ -16,26 +16,26 @@ "@fuels/connectors": "^0.27.1", "@fuels/react": "^0.27.1", "@tanstack/react-query": "^5.55.4", - "@wagmi/connectors": "^5.1.9", - "@wagmi/core": "^2.13.4", + "@wagmi/connectors": "^5.1.10", + "@wagmi/core": "^2.13.5", "dotenv": "^16.4.5", "fuels": "workspace:*", - "next": "14.2.9", + "next": "14.2.11", "react": "^18.3.1", "react-dom": "^18.3.1", "react-hot-toast": "^2.4.1", "react-use": "^17.5.1" }, "devDependencies": { - "@types/node": "^22.5.4", - "@playwright/test": "^1.47.0", - "@types/react": "^18.3.5", + "@types/node": "^22.5.5", + "@playwright/test": "^1.47.1", + "@types/react": "^18.3.6", "@types/react-dom": "^18.3", "autoprefixer": "^10.4.20", "eslint": "^8.57.0", - "eslint-config-next": "14.2.9", - "postcss": "^8.4.45", - "tailwindcss": "^3.4.10", + "eslint-config-next": "14.2.11", + "postcss": "^8.4.47", + "tailwindcss": "^3.4.11", "typescript": "~5.6.2", "vitest": "^2.0.5" } diff --git a/templates/vite/package.json b/templates/vite/package.json index e2bf0c19c16..4d158e741e6 100644 --- a/templates/vite/package.json +++ b/templates/vite/package.json @@ -17,8 +17,8 @@ "@fuels/react": "^0.27.1", "@tanstack/react-query": "^5.55.4", "@tanstack/react-router": "^1.56.5", - "@wagmi/connectors": "^5.1.9", - "@wagmi/core": "^2.13.4", + "@wagmi/connectors": "^5.1.10", + "@wagmi/core": "^2.13.5", "dotenv": "^16.4.5", "fuels": "workspace:*", "react": "^18.3.1", @@ -29,20 +29,20 @@ "devDependencies": { "@eslint/js": "^9.10.0", "@tanstack/router-plugin": "^1.56.4", - "@playwright/test": "^1.47.0", - "@types/react": "^18.3.5", + "@playwright/test": "^1.47.1", + "@types/react": "^18.3.6", "@types/react-dom": "^18.3", "@vitejs/plugin-react-swc": "^3.7.0", "autoprefixer": "^10.4.20", "eslint": "^8.57.0", "eslint-plugin-react-hooks": "^4.6.2", - "eslint-plugin-react-refresh": "^0.4.11", + "eslint-plugin-react-refresh": "^0.4.12", "globals": "^15.9.0", - "postcss": "^8.4.45", - "tailwindcss": "^3.4.10", + "postcss": "^8.4.47", + "tailwindcss": "^3.4.11", "typescript": "~5.6.2", "typescript-eslint": "^8.5.0", - "vite": "^5.4.3", + "vite": "^5.4.5", "vitest": "^2.0.5" } } From e6b6af943500fe3b9d38de6abc1ed017e3e4bbc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Torres?= <30977845+Torres-ssf@users.noreply.github.com> Date: Mon, 16 Sep 2024 18:36:23 -0300 Subject: [PATCH 16/26] fix: add missing receipts properties (#3156) --- .changeset/three-hairs-approve.md | 6 +++++ .../transaction-summary/operations.test.ts | 1 + .../providers/transaction-summary/receipt.ts | 22 ++----------------- .../src/providers/utils/receipts.test.ts | 4 ++++ .../account/src/providers/utils/receipts.ts | 4 ++++ .../test/fixtures/transaction-summary.ts | 1 + .../transactions/src/coders/receipt.test.ts | 3 +++ packages/transactions/src/coders/receipt.ts | 15 +++++++++++++ 8 files changed, 36 insertions(+), 20 deletions(-) create mode 100644 .changeset/three-hairs-approve.md diff --git a/.changeset/three-hairs-approve.md b/.changeset/three-hairs-approve.md new file mode 100644 index 00000000000..61642445ff1 --- /dev/null +++ b/.changeset/three-hairs-approve.md @@ -0,0 +1,6 @@ +--- +"@fuel-ts/transactions": patch +"@fuel-ts/account": patch +--- + +fix: add missing receipts properties diff --git a/packages/account/src/providers/transaction-summary/operations.test.ts b/packages/account/src/providers/transaction-summary/operations.test.ts index 623c29e928e..9a00406afc2 100644 --- a/packages/account/src/providers/transaction-summary/operations.test.ts +++ b/packages/account/src/providers/transaction-summary/operations.test.ts @@ -915,6 +915,7 @@ describe('operations', () => { nonce: '0x66c4d70c08ff30cd2d9dae0b6fd05972997579328529bb0605dd604afedfdf93', recipient: '0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266', sender: '0x4aec2335430f52d0314a03b244d285c675d790dfbf0bc853fd31e39548ad8b7d', + len: 0, type: 10, }; diff --git a/packages/account/src/providers/transaction-summary/receipt.ts b/packages/account/src/providers/transaction-summary/receipt.ts index 85561e77cce..b5f8d7662e5 100644 --- a/packages/account/src/providers/transaction-summary/receipt.ts +++ b/packages/account/src/providers/transaction-summary/receipt.ts @@ -6,26 +6,8 @@ import { assembleReceiptByType } from '../utils'; import type { BurnedAsset, MintedAsset } from './types'; -export const processGqlReceipt = (gqlReceipt: GqlReceiptFragment): TransactionResultReceipt => { - const receipt = assembleReceiptByType(gqlReceipt); - - switch (receipt.type) { - case ReceiptType.ReturnData: { - return { - ...receipt, - data: gqlReceipt.data || '0x', - }; - } - case ReceiptType.LogData: { - return { - ...receipt, - data: gqlReceipt.data || '0x', - }; - } - default: - return receipt; - } -}; +export const processGqlReceipt = (gqlReceipt: GqlReceiptFragment): TransactionResultReceipt => + assembleReceiptByType(gqlReceipt); export const extractMintedAssetsFromReceipts = ( receipts: Array diff --git a/packages/account/src/providers/utils/receipts.test.ts b/packages/account/src/providers/utils/receipts.test.ts index cc9b6b86c0f..5da13b10377 100644 --- a/packages/account/src/providers/utils/receipts.test.ts +++ b/packages/account/src/providers/utils/receipts.test.ts @@ -72,6 +72,7 @@ describe('assembleReceiptByType', () => { expect(receipt.len).toStrictEqual(new BN(MOCK_GQL_RECEIPT_FRAGMENT.len)); expect(receipt.is).toStrictEqual(new BN(MOCK_GQL_RECEIPT_FRAGMENT.is)); expect(receipt.pc).toStrictEqual(new BN(MOCK_GQL_RECEIPT_FRAGMENT.pc)); + expect(receipt.data).toStrictEqual(MOCK_GQL_RECEIPT_FRAGMENT.data); expect(receipt.ptr).toStrictEqual(new BN(MOCK_GQL_RECEIPT_FRAGMENT.ptr)); }); @@ -133,6 +134,7 @@ describe('assembleReceiptByType', () => { expect(receipt.len).toStrictEqual(new BN(MOCK_GQL_RECEIPT_FRAGMENT.len)); expect(receipt.val0).toStrictEqual(new BN(MOCK_GQL_RECEIPT_FRAGMENT.ra)); expect(receipt.val1).toStrictEqual(new BN(MOCK_GQL_RECEIPT_FRAGMENT.rb)); + expect(receipt.data).toStrictEqual(MOCK_GQL_RECEIPT_FRAGMENT.data); }); it('should return a ReceiptTransfer receipt when GqlReceiptType.Transfer is provided', () => { @@ -218,6 +220,7 @@ describe('assembleReceiptByType', () => { const amount = bn(MOCK_GQL_RECEIPT_FRAGMENT.amount); const data = arrayify(MOCK_GQL_RECEIPT_FRAGMENT.data || ''); const digest = MOCK_GQL_RECEIPT_FRAGMENT.digest; + const len = Number(MOCK_GQL_RECEIPT_FRAGMENT.len); const messageId = ReceiptMessageOutCoder.getMessageId({ sender, @@ -234,6 +237,7 @@ describe('assembleReceiptByType', () => { expect(receipt.nonce).toStrictEqual(nonce); expect(receipt.recipient).toStrictEqual(recipient); expect(receipt.sender).toStrictEqual(sender); + expect(receipt.len).toStrictEqual(len); expect(receipt.data).toStrictEqual(data); }); diff --git a/packages/account/src/providers/utils/receipts.ts b/packages/account/src/providers/utils/receipts.ts index ea3d181773a..bfc1ec9b85f 100644 --- a/packages/account/src/providers/utils/receipts.ts +++ b/packages/account/src/providers/utils/receipts.ts @@ -102,6 +102,7 @@ export function assembleReceiptByType(receipt: GqlReceiptFragment) { len: bn(receipt.len), digest: hexOrZero(receipt.digest), pc: bn(receipt.pc), + data: hexOrZero(receipt.data), is: bn(receipt.is), }; @@ -157,6 +158,7 @@ export function assembleReceiptByType(receipt: GqlReceiptFragment) { len: bn(receipt.len), digest: hexOrZero(receipt.digest), pc: bn(receipt.pc), + data: hexOrZero(receipt.data), is: bn(receipt.is), }; return logDataReceipt; @@ -206,6 +208,7 @@ export function assembleReceiptByType(receipt: GqlReceiptFragment) { const amount = bn(receipt.amount); const data = receipt.data ? arrayify(receipt.data) : Uint8Array.from([]); const digest = hexOrZero(receipt.digest); + const len = bn(receipt.len).toNumber(); const messageId = InputMessageCoder.getMessageId({ sender, @@ -221,6 +224,7 @@ export function assembleReceiptByType(receipt: GqlReceiptFragment) { recipient, amount, nonce, + len, data, digest, messageId, diff --git a/packages/account/test/fixtures/transaction-summary.ts b/packages/account/test/fixtures/transaction-summary.ts index 9e954446590..10054eef528 100644 --- a/packages/account/test/fixtures/transaction-summary.ts +++ b/packages/account/test/fixtures/transaction-summary.ts @@ -177,6 +177,7 @@ export const MOCK_RECEIPT_MESSAGE_OUT: TransactionResultMessageOutReceipt = { amount: bn.parseUnits('0.001'), nonce: '0x66c4d70c08ff30cd2d9dae0b6fd05972997579328529bb0605dd604afedfdf93', digest: '0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', + len: 0, data: new Uint8Array(), }; diff --git a/packages/transactions/src/coders/receipt.test.ts b/packages/transactions/src/coders/receipt.test.ts index 1e2db2b91be..77b185c1957 100644 --- a/packages/transactions/src/coders/receipt.test.ts +++ b/packages/transactions/src/coders/receipt.test.ts @@ -72,6 +72,7 @@ describe('ReceiptCoder', () => { digest: B256, pc: bn(0), is: bn(0), + data: '0x', }; const encoded = hexlify(new ReceiptCoder().encode(receipt)); @@ -164,6 +165,7 @@ describe('ReceiptCoder', () => { digest: B256, pc: bn(0), is: bn(0), + data: '0x', }; const encoded = hexlify(new ReceiptCoder().encode(receipt)); @@ -232,6 +234,7 @@ describe('ReceiptCoder', () => { recipient: B256_ALT2, amount: bn(4000), nonce: B256_ALT3, + len: 12, digest: B256_ALT4, data: Uint8Array.from([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), }; diff --git a/packages/transactions/src/coders/receipt.ts b/packages/transactions/src/coders/receipt.ts index cb25b5bed29..f5ce228dd69 100644 --- a/packages/transactions/src/coders/receipt.ts +++ b/packages/transactions/src/coders/receipt.ts @@ -184,6 +184,8 @@ export type ReceiptReturnData = { digest: string; /** Value of register $pc (u64) */ pc: BN; + /** Value of the memory range MEM[$rA, $rB]. */ + data: string; /** Value of register $is (u64) */ is: BN; }; @@ -207,6 +209,7 @@ export class ReceiptReturnDataCoder extends Coder { parts.push(new B256Coder().encode(value.digest)); parts.push(new BigNumberCoder('u64').encode(value.pc)); parts.push(new BigNumberCoder('u64').encode(value.is)); + parts.push(new ByteArrayCoder(value.len.toNumber()).encode(value.data)); return concat(parts); } @@ -509,6 +518,8 @@ export class ReceiptLogDataCoder extends Coder { const pc = decoded; [decoded, o] = new BigNumberCoder('u64').decode(data, o); const is = decoded; + [decoded, o] = new ByteArrayCoder(len.toNumber()).decode(data, o); + const logData = decoded; return [ { @@ -521,6 +532,7 @@ export class ReceiptLogDataCoder extends Coder { digest, pc, is, + data: logData, }, o, ]; @@ -728,6 +740,8 @@ export type ReceiptMessageOut = { amount: BN; /** Hexadecimal string representation of the 256-bit (32-byte) message nonce */ nonce: string; + /** Decimal string representation of a 16-bit unsigned integer; value of register $rC. */ + len: number; /** Hexadecimal string representation of 256-bit (32-byte), hash of MEM[$rA + 32, $rB] */ digest: string; /** Hexadecimal string representation of the value of the memory range MEM[$rA + 32, $rB] */ @@ -802,6 +816,7 @@ export class ReceiptMessageOutCoder extends Coder Date: Thu, 3 Oct 2024 15:06:52 +0200 Subject: [PATCH 17/26] update proxy contract --- .../src/cli/commands/deploy/proxy/types/Src14OwnedProxy.ts | 2 +- .../cli/commands/deploy/proxy/types/Src14OwnedProxyFactory.ts | 2 +- packages/fuels/src/cli/commands/deploy/proxy/types/common.d.ts | 2 +- packages/fuels/src/cli/commands/deploy/proxy/types/index.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/fuels/src/cli/commands/deploy/proxy/types/Src14OwnedProxy.ts b/packages/fuels/src/cli/commands/deploy/proxy/types/Src14OwnedProxy.ts index 5bf0ca489f2..7a00d9cf44b 100644 --- a/packages/fuels/src/cli/commands/deploy/proxy/types/Src14OwnedProxy.ts +++ b/packages/fuels/src/cli/commands/deploy/proxy/types/Src14OwnedProxy.ts @@ -5,7 +5,7 @@ /* eslint-disable @typescript-eslint/consistent-type-imports */ /* - Fuels version: 0.94.7 + Fuels version: 0.94.8 */ import { Contract, Interface } from "../../../../.."; diff --git a/packages/fuels/src/cli/commands/deploy/proxy/types/Src14OwnedProxyFactory.ts b/packages/fuels/src/cli/commands/deploy/proxy/types/Src14OwnedProxyFactory.ts index b27fdc1adfc..ba8c8ae9571 100644 --- a/packages/fuels/src/cli/commands/deploy/proxy/types/Src14OwnedProxyFactory.ts +++ b/packages/fuels/src/cli/commands/deploy/proxy/types/Src14OwnedProxyFactory.ts @@ -5,7 +5,7 @@ /* eslint-disable @typescript-eslint/consistent-type-imports */ /* - Fuels version: 0.94.7 + Fuels version: 0.94.8 */ import { Contract, ContractFactory, decompressBytecode } from "../../../../.."; diff --git a/packages/fuels/src/cli/commands/deploy/proxy/types/common.d.ts b/packages/fuels/src/cli/commands/deploy/proxy/types/common.d.ts index fe3b2168e48..792715f1050 100644 --- a/packages/fuels/src/cli/commands/deploy/proxy/types/common.d.ts +++ b/packages/fuels/src/cli/commands/deploy/proxy/types/common.d.ts @@ -5,7 +5,7 @@ /* eslint-disable @typescript-eslint/consistent-type-imports */ /* - Fuels version: 0.94.7 + Fuels version: 0.94.8 */ /** diff --git a/packages/fuels/src/cli/commands/deploy/proxy/types/index.ts b/packages/fuels/src/cli/commands/deploy/proxy/types/index.ts index f3266230287..67bfbb027a4 100644 --- a/packages/fuels/src/cli/commands/deploy/proxy/types/index.ts +++ b/packages/fuels/src/cli/commands/deploy/proxy/types/index.ts @@ -5,7 +5,7 @@ /* eslint-disable @typescript-eslint/consistent-type-imports */ /* - Fuels version: 0.94.7 + Fuels version: 0.94.8 */ export { Src14OwnedProxy } from './Src14OwnedProxy'; From 976c1bda4f4e4fc62d128857213885d07a3ec1cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nedim=20Salki=C4=87?= Date: Sun, 6 Oct 2024 14:17:50 +0200 Subject: [PATCH 18/26] feat: add missing matcher (#3247) * add missing matcher * Update packages/abi/src/matchers/sway-type-matchers.ts * Update packages/abi/src/matchers/sway-type-matchers.ts Co-authored-by: Peter Smith * fix * Update packages/abi/src/matchers/sway-type-matchers.ts * add tests --------- Co-authored-by: Peter Smith --- .../src/matchers/sway-type-matchers.test.ts | 20 +++++++++++++++++++ .../abi/src/matchers/sway-type-matchers.ts | 19 +++++++++++------- 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/packages/abi/src/matchers/sway-type-matchers.test.ts b/packages/abi/src/matchers/sway-type-matchers.test.ts index 314d01e70af..03dc81f169c 100644 --- a/packages/abi/src/matchers/sway-type-matchers.test.ts +++ b/packages/abi/src/matchers/sway-type-matchers.test.ts @@ -26,6 +26,7 @@ const testMappings: Record = evmAddress: 'evmAddress-matched', rawUntypedPtr: 'rawUntypedPtr-matched', rawUntypedSlice: 'rawUntypedSlice-matched', + str: 'str-matched', }; const matcher = createMatcher(testMappings); @@ -244,4 +245,23 @@ describe('sway type matchers', () => { expect(matcher({ swayType })).toEqual(`${key}-matched`); verifyOtherMatchersDontMatch(key, swayType); }); + + test('str', () => { + const key = 'str'; + const swayType = 'str'; + + expect(matcher({ swayType })).toEqual(`${key}-matched`); + verifyOtherMatchersDontMatch(key, swayType); + }); + + test('matcher without mapping for valid sway type throws', () => { + const swayType = 'str'; + + // @ts-expect-error intentionally missing key for valid swayType + const matcherWithoutMappings = createMatcher({}); + + expect(() => matcherWithoutMappings({ swayType })).toThrow( + `Matcher not found for sway type ${swayType}.` + ); + }); }); diff --git a/packages/abi/src/matchers/sway-type-matchers.ts b/packages/abi/src/matchers/sway-type-matchers.ts index fb73d766c9d..db3dddbda3a 100644 --- a/packages/abi/src/matchers/sway-type-matchers.ts +++ b/packages/abi/src/matchers/sway-type-matchers.ts @@ -9,6 +9,7 @@ export type SwayType = | 'b256' | 'generic' | 'string' + | 'str' | 'stdString' | 'option' | 'result' @@ -21,8 +22,8 @@ export type SwayType = | 'array' | 'assetId' | 'evmAddress' - | 'rawUntypedPtr' // might not need it - | 'rawUntypedSlice'; // might not need it + | 'rawUntypedPtr' + | 'rawUntypedSlice'; type Matcher = (type: string) => boolean; @@ -41,13 +42,15 @@ const generic: Matcher = (type) => GENERIC_REGEX.test(type); export const STRING_REGEX = /^str\[(?[0-9]+)\]/; const string: Matcher = (type) => STRING_REGEX.test(type); +const str: Matcher = (type) => type === 'str'; + export const TUPLE_REGEX = /^\((?.+)\)$/m; const tuple: Matcher = (type) => TUPLE_REGEX.test(type); export const ARRAY_REGEX = /^\[(?[\w\s\\[\]]+);\s*(?[0-9]+)\]/; const array: Matcher = (type) => ARRAY_REGEX.test(type); -const STRUCT_REGEX = /^struct .+$/m; +export const STRUCT_REGEX = /^struct (.+::)?(?.+)$/m; const STRUCT_STD_REGEX = /^struct std::.*(AssetId|B512|Vec|RawVec|EvmAddress|Bytes|String|RawBytes)$/m; const struct: Matcher = (type) => STRUCT_REGEX.test(type) && !STRUCT_STD_REGEX.test(type); @@ -60,7 +63,9 @@ const vector: Matcher = (type) => type === 'struct std::vec::Vec'; const option: Matcher = (type) => type === 'enum std::option::Option'; const result: Matcher = (type) => type === 'enum std::result::Result'; -const enumMatcher: Matcher = (type) => !option(type) && !result(type) && /^enum .*$/m.test(type); + +export const ENUM_REGEX = /^enum (.+::)?(?.+)$/m; +const enumMatcher: Matcher = (type) => !option(type) && !result(type) && ENUM_REGEX.test(type); const rawUntypedPtr: Matcher = (type) => type === 'raw untyped ptr'; const rawUntypedSlice: Matcher = (type) => type === 'raw untyped slice'; @@ -75,6 +80,7 @@ export const swayTypeMatchers: Record = { u64, u256, b256, + str, string, tuple, @@ -104,9 +110,8 @@ export function createMatcher(mappings: Record) { for (const [key, matcher] of swayTypeMatcherEntries) { if (matcher(swayType)) { - const mapping = mappings[key as SwayType]; - if (mapping) { - return mapping; + if (key in mappings) { + return mappings[key as SwayType]; } break; } From 97c03f4b7c95148efe437dff173c167a2a23f494 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Wed, 27 Nov 2024 18:11:10 +0000 Subject: [PATCH 19/26] chore: added errors for matchers --- apps/docs/src/guide/errors/index.md | 6 + .../src/matchers/sway-type-matchers.test.ts | 127 ++++++++++-------- .../abi/src/matchers/sway-type-matchers.ts | 7 +- packages/errors/src/error-codes.ts | 1 + 4 files changed, 83 insertions(+), 58 deletions(-) diff --git a/apps/docs/src/guide/errors/index.md b/apps/docs/src/guide/errors/index.md index 77772baa983..c20604f3217 100644 --- a/apps/docs/src/guide/errors/index.md +++ b/apps/docs/src/guide/errors/index.md @@ -318,6 +318,12 @@ In cases where the error hasn't been mapped yet, this code will be used. If you believe you found a bug, please report the [issue](https://github.com/FuelLabs/fuels-ts/issues/new/choose) to the team. +### `MATCHER_NOT_FOUND` + +When a matcher is not found for a given Sway type. + +Check that the Sway type is correct and exists in the ABI. + ### `MAX_INPUTS_EXCEEDED` When the number of transaction inputs exceeds the maximum limit allowed by the blockchain. diff --git a/packages/abi/src/matchers/sway-type-matchers.test.ts b/packages/abi/src/matchers/sway-type-matchers.test.ts index 03dc81f169c..46cc40cd475 100644 --- a/packages/abi/src/matchers/sway-type-matchers.test.ts +++ b/packages/abi/src/matchers/sway-type-matchers.test.ts @@ -1,3 +1,6 @@ +import { FuelError } from '@fuel-ts/errors'; +import { expectToThrowFuelError } from '@fuel-ts/errors/test-utils'; + import type { SwayType, swayTypeMatchers } from './sway-type-matchers'; import { createMatcher } from './sway-type-matchers'; @@ -31,14 +34,20 @@ const testMappings: Record = const matcher = createMatcher(testMappings); -function verifyOtherMatchersDontMatch(key: keyof typeof testMappings, swayType: string) { +async function verifyOtherMatchersDontMatch(key: keyof typeof testMappings, swayType: string) { const testMappingsWithoutKey = Object.fromEntries( Object.entries(testMappings).filter(([k]) => k !== key) ); const verifier = createMatcher(testMappingsWithoutKey as Record); - expect(() => verifier({ swayType })).toThrow(`Matcher not found for sway type ${swayType}.`); + await expectToThrowFuelError( + () => verifier({ swayType }), + new FuelError( + FuelError.CODES.MATCHER_NOT_FOUND, + `Matcher not found for Sway type "${swayType}".` + ) + ); } /** @@ -46,222 +55,226 @@ function verifyOtherMatchersDontMatch(key: keyof typeof testMappings, swayType: * @group browser */ describe('sway type matchers', () => { - test('void', () => { + test('void', async () => { const key = 'void'; const swayType = '()'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('bool', () => { + test('bool', async () => { const key = 'bool'; const swayType = 'bool'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('u8', () => { + test('u8', async () => { const key = 'u8'; const swayType = 'u8'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('u16', () => { + test('u16', async () => { const key = 'u16'; const swayType = 'u16'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('u32', () => { + test('u32', async () => { const key = 'u32'; const swayType = 'u32'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('u64', () => { + test('u64', async () => { const key = 'u64'; const swayType = 'u64'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('u256', () => { + test('u256', async () => { const key = 'u256'; const swayType = 'u256'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('b256', () => { + test('b256', async () => { const key = 'b256'; const swayType = 'b256'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('string', () => { + test('string', async () => { const key = 'string'; const swayType = 'str[5]'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('array', () => { + test('array', async () => { const key = 'array'; const swayType = '[_; 3]'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('tuple', () => { + test('tuple', async () => { const key = 'tuple'; const swayType = '(_, _, _)'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('struct', () => { + test('struct', async () => { const key = 'struct'; const swayType = 'struct MyStruct'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('assetId', () => { + test('assetId', async () => { const key = 'assetId'; const swayType = 'struct std::asset_id::AssetId'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('b512', () => { + test('b512', async () => { const key = 'b512'; const swayType = 'struct std::b512::B512'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('assetId', () => { + test('assetId', async () => { const key = 'assetId'; const swayType = 'struct std::asset_id::AssetId'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('bytes', () => { + test('bytes', async () => { const key = 'bytes'; const swayType = 'struct std::bytes::Bytes'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('stdString', () => { + test('stdString', async () => { const key = 'stdString'; const swayType = 'struct std::string::String'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('evmAddress', () => { + test('evmAddress', async () => { const key = 'evmAddress'; const swayType = 'struct std::vm::evm::evm_address::EvmAddress'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('vector', () => { + test('vector', async () => { const key = 'vector'; const swayType = 'struct std::vec::Vec'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('enum', () => { + test('enum', async () => { const key = 'enum'; const swayType = 'enum MyEnum'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('option', () => { + test('option', async () => { const key = 'option'; const swayType = 'enum std::option::Option'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('result', () => { + test('result', async () => { const key = 'result'; const swayType = 'enum std::result::Result'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('rawUntypedPtr', () => { + test('rawUntypedPtr', async () => { const key = 'rawUntypedPtr'; const swayType = 'raw untyped ptr'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('rawUntypedSlice', () => { + test('rawUntypedSlice', async () => { const key = 'rawUntypedSlice'; const swayType = 'raw untyped slice'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('generic', () => { + test('generic', async () => { const key = 'generic'; const swayType = 'generic T'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('str', () => { + test('str', async () => { const key = 'str'; const swayType = 'str'; expect(matcher({ swayType })).toEqual(`${key}-matched`); - verifyOtherMatchersDontMatch(key, swayType); + await verifyOtherMatchersDontMatch(key, swayType); }); - test('matcher without mapping for valid sway type throws', () => { + test('matcher without mapping for valid sway type throws', async () => { const swayType = 'str'; // @ts-expect-error intentionally missing key for valid swayType const matcherWithoutMappings = createMatcher({}); - expect(() => matcherWithoutMappings({ swayType })).toThrow( - `Matcher not found for sway type ${swayType}.` + await expectToThrowFuelError( + () => matcherWithoutMappings({ swayType }), + new FuelError( + FuelError.CODES.MATCHER_NOT_FOUND, + `Matcher not found for Sway type "${swayType}".` + ) ); }); }); diff --git a/packages/abi/src/matchers/sway-type-matchers.ts b/packages/abi/src/matchers/sway-type-matchers.ts index db3dddbda3a..9337b4cfb7e 100644 --- a/packages/abi/src/matchers/sway-type-matchers.ts +++ b/packages/abi/src/matchers/sway-type-matchers.ts @@ -1,3 +1,5 @@ +import { FuelError } from '@fuel-ts/errors'; + export type SwayType = | 'void' | 'bool' @@ -117,6 +119,9 @@ export function createMatcher(mappings: Record) { } } - throw new Error(`Matcher not found for sway type ${swayType}.`); + throw new FuelError( + FuelError.CODES.MATCHER_NOT_FOUND, + `Matcher not found for Sway type "${swayType}".` + ); }; } diff --git a/packages/errors/src/error-codes.ts b/packages/errors/src/error-codes.ts index 2959d4e6212..e7eda6f1f50 100644 --- a/packages/errors/src/error-codes.ts +++ b/packages/errors/src/error-codes.ts @@ -23,6 +23,7 @@ export enum ErrorCode { CONFIG_FILE_NOT_FOUND = 'config-file-not-found', CONFIG_FILE_ALREADY_EXISTS = 'config-file-already-exists', WORKSPACE_NOT_DETECTED = 'workspace-not-detected', + MATCHER_NOT_FOUND = 'matcher-not-found', // address /** From ee79c216cb28d19ddb48fe68dfe0a125478f073e Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Wed, 27 Nov 2024 18:14:26 +0000 Subject: [PATCH 20/26] chore: added matcher to spell check --- apps/docs/spell-check-custom-words.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/docs/spell-check-custom-words.txt b/apps/docs/spell-check-custom-words.txt index ff1ea80f563..077c55e6275 100644 --- a/apps/docs/spell-check-custom-words.txt +++ b/apps/docs/spell-check-custom-words.txt @@ -343,4 +343,5 @@ Workspaces WSL XOR XORs -YAML \ No newline at end of file +YAML +matcher \ No newline at end of file From c5bfa0ae8d1bb1d5dbbdda8e9e37ce68af6df40b Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Wed, 27 Nov 2024 18:20:57 +0000 Subject: [PATCH 21/26] chore: added errors dep --- packages/abi/package.json | 4 +++- pnpm-lock.yaml | 12 ++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/packages/abi/package.json b/packages/abi/package.json index 8ad5a2b2cbd..8d784a019f0 100644 --- a/packages/abi/package.json +++ b/packages/abi/package.json @@ -25,6 +25,8 @@ "build": "tsup", "postbuild": "tsx ../../scripts/postbuild.ts" }, - "dependencies": {}, + "dependencies": { + "@fuel-ts/errors": "workspace:*" + }, "devDependencies": {} } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1a2310ce748..51c908203bb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -641,7 +641,11 @@ importers: specifier: workspace:* version: link:../tsup - packages/abi: {} + packages/abi: + dependencies: + '@fuel-ts/errors': + specifier: workspace:* + version: link:../errors packages/abi-coder: dependencies: @@ -27777,7 +27781,7 @@ snapshots: eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) eslint-plugin-react: 7.35.0(eslint@8.57.0) eslint-plugin-react-hooks: 4.6.2(eslint@8.57.0) @@ -27832,7 +27836,7 @@ snapshots: enhanced-resolve: 5.17.1 eslint: 8.57.0 eslint-module-utils: 2.11.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) fast-glob: 3.3.2 get-tsconfig: 4.7.6 is-core-module: 2.15.1 @@ -27942,7 +27946,7 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): + eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.8 From 9a86b319441336abf3f789f8c09782bc70fee19c Mon Sep 17 00:00:00 2001 From: nedsalk Date: Mon, 13 Jan 2025 16:10:55 +0100 Subject: [PATCH 22/26] remove unused dependency --- packages/fuel-gauge/package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/fuel-gauge/package.json b/packages/fuel-gauge/package.json index b9f041e03d0..8abea339595 100644 --- a/packages/fuel-gauge/package.json +++ b/packages/fuel-gauge/package.json @@ -11,8 +11,7 @@ }, "license": "Apache-2.0", "dependencies": { - "fuels": "workspace:*", - "@fuel-ts/abi": "workspace:*" + "fuels": "workspace:*" }, "devDependencies": { "@fuel-ts/account": "workspace:*", From 21ac698baefc6fd612732ff9ad8c55bace0b9e86 Mon Sep 17 00:00:00 2001 From: nedsalk Date: Tue, 14 Jan 2025 12:23:40 +0100 Subject: [PATCH 23/26] fix lock file --- pnpm-lock.yaml | 38 +++----------------------------------- 1 file changed, 3 insertions(+), 35 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f5df73164cd..96265746850 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -837,9 +837,6 @@ importers: packages/fuel-gauge: dependencies: - '@fuel-ts/abi': - specifier: workspace:* - version: link:../abi fuels: specifier: workspace:* version: link:../fuels @@ -23327,7 +23324,7 @@ snapshots: eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) eslint-plugin-react: 7.35.0(eslint@8.57.0) eslint-plugin-react-hooks: 4.6.2(eslint@8.57.0) @@ -23382,7 +23379,7 @@ snapshots: enhanced-resolve: 5.17.1 eslint: 8.57.0 eslint-module-utils: 2.11.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) fast-glob: 3.3.2 get-tsconfig: 4.7.6 is-core-module: 2.15.1 @@ -23511,34 +23508,6 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): - dependencies: - '@rtsao/scc': 1.1.0 - array-includes: 3.1.8 - array.prototype.findlastindex: 1.2.5 - array.prototype.flat: 1.3.2 - array.prototype.flatmap: 1.3.2 - debug: 3.2.7 - doctrine: 2.1.0 - eslint: 8.57.0 - eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.11.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) - hasown: 2.0.2 - is-core-module: 2.15.1 - is-glob: 4.0.3 - minimatch: 3.1.2 - object.fromentries: 2.0.8 - object.groupby: 1.0.3 - object.values: 1.2.0 - semver: 6.3.1 - tsconfig-paths: 3.15.0 - optionalDependencies: - '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.6.3) - transitivePeerDependencies: - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - supports-color - eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): dependencies: '@rtsao/scc': 1.1.0 @@ -23550,7 +23519,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.11.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0)(eslint@8.57.0))(eslint@8.57.0) + eslint-module-utils: 2.11.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) hasown: 2.0.2 is-core-module: 2.15.1 is-glob: 4.0.3 @@ -23566,7 +23535,6 @@ snapshots: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - optional: true eslint-plugin-jest@25.7.0(@typescript-eslint/eslint-plugin@5.59.0(@typescript-eslint/parser@5.59.0(eslint@9.9.1(jiti@2.4.2))(typescript@5.6.3))(eslint@9.9.1(jiti@2.4.2))(typescript@5.6.3))(eslint@9.9.1(jiti@2.4.2))(jest@27.5.1(bufferutil@4.0.8)(ts-node@10.9.1(@swc/core@1.7.14(@swc/helpers@0.5.12))(@types/node@22.5.5)(typescript@5.6.3))(utf-8-validate@5.0.10))(typescript@5.6.3): dependencies: From 44f6590e4704b760e0fa595ebe06dc68169d8c0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nedim=20Salki=C4=87?= Date: Wed, 22 Jan 2025 14:45:30 +0100 Subject: [PATCH 24/26] feat: ABI parser (#3089) * feat: ABI parser * remove casts * remove unnecessary throw * centralize abi cleanup logic * remove rawUntypedPtr from swayTypeMatchers * rename method * Update cleanup-abi.ts * Update cleanup-abi.ts * refactor abi type mappers * refactor into using maps for types * refactor from array of tuples into `Map` * rename variables * refactorings, comments * split test up into multiple tests --------- Co-authored-by: Peter Smith --- .changeset/config.json | 1 - .changeset/tender-tigers-fry.md | 7 + apps/docs-api/index.md | 3 + apps/docs-api/typedoc.json | 1 + apps/docs/.vitepress/config.ts | 4 + apps/docs/spell-check-custom-words.txt | 3 +- .../cookbook/snippets/parsing-the-abi.ts | 9 + .../guide/cookbook/working-with-the-abi.md | 11 + apps/docs/src/guide/errors/index.md | 6 + internal/check-imports/src/references.ts | 6 + packages/abi/package.json | 3 +- packages/abi/src/index.ts | 1 + .../src/matchers/sway-type-matchers.test.ts | 9 - .../abi/src/matchers/sway-type-matchers.ts | 3 - packages/abi/src/parse/AbiParser.ts | 1 - .../abi/src/parse/specifications/v1/index.ts | 1 - packages/abi/src/parse/types.ts | 1 - packages/abi/src/parser/abi-parser.ts | 44 + packages/abi/src/parser/abi.ts | 142 ++ packages/abi/src/parser/index.ts | 3 + .../abi/src/parser/specifications/index.ts | 2 + .../specifications/v1/abi-type-mappers.ts | 94 + .../parser/specifications/v1/cleanup-abi.ts | 52 + .../parser/specifications/v1/map-attribute.ts | 23 + .../src/parser/specifications/v1/parser.ts | 75 + .../specifications/v1/resolvable-type.ts | 373 ++++ .../parser/specifications/v1/resolved-type.ts | 28 + .../parser/specifications/v1/specification.ts | 98 + packages/abi/typedoc.json | 6 + packages/errors/src/error-codes.ts | 1 + packages/fuel-gauge/src/abi/abi-parser.json | 1732 +++++++++++++++++ .../fuel-gauge/src/abi/abi-parser.test.ts | 51 + .../test/fixtures/forc-projects/Forc.toml | 1 + .../fixtures/forc-projects/parser/Forc.toml | 4 + .../fixtures/forc-projects/parser/src/main.sw | 69 + packages/fuels/package.json | 1 + packages/fuels/src/index.ts | 1 + pnpm-lock.yaml | 6 + 38 files changed, 2858 insertions(+), 18 deletions(-) create mode 100644 .changeset/tender-tigers-fry.md create mode 100644 apps/docs/src/guide/cookbook/snippets/parsing-the-abi.ts create mode 100644 apps/docs/src/guide/cookbook/working-with-the-abi.md delete mode 100644 packages/abi/src/parse/AbiParser.ts delete mode 100644 packages/abi/src/parse/specifications/v1/index.ts delete mode 100644 packages/abi/src/parse/types.ts create mode 100644 packages/abi/src/parser/abi-parser.ts create mode 100644 packages/abi/src/parser/abi.ts create mode 100644 packages/abi/src/parser/index.ts create mode 100644 packages/abi/src/parser/specifications/index.ts create mode 100644 packages/abi/src/parser/specifications/v1/abi-type-mappers.ts create mode 100644 packages/abi/src/parser/specifications/v1/cleanup-abi.ts create mode 100644 packages/abi/src/parser/specifications/v1/map-attribute.ts create mode 100644 packages/abi/src/parser/specifications/v1/parser.ts create mode 100644 packages/abi/src/parser/specifications/v1/resolvable-type.ts create mode 100644 packages/abi/src/parser/specifications/v1/resolved-type.ts create mode 100644 packages/abi/src/parser/specifications/v1/specification.ts create mode 100644 packages/abi/typedoc.json create mode 100644 packages/fuel-gauge/src/abi/abi-parser.json create mode 100644 packages/fuel-gauge/src/abi/abi-parser.test.ts create mode 100644 packages/fuel-gauge/test/fixtures/forc-projects/parser/Forc.toml create mode 100644 packages/fuel-gauge/test/fixtures/forc-projects/parser/src/main.sw diff --git a/.changeset/config.json b/.changeset/config.json index a9ca6cac83c..ea7d2ddbcae 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -7,7 +7,6 @@ "baseBranch": "master", "updateInternalDependencies": "patch", "ignore": [ - "@fuel-ts/abi", "fuel-gauge", "docs", "demo-fuels", diff --git a/.changeset/tender-tigers-fry.md b/.changeset/tender-tigers-fry.md new file mode 100644 index 00000000000..2e270bb05e9 --- /dev/null +++ b/.changeset/tender-tigers-fry.md @@ -0,0 +1,7 @@ +--- +"@fuel-ts/abi": patch +"fuels": patch +"@fuel-ts/errors": patch +--- + +feat: ABI parser diff --git a/apps/docs-api/index.md b/apps/docs-api/index.md index 9e9f1c5e6bc..31a32022812 100644 --- a/apps/docs-api/index.md +++ b/apps/docs-api/index.md @@ -12,6 +12,9 @@ # Modules + + + - [abi-coder](https://fuels-ts-docs-api.vercel.app/modules/_fuel_ts_abi_coder.html) - [abi-typegen](https://fuels-ts-docs-api.vercel.app/modules/_fuel_ts_abi_typegen.html) - [account](https://fuels-ts-docs-api.vercel.app/modules/_fuel_ts_account.html) diff --git a/apps/docs-api/typedoc.json b/apps/docs-api/typedoc.json index 80cfb47a49a..f04aba511f4 100644 --- a/apps/docs-api/typedoc.json +++ b/apps/docs-api/typedoc.json @@ -2,6 +2,7 @@ "$schema": "https://typedoc.org/schema.json", "entryPointStrategy": "packages", "entryPoints": [ + "../../packages/abi", "../../packages/abi-coder", "../../packages/abi-typegen", "../../packages/address", diff --git a/apps/docs/.vitepress/config.ts b/apps/docs/.vitepress/config.ts index 288308581b4..229841ebda5 100644 --- a/apps/docs/.vitepress/config.ts +++ b/apps/docs/.vitepress/config.ts @@ -441,6 +441,10 @@ export default defineConfig({ text: 'Optimized React Example', link: '/guide/cookbook/optimized-react-example', }, + { + text: 'Working with the ABI', + link: '/guide/cookbook/working-with-the-abi', + }, ], }, { diff --git a/apps/docs/spell-check-custom-words.txt b/apps/docs/spell-check-custom-words.txt index 167dd7a326e..b83448ca4cf 100644 --- a/apps/docs/spell-check-custom-words.txt +++ b/apps/docs/spell-check-custom-words.txt @@ -343,4 +343,5 @@ Workspaces WSL XOR XORs -matcher +YAML +matcher \ No newline at end of file diff --git a/apps/docs/src/guide/cookbook/snippets/parsing-the-abi.ts b/apps/docs/src/guide/cookbook/snippets/parsing-the-abi.ts new file mode 100644 index 00000000000..8b54490de56 --- /dev/null +++ b/apps/docs/src/guide/cookbook/snippets/parsing-the-abi.ts @@ -0,0 +1,9 @@ +// #region full +import { AbiParser } from 'fuels'; +import type { Abi, AbiSpecificationV1 } from 'fuels'; + +import { Counter } from '../../../typegend'; + +const parsedAbi: Abi = AbiParser.parse(Counter.abi as AbiSpecificationV1); +// #endregion full +console.log('Parsed ABI:', parsedAbi); diff --git a/apps/docs/src/guide/cookbook/working-with-the-abi.md b/apps/docs/src/guide/cookbook/working-with-the-abi.md new file mode 100644 index 00000000000..3824f20c576 --- /dev/null +++ b/apps/docs/src/guide/cookbook/working-with-the-abi.md @@ -0,0 +1,11 @@ +# Working with the ABI + +Building a Sway program with `forc build` outputs multiple files, one of which is a JSON representation of the program's ABI. Because ABI specifications can change from one `forc` version to another, working directly with the ABI is cumbersome due to having to manage all ABI specification versions in order to ensure proper functionality. + + + + + +To mitigate this, The SDK provides [`AbiParser`](#working-with-the-abi) which can parse all ABI specification versions and output an object that conforms to the [`Abi`](#working-with-the-abi) interface. The SDK also internally uses this `Abi` interface for implementing its encoding/decoding and TS type generation. + +<<< @./snippets/parsing-the-abi.ts#full{ts:line-numbers} diff --git a/apps/docs/src/guide/errors/index.md b/apps/docs/src/guide/errors/index.md index 6f459545233..136faaa0b66 100644 --- a/apps/docs/src/guide/errors/index.md +++ b/apps/docs/src/guide/errors/index.md @@ -18,6 +18,12 @@ When the arguments supplied to the function do not match the minimum required in Check that the arguments supplied to the function match the required type. +### `ABI_SPECIFICATION_INVALID` + +When the ABI specification provided is invalid. + +Check that the ABI specification is valid. + ### `ACCOUNT_REQUIRED` When an [`Account`](https://fuels-ts-docs-api.vercel.app/classes/_fuel_ts_account.Account.html) is required for an operation. This will usually be in the form of a [`Wallet`](../wallets/index.md). diff --git a/internal/check-imports/src/references.ts b/internal/check-imports/src/references.ts index aa4fbbe098a..b1a1479a66c 100644 --- a/internal/check-imports/src/references.ts +++ b/internal/check-imports/src/references.ts @@ -37,10 +37,16 @@ import { arrayify, hexlify, createConfig, + AbiParser, } from 'fuels'; const { log } = console; +/** + * abi + */ +log(AbiParser); + /** * abi-coder */ diff --git a/packages/abi/package.json b/packages/abi/package.json index 8d784a019f0..0fd951ba435 100644 --- a/packages/abi/package.json +++ b/packages/abi/package.json @@ -26,7 +26,8 @@ "postbuild": "tsx ../../scripts/postbuild.ts" }, "dependencies": { - "@fuel-ts/errors": "workspace:*" + "@fuel-ts/errors": "workspace:*", + "@fuel-ts/utils": "workspace:*" }, "devDependencies": {} } diff --git a/packages/abi/src/index.ts b/packages/abi/src/index.ts index 22506bf91e0..463cc711a6c 100644 --- a/packages/abi/src/index.ts +++ b/packages/abi/src/index.ts @@ -1,2 +1,3 @@ export * from './coder'; export * from './gen'; +export * from './parser'; diff --git a/packages/abi/src/matchers/sway-type-matchers.test.ts b/packages/abi/src/matchers/sway-type-matchers.test.ts index 46cc40cd475..ea6f8bfa77a 100644 --- a/packages/abi/src/matchers/sway-type-matchers.test.ts +++ b/packages/abi/src/matchers/sway-type-matchers.test.ts @@ -27,7 +27,6 @@ const testMappings: Record = array: 'array-matched', assetId: 'assetId-matched', evmAddress: 'evmAddress-matched', - rawUntypedPtr: 'rawUntypedPtr-matched', rawUntypedSlice: 'rawUntypedSlice-matched', str: 'str-matched', }; @@ -231,14 +230,6 @@ describe('sway type matchers', () => { await verifyOtherMatchersDontMatch(key, swayType); }); - test('rawUntypedPtr', async () => { - const key = 'rawUntypedPtr'; - const swayType = 'raw untyped ptr'; - - expect(matcher({ swayType })).toEqual(`${key}-matched`); - await verifyOtherMatchersDontMatch(key, swayType); - }); - test('rawUntypedSlice', async () => { const key = 'rawUntypedSlice'; const swayType = 'raw untyped slice'; diff --git a/packages/abi/src/matchers/sway-type-matchers.ts b/packages/abi/src/matchers/sway-type-matchers.ts index 9337b4cfb7e..c48f10c3c4e 100644 --- a/packages/abi/src/matchers/sway-type-matchers.ts +++ b/packages/abi/src/matchers/sway-type-matchers.ts @@ -24,7 +24,6 @@ export type SwayType = | 'array' | 'assetId' | 'evmAddress' - | 'rawUntypedPtr' | 'rawUntypedSlice'; type Matcher = (type: string) => boolean; @@ -69,7 +68,6 @@ const result: Matcher = (type) => type === 'enum std::result::Result'; export const ENUM_REGEX = /^enum (.+::)?(?.+)$/m; const enumMatcher: Matcher = (type) => !option(type) && !result(type) && ENUM_REGEX.test(type); -const rawUntypedPtr: Matcher = (type) => type === 'raw untyped ptr'; const rawUntypedSlice: Matcher = (type) => type === 'raw untyped slice'; export const swayTypeMatchers: Record = { @@ -100,7 +98,6 @@ export const swayTypeMatchers: Record = { option, result, - rawUntypedPtr, rawUntypedSlice, }; diff --git a/packages/abi/src/parse/AbiParser.ts b/packages/abi/src/parse/AbiParser.ts deleted file mode 100644 index 10051c76805..00000000000 --- a/packages/abi/src/parse/AbiParser.ts +++ /dev/null @@ -1 +0,0 @@ -// Placeholder diff --git a/packages/abi/src/parse/specifications/v1/index.ts b/packages/abi/src/parse/specifications/v1/index.ts deleted file mode 100644 index 10051c76805..00000000000 --- a/packages/abi/src/parse/specifications/v1/index.ts +++ /dev/null @@ -1 +0,0 @@ -// Placeholder diff --git a/packages/abi/src/parse/types.ts b/packages/abi/src/parse/types.ts deleted file mode 100644 index 10051c76805..00000000000 --- a/packages/abi/src/parse/types.ts +++ /dev/null @@ -1 +0,0 @@ -// Placeholder diff --git a/packages/abi/src/parser/abi-parser.ts b/packages/abi/src/parser/abi-parser.ts new file mode 100644 index 00000000000..31d230ce3cb --- /dev/null +++ b/packages/abi/src/parser/abi-parser.ts @@ -0,0 +1,44 @@ +import { FuelError } from '@fuel-ts/errors'; + +import type { Abi } from './abi'; +import type { AbiSpecificationV1 } from './specifications'; +import { AbiParserV1 } from './specifications'; + +/** + * A typed ABI object or a stringified json of a Sway program's ABI + */ +export type AbiSpecification = AbiSpecificationV1; + +export class AbiParser { + /** + * ABI specifications transpilers + */ + private static specifications = { + '1': AbiParserV1.parse, + } as const; + + /** + * Parses an ABI in JSON format. + * + * @param abi - a JSON ABI of a Sway program + * @returns an public interface for the Abi + */ + static parse(abi: AbiSpecification): Abi { + if (typeof abi.specVersion !== 'string') { + throw new FuelError( + FuelError.CODES.ABI_SPECIFICATION_INVALID, + 'Invalid ABI: the specification version is not a string.' + ); + } + + const parse = AbiParser.specifications[abi.specVersion]; + if (!parse) { + throw new FuelError( + FuelError.CODES.ABI_SPECIFICATION_INVALID, + `Invalid ABI: Unsupported ABI specification version ("${abi.specVersion}").` + ); + } + + return parse(abi); + } +} diff --git a/packages/abi/src/parser/abi.ts b/packages/abi/src/parser/abi.ts new file mode 100644 index 00000000000..345851ec354 --- /dev/null +++ b/packages/abi/src/parser/abi.ts @@ -0,0 +1,142 @@ +/** + * This interface serves as a representation of the ABI format outputted by `forc build` + * that won't be changing with the introduction of new abi specifications in Sway. + * Its purpose is to provide a stable interface for users to work with, + * which won't be affected by changing ABI specification versions. + */ +export interface Abi { + encodingVersion: string; + programType: 'contract' | 'predicate' | 'script' | 'library'; + /** + * Metadata types describe the structure of the types used in the `concreteTypes` field. + * One metadata type can be referenced multiple times if it is used in multiple concrete types. + */ + metadataTypes: AbiMetadataType[]; + /** + * Concrete types are types that are used in: + * function inputs/outputs, configurables, logged types, or message types. + * + * Their structure is fully known and they do not contain any unresolved generic parameters. + */ + concreteTypes: AbiConcreteType[]; + functions: AbiFunction[]; + loggedTypes: AbiLoggedType[]; + messageTypes: AbiMessageType[]; + configurables: AbiConfigurable[]; +} + +export interface AbiConcreteType { + swayType: string; + concreteTypeId: string; + /** + * The components field is populated when the type is any non-primitive type. + * That includes structs, enums, arrays, and tuples. + */ + components?: AbiTypeComponent[]; + /** + * A concrete type can be an implementation of a metadata type, + * in which case the `metadata` field is populated. + * If the underlying metadata type has type parameters (is generic), + * the `typeArguments` field corresponds to those type parameters. + */ + metadata?: { + metadataTypeId: number; + /** + * Type arguments used to resolve the type parameters in the metadata type. + * They are ordered in the same way as the type parameters in the metadata type. + */ + typeArguments?: AbiConcreteType[]; + }; +} + +export interface AbiMetadataType { + swayType: string; + metadataTypeId: number; + /** + * The components field is populated when the type is any non-primitive type. + * That includes structs, enums, arrays, and tuples. + */ + components?: AbiTypeComponent[]; + /** + * The existence of type parameters indicates that the metadata type is generic. + */ + typeParameters?: AbiMetadataType[]; +} + +export interface AbiTypeComponent { + name: string; + type: AbiConcreteType | AbiAppliedMetadataType; +} + +/** + * AbiAppliedMetadataType point to a metadata type but aren't the same as metadata types, + * as the metadata type describes the structure of the type, + * whereas the component is an actual implementation of that type. + */ +export interface AbiAppliedMetadataType { + swayType: string; + components?: AbiTypeComponent[]; + metadata: { + metadataTypeId: number; + typeArguments?: AbiTypeArgument[]; + }; +} + +export type AbiTypeArgument = AbiConcreteType | AbiAppliedMetadataType; + +export interface AbiFunctionInput { + name: string; + type: AbiConcreteType; +} + +export interface AbiFunction { + name: string; + inputs: AbiFunctionInput[]; + output: AbiConcreteType; + attributes?: readonly AbiFunctionAttribute[]; +} + +export interface AbiLoggedType { + logId: string; + type: AbiConcreteType; +} + +export interface AbiMessageType { + messageId: string; + type: AbiConcreteType; +} + +export interface AbiConfigurable { + name: string; + offset: number; + type: AbiConcreteType; +} + +export type AbiFunctionAttribute = + | StorageAttr + | PayableAttr + | TestAttr + | InlineAttr + | DocCommentAttr; + +export interface PayableAttr { + readonly name: 'payable'; +} + +export interface StorageAttr { + readonly name: 'storage'; + readonly arguments: readonly ('read' | 'write')[]; +} + +export interface TestAttr { + readonly name: 'test'; +} +export interface InlineAttr { + readonly name: 'inline'; + readonly arguments: 'never' | 'always'; +} + +export interface DocCommentAttr { + readonly name: 'doc-comment'; + readonly arguments: readonly string[]; +} diff --git a/packages/abi/src/parser/index.ts b/packages/abi/src/parser/index.ts new file mode 100644 index 00000000000..053e0c0a003 --- /dev/null +++ b/packages/abi/src/parser/index.ts @@ -0,0 +1,3 @@ +export { AbiParser, type AbiSpecification } from './abi-parser'; +export * from './abi'; +export * from './specifications/v1/specification'; diff --git a/packages/abi/src/parser/specifications/index.ts b/packages/abi/src/parser/specifications/index.ts new file mode 100644 index 00000000000..788ae99a778 --- /dev/null +++ b/packages/abi/src/parser/specifications/index.ts @@ -0,0 +1,2 @@ +export { AbiParserV1 } from './v1/parser'; +export * from './v1/specification'; diff --git a/packages/abi/src/parser/specifications/v1/abi-type-mappers.ts b/packages/abi/src/parser/specifications/v1/abi-type-mappers.ts new file mode 100644 index 00000000000..5dad5545b11 --- /dev/null +++ b/packages/abi/src/parser/specifications/v1/abi-type-mappers.ts @@ -0,0 +1,94 @@ +/* eslint-disable @typescript-eslint/no-use-before-define */ +import type { + AbiConcreteType, + AbiMetadataType, + AbiTypeArgument, + AbiTypeComponent, +} from '../../abi'; + +import type { ResolvableComponent, ResolvableType } from './resolvable-type'; +import type { ResolvedType } from './resolved-type'; + +function mapMetadata(type: ResolvableType | ResolvedType) { + const result: AbiTypeComponent['type']['metadata'] = { + metadataTypeId: type.metadataType?.metadataTypeId as number, + }; + + if (type.typeParamsArgsMap && type.metadataType?.typeParameters?.length) { + result.typeArguments = [...type.typeParamsArgsMap.values()].map((rt) => toTypeArgument(rt)); + } + + return result; +} + +function isResolvedConcreteType( + type: ResolvableType | ResolvedType +): type is ResolvedType & { typeId: string } { + const isResolvedType = 'typeId' in type; + + return isResolvedType && typeof type.typeId === 'string'; +} + +function mapComponentType(component: ResolvableComponent): AbiTypeComponent { + const { name, type } = component; + + let result: AbiTypeComponent['type']; + + if (isResolvedConcreteType(type)) { + result = { + swayType: type.swayType, + concreteTypeId: type.typeId, + }; + if (type.metadataType) { + result.metadata = mapMetadata(type) as AbiConcreteType['metadata']; + } + } else { + result = { + swayType: type.swayType, + metadata: mapMetadata(type), + }; + } + + if (type.components) { + result.components = type.components.map(mapComponentType); + } + + return { name, type: result }; +} + +function toTypeArgument(type: ResolvableType | ResolvedType): AbiTypeArgument { + // type args and components follow the same mapping logic + return mapComponentType({ name: '', type }).type; +} + +export function toAbiType(t: ResolvableType | ResolvedType): AbiConcreteType | AbiMetadataType { + let result: AbiConcreteType | AbiMetadataType; + + if (isResolvedConcreteType(t)) { + result = { + concreteTypeId: t.typeId, + swayType: t.swayType, + }; + + if (t.metadataType) { + result.metadata = mapMetadata(t) as AbiConcreteType['metadata']; + } + } else { + result = { + swayType: t.swayType, + metadataTypeId: t.metadataType?.metadataTypeId as number, + }; + + if (t.typeParamsArgsMap && t.metadataType?.typeParameters?.length) { + result.typeParameters = [...t.typeParamsArgsMap.values()].map( + (rt) => toAbiType(rt) as AbiMetadataType + ); + } + } + + if (t.components) { + result.components = t.components.map(mapComponentType); + } + + return result; +} diff --git a/packages/abi/src/parser/specifications/v1/cleanup-abi.ts b/packages/abi/src/parser/specifications/v1/cleanup-abi.ts new file mode 100644 index 00000000000..1d517f43707 --- /dev/null +++ b/packages/abi/src/parser/specifications/v1/cleanup-abi.ts @@ -0,0 +1,52 @@ +import type { AbiSpecificationV1 } from './specification'; + +/** + * Both RawVec and RawBytes are private sway std library types + * that can never be used directly in sway, + * and the only reason they're in the abi is because they're used internally by Vec and Bytes + * and not ignored when forc builds the outputs. + * We can safely ignore them and simplify the `Vec` and `Bytes` types. + * This makes it simpler for us to consume these types in typegen and coder, + * as well as for others consuming the parsed abi, + * who now don't have to worry about this unnecessary complexity. + * `raw untyped ptr` is also in the abi only because of RawVec and RawBytes, + * so we ignore that as well. + */ +const IGNORED_TYPES = ['struct std::vec::RawVec', 'struct std::bytes::RawBytes', 'raw untyped ptr']; + +export function cleanupAbi(abi: AbiSpecificationV1): AbiSpecificationV1 { + return { + ...abi, + metadataTypes: abi.metadataTypes + .filter((metadataType) => !IGNORED_TYPES.includes(metadataType.type)) + .map((metadataType) => { + switch (metadataType.type) { + /** + * Vectors consist of multiple components, + * but we only care about the `buf`'s first type argument + * which defines the type of the vector data. + * Everything else is being ignored, + * as it's then easier to reason about the vector. + */ + case 'struct std::vec::Vec': + return { + ...metadataType, + components: metadataType.components?.[0].typeArguments, + }; + + /** + * We treat Bytes as a special type + * that is handled only based on its type name ('struct std::bytes::Bytes') + * and not its components. + */ + case 'struct std::bytes::Bytes': + return { + type: metadataType.type, + metadataTypeId: metadataType.metadataTypeId, + }; + default: + return metadataType; + } + }), + }; +} diff --git a/packages/abi/src/parser/specifications/v1/map-attribute.ts b/packages/abi/src/parser/specifications/v1/map-attribute.ts new file mode 100644 index 00000000000..b14ea2e83c0 --- /dev/null +++ b/packages/abi/src/parser/specifications/v1/map-attribute.ts @@ -0,0 +1,23 @@ +import { assertUnreachable } from '@fuel-ts/utils'; + +import type { AbiFunctionAttribute } from '../../abi'; + +import type { AbiFunctionAttributeV1 } from './specification'; + +export const mapAttribute = (attribute: AbiFunctionAttributeV1): AbiFunctionAttribute => { + const { name, arguments: args } = attribute; + + switch (name) { + case 'inline': + return { name, arguments: args[0] }; + case 'storage': + return { name: 'storage', arguments: args }; + case 'doc-comment': + return { name, arguments: args }; + case 'payable': + case 'test': + return { name }; + default: + return assertUnreachable(attribute); + } +}; diff --git a/packages/abi/src/parser/specifications/v1/parser.ts b/packages/abi/src/parser/specifications/v1/parser.ts new file mode 100644 index 00000000000..0048ea802f3 --- /dev/null +++ b/packages/abi/src/parser/specifications/v1/parser.ts @@ -0,0 +1,75 @@ +import type { Abi, AbiConcreteType, AbiMetadataType } from '../../abi'; + +import { toAbiType } from './abi-type-mappers'; +import { cleanupAbi } from './cleanup-abi'; +import { mapAttribute } from './map-attribute'; +import { ResolvableType } from './resolvable-type'; +import { ResolvedType } from './resolved-type'; +import type { + AbiConfigurableV1, + AbiFunctionInputV1, + AbiFunctionV1, + AbiLoggedTypeV1, + AbiMessageTypeV1, + AbiSpecificationV1, +} from './specification'; + +export class AbiParserV1 { + static parse(abi: AbiSpecificationV1): Abi { + const cleanAbi = cleanupAbi(abi); + + const abiTypeMaps = { + metadataTypes: new Map(cleanAbi.metadataTypes.map((type) => [type.metadataTypeId, type])), + concreteTypes: new Map(cleanAbi.concreteTypes.map((type) => [type.concreteTypeId, type])), + }; + + const resolvableTypes = cleanAbi.metadataTypes.map( + (metadataType) => new ResolvableType(abiTypeMaps, metadataType.metadataTypeId, undefined) + ); + + const concreteTypes = cleanAbi.concreteTypes.map((concreteType) => { + const resolvableType = resolvableTypes.find( + (resolvable) => resolvable.metadataTypeId === concreteType.metadataTypeId + ); + + const resolvedType = resolvableType + ? resolvableType.resolve(concreteType) + : new ResolvedType({ swayType: concreteType.type, typeId: concreteType.concreteTypeId }); + + return toAbiType(resolvedType) as AbiConcreteType; + }); + + const getType = (concreteTypeId: string) => + // this will always be defined because it's in the context of the same ABI + concreteTypes.find((abiType) => abiType.concreteTypeId === concreteTypeId) as AbiConcreteType; + + return { + metadataTypes: resolvableTypes.map((rt) => toAbiType(rt) as AbiMetadataType), + concreteTypes, + encodingVersion: cleanAbi.encodingVersion, + programType: cleanAbi.programType as Abi['programType'], + functions: cleanAbi.functions.map((fn: AbiFunctionV1) => ({ + attributes: fn.attributes?.map(mapAttribute) ?? undefined, + name: fn.name, + output: getType(fn.output), + inputs: fn.inputs.map((input: AbiFunctionInputV1) => ({ + name: input.name, + type: getType(input.concreteTypeId), + })), + })), + loggedTypes: cleanAbi.loggedTypes.map((loggedType: AbiLoggedTypeV1) => ({ + logId: loggedType.logId, + type: getType(loggedType.concreteTypeId), + })), + messageTypes: cleanAbi.messagesTypes.map((messageType: AbiMessageTypeV1) => ({ + messageId: messageType.messageId, + type: getType(messageType.concreteTypeId), + })), + configurables: cleanAbi.configurables.map((configurable: AbiConfigurableV1) => ({ + name: configurable.name, + offset: configurable.offset, + type: getType(configurable.concreteTypeId), + })), + }; + } +} diff --git a/packages/abi/src/parser/specifications/v1/resolvable-type.ts b/packages/abi/src/parser/specifications/v1/resolvable-type.ts new file mode 100644 index 00000000000..04f297a9bf0 --- /dev/null +++ b/packages/abi/src/parser/specifications/v1/resolvable-type.ts @@ -0,0 +1,373 @@ +import { FuelError } from '@fuel-ts/errors'; + +import { swayTypeMatchers } from '../../../matchers/sway-type-matchers'; + +import type { ResolvedComponent } from './resolved-type'; +import { ResolvedType } from './resolved-type'; +import type { + AbiComponentV1, + AbiConcreteTypeV1, + AbiMetadataTypeV1, + AbiTypeArgumentV1, +} from './specification'; + +export interface ResolvableComponent { + name: string; + type: ResolvableType | ResolvedType; +} + +export class ResolvableType { + metadataType: AbiMetadataTypeV1; + swayType: string; + components: ResolvableComponent[] | undefined; + + constructor( + private abiTypeMaps: { + metadataTypes: Map; + concreteTypes: Map; + }, + public metadataTypeId: number, + public typeParamsArgsMap: Map | undefined + ) { + this.metadataType = this.findMetadataType(metadataTypeId); + this.swayType = this.metadataType.type; + this.typeParamsArgsMap ??= + this.metadataType.typeParameters && + new Map( + this.metadataType.typeParameters.map((typeParameter) => [ + typeParameter, + new ResolvableType(this.abiTypeMaps, typeParameter, undefined), + ]) + ); + + this.components = this.metadataType.components?.map((c) => + this.createResolvableComponent(this, c) + ); + } + + /** + * Find a metadata type by its ID. + * @param metadataTypeId - The ID of the metadata type to find. + * @returns The metadata type. + * + * @throws If the metadata type can not be found in the ABI. + */ + private findMetadataType(metadataTypeId: number): AbiMetadataTypeV1 { + const metadataType = this.abiTypeMaps.metadataTypes.get(metadataTypeId); + + if (!metadataType) { + throw new FuelError( + FuelError.CODES.TYPE_NOT_FOUND, + `Metadata type with id ${metadataTypeId} not found` + ); + } + return metadataType; + } + + /** + * Find a concrete type by its ID. + * @param concreteTypeId - The ID of the concrete type to find. + * @returns The concrete type. + * + * @throws If the concrete type can not be found in the ABI. + */ + private findConcreteType(concreteTypeId: string): AbiConcreteTypeV1 { + const concreteType = this.abiTypeMaps.concreteTypes.get(concreteTypeId); + + if (!concreteType) { + throw new FuelError( + FuelError.CODES.TYPE_NOT_FOUND, + `Concrete type with id ${concreteTypeId} not found` + ); + } + return concreteType; + } + + private static mapTypeParametersAndArgs( + metadataType: AbiMetadataTypeV1, + args: (ResolvableType | ResolvedType)[] + ): Map | undefined { + return ( + metadataType.typeParameters && + new Map( + metadataType.typeParameters.map((typeParameter, idx) => [typeParameter, args[idx]]) + ) + ); + } + + private createResolvableComponent( + parent: ResolvableType, + { typeId, typeArguments, name }: AbiComponentV1 | AbiTypeArgumentV1 + ): ResolvableComponent { + const isConcreteType = typeof typeId === 'string'; + + if (isConcreteType) { + const concreteType = this.findConcreteType(typeId); + return { + name, + type: this.resolveConcreteType(concreteType), + }; + } + + const metadataType = this.findMetadataType(typeId); + return { + name, + type: this.handleMetadataType(parent, metadataType, typeArguments), + }; + } + + /** + * Concrete types are *resolved* because everything is known about them. + */ + private resolveConcreteType(type: AbiConcreteTypeV1): ResolvedType { + /** + * If the concrete type doesn't have a linked metadata type, we can resolve it immediately. + * This is the case for e.g. u8, u16, ... + */ + if (type.metadataTypeId === undefined) { + return new ResolvedType({ + swayType: type.type, + typeId: type.concreteTypeId, + }); + } + /** + * The concrete type has an associated metadata type. + * If it's not generic (no type arguments), + * we'll create a ResolvableType with that metadata type, and then resolve it immediately. + * This would be the case for e.g. non-generic structs and enums. + */ + if (!type.typeArguments) { + return new ResolvableType(this.abiTypeMaps, type.metadataTypeId, undefined).resolveInternal( + type.concreteTypeId, + undefined + ); + } + + /** + * The concrete type's underlying metadata type is generic. + * We must resolve all its type parameters with the provided type arguments of the concrete type, + * and then resolve the metadata type itself. + */ + const metadataType = this.findMetadataType(type.metadataTypeId); + + const concreteTypeArgs = type.typeArguments.map((typeArgument) => { + const concreteTypeArg = this.findConcreteType(typeArgument); + return this.resolveConcreteType(concreteTypeArg); + }); + + return new ResolvableType( + this.abiTypeMaps, + type.metadataTypeId, + ResolvableType.mapTypeParametersAndArgs(metadataType, concreteTypeArgs) + ).resolveInternal(type.concreteTypeId, undefined); + } + + /** + * Metadata types are *handled* and not *resolved* because they might be generic, + * in which case they cannot be resolved. + * If they're not generic, they can be immediately resolved. + */ + private handleMetadataType( + parent: ResolvableType, + metadataType: AbiMetadataTypeV1, + typeArguments: AbiComponentV1['typeArguments'] + ): ResolvableType | ResolvedType { + /** + * If the type is generic, we can't resolve it and thus we create a `ResolvableType` from it. + * This propagates to the parent type, forcing it to be a `ResolvableType` as well, + * as it can't be resolved until this generic type is substituted with a type argument. + */ + if (swayTypeMatchers.generic(metadataType.type)) { + /** + * This search solves the case where an e.g. `generic T` is being substituted by `generic E`. + * This can happen when a generic type is nested in another generic type and they have differently-named type parameters. + * e.g. `GenericStruct` is nested in `Vec`: `struct MyStruct { a: Vec }` + * We check in the parent's typeParamsArgsMap if the metadata type we're solving for + * has been substituted with a different generic type, and then we use that generic type. + */ + const resolvableTypeParameter = parent.typeParamsArgsMap?.get(metadataType.metadataTypeId); + + return ( + resolvableTypeParameter ?? + new ResolvableType(this.abiTypeMaps, metadataType.metadataTypeId, undefined) + ); + } + + if (!metadataType.components) { + /** + * types like u8, u16 can make their way into metadata types + * if they aren't used _directly_ in a function-input/function-output/log/configurable/messageType + * These types are characterized by not having components and we can resolve them as-is + */ + return new ResolvableType( + this.abiTypeMaps, + metadataType.metadataTypeId, + undefined + ).resolveInternal(metadataType.metadataTypeId, undefined); + } + + const typeArgs = typeArguments?.map( + (typeArgument) => this.createResolvableComponent(parent, typeArgument).type + ); + + const resolvable = new ResolvableType( + this.abiTypeMaps, + metadataType.metadataTypeId, + !typeArgs?.length + ? undefined + : ResolvableType.mapTypeParametersAndArgs(metadataType, typeArgs) + ); + + /** + * If any component is unresolved, this means that the metadata type is generic. + * We can't resolve it yet, so we return the resolvable type. + * If all components are resolved, we can resolve the metadata type immediately. + */ + const isGeneric = resolvable.components?.some( + (component) => component.type instanceof ResolvableType + ); + + return isGeneric + ? resolvable + : resolvable.resolveInternal(metadataType.metadataTypeId, undefined); + } + + private resolveInternal( + typeId: string | number, + typeParamsArgsMap: Map | undefined + ): ResolvedType { + const resolvedType = new ResolvedType({ + swayType: this.swayType, + typeId, + metadataType: this.metadataType, + }); + + /** + * A type without components can be immediately resolved. + */ + if (!this.components) { + return resolvedType; + } + + /** + * Before resolving the components, + * we need to substitute the type parameters of the underlying metadata type + * with the type arguments of the concrete type, + * so that we can substitute the generic components with them later. + */ + const typeArgs = this.resolveTypeArgs(typeParamsArgsMap); + + const components: ResolvedComponent[] = this.components.map((component) => { + const { name, type } = component; + + if (type instanceof ResolvedType) { + return component as ResolvedComponent; + } + + /** + * Here the component's type is a `ResolvableType`. + * If the component is a generic type parameter itself, + * its corresponding type argument will be found in the typeArgs, + * which will be used to substitute the component with. + */ + const resolvedGenericType = typeArgs?.get(type.metadataTypeId); + + if (resolvedGenericType) { + return { + name, + type: resolvedGenericType, + }; + } + + return { + name, + /** + * The component is a `ResolvableType`, but it's not a generic type parameter itself. + * This means that one of its components (or component's components) + * is a generic type. + * We need to resolve that first before resolving the component. + * + * Note that we are passing in the original `typeParamsArgsMap` by default, + * which will be used to substitute the component's generic type parameters + * with the appropriate type arguments. + * + * The non-default case of passing `typeArgs` happens only for tuples/arrays + * which contain structs with implicit generics, + * e.g. `(bool, StructWithImplicitGenerics)` + */ + type: type.resolveInternal(type.metadataTypeId, typeParamsArgsMap ?? typeArgs), + }; + }); + + resolvedType.components = components; + resolvedType.typeParamsArgsMap = typeArgs; + + return resolvedType; + } + + private resolveTypeArgs( + typeParamsArgsMap: Map | undefined + ): Map | undefined { + /** + * This case only happens when the metadata type is *implicitly* generic. + * The type itself doesn't have any type parameters that should be resolved, + * but its components are still generic types. + * This happens in the following type: + * `struct StructWithImplicitGenerics { a: [E; 3], b: (E, F)}`. + */ + if (this.typeParamsArgsMap === undefined) { + return typeParamsArgsMap; + } + + const newMap = new Map(); + + /** + * We resolve the type parameters of the underlying metadata type + * with the type arguments of the concrete type. + */ + this.typeParamsArgsMap.forEach((arg, typeParameter) => { + /** + * Some type parameters can already be resolved + * e.g. `struct MyStruct { a: DoubleGeneric }` + * where the second type parameter of DoubleGeneric is already known. + */ + if (arg instanceof ResolvedType) { + newMap.set(typeParameter, arg); + return; + } + + /** + * The type parameter is either directly substituted with a type argument, + * or it's a metadata type which accepts the type argument, + * so that metadata type will be resolved and subsitute the type parameter. + */ + const resolved = + typeParamsArgsMap?.get(arg.metadataTypeId) ?? + arg.resolveInternal(arg.metadataTypeId, typeParamsArgsMap); + + newMap.set(arg.metadataTypeId, resolved); + }); + + return newMap; + } + + /** + * Resolves the instance of `ResolvableType` with the specific concrete type's data. + * @returns a `ResolvedType` in which all its components are resolved. + */ + public resolve(concreteType: AbiConcreteTypeV1): ResolvedType { + const concreteTypeArgs = concreteType.typeArguments?.map((typeArgument) => { + const concreteTypeArg = this.findConcreteType(typeArgument); + return this.resolveConcreteType(concreteTypeArg); + }); + + const typeParamsArgsMap = concreteTypeArgs + ? (ResolvableType.mapTypeParametersAndArgs(this.metadataType, concreteTypeArgs) as Map< + number, + ResolvedType + >) + : undefined; + + return this.resolveInternal(concreteType.concreteTypeId, typeParamsArgsMap); + } +} diff --git a/packages/abi/src/parser/specifications/v1/resolved-type.ts b/packages/abi/src/parser/specifications/v1/resolved-type.ts new file mode 100644 index 00000000000..6465d10f6d5 --- /dev/null +++ b/packages/abi/src/parser/specifications/v1/resolved-type.ts @@ -0,0 +1,28 @@ +import type { AbiMetadataTypeV1 } from './specification'; + +export interface ResolvedComponent { + name: string; + type: ResolvedType; +} + +export class ResolvedType { + public swayType: string; + public typeId: string | number; + public components: ResolvedComponent[] | undefined; + public typeParamsArgsMap: Map | undefined; + public metadataType: AbiMetadataTypeV1 | undefined; + + constructor(params: { + swayType: string; + typeId: string | number; + components?: ResolvedComponent[]; + typeParamsArgsMap?: Map; + metadataType?: AbiMetadataTypeV1; + }) { + this.swayType = params.swayType; + this.typeId = params.typeId; + this.components = params.components; + this.typeParamsArgsMap = params.typeParamsArgsMap; + this.metadataType = params.metadataType; + } +} diff --git a/packages/abi/src/parser/specifications/v1/specification.ts b/packages/abi/src/parser/specifications/v1/specification.ts new file mode 100644 index 00000000000..f360fbba8bb --- /dev/null +++ b/packages/abi/src/parser/specifications/v1/specification.ts @@ -0,0 +1,98 @@ +/** + * Types for Fuel JSON ABI Format specification v1, as defined on: + * https://github.com/FuelLabs/fuel-specs/blob/master/src/abi/json-abi-format.md + */ +export interface AbiSpecificationV1 { + readonly specVersion: '1'; + readonly encodingVersion: string; + readonly programType: string; + readonly concreteTypes: readonly AbiConcreteTypeV1[]; + readonly metadataTypes: readonly AbiMetadataTypeV1[]; + readonly functions: readonly AbiFunctionV1[]; + readonly loggedTypes: readonly AbiLoggedTypeV1[]; + readonly messagesTypes: readonly AbiMessageTypeV1[]; + readonly configurables: readonly AbiConfigurableV1[]; +} + +export interface AbiConcreteTypeV1 { + readonly type: string; + readonly concreteTypeId: string; + readonly metadataTypeId?: number; + readonly typeArguments?: readonly string[]; +} + +export interface AbiMetadataTypeV1 { + readonly type: string; + readonly metadataTypeId: number; + readonly components?: readonly AbiComponentV1[]; + readonly typeParameters?: readonly number[]; +} + +export interface AbiComponentV1 extends AbiTypeArgumentV1 {} + +export interface AbiTypeArgumentV1 { + readonly name: string; + readonly typeId: number | string; // the type metadata declaration ID or type concrete declaration hash based ID of the type of the component. + readonly typeArguments?: readonly AbiTypeArgumentV1[]; +} + +export interface AbiFunctionV1 { + readonly name: string; + readonly inputs: readonly AbiFunctionInputV1[]; + readonly output: string; + readonly attributes: readonly AbiFunctionAttributeV1[] | null; +} + +export interface AbiFunctionInputV1 { + readonly name: string; + readonly concreteTypeId: string; +} + +export interface AbiLoggedTypeV1 { + readonly logId: string; + // the _type concrete declaration_ hash based ID of the value being logged. + readonly concreteTypeId: string; +} + +export interface AbiMessageTypeV1 { + readonly messageId: string; + readonly concreteTypeId: string; +} + +export interface AbiConfigurableV1 { + readonly name: string; + readonly concreteTypeId: string; + readonly offset: number; +} + +export type AbiFunctionAttributeV1 = + | StorageAttrV1 + | PayableAttrV1 + | TestAttrV1 + | InlineAttrV1 + | DocCommentAttrV1; + +export interface PayableAttrV1 { + readonly name: 'payable'; + readonly arguments: readonly []; +} + +export interface StorageAttrV1 { + readonly name: 'storage'; + readonly arguments: readonly ('read' | 'write')[]; +} + +export interface TestAttrV1 { + readonly name: 'test'; + readonly arguments: readonly []; +} + +export interface InlineAttrV1 { + readonly name: 'inline'; + readonly arguments: readonly ['never'] | readonly ['always']; +} + +export interface DocCommentAttrV1 { + readonly name: 'doc-comment'; + readonly arguments: string[]; +} diff --git a/packages/abi/typedoc.json b/packages/abi/typedoc.json new file mode 100644 index 00000000000..a8ec6b825f0 --- /dev/null +++ b/packages/abi/typedoc.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "extends": ["../../typedoc.base.json"], + "entryPoints": ["src/index.ts"], + "readme": "none" +} diff --git a/packages/errors/src/error-codes.ts b/packages/errors/src/error-codes.ts index a016b719ae3..05295418479 100644 --- a/packages/errors/src/error-codes.ts +++ b/packages/errors/src/error-codes.ts @@ -13,6 +13,7 @@ export enum ErrorCode { TYPE_NOT_SUPPORTED = 'type-not-supported', INVALID_DECODE_VALUE = 'invalid-decode-value', JSON_ABI_ERROR = 'json-abi-error', + ABI_SPECIFICATION_INVALID = 'abi-specification-invalid', TYPE_ID_NOT_FOUND = 'type-id-not-found', BIN_FILE_NOT_FOUND = 'bin-file-not-found', CODER_NOT_FOUND = 'coder-not-found', diff --git a/packages/fuel-gauge/src/abi/abi-parser.json b/packages/fuel-gauge/src/abi/abi-parser.json new file mode 100644 index 00000000000..373715abe6c --- /dev/null +++ b/packages/fuel-gauge/src/abi/abi-parser.json @@ -0,0 +1,1732 @@ +{ + "metadataTypes": [ + { + "metadataTypeId": 0, + "swayType": "(_, _)", + "components": [ + { + "name": "__tuple_element", + "type": { + "swayType": "generic E", + "metadata": { + "metadataTypeId": 4 + } + } + }, + { + "name": "__tuple_element", + "type": { + "swayType": "generic F", + "metadata": { + "metadataTypeId": 5 + } + } + } + ] + }, + { + "metadataTypeId": 1, + "swayType": "(_, _)", + "components": [ + { + "name": "__tuple_element", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "__tuple_element", + "type": { + "swayType": "struct StructWithImplicitGenerics", + "metadata": { + "metadataTypeId": 12, + "typeArguments": [ + { + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903", + "swayType": "bool" + }, + { + "swayType": "b256", + "metadata": { + "metadataTypeId": 3 + } + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "[_; 3]", + "metadata": { + "metadataTypeId": 2 + }, + "components": [ + { + "name": "__array_element", + "type": { + "swayType": "generic E", + "metadata": { + "metadataTypeId": 4 + } + } + } + ] + } + }, + { + "name": "b", + "type": { + "swayType": "(_, _)", + "metadata": { + "metadataTypeId": 0 + }, + "components": [ + { + "name": "__tuple_element", + "type": { + "swayType": "generic E", + "metadata": { + "metadataTypeId": 4 + } + } + }, + { + "name": "__tuple_element", + "type": { + "swayType": "generic F", + "metadata": { + "metadataTypeId": 5 + } + } + } + ] + } + } + ] + } + } + ] + }, + { + "metadataTypeId": 2, + "swayType": "[_; 3]", + "components": [ + { + "name": "__array_element", + "type": { + "swayType": "generic E", + "metadata": { + "metadataTypeId": 4 + } + } + } + ] + }, + { + "metadataTypeId": 3, + "swayType": "b256" + }, + { + "metadataTypeId": 4, + "swayType": "generic E" + }, + { + "metadataTypeId": 5, + "swayType": "generic F" + }, + { + "metadataTypeId": 6, + "swayType": "generic T" + }, + { + "metadataTypeId": 8, + "swayType": "struct DoubleGeneric", + "components": [ + { + "name": "a", + "type": { + "swayType": "generic T", + "metadata": { + "metadataTypeId": 6 + } + } + }, + { + "name": "b", + "type": { + "swayType": "generic F", + "metadata": { + "metadataTypeId": 5 + } + } + } + ], + "typeParameters": [ + { + "metadataTypeId": 6, + "swayType": "generic T" + }, + { + "metadataTypeId": 5, + "swayType": "generic F" + } + ] + }, + { + "metadataTypeId": 9, + "swayType": "struct GenericStruct", + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "b", + "type": { + "swayType": "u32", + "metadata": { + "metadataTypeId": 17 + } + } + }, + { + "name": "c", + "type": { + "swayType": "generic T", + "metadata": { + "metadataTypeId": 6 + } + } + } + ], + "typeParameters": [ + { + "metadataTypeId": 6, + "swayType": "generic T" + } + ] + }, + { + "metadataTypeId": 10, + "swayType": "struct NestedGenericStruct", + "components": [ + { + "name": "a", + "type": { + "swayType": "struct std::vec::Vec", + "metadata": { + "metadataTypeId": 16, + "typeArguments": [ + { + "swayType": "struct GenericStruct", + "metadata": { + "metadataTypeId": 9, + "typeArguments": [ + { + "swayType": "generic E", + "metadata": { + "metadataTypeId": 4 + } + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "b", + "type": { + "swayType": "u32", + "metadata": { + "metadataTypeId": 17 + } + } + }, + { + "name": "c", + "type": { + "swayType": "generic E", + "metadata": { + "metadataTypeId": 4 + } + } + } + ] + } + ] + }, + "components": [ + { + "name": "", + "type": { + "swayType": "struct GenericStruct", + "metadata": { + "metadataTypeId": 9, + "typeArguments": [ + { + "swayType": "generic E", + "metadata": { + "metadataTypeId": 4 + } + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "b", + "type": { + "swayType": "u32", + "metadata": { + "metadataTypeId": 17 + } + } + }, + { + "name": "c", + "type": { + "swayType": "generic E", + "metadata": { + "metadataTypeId": 4 + } + } + } + ] + } + } + ] + } + }, + { + "name": "b", + "type": { + "swayType": "struct std::vec::Vec", + "metadata": { + "metadataTypeId": 16, + "typeArguments": [ + { + "swayType": "struct GenericStruct", + "metadata": { + "metadataTypeId": 9, + "typeArguments": [ + { + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", + "swayType": "u16" + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "b", + "type": { + "swayType": "u32", + "metadata": { + "metadataTypeId": 17 + } + } + }, + { + "name": "c", + "type": { + "swayType": "u16", + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + } + } + ] + } + ] + }, + "components": [ + { + "name": "", + "type": { + "swayType": "struct GenericStruct", + "metadata": { + "metadataTypeId": 9, + "typeArguments": [ + { + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", + "swayType": "u16" + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "b", + "type": { + "swayType": "u32", + "metadata": { + "metadataTypeId": 17 + } + } + }, + { + "name": "c", + "type": { + "swayType": "u16", + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + } + } + ] + } + } + ] + } + }, + { + "name": "c", + "type": { + "swayType": "struct DoubleGeneric", + "metadata": { + "metadataTypeId": 8, + "typeArguments": [ + { + "swayType": "generic E", + "metadata": { + "metadataTypeId": 4 + } + }, + { + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", + "swayType": "u16" + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "generic E", + "metadata": { + "metadataTypeId": 4 + } + } + }, + { + "name": "b", + "type": { + "swayType": "u16", + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + } + } + ] + } + } + ], + "typeParameters": [ + { + "metadataTypeId": 4, + "swayType": "generic E" + } + ] + }, + { + "metadataTypeId": 11, + "swayType": "struct SimpleStruct", + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + } + ] + }, + { + "metadataTypeId": 12, + "swayType": "struct StructWithImplicitGenerics", + "components": [ + { + "name": "a", + "type": { + "swayType": "[_; 3]", + "metadata": { + "metadataTypeId": 2 + }, + "components": [ + { + "name": "__array_element", + "type": { + "swayType": "generic E", + "metadata": { + "metadataTypeId": 4 + } + } + } + ] + } + }, + { + "name": "b", + "type": { + "swayType": "(_, _)", + "metadata": { + "metadataTypeId": 0 + }, + "components": [ + { + "name": "__tuple_element", + "type": { + "swayType": "generic E", + "metadata": { + "metadataTypeId": 4 + } + } + }, + { + "name": "__tuple_element", + "type": { + "swayType": "generic F", + "metadata": { + "metadataTypeId": 5 + } + } + } + ] + } + } + ], + "typeParameters": [ + { + "metadataTypeId": 4, + "swayType": "generic E" + }, + { + "metadataTypeId": 5, + "swayType": "generic F" + } + ] + }, + { + "metadataTypeId": 13, + "swayType": "struct std::bytes::Bytes" + }, + { + "metadataTypeId": 16, + "swayType": "struct std::vec::Vec", + "components": [ + { + "name": "", + "type": { + "swayType": "generic T", + "metadata": { + "metadataTypeId": 6 + } + } + } + ], + "typeParameters": [ + { + "metadataTypeId": 6, + "swayType": "generic T" + } + ] + }, + { + "metadataTypeId": 17, + "swayType": "u32" + }, + { + "metadataTypeId": 18, + "swayType": "u64" + } + ], + "concreteTypes": [ + { + "concreteTypeId": "9dc54ad1b685b6abf04fbcc93696e440452944466e2dfd64b5df956a13ad2027", + "swayType": "(_, _)", + "metadata": { + "metadataTypeId": 1 + }, + "components": [ + { + "name": "__tuple_element", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "__tuple_element", + "type": { + "swayType": "struct StructWithImplicitGenerics", + "metadata": { + "metadataTypeId": 12, + "typeArguments": [ + { + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903", + "swayType": "bool" + }, + { + "swayType": "b256", + "metadata": { + "metadataTypeId": 3 + } + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "[_; 3]", + "metadata": { + "metadataTypeId": 2 + }, + "components": [ + { + "name": "__array_element", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + } + ] + } + }, + { + "name": "b", + "type": { + "swayType": "(_, _)", + "metadata": { + "metadataTypeId": 0 + }, + "components": [ + { + "name": "__tuple_element", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "__tuple_element", + "type": { + "swayType": "b256", + "metadata": { + "metadataTypeId": 3 + } + } + } + ] + } + } + ] + } + } + ] + }, + { + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903", + "swayType": "bool" + }, + { + "concreteTypeId": "8fa64aacdb756049c3c90d3a5fa8d1a7ebedefc8dc2f347e67bb26ef4c7140a7", + "swayType": "struct GenericStruct", + "metadata": { + "metadataTypeId": 9, + "typeArguments": [ + { + "concreteTypeId": "688b6ed7fc2c45e135ea9a2ce11e3f5313a4c057ba5d616e3381937605ea81e4", + "swayType": "struct std::vec::Vec", + "metadata": { + "metadataTypeId": 16, + "typeArguments": [ + { + "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", + "swayType": "struct SimpleStruct", + "metadata": { + "metadataTypeId": 11 + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + } + ] + } + ] + }, + "components": [ + { + "name": "", + "type": { + "swayType": "struct SimpleStruct", + "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", + "metadata": { + "metadataTypeId": 11 + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + } + ] + } + } + ] + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "b", + "type": { + "swayType": "u32", + "metadata": { + "metadataTypeId": 17 + } + } + }, + { + "name": "c", + "type": { + "swayType": "struct std::vec::Vec", + "concreteTypeId": "688b6ed7fc2c45e135ea9a2ce11e3f5313a4c057ba5d616e3381937605ea81e4", + "metadata": { + "metadataTypeId": 16, + "typeArguments": [ + { + "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", + "swayType": "struct SimpleStruct", + "metadata": { + "metadataTypeId": 11 + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + } + ] + } + ] + }, + "components": [ + { + "name": "", + "type": { + "swayType": "struct SimpleStruct", + "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", + "metadata": { + "metadataTypeId": 11 + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + } + ] + } + } + ] + } + } + ] + }, + { + "concreteTypeId": "cc3087210794115a9b7e470ad5b5d554808a3a88aa003ae80bae7b0dc4505f50", + "swayType": "struct NestedGenericStruct", + "metadata": { + "metadataTypeId": 10, + "typeArguments": [ + { + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "swayType": "u8" + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "struct std::vec::Vec", + "metadata": { + "metadataTypeId": 16, + "typeArguments": [ + { + "swayType": "struct GenericStruct", + "metadata": { + "metadataTypeId": 9, + "typeArguments": [ + { + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "swayType": "u8" + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "b", + "type": { + "swayType": "u32", + "metadata": { + "metadataTypeId": 17 + } + } + }, + { + "name": "c", + "type": { + "swayType": "u8", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + } + ] + } + ] + }, + "components": [ + { + "name": "", + "type": { + "swayType": "struct GenericStruct", + "metadata": { + "metadataTypeId": 9, + "typeArguments": [ + { + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "swayType": "u8" + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "b", + "type": { + "swayType": "u32", + "metadata": { + "metadataTypeId": 17 + } + } + }, + { + "name": "c", + "type": { + "swayType": "u8", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + } + ] + } + } + ] + } + }, + { + "name": "b", + "type": { + "swayType": "struct std::vec::Vec", + "metadata": { + "metadataTypeId": 16, + "typeArguments": [ + { + "swayType": "struct GenericStruct", + "metadata": { + "metadataTypeId": 9, + "typeArguments": [ + { + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", + "swayType": "u16" + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "b", + "type": { + "swayType": "u32", + "metadata": { + "metadataTypeId": 17 + } + } + }, + { + "name": "c", + "type": { + "swayType": "u16", + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + } + } + ] + } + ] + }, + "components": [ + { + "name": "", + "type": { + "swayType": "struct GenericStruct", + "metadata": { + "metadataTypeId": 9, + "typeArguments": [ + { + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", + "swayType": "u16" + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "b", + "type": { + "swayType": "u32", + "metadata": { + "metadataTypeId": 17 + } + } + }, + { + "name": "c", + "type": { + "swayType": "u16", + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + } + } + ] + } + } + ] + } + }, + { + "name": "c", + "type": { + "swayType": "struct DoubleGeneric", + "metadata": { + "metadataTypeId": 8, + "typeArguments": [ + { + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "swayType": "u8" + }, + { + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", + "swayType": "u16" + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "u8", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + }, + { + "name": "b", + "type": { + "swayType": "u16", + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + } + } + ] + } + } + ] + }, + { + "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", + "swayType": "struct SimpleStruct", + "metadata": { + "metadataTypeId": 11 + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + } + ] + }, + { + "concreteTypeId": "426345c4ea93db9f08eeb9fe6047ef0273294bfb1140600a0660be9f2a08d750", + "swayType": "struct StructWithImplicitGenerics", + "metadata": { + "metadataTypeId": 12, + "typeArguments": [ + { + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "swayType": "u8" + }, + { + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", + "swayType": "u16" + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "[_; 3]", + "metadata": { + "metadataTypeId": 2 + }, + "components": [ + { + "name": "__array_element", + "type": { + "swayType": "u8", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + } + ] + } + }, + { + "name": "b", + "type": { + "swayType": "(_, _)", + "metadata": { + "metadataTypeId": 0 + }, + "components": [ + { + "name": "__tuple_element", + "type": { + "swayType": "u8", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + }, + { + "name": "__tuple_element", + "type": { + "swayType": "u16", + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + } + } + ] + } + } + ] + }, + { + "concreteTypeId": "cdd87b7d12fe505416570c294c884bca819364863efe3bf539245fa18515fbbb", + "swayType": "struct std::bytes::Bytes", + "metadata": { + "metadataTypeId": 13 + } + }, + { + "concreteTypeId": "688b6ed7fc2c45e135ea9a2ce11e3f5313a4c057ba5d616e3381937605ea81e4", + "swayType": "struct std::vec::Vec", + "metadata": { + "metadataTypeId": 16, + "typeArguments": [ + { + "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", + "swayType": "struct SimpleStruct", + "metadata": { + "metadataTypeId": 11 + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + } + ] + } + ] + }, + "components": [ + { + "name": "", + "type": { + "swayType": "struct SimpleStruct", + "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", + "metadata": { + "metadataTypeId": 11 + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + } + ] + } + } + ] + }, + { + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", + "swayType": "u16" + }, + { + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "swayType": "u8" + } + ], + "encodingVersion": "1", + "programType": "contract", + "functions": [ + { + "name": "bytes", + "output": { + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903", + "swayType": "bool" + }, + "inputs": [ + { + "name": "arg", + "type": { + "concreteTypeId": "cdd87b7d12fe505416570c294c884bca819364863efe3bf539245fa18515fbbb", + "swayType": "struct std::bytes::Bytes", + "metadata": { + "metadataTypeId": 13 + } + } + } + ] + }, + { + "name": "generic_structs", + "output": { + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903", + "swayType": "bool" + }, + "inputs": [ + { + "name": "arg1", + "type": { + "concreteTypeId": "8fa64aacdb756049c3c90d3a5fa8d1a7ebedefc8dc2f347e67bb26ef4c7140a7", + "swayType": "struct GenericStruct", + "metadata": { + "metadataTypeId": 9, + "typeArguments": [ + { + "concreteTypeId": "688b6ed7fc2c45e135ea9a2ce11e3f5313a4c057ba5d616e3381937605ea81e4", + "swayType": "struct std::vec::Vec", + "metadata": { + "metadataTypeId": 16, + "typeArguments": [ + { + "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", + "swayType": "struct SimpleStruct", + "metadata": { + "metadataTypeId": 11 + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + } + ] + } + ] + }, + "components": [ + { + "name": "", + "type": { + "swayType": "struct SimpleStruct", + "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", + "metadata": { + "metadataTypeId": 11 + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + } + ] + } + } + ] + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "b", + "type": { + "swayType": "u32", + "metadata": { + "metadataTypeId": 17 + } + } + }, + { + "name": "c", + "type": { + "swayType": "struct std::vec::Vec", + "concreteTypeId": "688b6ed7fc2c45e135ea9a2ce11e3f5313a4c057ba5d616e3381937605ea81e4", + "metadata": { + "metadataTypeId": 16, + "typeArguments": [ + { + "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", + "swayType": "struct SimpleStruct", + "metadata": { + "metadataTypeId": 11 + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + } + ] + } + ] + }, + "components": [ + { + "name": "", + "type": { + "swayType": "struct SimpleStruct", + "concreteTypeId": "75f7f7a06026cab5d7a70984d1fde56001e83505e3a091ff9722b92d7f56d8be", + "metadata": { + "metadataTypeId": 11 + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + } + ] + } + } + ] + } + } + ] + } + }, + { + "name": "arg2", + "type": { + "concreteTypeId": "cc3087210794115a9b7e470ad5b5d554808a3a88aa003ae80bae7b0dc4505f50", + "swayType": "struct NestedGenericStruct", + "metadata": { + "metadataTypeId": 10, + "typeArguments": [ + { + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "swayType": "u8" + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "struct std::vec::Vec", + "metadata": { + "metadataTypeId": 16, + "typeArguments": [ + { + "swayType": "struct GenericStruct", + "metadata": { + "metadataTypeId": 9, + "typeArguments": [ + { + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "swayType": "u8" + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "b", + "type": { + "swayType": "u32", + "metadata": { + "metadataTypeId": 17 + } + } + }, + { + "name": "c", + "type": { + "swayType": "u8", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + } + ] + } + ] + }, + "components": [ + { + "name": "", + "type": { + "swayType": "struct GenericStruct", + "metadata": { + "metadataTypeId": 9, + "typeArguments": [ + { + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "swayType": "u8" + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "b", + "type": { + "swayType": "u32", + "metadata": { + "metadataTypeId": 17 + } + } + }, + { + "name": "c", + "type": { + "swayType": "u8", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + } + ] + } + } + ] + } + }, + { + "name": "b", + "type": { + "swayType": "struct std::vec::Vec", + "metadata": { + "metadataTypeId": 16, + "typeArguments": [ + { + "swayType": "struct GenericStruct", + "metadata": { + "metadataTypeId": 9, + "typeArguments": [ + { + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", + "swayType": "u16" + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "b", + "type": { + "swayType": "u32", + "metadata": { + "metadataTypeId": 17 + } + } + }, + { + "name": "c", + "type": { + "swayType": "u16", + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + } + } + ] + } + ] + }, + "components": [ + { + "name": "", + "type": { + "swayType": "struct GenericStruct", + "metadata": { + "metadataTypeId": 9, + "typeArguments": [ + { + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", + "swayType": "u16" + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "b", + "type": { + "swayType": "u32", + "metadata": { + "metadataTypeId": 17 + } + } + }, + { + "name": "c", + "type": { + "swayType": "u16", + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + } + } + ] + } + } + ] + } + }, + { + "name": "c", + "type": { + "swayType": "struct DoubleGeneric", + "metadata": { + "metadataTypeId": 8, + "typeArguments": [ + { + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "swayType": "u8" + }, + { + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", + "swayType": "u16" + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "u8", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + }, + { + "name": "b", + "type": { + "swayType": "u16", + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + } + } + ] + } + } + ] + } + } + ] + }, + { + "name": "implicit_generic_struct", + "output": { + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903", + "swayType": "bool" + }, + "inputs": [ + { + "name": "arg1", + "type": { + "concreteTypeId": "426345c4ea93db9f08eeb9fe6047ef0273294bfb1140600a0660be9f2a08d750", + "swayType": "struct StructWithImplicitGenerics", + "metadata": { + "metadataTypeId": 12, + "typeArguments": [ + { + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "swayType": "u8" + }, + { + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", + "swayType": "u16" + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "[_; 3]", + "metadata": { + "metadataTypeId": 2 + }, + "components": [ + { + "name": "__array_element", + "type": { + "swayType": "u8", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + } + ] + } + }, + { + "name": "b", + "type": { + "swayType": "(_, _)", + "metadata": { + "metadataTypeId": 0 + }, + "components": [ + { + "name": "__tuple_element", + "type": { + "swayType": "u8", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + }, + { + "name": "__tuple_element", + "type": { + "swayType": "u16", + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + } + } + ] + } + } + ] + } + }, + { + "name": "arg2", + "type": { + "concreteTypeId": "9dc54ad1b685b6abf04fbcc93696e440452944466e2dfd64b5df956a13ad2027", + "swayType": "(_, _)", + "metadata": { + "metadataTypeId": 1 + }, + "components": [ + { + "name": "__tuple_element", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "__tuple_element", + "type": { + "swayType": "struct StructWithImplicitGenerics", + "metadata": { + "metadataTypeId": 12, + "typeArguments": [ + { + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903", + "swayType": "bool" + }, + { + "swayType": "b256", + "metadata": { + "metadataTypeId": 3 + } + } + ] + }, + "components": [ + { + "name": "a", + "type": { + "swayType": "[_; 3]", + "metadata": { + "metadataTypeId": 2 + }, + "components": [ + { + "name": "__array_element", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + } + ] + } + }, + { + "name": "b", + "type": { + "swayType": "(_, _)", + "metadata": { + "metadataTypeId": 0 + }, + "components": [ + { + "name": "__tuple_element", + "type": { + "swayType": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + }, + { + "name": "__tuple_element", + "type": { + "swayType": "b256", + "metadata": { + "metadataTypeId": 3 + } + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + ], + "loggedTypes": [ + { + "logId": "13213829929622723620", + "type": { + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903", + "swayType": "bool" + } + } + ], + "messageTypes": [ + { + "messageId": "0", + "type": { + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903", + "swayType": "bool" + } + }, + { + "messageId": "1", + "type": { + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903", + "swayType": "bool" + } + } + ], + "configurables": [ + { + "name": "U8_VALUE", + "offset": 5360, + "type": { + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "swayType": "u8" + } + } + ] +} diff --git a/packages/fuel-gauge/src/abi/abi-parser.test.ts b/packages/fuel-gauge/src/abi/abi-parser.test.ts new file mode 100644 index 00000000000..07498ae19ce --- /dev/null +++ b/packages/fuel-gauge/src/abi/abi-parser.test.ts @@ -0,0 +1,51 @@ +import { AbiParser, type AbiSpecification } from 'fuels'; + +import { Parser } from '../../test/typegen'; + +import expected from './abi-parser.json'; + +/** + * @group node + * @group browser + */ +describe('AbiParser', () => { + test('parses encoding version as expected', () => { + const parsed = AbiParser.parse(Parser.abi as AbiSpecification); + expect(parsed.encodingVersion).toEqual(expected.encodingVersion); + }); + + test('parses program type as expected', () => { + const parsed = AbiParser.parse(Parser.abi as AbiSpecification); + expect(parsed.programType).toEqual(expected.programType); + }); + + test('parses metadata types as expected', () => { + const parsed = AbiParser.parse(Parser.abi as AbiSpecification); + expect(parsed.metadataTypes).toEqual(expected.metadataTypes); + }); + + test('parses concrete types as expected', () => { + const parsed = AbiParser.parse(Parser.abi as AbiSpecification); + expect(parsed.concreteTypes).toEqual(expected.concreteTypes); + }); + + test('parses functions as expected', () => { + const parsed = AbiParser.parse(Parser.abi as AbiSpecification); + expect(parsed.functions).toEqual(expected.functions); + }); + + test('parses logged types as expected', () => { + const parsed = AbiParser.parse(Parser.abi as AbiSpecification); + expect(parsed.loggedTypes).toEqual(expected.loggedTypes); + }); + + test('parses message types as expected', () => { + const parsed = AbiParser.parse(Parser.abi as AbiSpecification); + expect(parsed.messageTypes).toEqual(expected.messageTypes); + }); + + test('parses configurables as expected', () => { + const parsed = AbiParser.parse(Parser.abi as AbiSpecification); + expect(parsed.configurables).toEqual(expected.configurables); + }); +}); diff --git a/packages/fuel-gauge/test/fixtures/forc-projects/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/Forc.toml index 7ad01c21e7d..a01e7b9390a 100644 --- a/packages/fuel-gauge/test/fixtures/forc-projects/Forc.toml +++ b/packages/fuel-gauge/test/fixtures/forc-projects/Forc.toml @@ -3,6 +3,7 @@ members = [ "abi-contract", "abi-script", "abi-predicate", + "parser", "advanced-logging", "advanced-logging-abi", "advanced-logging-other-contract", diff --git a/packages/fuel-gauge/test/fixtures/forc-projects/parser/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/parser/Forc.toml new file mode 100644 index 00000000000..591f549398f --- /dev/null +++ b/packages/fuel-gauge/test/fixtures/forc-projects/parser/Forc.toml @@ -0,0 +1,4 @@ +[project] +authors = ["Fuel Labs "] +license = "Apache-2.0" +name = "parser" diff --git a/packages/fuel-gauge/test/fixtures/forc-projects/parser/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/parser/src/main.sw new file mode 100644 index 00000000000..44d4262645a --- /dev/null +++ b/packages/fuel-gauge/test/fixtures/forc-projects/parser/src/main.sw @@ -0,0 +1,69 @@ +contract; +use std::bytes::Bytes; +use std::message::send_typed_message; + +struct GenericStruct { + a: bool, + b: u32, + c: T, +} + +pub struct DoubleGeneric { + pub a: T, + pub b: F, +} + +struct NestedGenericStruct { + a: Vec>, + b: Vec>, + c: DoubleGeneric, +} + +struct SimpleStruct { + a: bool, +} + +pub struct StructWithImplicitGenerics { + pub a: [E; 3], + pub b: (E, F), +} + +configurable { + U8_VALUE: u8 = 10, +} + +abi VoidContract { + fn generic_structs( + arg1: GenericStruct>, + arg2: NestedGenericStruct, + ) -> bool; + fn implicit_generic_struct( + arg1: StructWithImplicitGenerics, + arg2: (bool, StructWithImplicitGenerics), + ) -> bool; + fn bytes(arg: Bytes) -> bool; +} + +impl VoidContract for Contract { + fn generic_structs( + arg1: GenericStruct>, + arg2: NestedGenericStruct, + ) -> bool { + log(arg1.a); + send_typed_message( + 0x0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20, + arg1.a, + 123, + ); + true + } + fn implicit_generic_struct( + arg1: StructWithImplicitGenerics, + arg2: (bool, StructWithImplicitGenerics), + ) -> bool { + true + } + fn bytes(arg: Bytes) -> bool { + true + } +} diff --git a/packages/fuels/package.json b/packages/fuels/package.json index d22bfe12ee3..771de89c397 100644 --- a/packages/fuels/package.json +++ b/packages/fuels/package.json @@ -62,6 +62,7 @@ }, "license": "Apache-2.0", "dependencies": { + "@fuel-ts/abi": "workspace:*", "@fuel-ts/abi-coder": "workspace:*", "@fuel-ts/abi-typegen": "workspace:*", "@fuel-ts/account": "workspace:*", diff --git a/packages/fuels/src/index.ts b/packages/fuels/src/index.ts index d485f2a6cc4..07665e7e8c5 100644 --- a/packages/fuels/src/index.ts +++ b/packages/fuels/src/index.ts @@ -16,3 +16,4 @@ export * from '@fuel-ts/account'; export * from '@fuel-ts/transactions/configs'; export * from '@fuel-ts/account/configs'; export * from '@fuel-ts/recipes'; +export * from '@fuel-ts/abi'; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ee38126026b..a77ebeb9c62 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -578,6 +578,9 @@ importers: '@fuel-ts/errors': specifier: workspace:* version: link:../errors + '@fuel-ts/utils': + specifier: workspace:* + version: link:../utils packages/abi-coder: dependencies: @@ -847,6 +850,9 @@ importers: packages/fuels: dependencies: + '@fuel-ts/abi': + specifier: workspace:* + version: link:../abi '@fuel-ts/abi-coder': specifier: workspace:* version: link:../abi-coder From 9ec45f9873abbd4db9429439bc26234373567f26 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Wed, 22 Jan 2025 14:37:47 +0000 Subject: [PATCH 25/26] feat!: ABI Gen (#3249) * parser scaffolding * lint fix * chore: ABI parser - API alterations (#3164) * Add `AbiTypeMetadata` and fix bug * chore: adjust attributes to match spec * chore: added `FuelError` * chore: fixed test for matchers * fix generic type resolution edge case * changeset * refactoring, commenting * chore: favour `concreteTypeId` * chore: fix up errors for the parser specification * docs: added error code * chore: nit * chore: attribute arguments always defined * chore: fix incorrect inline attribute arguments * chore: re-adjusted `mapAttribute` * chore: added helper functions for finding concreteTypes and metadataTypes * chore: removed static methods + further `findConcreteType` + `findMetadataType` simplifications * chore: more verbose variable names * chore: constructor as first public method * chore: rename `type` for `swayType` * chore: removed `specVersion` * add comments * chore: added name to typeArguments * comments * fix? * fix? * chore: rollback to working state * refactoring * add test group * revert changes * format projects * export parser from fuels * cleanup * renamings * renamings * add comments to `Abi` * add docs * update docs * rename test * rename to * formatting * more explanations * cleaner * formatting * comments * add double generic case * fix test * update changeset * revert * fix changeset * not breaking * fix test * add import check * fix linting * fix lint * add comments to abi interface * Update .changeset/tender-tigers-fry.md Co-authored-by: Chad Nehemiah * fix changeset * add implicit generic edge case * feat: ABI Gen * fix storage slots and imports in tests * fix linting * fix linting * Update .changeset/poor-years-hang.md Co-authored-by: Peter Smith * improve type arguments representation * fix type arguments * explanatory comment * move types to separate file * move fixtures into folders * move `mapComponents` and add explanations * move logic to shared folder * add type docs explaining functions * add doc blocks for `AbiGen` and related types * remove unnecessary flags * remove todo * input/output * feat: ABI parser * remove casts * remove unnecessary throw * centralize abi cleanup logic * remove rawUntypedPtr from swayTypeMatchers * remove rawUntypedPtr * made `abi` and `storage-slots` ts files * move from linting to cast * remove usage of `fuels-typegen` * change to `FuelError` * simplify inputs/output types for script and predicate * improve index file rendering * export types from base program file (and thus index) * cleanup type rendering * simplified program rendering * fix recipes * reorder deps * refactor render-index-files * remove file * update changeset * fix changeset * fix recipes build * fix test * cleanup * fix knip * fix lint * export inputs, outputs and configurables * rename method * Update cleanup-abi.ts * Update cleanup-abi.ts * refactor abi type mappers * refactor into using maps for types * refactor from array of tuples into `Map` * rename variables * refactorings, comments * split test up into multiple tests * remove already included --silent flag * added non-happy paths testing * mvoed cli into abi package * cleanup * export types from contract/predicate/script * improve upon index exports now that types are also re-exported * fix pnpm-lock.yaml * rename * fix recipes * log instead of throwing * fix lint * add `forc` and `fuel-core` to path * try again * try again * fix lint * Increase timeout * cleanup * revert timeout * chore: use playwright in browser tests * revert isolate flag for safety * revert some changes * update docs * update imports * revert file * revert input * fix import * update * revert file * remove flags * fix lint * lock file fix * fix tests * fix lint * fix lint 2 * fix lock file * chore: sync build * chore: removed `Vec` --------- Co-authored-by: nedsalk Co-authored-by: Chad Nehemiah --- .changeset/poor-years-hang.md | 6 + .github/actions/test-setup/action.yaml | 6 + .knip.json | 2 +- apps/demo-typegen/package.json | 4 +- apps/demo-typegen/src/demo.test.ts | 6 +- .../contracts/snippets/proxy-contracts.ts | 9 +- .../storage-slots/override-storage-slots.ts | 7 +- apps/docs/src/guide/fuels-cli/commands.md | 5 +- .../src/guide/fuels-cli/generating-types.md | 32 +- .../guide/fuels-cli/using-generated-types.md | 4 +- .../snippets/enums/using-enums-of-enums-1.ts | 4 +- .../snippets/enums/using-enums-of-enums-2.ts | 4 +- .../types/snippets/enums/using-sway-enums.ts | 4 +- packages/abi-typegen/package.json | 3 - packages/abi/package.json | 21 +- packages/abi/src/bin.ts | 15 + packages/abi/src/cli.ts | 1 + packages/abi/src/gen/abi-gen-types.ts | 56 +- packages/abi/src/gen/abi-gen.ts | 20 +- packages/abi/src/gen/cli/index.ts | 1 + packages/abi/src/gen/cli/run.ts | 52 + packages/abi/src/gen/cli/utils.test.ts | 38 + packages/abi/src/gen/cli/utils.ts | 109 + packages/abi/src/gen/hbs.d.ts | 5 + packages/abi/src/gen/index.ts | 1 + packages/abi/src/gen/renderers/getRenderer.ts | 16 + .../abi/src/gen/renderers/ts/render-ts.ts | 17 + .../ts/renderers/get-parent-dir-wrapper.ts | 32 + .../ts/renderers/render-index-files.ts | 73 + .../renderers/ts/renderers/render-program.ts | 113 + .../renderers/ts/renderers/render-programs.ts | 37 + .../renderers/ts/renderers/render-types.ts | 120 + .../ts/renderers/template-renderer.ts | 29 + .../src/gen/renderers/ts/templates/abi.hbs | 3 + .../gen/renderers/ts/templates/bytecode.hbs | 5 + .../src/gen/renderers/ts/templates/common.hbs | 44 + .../ts/templates/contract-factory.hbs | 26 + .../gen/renderers/ts/templates/contract.hbs | 33 + .../src/gen/renderers/ts/templates/header.hbs | 9 + .../src/gen/renderers/ts/templates/index.hbs | 5 + .../gen/renderers/ts/templates/predicate.hbs | 33 + .../src/gen/renderers/ts/templates/script.hbs | 25 + .../renderers/ts/templates/storage-slots.hbs | 5 + .../src/gen/renderers/ts/templates/types.hbs | 36 + .../abi/src/gen/renderers/ts/typers/enums.ts | 68 + .../renderers/ts/typers/generate-ts-type.ts | 6 + .../src/gen/renderers/ts/typers/helpers.ts | 10 + .../src/gen/renderers/ts/typers/iterators.ts | 37 + .../abi/src/gen/renderers/ts/typers/simple.ts | 82 + .../abi/src/gen/renderers/ts/typers/struct.ts | 88 + .../gen/renderers/ts/typers/typer-matcher.ts | 51 + .../abi/src/gen/renderers/ts/typers/types.ts | 20 + .../abi/src/gen/renderers/ts/typers/utils.ts | 81 + packages/abi/src/gen/renderers/types.ts | 9 + .../evaluate-function-inputs-optionality.ts | 15 + packages/abi/tsup.config.ts | 12 +- packages/abi/typegen.js | 2 + packages/fuel-gauge/package.json | 1 + packages/fuel-gauge/src/abi/abi-coder.test.ts | 34 +- packages/fuel-gauge/src/abi/abi-gen.test.ts | 162 +- .../fuel-gauge/src/abi/abi-script.test.ts | 9 +- .../fuel-gauge/src/abi/fixtures/common.txt | 53 + .../abi/fixtures/contracts/contract-abi.txt | 2808 +++++++++++++++++ .../fixtures/contracts/contract-bytecode.txt | 14 + .../fixtures/contracts/contract-factory.txt | 35 + .../abi/fixtures/contracts/contract-index.txt | 13 + .../contracts/contract-storage-slots.txt | 14 + .../abi/fixtures/contracts/contract-types.txt | 373 +++ .../src/abi/fixtures/contracts/contract.txt | 42 + .../fuel-gauge/src/abi/fixtures/index.txt | 14 + .../abi/fixtures/predicates/predicate-abi.txt | 283 ++ .../fixtures/predicates/predicate-index.txt | 12 + .../fixtures/predicates/predicate-types.txt | 32 + .../src/abi/fixtures/predicates/predicate.txt | 42 + .../src/abi/fixtures/scripts/script-abi.txt | 283 ++ .../src/abi/fixtures/scripts/script-index.txt | 12 + .../src/abi/fixtures/scripts/script-types.txt | 32 + .../src/abi/fixtures/scripts/script.txt | 34 + .../fuel-gauge/src/contract-factory.test.ts | 6 +- .../fuel-gauge/src/coverage-contract.test.ts | 49 +- packages/fuel-gauge/src/min-gas.test.ts | 2 +- packages/fuel-gauge/src/options.test.ts | 2 +- packages/fuel-gauge/src/recipes.test.ts | 4 +- .../src/reentrant-contract-calls.test.ts | 2 +- .../src/script-with-configurable.test.ts | 8 +- .../src/script-with-options.test.ts | 2 +- .../src/script-with-vectors.test.ts | 20 +- .../src/storage-test-contract.test.ts | 10 +- packages/fuel-gauge/src/str-slice.test.ts | 8 +- packages/fuel-gauge/src/vectors.test.ts | 29 +- packages/fuel-gauge/src/void.test.ts | 10 +- packages/fuels/.gitignore | 1 + packages/fuels/package.json | 1 - packages/fuels/src/cli.ts | 8 +- .../src/cli/commands/build/generateTypes.ts | 70 - .../src/cli/commands/build/index.test.ts | 2 +- .../fuels/src/cli/commands/build/index.ts | 4 +- .../cli/commands/deploy/deployContracts.ts | 2 +- .../fuels/src/cli/commands/deploy/index.ts | 6 +- .../fuels/src/cli/commands/generate-types.ts | 16 + packages/fuels/src/cli/templates/index.hbs | 2 +- packages/fuels/src/cli/types.ts | 5 + packages/fuels/src/index.ts | 1 + packages/fuels/test/features/build.test.ts | 4 +- packages/fuels/test/fixtures/fuels.config.ts | 8 +- packages/recipes/package.json | 2 +- packages/recipes/scripts/build-recipes.ts | 32 +- packages/recipes/src/types/common.d.ts | 31 - packages/recipes/src/types/common.ts | 53 + .../Src14OwnedProxy-abi.ts} | 108 +- .../Src14OwnedProxy-bytecode.ts} | 26 +- .../Src14OwnedProxy-storage-slots.ts | 30 + .../src/types/contracts/Src14OwnedProxy.ts | 41 + .../types/contracts/Src14OwnedProxyFactory.ts | 31 + .../types/contracts/Src14OwnedProxyTypes.ts | 68 + packages/recipes/src/types/contracts/index.ts | 12 + packages/recipes/src/types/index.ts | 11 +- pnpm-lock.yaml | 24 +- templates/nextjs/src/sway-api/common.ts | 53 + templates/vite/src/sway-api/common.ts | 53 + 120 files changed, 6262 insertions(+), 454 deletions(-) create mode 100644 .changeset/poor-years-hang.md create mode 100755 packages/abi/src/bin.ts create mode 100644 packages/abi/src/cli.ts create mode 100644 packages/abi/src/gen/cli/index.ts create mode 100644 packages/abi/src/gen/cli/run.ts create mode 100644 packages/abi/src/gen/cli/utils.test.ts create mode 100644 packages/abi/src/gen/cli/utils.ts create mode 100644 packages/abi/src/gen/hbs.d.ts create mode 100644 packages/abi/src/gen/renderers/getRenderer.ts create mode 100644 packages/abi/src/gen/renderers/ts/render-ts.ts create mode 100644 packages/abi/src/gen/renderers/ts/renderers/get-parent-dir-wrapper.ts create mode 100644 packages/abi/src/gen/renderers/ts/renderers/render-index-files.ts create mode 100644 packages/abi/src/gen/renderers/ts/renderers/render-program.ts create mode 100644 packages/abi/src/gen/renderers/ts/renderers/render-programs.ts create mode 100644 packages/abi/src/gen/renderers/ts/renderers/render-types.ts create mode 100644 packages/abi/src/gen/renderers/ts/renderers/template-renderer.ts create mode 100644 packages/abi/src/gen/renderers/ts/templates/abi.hbs create mode 100644 packages/abi/src/gen/renderers/ts/templates/bytecode.hbs create mode 100644 packages/abi/src/gen/renderers/ts/templates/common.hbs create mode 100644 packages/abi/src/gen/renderers/ts/templates/contract-factory.hbs create mode 100644 packages/abi/src/gen/renderers/ts/templates/contract.hbs create mode 100644 packages/abi/src/gen/renderers/ts/templates/header.hbs create mode 100644 packages/abi/src/gen/renderers/ts/templates/index.hbs create mode 100644 packages/abi/src/gen/renderers/ts/templates/predicate.hbs create mode 100644 packages/abi/src/gen/renderers/ts/templates/script.hbs create mode 100644 packages/abi/src/gen/renderers/ts/templates/storage-slots.hbs create mode 100644 packages/abi/src/gen/renderers/ts/templates/types.hbs create mode 100644 packages/abi/src/gen/renderers/ts/typers/enums.ts create mode 100644 packages/abi/src/gen/renderers/ts/typers/generate-ts-type.ts create mode 100644 packages/abi/src/gen/renderers/ts/typers/helpers.ts create mode 100644 packages/abi/src/gen/renderers/ts/typers/iterators.ts create mode 100644 packages/abi/src/gen/renderers/ts/typers/simple.ts create mode 100644 packages/abi/src/gen/renderers/ts/typers/struct.ts create mode 100644 packages/abi/src/gen/renderers/ts/typers/typer-matcher.ts create mode 100644 packages/abi/src/gen/renderers/ts/typers/types.ts create mode 100644 packages/abi/src/gen/renderers/ts/typers/utils.ts create mode 100644 packages/abi/src/gen/renderers/types.ts create mode 100644 packages/abi/src/utils/evaluate-function-inputs-optionality.ts create mode 100755 packages/abi/typegen.js create mode 100644 packages/fuel-gauge/src/abi/fixtures/common.txt create mode 100644 packages/fuel-gauge/src/abi/fixtures/contracts/contract-abi.txt create mode 100644 packages/fuel-gauge/src/abi/fixtures/contracts/contract-bytecode.txt create mode 100644 packages/fuel-gauge/src/abi/fixtures/contracts/contract-factory.txt create mode 100644 packages/fuel-gauge/src/abi/fixtures/contracts/contract-index.txt create mode 100644 packages/fuel-gauge/src/abi/fixtures/contracts/contract-storage-slots.txt create mode 100644 packages/fuel-gauge/src/abi/fixtures/contracts/contract-types.txt create mode 100644 packages/fuel-gauge/src/abi/fixtures/contracts/contract.txt create mode 100644 packages/fuel-gauge/src/abi/fixtures/index.txt create mode 100644 packages/fuel-gauge/src/abi/fixtures/predicates/predicate-abi.txt create mode 100644 packages/fuel-gauge/src/abi/fixtures/predicates/predicate-index.txt create mode 100644 packages/fuel-gauge/src/abi/fixtures/predicates/predicate-types.txt create mode 100644 packages/fuel-gauge/src/abi/fixtures/predicates/predicate.txt create mode 100644 packages/fuel-gauge/src/abi/fixtures/scripts/script-abi.txt create mode 100644 packages/fuel-gauge/src/abi/fixtures/scripts/script-index.txt create mode 100644 packages/fuel-gauge/src/abi/fixtures/scripts/script-types.txt create mode 100644 packages/fuel-gauge/src/abi/fixtures/scripts/script.txt delete mode 100644 packages/fuels/src/cli/commands/build/generateTypes.ts create mode 100644 packages/fuels/src/cli/commands/generate-types.ts delete mode 100644 packages/recipes/src/types/common.d.ts create mode 100644 packages/recipes/src/types/common.ts rename packages/recipes/src/types/{Src14OwnedProxy.ts => contracts/Src14OwnedProxy-abi.ts} (80%) rename packages/recipes/src/types/{Src14OwnedProxyFactory.ts => contracts/Src14OwnedProxy-bytecode.ts} (89%) create mode 100644 packages/recipes/src/types/contracts/Src14OwnedProxy-storage-slots.ts create mode 100644 packages/recipes/src/types/contracts/Src14OwnedProxy.ts create mode 100644 packages/recipes/src/types/contracts/Src14OwnedProxyFactory.ts create mode 100644 packages/recipes/src/types/contracts/Src14OwnedProxyTypes.ts create mode 100644 packages/recipes/src/types/contracts/index.ts create mode 100644 templates/nextjs/src/sway-api/common.ts create mode 100644 templates/vite/src/sway-api/common.ts diff --git a/.changeset/poor-years-hang.md b/.changeset/poor-years-hang.md new file mode 100644 index 00000000000..e1335f22087 --- /dev/null +++ b/.changeset/poor-years-hang.md @@ -0,0 +1,6 @@ +--- +"@fuel-ts/abi": minor +"fuels": minor +--- + +feat!: ABI Gen diff --git a/.github/actions/test-setup/action.yaml b/.github/actions/test-setup/action.yaml index 8d7c3d6cf0c..0c649356d13 100644 --- a/.github/actions/test-setup/action.yaml +++ b/.github/actions/test-setup/action.yaml @@ -39,6 +39,12 @@ runs: with: bun-version: ${{ inputs.bun-version }} + - name: Set forc and fuel-core paths + shell: bash + run: | + echo "$GITHUB_WORKSPACE/internal/forc/forc-binaries" >> $GITHUB_PATH + echo "$GITHUB_WORKSPACE/internal/fuel-core/fuel-core-binaries" >> $GITHUB_PATH + - name: Build run: pnpm build shell: bash diff --git a/.knip.json b/.knip.json index 5f0eb9e6e4f..46d7d8fbde3 100644 --- a/.knip.json +++ b/.knip.json @@ -8,7 +8,7 @@ "fuels", "bun", "@types/rimraf", - "@fuel-ts/abi-typegen", + "@fuel-ts/abi", "@internal/fuel-core", "get-graphql-schema", "events", diff --git a/apps/demo-typegen/package.json b/apps/demo-typegen/package.json index 520890ac0a3..9d6d61ce1b4 100644 --- a/apps/demo-typegen/package.json +++ b/apps/demo-typegen/package.json @@ -11,8 +11,8 @@ "forc:predicate": "pnpm fuels-forc build -p demo-predicate --release", "build:types": "run-p types:*", "types:contract": "pnpm fuels typegen -i demo-contract/out/release/demo-contract-abi.json -o src/contract-types", - "types:script": "pnpm fuels typegen -i demo-script/out/release/demo-script-abi.json -o src/script-types --script", - "types:predicate": "pnpm fuels typegen -i demo-predicate/out/release/demo-predicate-abi.json -o src/predicate-types --predicate" + "types:script": "pnpm fuels typegen -i demo-script/out/release/demo-script-abi.json -o src/script-types", + "types:predicate": "pnpm fuels typegen -i demo-predicate/out/release/demo-predicate-abi.json -o src/predicate-types" }, "license": "Apache-2.0", "dependencies": { diff --git a/apps/demo-typegen/src/demo.test.ts b/apps/demo-typegen/src/demo.test.ts index d52c7bf2383..9134931b910 100644 --- a/apps/demo-typegen/src/demo.test.ts +++ b/apps/demo-typegen/src/demo.test.ts @@ -2,11 +2,9 @@ import { toHex, Address, Wallet, FuelError, ErrorCode } from 'fuels'; import { expectToThrowFuelError, launchTestNode } from 'fuels/test-utils'; -import storageSlots from '../demo-contract/out/release/demo-contract-storage_slots.json'; - import { DemoContract, DemoContractFactory } from './contract-types'; import { DemoPredicate } from './predicate-types'; -import type { DemoPredicateInputs } from './predicate-types/DemoPredicate'; +import type { DemoPredicateInputs } from './predicate-types/predicates/DemoPredicate'; import { DemoScript } from './script-types'; /** @@ -25,7 +23,7 @@ describe('ExampleContract', () => { // #context import { DemoContractFactory } from './sway-programs-api'; const { waitForResult } = await DemoContractFactory.deploy(wallet, { - storageSlots, + storageSlots: DemoContractFactory.storageSlots, }); const { contract } = await waitForResult(); diff --git a/apps/docs/src/guide/contracts/snippets/proxy-contracts.ts b/apps/docs/src/guide/contracts/snippets/proxy-contracts.ts index 50db63824a0..6e1ee1faa37 100644 --- a/apps/docs/src/guide/contracts/snippets/proxy-contracts.ts +++ b/apps/docs/src/guide/contracts/snippets/proxy-contracts.ts @@ -1,10 +1,5 @@ // #region proxy-2 -import { - Provider, - Wallet, - Src14OwnedProxy, - Src14OwnedProxyFactory, -} from 'fuels'; +import { Provider, Wallet, Src14OwnedProxyFactory } from 'fuels'; import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../env'; import { @@ -28,7 +23,7 @@ const { contract: counterContract } = await deploy.waitForResult(); * initialize the storage slots. */ const storageSlots = counterContractFactory.storageSlots.concat( - Src14OwnedProxy.storageSlots + Src14OwnedProxyFactory.storageSlots ); /** * These configurables are specific to our recommended SRC14 compliant diff --git a/apps/docs/src/guide/contracts/snippets/storage-slots/override-storage-slots.ts b/apps/docs/src/guide/contracts/snippets/storage-slots/override-storage-slots.ts index a4b4c289f1f..53f82cf028e 100644 --- a/apps/docs/src/guide/contracts/snippets/storage-slots/override-storage-slots.ts +++ b/apps/docs/src/guide/contracts/snippets/storage-slots/override-storage-slots.ts @@ -2,16 +2,13 @@ import { Provider, Wallet } from 'fuels'; import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../../env'; -import { - StorageTestContract, - StorageTestContractFactory, -} from '../../../../typegend'; +import { StorageTestContractFactory } from '../../../../typegend'; const provider = new Provider(LOCAL_NETWORK_URL); const deployer = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider); const deploymentTx = await StorageTestContractFactory.deploy(deployer, { - storageSlots: StorageTestContract.storageSlots, + storageSlots: StorageTestContractFactory.storageSlots, }); await deploymentTx.waitForResult(); diff --git a/apps/docs/src/guide/fuels-cli/commands.md b/apps/docs/src/guide/fuels-cli/commands.md index 97e936c676f..43bbf92925e 100644 --- a/apps/docs/src/guide/fuels-cli/commands.md +++ b/apps/docs/src/guide/fuels-cli/commands.md @@ -79,7 +79,7 @@ npx fuels@{{fuels}} build ``` 1. Build all Sway programs under your `workspace` using `forc` [1](https://docs.fuel.network/docs/forc/commands/forc_build/) -1. Generate types for them using `fuels-typegen` [2](#fuels-typegen) +1. Generate types for them using `fuels typegen` [2](#fuels-typegen) ```console-vue npx fuels@{{fuels}} build --deploy @@ -167,9 +167,6 @@ npx fuels@{{fuels}} help typegen Options: -i, --inputs Input paths/globals to your Abi JSON files -o, --output Directory path for generated files - -c, --contract Generate types for Contracts [default] - -s, --script Generate types for Scripts - -p, --predicate Generate types for Predicates -S, --silent Omit output messages ``` diff --git a/apps/docs/src/guide/fuels-cli/generating-types.md b/apps/docs/src/guide/fuels-cli/generating-types.md index 6a42b1b530d..57523586e26 100644 --- a/apps/docs/src/guide/fuels-cli/generating-types.md +++ b/apps/docs/src/guide/fuels-cli/generating-types.md @@ -27,18 +27,15 @@ Generate Typescript from Sway ABI JSON files Options: -i, --inputs Input paths/globals to your ABI JSON files -o, --output Directory path for generated files - -c, --contract Generate types for Contracts [default] - -s, --script Generate types for Scripts - -p, --predicate Generate types for Predicates -S, --silent Omit output messages -h, --help Display help ``` -## Generating Types for Contracts +## Generating Types -You can generate types for a Sway contract using the command below: +You can generate types for a Sway program using the command below: - + ```console @@ -50,30 +47,15 @@ pnpm fuels typegen -i ./abis/*-abi.json -o ./types -The path after the input flag `-i` should point to the file ending in `-abi.json` produced when the contract was built. +The path after the input flag `-i` should point to the file ending in `-abi.json` produced when the Sway program was built. -The path after the output flag `-o` will be the output directory for the generated types. +- For scripts and predicates, you'll need the bytecode of the program to be in the same folder for the command to work. +- For contracts, the command will work without the bytecode but the corresponding `ContractFactory` file won't be generated as factories need the bytecode to operate. -You can omit the `--contract` option here since it's the default. +The path after the output flag `-o` will be the output directory for the generated types. -## Generating Types for Scripts - -To generate types for a Sway script, use the `--script` flag: - -```console -pnpm fuels typegen -i ./abis/*-abi.json -o ./types --script -``` - -## Generating Types for Predicates - -To generate types for a Sway predicate, use the `--predicate` flag: - -```console -pnpm fuels typegen -i ./abis/*-abi.json -o ./types --predicate -``` - --- See also: diff --git a/apps/docs/src/guide/fuels-cli/using-generated-types.md b/apps/docs/src/guide/fuels-cli/using-generated-types.md index 4702c2e0394..7e38ecf61c3 100644 --- a/apps/docs/src/guide/fuels-cli/using-generated-types.md +++ b/apps/docs/src/guide/fuels-cli/using-generated-types.md @@ -29,7 +29,7 @@ Typegen tries to resolve, auto-load, and embed the [Storage Slots](../contracts/ After generating types via: ```console -pnpm fuels typegen -i ./abis/*-abi.json -o ./types --script +pnpm fuels typegen -i ./abis/*-abi.json -o ./types ``` We can use these files like so: @@ -41,7 +41,7 @@ We can use these files like so: After generating types via: ```console -pnpm fuels typegen -i ./abis/*-abi.json -o ./types --predicate +pnpm fuels typegen -i ./abis/*-abi.json -o ./types ``` We can use these files like so: diff --git a/apps/docs/src/guide/types/snippets/enums/using-enums-of-enums-1.ts b/apps/docs/src/guide/types/snippets/enums/using-enums-of-enums-1.ts index d3bc38d837d..2194c4fdc16 100644 --- a/apps/docs/src/guide/types/snippets/enums/using-enums-of-enums-1.ts +++ b/apps/docs/src/guide/types/snippets/enums/using-enums-of-enums-1.ts @@ -2,7 +2,7 @@ import { Provider, Wallet } from 'fuels'; import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../../env'; import { EchoEnumFactory } from '../../../../typegend'; -import { UserErrorInput } from '../../../../typegend/contracts/EchoEnum'; +import { UserError } from '../../../../typegend/contracts/EchoEnum'; const provider = new Provider(LOCAL_NETWORK_URL); const wallet = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider); @@ -10,7 +10,7 @@ const deploy = await EchoEnumFactory.deploy(wallet); const { contract } = await deploy.waitForResult(); // #region snippet-1 -const enumParam = { UserError: UserErrorInput.InsufficientPermissions }; +const enumParam = { UserError: UserError.InsufficientPermissions }; const { value } = await contract.functions.echo_error_enum(enumParam).get(); diff --git a/apps/docs/src/guide/types/snippets/enums/using-enums-of-enums-2.ts b/apps/docs/src/guide/types/snippets/enums/using-enums-of-enums-2.ts index d38469bd533..2c6318b0696 100644 --- a/apps/docs/src/guide/types/snippets/enums/using-enums-of-enums-2.ts +++ b/apps/docs/src/guide/types/snippets/enums/using-enums-of-enums-2.ts @@ -2,7 +2,7 @@ import { Provider, Wallet } from 'fuels'; import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../../env'; import { EchoEnumFactory } from '../../../../typegend'; -import { StateErrorInput } from '../../../../typegend/contracts/EchoEnum'; +import { StateError } from '../../../../typegend/contracts/EchoEnum'; const provider = new Provider(LOCAL_NETWORK_URL); const wallet = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider); @@ -10,7 +10,7 @@ const deploy = await EchoEnumFactory.deploy(wallet); const { contract } = await deploy.waitForResult(); // #region snippet-1 -const enumParam = { StateError: StateErrorInput.Completed }; +const enumParam = { StateError: StateError.Completed }; const { value } = await contract.functions.echo_error_enum(enumParam).get(); diff --git a/apps/docs/src/guide/types/snippets/enums/using-sway-enums.ts b/apps/docs/src/guide/types/snippets/enums/using-sway-enums.ts index 4c3b0233ace..93c7fc3d3c7 100644 --- a/apps/docs/src/guide/types/snippets/enums/using-sway-enums.ts +++ b/apps/docs/src/guide/types/snippets/enums/using-sway-enums.ts @@ -3,14 +3,14 @@ import { Provider, Wallet } from 'fuels'; import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../../env'; import { EchoEnumFactory } from '../../../../typegend'; -import { StateErrorInput } from '../../../../typegend/contracts/EchoEnum'; +import { StateError } from '../../../../typegend/contracts/EchoEnum'; const provider = new Provider(LOCAL_NETWORK_URL); const wallet = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider); const deploy = await EchoEnumFactory.deploy(wallet); const { contract } = await deploy.waitForResult(); -const enumParam = StateErrorInput.Completed; +const enumParam = StateError.Completed; const { value } = await contract.functions .echo_state_error_enum(enumParam) diff --git a/packages/abi-typegen/package.json b/packages/abi-typegen/package.json index a0c7a220487..d4695347303 100644 --- a/packages/abi-typegen/package.json +++ b/packages/abi-typegen/package.json @@ -3,9 +3,6 @@ "version": "0.98.0", "description": "Generates Typescript definitions from Sway ABI Json files", "author": "Fuel Labs (https://fuel.network/)", - "bin": { - "fuels-typegen": "typegen.js" - }, "main": "dist/index.js", "module": "dist/index.mjs", "types": "dist/index.d.ts", diff --git a/packages/abi/package.json b/packages/abi/package.json index 0fd951ba435..dc3a5066347 100644 --- a/packages/abi/package.json +++ b/packages/abi/package.json @@ -11,11 +11,26 @@ "engines": { "node": "^18.20.3 || ^20.0.0 || ^22.0.0" }, + "bin": { + "fuels-typegen": "typegen.js" + }, "exports": { ".": { "require": "./dist/index.js", "import": "./dist/index.mjs", "types": "./dist/index.d.ts" + }, + "./cli": { + "types": "./dist/cli.d.ts", + "require": "./dist/cli.js", + "import": "./dist/cli.mjs" + } + }, + "typesVersions": { + "*": { + "cli": [ + "./dist/cli.d.ts" + ] } }, "files": [ @@ -27,7 +42,11 @@ }, "dependencies": { "@fuel-ts/errors": "workspace:*", - "@fuel-ts/utils": "workspace:*" + "@fuel-ts/utils": "workspace:*", + "@fuel-ts/versions": "workspace:*", + "handlebars": "4.7.8", + "commander": "12.1.0", + "glob": "10.4.5" }, "devDependencies": {} } diff --git a/packages/abi/src/bin.ts b/packages/abi/src/bin.ts new file mode 100755 index 00000000000..4d4c3bed880 --- /dev/null +++ b/packages/abi/src/bin.ts @@ -0,0 +1,15 @@ +import { getBinaryVersions } from '@fuel-ts/versions/cli'; +import { Command } from 'commander'; + +import { configureTypegenCliOptions } from './cli'; + +const program = new Command(); + +program.name('fuels-typegen'); +program.version(getBinaryVersions().FUELS); +program.usage(`-i ../out/*-abi.json -o ./generated/`); +program.option('-S, --silent', 'Omit output messages', false); + +configureTypegenCliOptions(program); + +program.parse(process.argv); diff --git a/packages/abi/src/cli.ts b/packages/abi/src/cli.ts new file mode 100644 index 00000000000..c37108bd746 --- /dev/null +++ b/packages/abi/src/cli.ts @@ -0,0 +1 @@ +export * from './gen/cli'; diff --git a/packages/abi/src/gen/abi-gen-types.ts b/packages/abi/src/gen/abi-gen-types.ts index 10051c76805..032c27a243f 100644 --- a/packages/abi/src/gen/abi-gen-types.ts +++ b/packages/abi/src/gen/abi-gen-types.ts @@ -1 +1,55 @@ -// Placeholder +import type { BinaryVersions } from '@fuel-ts/versions'; + +import type { Abi } from '../parser'; + +export interface AbiGenInput { + /** + * The details of the program to generate the files for. + */ + programDetails: ProgramDetails[]; + /** + * The versions of the binaries used to generate the files. + */ + versions: BinaryVersions; + /** + * The mode to generate the files in. + * Defaults to 'ts' which generates typescript files. + */ + mode?: 'ts'; +} + +export interface AbiGenResult { + /** + * The filename of the generated file. + */ + filename: string; + /** + * The content of the generated file. + */ + content: string; +} + +export interface ProgramDetails { + /** + * The name of the program to generate files for. + * This will be used to name the generated files, + * as well as throughout the generated code. + */ + name: string; + /** + * The compressed bytecode of the program in base64 format. + */ + binCompressed?: string; + /** + * The abi of the program in the format returned via `AbiParser`. + */ + abi: Abi; + /** + * The original abi contents in string format. + */ + abiContents: string; + /** + * The storage slots, if working with a contract. + */ + storageSlots?: string; +} diff --git a/packages/abi/src/gen/abi-gen.ts b/packages/abi/src/gen/abi-gen.ts index e0ad4905d2f..db6b2d9f46a 100644 --- a/packages/abi/src/gen/abi-gen.ts +++ b/packages/abi/src/gen/abi-gen.ts @@ -1 +1,19 @@ -export class AbiGen {} +import type { AbiGenInput, AbiGenResult } from './abi-gen-types'; +import { getRenderer } from './renderers/getRenderer'; + +/** + * The main class to generate files for given sway programs. + * These contents of these generated files make it easier to interact + * with the sway programs, because type definitions are added, + * as well as some automatic loading is done for the user. + */ +export class AbiGen { + /** + * @returns an array of generated files for the given program details. + * They can be saved to disk as-is or further processed. + */ + public static generate({ programDetails, mode, versions }: AbiGenInput): AbiGenResult[] { + const render = getRenderer(mode); + return render(programDetails, versions); + } +} diff --git a/packages/abi/src/gen/cli/index.ts b/packages/abi/src/gen/cli/index.ts new file mode 100644 index 00000000000..939508c0f1b --- /dev/null +++ b/packages/abi/src/gen/cli/index.ts @@ -0,0 +1 @@ +export { configureTypegenCliOptions, runTypegen } from './run'; diff --git a/packages/abi/src/gen/cli/run.ts b/packages/abi/src/gen/cli/run.ts new file mode 100644 index 00000000000..ab87e9c61d4 --- /dev/null +++ b/packages/abi/src/gen/cli/run.ts @@ -0,0 +1,52 @@ +import { getBinaryVersions } from '@fuel-ts/versions/cli'; +import type { Command } from 'commander'; +import { mkdirSync, writeFileSync } from 'fs'; +import { join } from 'path'; + +import { AbiGen } from '../abi-gen'; + +import { getProgramDetails, loggingConfig } from './utils'; + +export interface RunTypegenOptions { + inputs: string[]; + output: string; + silent?: boolean; +} + +export function runTypegen(options: RunTypegenOptions) { + const { inputs, output, silent } = options; + + loggingConfig.silent = !!silent; + + const programDetails = getProgramDetails(inputs); + + const results = AbiGen.generate({ programDetails, versions: getBinaryVersions() }); + + mkdirSync(output, { recursive: true }); + + const subDirectories = new Set(); + + results.forEach((r) => { + const dir = r.filename.split('/').slice(0, -1).join('/'); + if (dir !== '') { + subDirectories.add(dir); + } + }); + + subDirectories.forEach((dir) => { + mkdirSync(join(output, dir), { recursive: true }); + }); + + results.forEach((r) => { + const outputPath = join(output, r.filename); + writeFileSync(outputPath, r.content); + }); +} + +export function configureTypegenCliOptions(program: Command) { + return program + .description(`Generate Typescript from forc build outputs`) + .requiredOption('-i, --inputs ', 'Input paths/globals to your ABI JSON files') + .requiredOption('-o, --output ', 'Directory path for generated files') + .action(runTypegen); +} diff --git a/packages/abi/src/gen/cli/utils.test.ts b/packages/abi/src/gen/cli/utils.test.ts new file mode 100644 index 00000000000..394b52180f9 --- /dev/null +++ b/packages/abi/src/gen/cli/utils.test.ts @@ -0,0 +1,38 @@ +import { ErrorCode, FuelError } from '@fuel-ts/errors'; +import { expectToThrowFuelError } from '@fuel-ts/errors/test-utils'; + +import { normalizeProjectName } from './utils'; + +/** + * @group node + */ +describe('normalizeProjectName', () => { + test('should normalize project name', () => { + expect(normalizeProjectName('DsToken')).toEqual('DsToken'); + expect(normalizeProjectName('test')).toEqual('Test'); + expect(normalizeProjectName('ds-token')).toEqual('DsToken'); + expect(normalizeProjectName('ds_token')).toEqual('DsToken'); + expect(normalizeProjectName('Aaa_bbb_CCDD-EEE')).toEqual('AaaBbbCCDDEEE'); + expect(normalizeProjectName('ds token')).toEqual('DsToken'); + expect(normalizeProjectName('name.abi')).toEqual('NameAbi'); + expect(normalizeProjectName('1234name.abi')).toEqual('NameAbi'); + expect(normalizeProjectName('ERC20.abi')).toEqual('ERC20Abi'); + expect(normalizeProjectName('my-contract')).toEqual('MyContract'); + expect(normalizeProjectName('my contract')).toEqual('MyContract'); + expect(normalizeProjectName('my.contract')).toEqual('MyContract'); + expect(normalizeProjectName('still-my.contract')).toEqual('StillMyContract'); + expect(normalizeProjectName('also my.contract')).toEqual('AlsoMyContract'); + }); + + test('throws if name cannot be normalized', async () => { + await expectToThrowFuelError( + () => normalizeProjectName(''), + new FuelError( + ErrorCode.PARSE_FAILED, + `The provided string '' results in an empty output after`.concat( + ` normalization, therefore, it can't normalize string.` + ) + ) + ); + }); +}); diff --git a/packages/abi/src/gen/cli/utils.ts b/packages/abi/src/gen/cli/utils.ts new file mode 100644 index 00000000000..dd2f987b3cc --- /dev/null +++ b/packages/abi/src/gen/cli/utils.ts @@ -0,0 +1,109 @@ +import { ErrorCode, FuelError } from '@fuel-ts/errors'; +import { assertUnreachable, compressBytecode, hexlify } from '@fuel-ts/utils'; +import { readFileSync } from 'fs'; +import { globSync } from 'glob'; + +import type { AbiSpecification } from '../../parser'; +import { AbiParser } from '../../parser'; +import type { ProgramDetails } from '../abi-gen-types'; + +export const loggingConfig = { + silent: false, +}; + +export function log(...args: Parameters) { + if (!loggingConfig.silent) { + // eslint-disable-next-line no-console + console.log(...args); + } +} + +/** + * Converts `some.string-value` into `SomeStringValue`. + * + * Examples: + * my-simple.test —— MySimpleTest + * myFile.ts —— MyFileTs + * my-abi.json —— MyAbiJson + */ +export function normalizeProjectName(str: string): string { + const transformations: ((s: string) => string)[] = [ + (s) => s.replace(/\s+/g, '-'), // spaces to - + (s) => s.replace(/\./g, '-'), // dots to - + (s) => s.replace(/_/g, '-'), // underscore to - + (s) => s.replace(/-[a-z]/g, (match) => match.slice(-1).toUpperCase()), // delete '-' and capitalize the letter after them + (s) => s.replace(/-/g, ''), // delete any '-' left + (s) => s.replace(/^\d+/, ''), // removes leading digits + ]; + + const output = transformations.reduce((s, t) => t(s), str); + + if (output === '') { + const errMsg = `The provided string '${str}' results in an empty output after`.concat( + ` normalization, therefore, it can't normalize string.` + ); + throw new FuelError(ErrorCode.PARSE_FAILED, errMsg); + } + + return output[0].toUpperCase() + output.slice(1); // capitalize first letter +} + +function handleMissingBinary(path: string, abi: AbiSpecification) { + const programType = abi.programType as 'predicate' | 'script' | 'contract' | 'library'; + switch (programType) { + case 'predicate': + throw new FuelError( + ErrorCode.BIN_FILE_NOT_FOUND, + `For predicates, the bytecode is required. No bytecode found for predicate at ${path}.` + ); + case 'script': + throw new FuelError( + ErrorCode.BIN_FILE_NOT_FOUND, + `For scripts, the bytecode is required. No bytecode found for script at ${path}.` + ); + case 'contract': + log(`No bytecode found for contract at ${path}, will not generate ContractFactory for it.`); + break; + case 'library': + // ignore; + break; + default: + assertUnreachable(programType); + } +} + +export function getProgramDetails(paths: string[]) { + const details: ProgramDetails[] = []; + paths.forEach((path) => { + const abiPath = path.match(/.+-abi\.json/) ? path : globSync(`${path}/*-abi.json`)[0]; + if (abiPath === undefined) { + log(`No abi file found in ${path}, skipping this path.`); + return; + } + + const dir = abiPath.match(/.*\//)?.[0] as string; + const projectName = abiPath.match(/([^/])+(?=-abi\.json)/)?.[0] as string; + const abiContentsStr = readFileSync(abiPath).toString(); + const abi = JSON.parse(abiContentsStr) as AbiSpecification; + + const [storageSlotsPath] = globSync(`${dir}/*-storage_slots.json`); + const storageSlots = storageSlotsPath ? readFileSync(storageSlotsPath).toString() : undefined; + + const [binPath] = globSync(`${dir}/*.bin`); + if (binPath === undefined) { + handleMissingBinary(path, abi); + } + + const binCompressed = binPath && compressBytecode(hexlify(readFileSync(binPath))); + + details.push({ + name: normalizeProjectName(projectName), + abi: AbiParser.parse(JSON.parse(abiContentsStr) as AbiSpecification), + binCompressed, + abiContents: abiContentsStr, + storageSlots, + }); + }); + + return details; +} diff --git a/packages/abi/src/gen/hbs.d.ts b/packages/abi/src/gen/hbs.d.ts new file mode 100644 index 00000000000..cefe640967a --- /dev/null +++ b/packages/abi/src/gen/hbs.d.ts @@ -0,0 +1,5 @@ +// informs TS about Handlebar `.hbs` templates extension +declare module '*.hbs' { + const value: string; + export default value; +} diff --git a/packages/abi/src/gen/index.ts b/packages/abi/src/gen/index.ts index 11641ac45c6..29b42ee4313 100644 --- a/packages/abi/src/gen/index.ts +++ b/packages/abi/src/gen/index.ts @@ -1 +1,2 @@ export { AbiGen } from './abi-gen'; +export * from './abi-gen-types'; diff --git a/packages/abi/src/gen/renderers/getRenderer.ts b/packages/abi/src/gen/renderers/getRenderer.ts new file mode 100644 index 00000000000..bf43bb5d832 --- /dev/null +++ b/packages/abi/src/gen/renderers/getRenderer.ts @@ -0,0 +1,16 @@ +import { assertUnreachable } from '@fuel-ts/utils'; + +import type { AbiGenInput } from '../abi-gen-types'; + +import { renderTs } from './ts/render-ts'; +import type { Renderer } from './types'; + +export function getRenderer(mode: AbiGenInput['mode']): Renderer { + switch (mode) { + case 'ts': + case undefined: + return renderTs; + default: + return assertUnreachable(mode); + } +} diff --git a/packages/abi/src/gen/renderers/ts/render-ts.ts b/packages/abi/src/gen/renderers/ts/render-ts.ts new file mode 100644 index 00000000000..6654b4c6902 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/render-ts.ts @@ -0,0 +1,17 @@ +import type { AbiGenResult, ProgramDetails } from '../../abi-gen-types'; +import type { Renderer } from '../types'; + +import { renderPrograms } from './renderers/render-programs'; +import { templateRenderer } from './renderers/template-renderer'; +import commonTemplate from './templates/common.hbs'; + +export const renderTs: Renderer = (details: ProgramDetails[], versions): AbiGenResult[] => { + const results = renderPrograms(details, versions); + + results.push({ + filename: 'common.ts', + content: templateRenderer({ template: commonTemplate, versions }), + }); + + return results; +}; diff --git a/packages/abi/src/gen/renderers/ts/renderers/get-parent-dir-wrapper.ts b/packages/abi/src/gen/renderers/ts/renderers/get-parent-dir-wrapper.ts new file mode 100644 index 00000000000..a8239ef814e --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/renderers/get-parent-dir-wrapper.ts @@ -0,0 +1,32 @@ +import { assertUnreachable } from '@fuel-ts/utils'; + +import type { Abi } from '../../../../parser'; + +export function getParentDirWrapper(programType: Abi['programType']): { + parentDir: string; + withParentDir: (file: string) => string; + removeParentDir: (file: string) => string; +} { + let parentDir: string = ''; + switch (programType) { + case 'contract': + parentDir = 'contracts'; + break; + case 'predicate': + parentDir = 'predicates'; + break; + case 'script': + parentDir = 'scripts'; + break; + case 'library': + break; + default: + assertUnreachable(programType); + } + + return { + parentDir, + withParentDir: (file) => `${parentDir}/${file}`, + removeParentDir: (file) => file.split(`${parentDir}/`)[1], + }; +} diff --git a/packages/abi/src/gen/renderers/ts/renderers/render-index-files.ts b/packages/abi/src/gen/renderers/ts/renderers/render-index-files.ts new file mode 100644 index 00000000000..12c9c479871 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/renderers/render-index-files.ts @@ -0,0 +1,73 @@ +import type { BinaryVersions } from '@fuel-ts/versions'; + +import type { Abi } from '../../../../parser'; +import type { AbiGenResult } from '../../../abi-gen-types'; +import indexTemplate from '../templates/index.hbs'; + +import { getParentDirWrapper } from './get-parent-dir-wrapper'; +import { templateRenderer } from './template-renderer'; + +export type IndexContents = Map< + Abi['programType'], + { filename: string; exportedContent: string[] }[] +>; +/** + * @returns an array of index files + * that includes the root index.ts and the index.ts for each provided program type. + */ +export function renderIndexFiles( + indexContents: IndexContents, + versions: BinaryVersions +): AbiGenResult[] { + const results: AbiGenResult[] = []; + + indexContents.forEach((files, programType) => { + const { withParentDir, removeParentDir } = getParentDirWrapper(programType); + + // from index.ts to e.g. contracts/index.ts + const indexFilename = withParentDir('index.ts'); + + const exports = files.map(({ filename, exportedContent }) => { + // from e.g. contracts/AbiContract.ts to AbiContract.ts + const relativePathToFile = removeParentDir(filename); + // remove .ts extension + return { + path: relativePathToFile.split('.')[0], + exportedContent: `{ ${exportedContent.join(', ')} }`, + }; + }); + + const content = templateRenderer({ + versions, + template: indexTemplate, + data: { + exports, + }, + }); + + results.push({ + filename: indexFilename, + content, + }); + }); + + const mainIndexFileExports = [...indexContents.keys()] + .sort() + .map((programType) => getParentDirWrapper(programType).parentDir) + .map((path) => ({ path, exportedContent: '*' })); + + const mainIndexFile: AbiGenResult = { + filename: 'index.ts', + content: templateRenderer({ + versions, + template: indexTemplate, + data: { + exports: mainIndexFileExports, + }, + }), + }; + + results.push(mainIndexFile); + + return results; +} diff --git a/packages/abi/src/gen/renderers/ts/renderers/render-program.ts b/packages/abi/src/gen/renderers/ts/renderers/render-program.ts new file mode 100644 index 00000000000..7bcb0c6a017 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/renderers/render-program.ts @@ -0,0 +1,113 @@ +import { assertUnreachable } from '@fuel-ts/utils'; +import type { BinaryVersions } from '@fuel-ts/versions'; + +import type { ProgramDetails } from '../../../abi-gen-types'; +import type { TsAbiGenResult } from '../../types'; +import abiTemplate from '../templates/abi.hbs'; +import bytecodeTemplate from '../templates/bytecode.hbs'; +import contractFactoryTemplate from '../templates/contract-factory.hbs'; +import contractTemplate from '../templates/contract.hbs'; +import predicateTemplate from '../templates/predicate.hbs'; +import scriptTemplate from '../templates/script.hbs'; +import storageSlotsTemplate from '../templates/storage-slots.hbs'; + +import { getParentDirWrapper } from './get-parent-dir-wrapper'; +import { renderTypes } from './render-types'; +import { templateRenderer } from './template-renderer'; + +/** + * Renders program-related files based on the program type. + * @returns An array of results containing filenames and their corresponding content. + * The files returned are all related to the program except the types. + * This includes the abi, bytecode, and the program-related classes. + */ +export function renderProgram(details: ProgramDetails, versions: BinaryVersions): TsAbiGenResult[] { + const { abi, binCompressed, name, abiContents, storageSlots } = details; + + const results: TsAbiGenResult[] = [ + { + filename: `${name}Types.ts`, + content: renderTypes(details, versions), + }, + { + filename: `${name}-abi.ts`, + content: templateRenderer({ template: abiTemplate, versions, data: { abiContents } }), + }, + ]; + + if (binCompressed) { + results.push({ + filename: `${name}-bytecode.ts`, + content: templateRenderer({ template: bytecodeTemplate, versions, data: { binCompressed } }), + }); + } + + switch (abi.programType) { + case 'contract': + results.push( + { + filename: `${name}.ts`, + content: templateRenderer({ + template: contractTemplate, + versions, + data: { name }, + }), + exportInIndexFile: [name], + }, + + { + filename: `${name}-storage-slots.ts`, + content: templateRenderer({ + template: storageSlotsTemplate, + versions, + data: { storageSlots }, + }), + } + ); + + if (binCompressed) { + results.push({ + filename: `${name}Factory.ts`, + content: templateRenderer({ + template: contractFactoryTemplate, + versions, + data: { name }, + }), + exportInIndexFile: [`${name}Factory`], + }); + } + break; + case 'predicate': + results.push({ + filename: `${name}.ts`, + content: templateRenderer({ + template: predicateTemplate, + versions, + data: { name }, + }), + exportInIndexFile: [name], + }); + break; + case 'script': + results.push({ + filename: `${name}.ts`, + content: templateRenderer({ + template: scriptTemplate, + versions, + data: { name }, + }), + exportInIndexFile: [name], + }); + break; + case 'library': + // we do nothing for library + break; + default: + assertUnreachable(abi.programType); + break; + } + + const { withParentDir } = getParentDirWrapper(abi.programType); + + return results.map((r) => ({ ...r, filename: withParentDir(r.filename) })); +} diff --git a/packages/abi/src/gen/renderers/ts/renderers/render-programs.ts b/packages/abi/src/gen/renderers/ts/renderers/render-programs.ts new file mode 100644 index 00000000000..269e90f8676 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/renderers/render-programs.ts @@ -0,0 +1,37 @@ +import type { BinaryVersions } from '@fuel-ts/versions'; + +import type { AbiGenResult, ProgramDetails } from '../../../abi-gen-types'; + +import type { IndexContents } from './render-index-files'; +import { renderIndexFiles } from './render-index-files'; +import { renderProgram } from './render-program'; + +/** + * For the given program details, render all program-related files. + * That includes the abi, bytecode, program-related classes, + * type files and the index files. + */ +export function renderPrograms(details: ProgramDetails[], versions: BinaryVersions) { + const results: AbiGenResult[] = []; + const indexContents: IndexContents = new Map(); + + for (const d of details) { + const files = renderProgram(d, versions); + + results.push(...files); + + files.forEach((file) => { + if (!file.exportInIndexFile?.length) { + return; + } + + const contents = indexContents.get(d.abi.programType) ?? []; + contents.push({ filename: file.filename, exportedContent: file.exportInIndexFile }); + indexContents.set(d.abi.programType, contents); + }); + } + + results.push(...renderIndexFiles(indexContents, versions)); + + return results; +} diff --git a/packages/abi/src/gen/renderers/ts/renderers/render-types.ts b/packages/abi/src/gen/renderers/ts/renderers/render-types.ts new file mode 100644 index 00000000000..d8a88e2a362 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/renderers/render-types.ts @@ -0,0 +1,120 @@ +import type { BinaryVersions } from '@fuel-ts/versions'; + +import { createMatcher } from '../../../../matchers/sway-type-matchers'; +import type { Abi } from '../../../../parser'; +import { evaluateFunctionInputsOptionality } from '../../../../utils/evaluate-function-inputs-optionality'; +import type { ProgramDetails } from '../../../abi-gen-types'; +import typesTemplate from '../templates/types.hbs'; +import { generateTsType } from '../typers/generate-ts-type'; +import { flattenImports } from '../typers/helpers'; +import type { TyperReturn } from '../typers/types'; + +import { templateRenderer } from './template-renderer'; + +const metadataTypeFilter = createMatcher({ + enum: true, + struct: true, + assetId: true, + string: false, + void: false, + bool: false, + u8: false, + u16: false, + u32: false, + u64: false, + u256: false, + b256: false, + generic: false, + stdString: false, + option: false, + result: false, + str: false, + b512: false, + bytes: false, + vector: false, + tuple: false, + array: false, + evmAddress: false, + rawUntypedSlice: false, +}); + +export function sortAlphabetically(a: TyperReturn, b: TyperReturn) { + if (a.input < b.input) { + return -1; + } + if (a.input > b.input) { + return 1; + } + return 0; +} + +function mergeTypeImports(mTypes: TyperReturn[], cTypesMap: Record) { + const cTypes = Object.values(cTypesMap); + + const imports = flattenImports(mTypes.concat(cTypes)); + + const fuelsTypeImports = [...new Set(imports.fuelsTypeImports)].sort().join(', '); + + const commonTypeImports = [...new Set(imports.commonTypeImports)].sort().join(', '); + + return { fuelsTypeImports, commonTypeImports }; +} + +function mapFunctions(abi: Abi, cTypes: Record) { + return abi.functions.map((fn) => { + const inputs = evaluateFunctionInputsOptionality(fn); + + return { + name: fn.name, + inputs: `[${inputs.map((i) => `${i.name}${i.isOptional ? '?' : ''}: ${cTypes[i.type.concreteTypeId].input}`).join(', ')}]`, + output: cTypes[fn.output.concreteTypeId].output, + }; + }); +} + +function mapConfigurables(abi: Abi, cTypes: Record) { + return abi.configurables.length > 0 + ? abi.configurables.map(({ name, type }) => ({ + name, + input: cTypes[type.concreteTypeId].input, + })) + : undefined; +} + +/** + * Renders the types file for a program. + * @returns An object containing the filename and the content of the types file. + * The type rendering logic is the same for all program types. + */ +export function renderTypes( + { name: programName, abi }: ProgramDetails, + versions: BinaryVersions +): string { + const mTypes = abi.metadataTypes + .filter(metadataTypeFilter) + .map((abiType) => generateTsType({ abiType })); + + const cTypes = abi.concreteTypes.reduce>((res, abiType) => { + res[abiType.concreteTypeId] = generateTsType({ abiType, asReference: true }); + return res; + }, {}); + + const { fuelsTypeImports, commonTypeImports } = mergeTypeImports(mTypes, cTypes); + + const content = templateRenderer({ + template: typesTemplate, + versions, + data: { + isContract: abi.programType === 'contract', + name: programName, + fuelsTypeImports, + commonTypeImports, + enums: mTypes.filter(({ tsType }) => tsType === 'enum').sort(sortAlphabetically), + types: mTypes.filter(({ tsType }) => tsType === 'type').sort(sortAlphabetically), + functions: mapFunctions(abi, cTypes), + configurables: mapConfigurables(abi, cTypes), + }, + }); + + return content; +} diff --git a/packages/abi/src/gen/renderers/ts/renderers/template-renderer.ts b/packages/abi/src/gen/renderers/ts/renderers/template-renderer.ts new file mode 100644 index 00000000000..f1a4ceaf7ea --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/renderers/template-renderer.ts @@ -0,0 +1,29 @@ +import type { BinaryVersions } from '@fuel-ts/versions'; +import Handlebars from 'handlebars'; + +import headerTemplate from '../templates/header.hbs'; + +/* + Renders the given template w/ the given data, while injecting common + header for disabling lint rules and annotating Fuel component's versions. +*/ +export function templateRenderer(params: { + template: string; + data?: Record; + versions: BinaryVersions; +}) { + const { data, template, versions } = params; + + const options = { + strict: true, + noEscape: true, + }; + + const renderHeaderTemplate = Handlebars.compile(headerTemplate, options); + const renderTemplate = Handlebars.compile(template, options); + + return renderTemplate({ + header: renderHeaderTemplate(versions), + ...(data ?? {}), + }); +} diff --git a/packages/abi/src/gen/renderers/ts/templates/abi.hbs b/packages/abi/src/gen/renderers/ts/templates/abi.hbs new file mode 100644 index 00000000000..0516073cc70 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/templates/abi.hbs @@ -0,0 +1,3 @@ +{{header}} + +export const abi = {{abiContents}}; \ No newline at end of file diff --git a/packages/abi/src/gen/renderers/ts/templates/bytecode.hbs b/packages/abi/src/gen/renderers/ts/templates/bytecode.hbs new file mode 100644 index 00000000000..5d859be0dd2 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/templates/bytecode.hbs @@ -0,0 +1,5 @@ +{{header}} + +import { decompressBytecode } from "fuels"; + +export const bytecode = decompressBytecode("{{binCompressed}}"); \ No newline at end of file diff --git a/packages/abi/src/gen/renderers/ts/templates/common.hbs b/packages/abi/src/gen/renderers/ts/templates/common.hbs new file mode 100644 index 00000000000..c6bb8343a05 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/templates/common.hbs @@ -0,0 +1,44 @@ +{{header}} + +import type { FunctionFragment, InvokeFunction } from 'fuels'; + +/** + * Mimics Sway Enum. + * Requires one and only one Key-Value pair and raises error if more are provided. + */ +export type Enum = { + [K in keyof T]: Pick & { [P in Exclude]?: never }; +}[keyof T]; + +/** + * Mimics Sway Option type. + */ +export type Option = T | undefined; + +/** + * Mimics Sway Result enum type. + * Ok represents the success case, while Err represents the error case. + */ +export type Result = Enum<{ Ok: T; Err: E }>; + +/** + * Mimics Sway array type. For example, [u64; 10] is converted to ArrayOfLength. + */ +export type ArrayOfLength< + T, + Length extends number, + Arr extends unknown[] = [], +> = Arr['length'] extends Length ? Arr : ArrayOfLength; + +interface Types { + functions: Record; + configurables: Partial>; +} + +export type ProgramFunctionMapper = { + [K in keyof T]: InvokeFunction; +}; + +export type InterfaceFunctionMapper = { + [K in keyof T]: FunctionFragment; +}; \ No newline at end of file diff --git a/packages/abi/src/gen/renderers/ts/templates/contract-factory.hbs b/packages/abi/src/gen/renderers/ts/templates/contract-factory.hbs new file mode 100644 index 00000000000..b57f0ea8e33 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/templates/contract-factory.hbs @@ -0,0 +1,26 @@ +{{header}} + +import { ContractFactory } from 'fuels'; +import type { Account, Provider, DeployContractOptions } from 'fuels'; +import { {{name}} } from './{{name}}'; +import { bytecode } from './{{name}}-bytecode'; +import { abi } from './{{name}}-abi'; +import { storageSlots } from './{{name}}-storage-slots'; + +export class {{name}}Factory extends ContractFactory<{{name}}> { + + static readonly bytecode = bytecode; + static readonly storageSlots = storageSlots; + + constructor(accountOrProvider: Account | Provider) { + super(bytecode, abi, accountOrProvider, {{name}}Factory.storageSlots); + } + + static deploy ( + wallet: Account, + options: DeployContractOptions = {} + ) { + const factory = new {{name}}Factory(wallet); + return factory.deploy(options); + } +} diff --git a/packages/abi/src/gen/renderers/ts/templates/contract.hbs b/packages/abi/src/gen/renderers/ts/templates/contract.hbs new file mode 100644 index 00000000000..87ddcf43d43 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/templates/contract.hbs @@ -0,0 +1,33 @@ +{{header}} + +import { Contract, Interface } from "fuels"; +import type { Address, Account, Provider } from 'fuels'; +import type { {{name}}Types as Types } from './{{name}}Types'; +import type { InterfaceFunctionMapper, ProgramFunctionMapper } from '../common'; +import { abi } from './{{name}}-abi'; + +export * from './{{name}}Types'; + +export type {{name}}Configurables = Types['configurables']; + +export class {{name}}Interface extends Interface { + declare functions: InterfaceFunctionMapper; + + constructor() { + super(abi); + } +} + +export class {{name}} extends Contract { + declare interface: {{name}}Interface; + declare functions: ProgramFunctionMapper; + + public static readonly abi = abi; + + constructor( + id: string | Address, + accountOrProvider: Account | Provider, + ) { + super(id, abi, accountOrProvider); + } +} \ No newline at end of file diff --git a/packages/abi/src/gen/renderers/ts/templates/header.hbs b/packages/abi/src/gen/renderers/ts/templates/header.hbs new file mode 100644 index 00000000000..a8ec5578f8b --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/templates/header.hbs @@ -0,0 +1,9 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: {{FUELS}} + Forc version: {{FORC}} +*/ diff --git a/packages/abi/src/gen/renderers/ts/templates/index.hbs b/packages/abi/src/gen/renderers/ts/templates/index.hbs new file mode 100644 index 00000000000..f323c7973da --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/templates/index.hbs @@ -0,0 +1,5 @@ +{{header}} + +{{#each exports}} +export {{exportedContent}} from './{{path}}'; +{{/each}} \ No newline at end of file diff --git a/packages/abi/src/gen/renderers/ts/templates/predicate.hbs b/packages/abi/src/gen/renderers/ts/templates/predicate.hbs new file mode 100644 index 00000000000..2925628d4e5 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/templates/predicate.hbs @@ -0,0 +1,33 @@ +{{header}} + +import { Predicate } from 'fuels'; +import type { PredicateParams } from 'fuels'; +import { abi } from './{{name}}-abi'; +import { bytecode } from './{{name}}-bytecode'; +import type { {{name}}Types as Types } from './{{name}}Types'; + +export * from './{{name}}Types'; + +export type {{name}}Inputs = Types['inputs']; +export type {{name}}Output = Types['output']; +export type {{name}}Configurables = Types['configurables']; + +export type {{name}}Parameters = Omit< + PredicateParams< + Types['inputs'], + Types['configurables'] + >, + 'abi' | 'bytecode' +>; + +export class {{name}} extends Predicate< + Types['inputs'], + Types['configurables'] +> { + public static readonly abi = abi; + public static readonly bytecode = bytecode; + + constructor(params: {{name}}Parameters) { + super({ abi, bytecode, ...params }); + } +} \ No newline at end of file diff --git a/packages/abi/src/gen/renderers/ts/templates/script.hbs b/packages/abi/src/gen/renderers/ts/templates/script.hbs new file mode 100644 index 00000000000..b304d851616 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/templates/script.hbs @@ -0,0 +1,25 @@ +{{header}} + +import { Script } from 'fuels'; +import type { Account } from 'fuels'; +import { abi } from './{{name}}-abi'; +import { bytecode } from './{{name}}-bytecode'; +import type { {{name}}Types as Types } from './{{name}}Types'; + +export * from './{{name}}Types'; + +export type {{name}}Inputs = Types['inputs']; +export type {{name}}Output = Types['output']; +export type {{name}}Configurables = Types['configurables']; + +export class {{name}} extends Script< + Types['inputs'], + Types['output'] +> { + public static readonly abi = abi; + public static readonly bytecode = bytecode; + + constructor(wallet: Account) { + super(bytecode, abi, wallet); + } +} \ No newline at end of file diff --git a/packages/abi/src/gen/renderers/ts/templates/storage-slots.hbs b/packages/abi/src/gen/renderers/ts/templates/storage-slots.hbs new file mode 100644 index 00000000000..a877acccda5 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/templates/storage-slots.hbs @@ -0,0 +1,5 @@ +{{header}} + +import type { StorageSlot } from 'fuels'; + +export const storageSlots: StorageSlot[] = {{storageSlots}}; \ No newline at end of file diff --git a/packages/abi/src/gen/renderers/ts/templates/types.hbs b/packages/abi/src/gen/renderers/ts/templates/types.hbs new file mode 100644 index 00000000000..8624ec21820 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/templates/types.hbs @@ -0,0 +1,36 @@ +{{header}} + +import type { {{fuelsTypeImports}} } from 'fuels'; +import type { {{commonTypeImports}} } from '../common'; + +{{#each enums}} +export enum {{input}}; +{{/each}} + +{{#each types}} +export type {{input}}; +export type {{output}}; +{{/each}} + +export interface {{name}}Types { + {{#if isContract}} + functions: { + {{#each functions}} + {{name}}: { + inputs: {{inputs}}; + output: {{output}}; + }; + {{/each}} + }; + {{else}} + {{#each functions}} + inputs: {{inputs}}; + output: {{output}}; + {{/each}} + {{/if}} + configurables: {{#if configurables}}Partial<{ + {{#each configurables}} + {{name}}: {{input}}; + {{/each}} + }>{{else}}undefined{{/if}}; +} \ No newline at end of file diff --git a/packages/abi/src/gen/renderers/ts/typers/enums.ts b/packages/abi/src/gen/renderers/ts/typers/enums.ts new file mode 100644 index 00000000000..31e81835330 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/typers/enums.ts @@ -0,0 +1,68 @@ +import { swayTypeMatchers, ENUM_REGEX } from '../../../../matchers/sway-type-matchers'; + +import { structTyper } from './struct'; +import type { Typer, TyperAbiType } from './types'; + +function isNativeEnum(abiType: TyperAbiType) { + return abiType.components?.every((t) => swayTypeMatchers.void(t.type.swayType)) === true; +} + +export const enumTyper: Typer = (params, typer) => { + const { abiType } = params; + if (isNativeEnum(abiType)) { + const typeName = ENUM_REGEX.exec(abiType.swayType)?.[2] as string; + + if (params.asReference) { + return { input: typeName, output: typeName }; + } + + const enumFields = abiType.components?.map((c) => `${c.name} = '${c.name}'`).join(', '); + const input = `${typeName} { ${enumFields} }`; + return { + input, + output: input, + tsType: 'enum', + }; + } + + return structTyper(params, typer); +}; + +export const optionTyper: Typer = ({ abiType }, typer) => { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const { type } = abiType.components![1]!; + const some = typer({ abiType: type, asReference: true }); + const input = `Option<${some.input}>`; + const output = `Option<${some.output}>`; + return { + input, + output, + commonTypeImports: ['Option'], + }; +}; + +export const resultTyper: Typer = ({ abiType }, typer) => { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const [{ type: ok }, { type: err }] = abiType.components!; + const mappedOk = typer({ abiType: ok, asReference: true }); + const mappedErr = typer({ abiType: err, asReference: true }); + + const input = `Result<${mappedOk.input}, ${mappedErr.input}>`; + const output = `Result<${mappedOk.output}, ${mappedErr.output}>`; + + const fuelsTypeImports = [ + mappedOk.fuelsTypeImports ?? [], + mappedErr.fuelsTypeImports ?? [], + ].flat(); + const commonTypeImports = [ + mappedOk.commonTypeImports ?? [], + mappedErr.commonTypeImports ?? [], + ['Result'], + ].flat(); + return { + input, + output, + fuelsTypeImports, + commonTypeImports, + }; +}; diff --git a/packages/abi/src/gen/renderers/ts/typers/generate-ts-type.ts b/packages/abi/src/gen/renderers/ts/typers/generate-ts-type.ts new file mode 100644 index 00000000000..09ce1a1aa55 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/typers/generate-ts-type.ts @@ -0,0 +1,6 @@ +import { typerMatcher } from './typer-matcher'; +import type { TyperParams, TyperReturn } from './types'; + +export function generateTsType(params: TyperParams): TyperReturn { + return typerMatcher(params.abiType)(params, generateTsType); +} diff --git a/packages/abi/src/gen/renderers/ts/typers/helpers.ts b/packages/abi/src/gen/renderers/ts/typers/helpers.ts new file mode 100644 index 00000000000..892c6e1b62f --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/typers/helpers.ts @@ -0,0 +1,10 @@ +import type { TyperReturn } from './types'; + +export function flattenImports(mapped: TyperReturn[]) { + const fuelsTypeImports = mapped.flatMap((m) => m.fuelsTypeImports).filter((x) => x !== undefined); + const commonTypeImports = mapped + .flatMap((m) => m.commonTypeImports) + .filter((x) => x !== undefined); + + return { fuelsTypeImports, commonTypeImports }; +} diff --git a/packages/abi/src/gen/renderers/ts/typers/iterators.ts b/packages/abi/src/gen/renderers/ts/typers/iterators.ts new file mode 100644 index 00000000000..3ed4f99743d --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/typers/iterators.ts @@ -0,0 +1,37 @@ +import { ARRAY_REGEX } from '../../../../matchers/sway-type-matchers'; +import type { AbiTypeComponent } from '../../../../parser'; + +import type { Typer } from './types'; +import { mapComponents } from './utils'; + +export const tupleTyper: Typer = ({ abiType }, typer) => + mapComponents({ parent: abiType, includeComponentNames: false, typer }); + +export const arrayTyper: Typer = ({ abiType }, typer) => { + const length = ARRAY_REGEX.exec(abiType.swayType)?.[2]; + + const { type } = abiType.components?.[0] as AbiTypeComponent; + const mapped = typer({ abiType: type, asReference: true }); + + const input = `ArrayOfLength<${mapped.input}, ${length}>`; + const output = `ArrayOfLength<${mapped.output}, ${length}>`; + + return { + input, + output, + fuelsTypeImports: mapped.fuelsTypeImports, + commonTypeImports: ['ArrayOfLength', ...(mapped.commonTypeImports ?? [])], + }; +}; + +export const vectorTyper: Typer = ({ abiType }, typer) => { + const { type } = abiType.components?.[0] as AbiTypeComponent; + const mapped = typer({ abiType: type, asReference: true }); + const input = `${mapped.input}[]`; + const output = `${mapped.output}[]`; + return { + ...mapped, + input, + output, + }; +}; diff --git a/packages/abi/src/gen/renderers/ts/typers/simple.ts b/packages/abi/src/gen/renderers/ts/typers/simple.ts new file mode 100644 index 00000000000..9440f5aec51 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/typers/simple.ts @@ -0,0 +1,82 @@ +import { GENERIC_REGEX } from '../../../../matchers/sway-type-matchers'; + +import type { TyperReturn, Typer } from './types'; + +const numberTyperReturn: TyperReturn = { + input: 'BigNumberish', + output: 'number', + fuelsTypeImports: ['BigNumberish'], +}; + +export const u8Typer: Typer = () => numberTyperReturn; +export const u16Typer = u8Typer; +export const u32Typer = u8Typer; + +const u64TyperReturn: TyperReturn = { + input: 'BigNumberish', + output: 'BN', + fuelsTypeImports: ['BigNumberish', 'BN'], +}; +export const u64Typer: Typer = () => u64TyperReturn; +export const u256Typer: Typer = u64Typer; + +const boolTyperReturn = { + input: 'boolean', + output: 'boolean', +}; +export const boolTyper: Typer = () => boolTyperReturn; + +const stringTyperReturn: TyperReturn = { + input: 'string', + output: 'string', +}; +export const stringTyper: Typer = () => stringTyperReturn; +export const b256Typer: Typer = stringTyper; +export const b512Typer: Typer = stringTyper; + +const evmAddressTyperReturn: TyperReturn = { + input: 'EvmAddress', + output: 'EvmAddress', + fuelsTypeImports: ['EvmAddress'], +}; +export const evmAddressTyper: Typer = () => evmAddressTyperReturn; + +const bytesTyperReturn: TyperReturn = { + input: 'Bytes', + output: 'Bytes', + fuelsTypeImports: ['Bytes'], +}; +export const bytesTyper: Typer = () => bytesTyperReturn; + +const strTyperReturn: TyperReturn = { + input: 'StrSlice', + output: 'StrSlice', + fuelsTypeImports: ['StrSlice'], +}; +export const strTyper: Typer = () => strTyperReturn; + +const rawSliceTyperReturn: TyperReturn = { + input: 'RawSlice', + output: 'RawSlice', + fuelsTypeImports: ['RawSlice'], +}; +export const rawSliceTyper = () => rawSliceTyperReturn; + +const stdStringTyperReturn: TyperReturn = { + input: 'StdString', + output: 'StdString', + fuelsTypeImports: ['StdString'], +}; +export const stdStringTyper: Typer = () => stdStringTyperReturn; + +const voidTyperReturn: TyperReturn = { input: 'undefined', output: 'void' }; +export const voidTyper: Typer = () => voidTyperReturn; + +export const genericTyper: Typer = ({ abiType }) => { + // extracts the `T` part from `generic T` + const typeName = GENERIC_REGEX.exec(abiType.swayType)?.[1] as string; + return { + input: typeName, + output: typeName, + }; +}; diff --git a/packages/abi/src/gen/renderers/ts/typers/struct.ts b/packages/abi/src/gen/renderers/ts/typers/struct.ts new file mode 100644 index 00000000000..fbbcc5942fa --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/typers/struct.ts @@ -0,0 +1,88 @@ +import { ENUM_REGEX, STRUCT_REGEX } from '../../../../matchers/sway-type-matchers'; +import type { AbiMetadataType, AbiTypeArgument } from '../../../../parser'; + +import { flattenImports } from './helpers'; +import type { TyperReturn, Typer, GlobalTyper, TyperAbiType } from './types'; +import { mapComponents } from './utils'; + +function mapGenericTypeParameters( + typeArgs: AbiTypeArgument[] | AbiMetadataType['typeParameters'], + typer: GlobalTyper +): TyperReturn { + if (!typeArgs) { + return { + input: '', + output: '', + }; + } + const mapped = typeArgs.map((ta) => typer({ abiType: ta, asReference: true })); + const { fuelsTypeImports, commonTypeImports } = flattenImports(mapped); + + const input = mapped.map((r) => r.input).join(', '); + const output = mapped.map((r) => r.output).join(', '); + return { + fuelsTypeImports, + commonTypeImports, + input: `<${input}>`, + output: `<${output}>`, + }; +} + +function getTypeNames(abiType: TyperAbiType) { + const typeName = + STRUCT_REGEX.exec(abiType.swayType)?.[2] ?? ENUM_REGEX.exec(abiType.swayType)?.[2]; + return { + inputName: `${typeName}Input`, + outputName: `${typeName}Output`, + }; +} + +function mapStructAsReference(abiType: TyperAbiType, typer: GlobalTyper): TyperReturn { + const { inputName, outputName } = getTypeNames(abiType); + + const typeArgs = mapGenericTypeParameters( + 'metadata' in abiType + ? abiType.metadata?.typeArguments + : (abiType as AbiMetadataType).typeParameters, + typer + ); + + return { + ...typeArgs, + input: `${inputName}${typeArgs.input}`, + output: `${outputName}${typeArgs.output}`, + }; +} + +export const structTyper: Typer = ({ abiType, asReference }, typer) => { + if ('metadata' in abiType || asReference) { + return mapStructAsReference(abiType, typer); + } + + const { inputName, outputName } = getTypeNames(abiType); + + const typeParameters = mapGenericTypeParameters( + (abiType as AbiMetadataType).typeParameters, + typer + ); + const content = mapComponents({ parent: abiType, includeComponentNames: true, typer }); + + const inputType = `${inputName}${typeParameters.input}`; + const outputType = `${outputName}${typeParameters.output}`; + + const input = `${inputType} = ${content.input}`; + let output = ''; + if (content.input === content.output) { + output = `${outputType} = ${inputType}`; + } else { + output = `${outputType} = ${content.output}`; + } + + return { + input, + output, + commonTypeImports: content.commonTypeImports, + fuelsTypeImports: content.fuelsTypeImports, + tsType: 'type', + }; +}; diff --git a/packages/abi/src/gen/renderers/ts/typers/typer-matcher.ts b/packages/abi/src/gen/renderers/ts/typers/typer-matcher.ts new file mode 100644 index 00000000000..03da529b250 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/typers/typer-matcher.ts @@ -0,0 +1,51 @@ +import { createMatcher } from '../../../../matchers/sway-type-matchers'; + +import { optionTyper, enumTyper, resultTyper } from './enums'; +import { tupleTyper, arrayTyper, vectorTyper } from './iterators'; +import { + boolTyper, + u8Typer, + u16Typer, + u32Typer, + u64Typer, + u256Typer, + b256Typer, + stringTyper, + evmAddressTyper, + genericTyper, + b512Typer, + bytesTyper, + rawSliceTyper, + stdStringTyper, + strTyper, + voidTyper, +} from './simple'; +import { structTyper } from './struct'; +import type { Typer } from './types'; + +export const typerMatcher = createMatcher({ + bool: boolTyper, + u8: u8Typer, + u16: u16Typer, + u32: u32Typer, + u64: u64Typer, + u256: u256Typer, + b256: b256Typer, + b512: b512Typer, + tuple: tupleTyper, + array: arrayTyper, + struct: structTyper, + generic: genericTyper, + string: stringTyper, + vector: vectorTyper, + option: optionTyper, + bytes: bytesTyper, + str: strTyper, + rawUntypedSlice: rawSliceTyper, + stdString: stdStringTyper, + enum: enumTyper, + result: resultTyper, + void: voidTyper, + assetId: structTyper, + evmAddress: evmAddressTyper, +}); diff --git a/packages/abi/src/gen/renderers/ts/typers/types.ts b/packages/abi/src/gen/renderers/ts/typers/types.ts new file mode 100644 index 00000000000..e31a4c8f5e9 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/typers/types.ts @@ -0,0 +1,20 @@ +import type { AbiConcreteType, AbiTypeComponent, AbiMetadataType } from '../../../../parser'; + +export interface TyperReturn { + input: string; + output: string; + fuelsTypeImports?: string[]; + commonTypeImports?: string[]; + tsType?: 'enum' | 'type'; +} + +export type TyperAbiType = AbiConcreteType | AbiMetadataType | AbiTypeComponent['type']; + +export type TyperParams = { + abiType: TyperAbiType; + asReference?: boolean; +}; + +export type GlobalTyper = (p: TyperParams) => TyperReturn; + +export type Typer = (params: TyperParams, typer: GlobalTyper) => TyperReturn; diff --git a/packages/abi/src/gen/renderers/ts/typers/utils.ts b/packages/abi/src/gen/renderers/ts/typers/utils.ts new file mode 100644 index 00000000000..9305850eb43 --- /dev/null +++ b/packages/abi/src/gen/renderers/ts/typers/utils.ts @@ -0,0 +1,81 @@ +import { assertUnreachable } from '@fuel-ts/utils'; + +import { ENUM_REGEX, TUPLE_REGEX } from '../../../../matchers/sway-type-matchers'; +import type { AbiTypeComponent } from '../../../../parser'; + +import { flattenImports } from './helpers'; +import type { TyperAbiType, GlobalTyper, TyperReturn } from './types'; + +function componentMapper( + c: AbiTypeComponent, + includeName: boolean, + generateTsType: GlobalTyper +): TyperReturn { + const mapped = generateTsType({ abiType: c.type, asReference: true }); + + if (!includeName) { + return mapped; + } + + return { + ...mapped, + input: `${c.name}: ${mapped.input}`, + output: `${c.name}: ${mapped.output}`, + }; +} + +function wrapStructContent(text: string, wrap: '{}' | '[]' | 'Enum'): string { + switch (wrap) { + case '{}': + return `{ ${text} }`; + case '[]': + return `[${text}]`; + case 'Enum': { + const wrappedAsObj = wrapStructContent(text, '{}'); + return `Enum<${wrappedAsObj}>`; + } + default: + return assertUnreachable(wrap); + } +} + +/** + * This function maps components for a given parent type + * which can be a tuple or struct (and enum). + */ +export function mapComponents(params: { + parent: TyperAbiType; + /** + * Component names are included for structs and enums, + * but they're not included for tuples (we ignore the `__tuple_element` name). + */ + includeComponentNames: boolean; + typer: GlobalTyper; +}) { + const { parent, includeComponentNames, typer } = params; + const components = parent.components as AbiTypeComponent[]; + const mapped = components.map((c) => componentMapper(c, includeComponentNames, typer)); + + // eslint-disable-next-line no-nested-ternary + const wrap = ENUM_REGEX.test(parent.swayType) + ? 'Enum' + : TUPLE_REGEX.test(parent.swayType) + ? '[]' + : '{}'; + + const input = wrapStructContent(mapped.map((m) => m.input).join(', '), wrap); + const output = wrapStructContent(mapped.map((m) => m.output).join(', '), wrap); + + const { fuelsTypeImports, commonTypeImports } = flattenImports(mapped); + + if (wrap === 'Enum') { + commonTypeImports.push('Enum'); + } + + return { + input, + output, + fuelsTypeImports, + commonTypeImports, + }; +} diff --git a/packages/abi/src/gen/renderers/types.ts b/packages/abi/src/gen/renderers/types.ts new file mode 100644 index 00000000000..5d18ccaa6e9 --- /dev/null +++ b/packages/abi/src/gen/renderers/types.ts @@ -0,0 +1,9 @@ +import type { BinaryVersions } from '@fuel-ts/versions'; + +import type { AbiGenResult, ProgramDetails } from '../abi-gen-types'; + +export type Renderer = (details: ProgramDetails[], versions: BinaryVersions) => AbiGenResult[]; + +export type TsAbiGenResult = AbiGenResult & { + exportInIndexFile?: string[]; +}; diff --git a/packages/abi/src/utils/evaluate-function-inputs-optionality.ts b/packages/abi/src/utils/evaluate-function-inputs-optionality.ts new file mode 100644 index 00000000000..280e64c917a --- /dev/null +++ b/packages/abi/src/utils/evaluate-function-inputs-optionality.ts @@ -0,0 +1,15 @@ +import { swayTypeMatchers } from '../matchers/sway-type-matchers'; +import type { AbiFunction, AbiFunctionInput } from '../parser'; + +export function evaluateFunctionInputsOptionality( + fn: AbiFunction +): (AbiFunctionInput & { isOptional: boolean })[] { + let isMandatory = false; + return fn.inputs.reduceRight<(AbiFunctionInput & { isOptional: boolean })[]>((result, input) => { + const isTypeMandatory = + !swayTypeMatchers.void(input.type.swayType) && !swayTypeMatchers.option(input.type.swayType); + + isMandatory = isMandatory || isTypeMandatory; + return [{ ...input, isOptional: !isMandatory }, ...result]; + }, []); +} diff --git a/packages/abi/tsup.config.ts b/packages/abi/tsup.config.ts index 4c7f2f0354f..48e24be8656 100644 --- a/packages/abi/tsup.config.ts +++ b/packages/abi/tsup.config.ts @@ -1,3 +1,11 @@ -import { index } from '@internal/tsup'; +import { indexBinAndCliConfig } from '@internal/tsup'; +import type { Options } from 'tsup'; -export default index; +const configs: Options = { + ...indexBinAndCliConfig, + loader: { + '.hbs': 'text', + }, +}; + +export default configs; diff --git a/packages/abi/typegen.js b/packages/abi/typegen.js new file mode 100755 index 00000000000..ae13c3e8f43 --- /dev/null +++ b/packages/abi/typegen.js @@ -0,0 +1,2 @@ +#!/usr/bin/env node +require('./dist/bin.js'); diff --git a/packages/fuel-gauge/package.json b/packages/fuel-gauge/package.json index 97986da0e89..b5932b0cec2 100644 --- a/packages/fuel-gauge/package.json +++ b/packages/fuel-gauge/package.json @@ -14,6 +14,7 @@ "fuels": "workspace:*" }, "devDependencies": { + "@fuel-ts/abi": "workspace:*", "@fuel-ts/account": "workspace:*", "@fuel-ts/errors": "workspace:*", "@fuel-ts/merkle": "workspace:*", diff --git a/packages/fuel-gauge/src/abi/abi-coder.test.ts b/packages/fuel-gauge/src/abi/abi-coder.test.ts index 5f7fe677b1a..08f6456d859 100644 --- a/packages/fuel-gauge/src/abi/abi-coder.test.ts +++ b/packages/fuel-gauge/src/abi/abi-coder.test.ts @@ -4,11 +4,8 @@ import { expectToThrowFuelError, launchTestNode } from 'fuels/test-utils'; import { AbiContractFactory } from '../../test/typegen'; import type { AbiContract } from '../../test/typegen'; -import { - EnumWithNativeInput, - EnumWithNativeOutput, - ExternalEnumInput, -} from '../../test/typegen/contracts/AbiContract'; +import type { Option, Result } from '../../test/typegen/common'; +import { EnumWithNative, ExternalEnum } from '../../test/typegen/contracts/AbiContractTypes'; import type { EnumWithBuiltinTypeInput, EnumWithBuiltinTypeOutput, @@ -32,8 +29,7 @@ import type { StructWithEnumArrayOutput, StructWithSingleOptionOutput, StructWithSingleOptionInput, -} from '../../test/typegen/contracts/AbiContract'; -import type { Option, Result, Vec } from '../../test/typegen/contracts/common'; +} from '../../test/typegen/contracts/AbiContractTypes'; import { U16_MAX, @@ -793,7 +789,7 @@ describe('AbiCoder', () => { describe('types_array_with_vector', () => { it('should encode/decode just fine', async () => { - const input = [[1, 2, 3]] as [Vec]; + const input = [[1, 2, 3]] as [BigNumberish[]]; const expected = [[3, 2, 1]]; const { waitForResult } = await contract.functions.types_array_with_vector(input).call(); @@ -1091,14 +1087,10 @@ describe('AbiCoder', () => { describe('types_struct_with_array_of_enums', () => { it.todo('should encode/decode just fine', async () => { const input: StructWithEnumArrayInput = { - a: [EnumWithNativeInput.Checked, EnumWithNativeInput.Checked, EnumWithNativeInput.Checked], + a: [EnumWithNative.Checked, EnumWithNative.Checked, EnumWithNative.Checked], }; const expected: StructWithEnumArrayOutput = { - a: [ - EnumWithNativeOutput.Pending, - EnumWithNativeOutput.Pending, - EnumWithNativeOutput.Pending, - ], + a: [EnumWithNative.Pending, EnumWithNative.Pending, EnumWithNative.Pending], }; const { waitForResult } = await contract.functions @@ -1470,8 +1462,8 @@ describe('AbiCoder', () => { */ describe('types_enum', () => { it('should encode/decode just fine', async () => { - const input = EnumWithNativeInput.Checked; - const expected = EnumWithNativeInput.Pending; + const input = EnumWithNative.Checked; + const expected = EnumWithNative.Pending; const { waitForResult } = await contract.functions.types_enum(input).call(); @@ -1579,8 +1571,8 @@ describe('AbiCoder', () => { describe('types_enum_external', () => { it('should encode/decode just fine', async () => { - const input = ExternalEnumInput.A; - const expected = ExternalEnumInput.B; + const input = ExternalEnum.A; + const expected = ExternalEnum.B; const { waitForResult } = await contract.functions.types_enum_external(input).call(); @@ -1607,7 +1599,7 @@ describe('AbiCoder', () => { describe('types_enum_with_structs', () => { it('should encode/decode just fine', async () => { - const input = { a: EnumWithNativeInput.Checked }; + const input = { a: EnumWithNative.Checked }; const expected = { b: { a: true, b: 10 } }; const { waitForResult } = await contract.functions.types_enum_with_structs(input).call(); @@ -1759,8 +1751,8 @@ describe('AbiCoder', () => { describe('types_vector_option', () => { it('should encode/decode just fine', async () => { - const input: Vec = [{ a: [1, 2, 3, 4, 5] }]; - const expected: Vec = [{ a: [5, 4, 3, 2, 1] }]; + const input: StructWithMultiOptionInput[] = [{ a: [1, 2, 3, 4, 5] }]; + const expected: StructWithMultiOptionOutput[] = [{ a: [5, 4, 3, 2, 1] }]; const { waitForResult } = await contract.functions.types_vector_option(input).call(); diff --git a/packages/fuel-gauge/src/abi/abi-gen.test.ts b/packages/fuel-gauge/src/abi/abi-gen.test.ts index e3a2b44922a..e71c595953d 100644 --- a/packages/fuel-gauge/src/abi/abi-gen.test.ts +++ b/packages/fuel-gauge/src/abi/abi-gen.test.ts @@ -1,23 +1,165 @@ -import { log } from 'console'; +import { runTypegen } from '@fuel-ts/abi/cli'; +import { randomUUID } from 'crypto'; +import { cpSync, mkdirSync, readdirSync, readFileSync, rmdirSync, rmSync } from 'fs'; +import { FuelError } from 'fuels'; +import { expectToThrowFuelError } from 'fuels/test-utils'; +import { tmpdir } from 'os'; +import { join } from 'path'; import { AbiProjectsEnum, getAbiForcProject } from './utils'; +function generateTmpDir(fromDir?: string) { + const dir = join(tmpdir(), 'fuels', randomUUID()); + + mkdirSync(dir, { recursive: true }); + + if (fromDir) { + cpSync(fromDir, dir, { recursive: true }); + } + + return { path: dir, [Symbol.dispose]: () => rmdirSync(dir, { recursive: true }) }; +} + /** * @group node */ describe('AbiGen', () => { - test('contract', () => { - const { abiContents } = getAbiForcProject(AbiProjectsEnum.ABI_CONTRACT); - log(abiContents); + test('Generates all files correctly', () => { + const fixtureResultMap = new Map([ + ['index', 'index.ts'], + ['common', 'common.ts'], + + ['contracts/contract-index', 'contracts/index.ts'], + ['contracts/contract', 'contracts/AbiContract.ts'], + ['contracts/contract-types', 'contracts/AbiContractTypes.ts'], + ['contracts/contract-factory', 'contracts/AbiContractFactory.ts'], + ['contracts/contract-bytecode', 'contracts/AbiContract-bytecode.ts'], + ['contracts/contract-abi', 'contracts/AbiContract-abi.ts'], + ['contracts/contract-storage-slots', 'contracts/AbiContract-storage-slots.ts'], + + ['predicates/predicate-index', 'predicates/index.ts'], + ['predicates/predicate', 'predicates/AbiPredicate.ts'], + ['predicates/predicate-types', 'predicates/AbiPredicateTypes.ts'], + ['predicates/predicate-abi', 'predicates/AbiPredicate-abi.ts'], + + ['scripts/script-index', 'scripts/index.ts'], + ['scripts/script', 'scripts/AbiScript.ts'], + ['scripts/script-types', 'scripts/AbiScriptTypes.ts'], + ['scripts/script-abi', 'scripts/AbiScript-abi.ts'], + ]); + + const { buildDir: contractDir } = getAbiForcProject(AbiProjectsEnum.ABI_CONTRACT); + const { buildDir: predicateDir } = getAbiForcProject(AbiProjectsEnum.ABI_PREDICATE); + const { abiPath: scriptAbiPath } = getAbiForcProject(AbiProjectsEnum.ABI_SCRIPT); + + using output = generateTmpDir(); + + runTypegen({ + inputs: [contractDir, predicateDir, scriptAbiPath], + output: output.path, + }); + + fixtureResultMap.forEach((filename, fixture) => { + const fixtureFile = join( + process.cwd(), + `packages/fuel-gauge/src/abi/fixtures/${fixture}.txt` + ); + const expected = readFileSync(fixtureFile).toString(); + const generated = readFileSync(join(output.path, filename)).toString(); + + expect(generated).toEqual(expected); + }); }); - test('script', () => { - const { abiContents } = getAbiForcProject(AbiProjectsEnum.ABI_SCRIPT); - log(abiContents); + test('logs if no abi json file found and skips path', () => { + const logSpy = vi.spyOn(console, 'log').mockImplementationOnce(() => {}); + const { buildDir: scriptBuildDir, name: scriptName } = getAbiForcProject( + AbiProjectsEnum.ABI_SCRIPT + ); + const { buildDir: predicateBuildDir } = getAbiForcProject(AbiProjectsEnum.ABI_PREDICATE); + using scriptDir = generateTmpDir(scriptBuildDir); + + rmSync(join(scriptDir.path, `${scriptName}-abi.json`)); + + using predicateDir = generateTmpDir(predicateBuildDir); + + runTypegen({ + inputs: [scriptDir.path, predicateDir.path], + output: scriptDir.path, + }); + + expect(logSpy).toHaveBeenCalledWith( + `No abi file found in ${scriptDir.path}, skipping this path.` + ); + const outputDirContents = readdirSync(scriptDir.path); + + expect(outputDirContents).not.toContain('scripts'); + expect(outputDirContents).toContain('predicates'); }); - test('predicate', () => { - const { abiContents } = getAbiForcProject(AbiProjectsEnum.ABI_PREDICATE); - log(abiContents); + test('skips contract factory and bytecode generation when bytecode is missing and logs it', () => { + const { buildDir, name } = getAbiForcProject(AbiProjectsEnum.ABI_CONTRACT); + using tmpDir = generateTmpDir(buildDir); + + rmSync(join(tmpDir.path, `${name}.bin`)); + + const spy = vi.spyOn(console, 'log').mockImplementationOnce(() => {}); + + runTypegen({ + inputs: [tmpDir.path], + output: tmpDir.path, + }); + + expect(spy).toHaveBeenCalledWith( + `No bytecode found for contract at ${tmpDir.path}, will not generate ContractFactory for it.` + ); + + const contractsOutputs = readdirSync(join(tmpDir.path, 'contracts')); + + expect(contractsOutputs).toContain('index.ts'); + expect(contractsOutputs).toContain('AbiContract.ts'); + expect(contractsOutputs).toContain('AbiContractTypes.ts'); + expect(contractsOutputs).toContain('AbiContract-abi.ts'); + expect(contractsOutputs).toContain('AbiContract-storage-slots.ts'); + expect(contractsOutputs).not.toContain('AbiContractFactory.ts'); + expect(contractsOutputs).not.toContain('AbiContract-bytecode.ts'); + }); + + test('throws when missing bytecode for script', async () => { + const { buildDir, name } = getAbiForcProject(AbiProjectsEnum.ABI_SCRIPT); + using tmpDir = generateTmpDir(buildDir); + + rmSync(join(tmpDir.path, `${name}.bin`)); + + await expectToThrowFuelError( + () => + runTypegen({ + inputs: [tmpDir.path], + output: tmpDir.path, + }), + new FuelError( + FuelError.CODES.BIN_FILE_NOT_FOUND, + `For scripts, the bytecode is required. No bytecode found for script at ${tmpDir.path}.` + ) + ); + }); + + test('throws when missing bytecode for predicate', async () => { + const { buildDir, name } = getAbiForcProject(AbiProjectsEnum.ABI_PREDICATE); + using tmpDir = generateTmpDir(buildDir); + + rmSync(join(tmpDir.path, `${name}.bin`)); + + await expectToThrowFuelError( + () => + runTypegen({ + inputs: [tmpDir.path], + output: tmpDir.path, + }), + new FuelError( + FuelError.CODES.BIN_FILE_NOT_FOUND, + `For predicates, the bytecode is required. No bytecode found for predicate at ${tmpDir.path}.` + ) + ); }); }); diff --git a/packages/fuel-gauge/src/abi/abi-script.test.ts b/packages/fuel-gauge/src/abi/abi-script.test.ts index c6eb5eecb05..d8be4a79432 100644 --- a/packages/fuel-gauge/src/abi/abi-script.test.ts +++ b/packages/fuel-gauge/src/abi/abi-script.test.ts @@ -8,7 +8,6 @@ import { type AssetIdInput, type ScriptWithComplexArgsInputs, } from '../../test/typegen/scripts/ScriptWithComplexArgs'; -import type { Vec } from '../../test/typegen/scripts/common'; /** * @group browser @@ -52,9 +51,11 @@ describe('abi-script', () => { const arg1 = 100; const arg2 = { bits: getRandomB256() }; const arg3 = 100; - const arg4 = [[{ bits: getRandomB256() }, { bits: getRandomB256() }, true]] as Vec< - [AssetIdInput, AssetIdInput, boolean] - >; + const arg4 = [[{ bits: getRandomB256() }, { bits: getRandomB256() }, true]] as [ + AssetIdInput, + AssetIdInput, + boolean, + ][]; const arg5 = { Address: { bits: getRandomB256() } }; const arg6 = 100; const expected = [ diff --git a/packages/fuel-gauge/src/abi/fixtures/common.txt b/packages/fuel-gauge/src/abi/fixtures/common.txt new file mode 100644 index 00000000000..43cb6e6689e --- /dev/null +++ b/packages/fuel-gauge/src/abi/fixtures/common.txt @@ -0,0 +1,53 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.98.0 + Forc version: 0.66.5 +*/ + + +import type { FunctionFragment, InvokeFunction } from 'fuels'; + +/** + * Mimics Sway Enum. + * Requires one and only one Key-Value pair and raises error if more are provided. + */ +export type Enum = { + [K in keyof T]: Pick & { [P in Exclude]?: never }; +}[keyof T]; + +/** + * Mimics Sway Option type. + */ +export type Option = T | undefined; + +/** + * Mimics Sway Result enum type. + * Ok represents the success case, while Err represents the error case. + */ +export type Result = Enum<{ Ok: T; Err: E }>; + +/** + * Mimics Sway array type. For example, [u64; 10] is converted to ArrayOfLength. + */ +export type ArrayOfLength< + T, + Length extends number, + Arr extends unknown[] = [], +> = Arr['length'] extends Length ? Arr : ArrayOfLength; + +interface Types { + functions: Record; + configurables: Partial>; +} + +export type ProgramFunctionMapper = { + [K in keyof T]: InvokeFunction; +}; + +export type InterfaceFunctionMapper = { + [K in keyof T]: FunctionFragment; +}; \ No newline at end of file diff --git a/packages/fuel-gauge/src/abi/fixtures/contracts/contract-abi.txt b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-abi.txt new file mode 100644 index 00000000000..8aae39e58b9 --- /dev/null +++ b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-abi.txt @@ -0,0 +1,2808 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.98.0 + Forc version: 0.66.5 +*/ + + +export const abi = { + "programType": "contract", + "specVersion": "1", + "encodingVersion": "1", + "concreteTypes": [ + { + "type": "()", + "concreteTypeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d" + }, + { + "type": "(b256, bool)", + "concreteTypeId": "d5f6ab61fc224aae1bf15a89ab88840ed54e312a76a9735d1f60d4d0d1fae640", + "metadataTypeId": 0 + }, + { + "type": "(bool, u64)", + "concreteTypeId": "c998ca9a5f221fe7b5c66ae70c8a9562b86d964408b00d17f883c906bc1fe4be", + "metadataTypeId": 8 + }, + { + "type": "(str[5], bool)", + "concreteTypeId": "a1e229302ed2f092752a6bc4fbe66bb9305e0802b1b01ecc5e1d59356702e956", + "metadataTypeId": 1 + }, + { + "type": "(str[5], str[5])", + "concreteTypeId": "30022fd7ad3fda4035d30e4d86b705d4870924d4b4fe054624d2561fa12bb33e", + "metadataTypeId": 2 + }, + { + "type": "(struct data_structures::StructDoubleGeneric<[b256; 3],u8>, [struct data_structures::StructDoubleGeneric; 4], (str[5], bool), struct data_structures::StructSimple)", + "concreteTypeId": "343f07ddcd75b9385bc193e0419f2e89c75fad67cbf4ad1b36a01a136620817e", + "metadataTypeId": 13 + }, + { + "type": "(struct data_structures::StructSimple, struct std::vec::Vec)", + "concreteTypeId": "5ebb7c8cdd38d1f676f9c7089a2da12b27114ee3771c2047f3295d4d30f8fd2c", + "metadataTypeId": 3 + }, + { + "type": "(struct std::asset_id::AssetId, struct std::asset_id::AssetId, bool)", + "concreteTypeId": "a95e1fcceb1451b8a76471f593f66c4a52ca04bde3c227c746ad7aaf988de5c6", + "metadataTypeId": 10 + }, + { + "type": "(struct std::vec::Vec, b256)", + "concreteTypeId": "52e2726988c7da304606fbe4ed696efac04beb29e9a22e15778f8a0539c9cb94", + "metadataTypeId": 5 + }, + { + "type": "(struct std::vec::Vec, struct std::vec::Vec)", + "concreteTypeId": "87a4626758542d7b6a03099839e440a052a4d5a00e3abfdf22bcc564ca19a4fd", + "metadataTypeId": 6 + }, + { + "type": "(u32, struct std::vec::Vec, struct std::vec::Vec)", + "concreteTypeId": "18034e13b18b71de3c7e12f8f10a7bd48a23870e0dbb46eaf10faeb26d70f000", + "metadataTypeId": 9 + }, + { + "type": "(u64, struct data_structures::StructSimple)", + "concreteTypeId": "0088c28967dbcdaa34626c7e915e44b2afe72f12415f0e31edc0b5ce70e7c6dc", + "metadataTypeId": 4 + }, + { + "type": "(u8, struct data_structures::StructSingleGeneric>, str[3])", + "concreteTypeId": "6f875be99a39d9920569678a34ffce676a6c3e14b958910db250b9cb4957157f", + "metadataTypeId": 11 + }, + { + "type": "(u8, u8, u8)", + "concreteTypeId": "79239b6d6f2383e2cfbaf4da7fdf7ee7fb59b7bf517acfff2d9433e9e76e8fc4", + "metadataTypeId": 12 + }, + { + "type": "[b256; 3]", + "concreteTypeId": "81342782c917fcfd178741cb2b3a12ea1ebeaa57253fc4ee6700b4d7d6ab32d3", + "metadataTypeId": 17 + }, + { + "type": "[struct data_structures::StructDoubleGeneric,str[1]>; 2]", + "concreteTypeId": "b8164e36cce9d14142824b5cc55aebc1272036775b966af82c49c78aff114006", + "metadataTypeId": 15 + }, + { + "type": "[struct data_structures::StructDoubleGeneric; 4]", + "concreteTypeId": "b22807669faa58263e636f6e2d194df8ddbc6686bb4ea14ee28005fa30adbe85", + "metadataTypeId": 22 + }, + { + "type": "[struct data_structures::StructSimple; 3]", + "concreteTypeId": "38f2594527b516dab2c81b31356901226242d7c32554877e36797c6b23969237", + "metadataTypeId": 18 + }, + { + "type": "[struct std::vec::Vec; 1]", + "concreteTypeId": "593b39347cc381516d8ed1f8e5e628a8d455bd3f833bd9dfdd5165ba16f9f980", + "metadataTypeId": 14 + }, + { + "type": "[u8; 4]", + "concreteTypeId": "f28afa065fc5de602456160c4155d4de7d9a61e85a995d209a14eab0b34bd6b4", + "metadataTypeId": 23 + }, + { + "type": "b256", + "concreteTypeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + }, + { + "type": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + }, + { + "type": "enum abi-library::ExternalEnum", + "concreteTypeId": "9a24373d8ce7688609717fd5a9b75360cd8a6bdb224ae095f0c05cc891cadd42", + "metadataTypeId": 25 + }, + { + "type": "enum data_structures::EnumDoubleGeneric", + "concreteTypeId": "d0ed93cd57cc3dfb1c119b22bf63f5d215122402536127bf17087ca6d8186307", + "metadataTypeId": 26, + "typeArguments": [ + "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + ] + }, + { + "type": "enum data_structures::EnumWithBuiltinType", + "concreteTypeId": "2136f16aedeec1ab7f1d912c57cc0566e86c36f20a2cb313e3d679cead6a0e61", + "metadataTypeId": 27 + }, + { + "type": "enum data_structures::EnumWithNative", + "concreteTypeId": "58ae0e9c51da476db1149dd48b1cda83a12187df4c049f8df5021f0b1696fb93", + "metadataTypeId": 28 + }, + { + "type": "enum data_structures::EnumWithStructs", + "concreteTypeId": "9ed6dede3ae1e66e0f951e860e863f77fb9b9499f4666a1123bf244c4a201669", + "metadataTypeId": 29 + }, + { + "type": "enum data_structures::EnumWithVector", + "concreteTypeId": "0272d5aecccd33822994b7be1494b72ec9ad860e4cb51f043deda7ac1e2cae26", + "metadataTypeId": 30 + }, + { + "type": "enum std::identity::Identity", + "concreteTypeId": "ab7cd04e05be58e3fc15d424c2c4a57f824a2a2d97d67252440a3925ebdc1335", + "metadataTypeId": 31 + }, + { + "type": "enum std::option::Option", + "concreteTypeId": "25616ce23be3ca41fd26f8c546c053ec256f8fb5593036f60c9c417e86dcc92e", + "metadataTypeId": 32, + "typeArguments": [ + "ef937135956e37401e0bc90406ca8becda92d1b4e387fe938ddef8d27ee192a1" + ] + }, + { + "type": "enum std::option::Option", + "concreteTypeId": "2da102c46c7263beeed95818cd7bee801716ba8303dddafdcd0f6c9efda4a0f1", + "metadataTypeId": 32, + "typeArguments": [ + "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + ] + }, + { + "type": "enum std::result::Result", + "concreteTypeId": "9891b1ee451eed790368ea3969e3c8f550efa87de489b5d7b933e2290800791b", + "metadataTypeId": 33, + "typeArguments": [ + "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0", + "338a25cb65b9251663dcce6362b744fe10aa849758299590f4efed5dd299bf50" + ] + }, + { + "type": "enum std::result::Result", + "concreteTypeId": "b3131b4c08c16cfa55b3150d587c3afa3e4cdebe0399f3f599fa160baaa64e0c", + "metadataTypeId": 33, + "typeArguments": [ + "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0", + "d7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc" + ] + }, + { + "type": "raw untyped slice", + "concreteTypeId": "1e1c7c52c1c7a9901681337f8669555f62aac58911332c9ff6b4ea8e73786570" + }, + { + "type": "str", + "concreteTypeId": "8c25cb3686462e9a86d2883c5688a22fe738b0bbc85f458d2d2b5f3f667c6d5a" + }, + { + "type": "str[10]", + "concreteTypeId": "338a25cb65b9251663dcce6362b744fe10aa849758299590f4efed5dd299bf50" + }, + { + "type": "str[5]", + "concreteTypeId": "84877f6e98274b9e4721db68b4c0bdb9e52b8e9572c5bd7811c07a41ced882c7" + }, + { + "type": "struct abi-library::ExternalStruct", + "concreteTypeId": "c3a770db33c4e755ad3ba4586b9c10520511fb80b767feb57dd41da1a88f6978", + "metadataTypeId": 45 + }, + { + "type": "struct data_structures::Configurables", + "concreteTypeId": "69d4f1cc5ce793681d98a55ab013f42ab56260131d39af6c1e71a5f3531557bc", + "metadataTypeId": 46 + }, + { + "type": "struct data_structures::StructA", + "concreteTypeId": "db8b04f624965fbfd7eb7dc3fc3c6a54a71d0019b37d4011a9350d1870136c9d", + "metadataTypeId": 47 + }, + { + "type": "struct data_structures::StructB", + "concreteTypeId": "9f074fde9cb9194b90bd208c8c95e709bfb1a5c736b063302e5639ce4daad5aa", + "metadataTypeId": 48 + }, + { + "type": "struct data_structures::StructC", + "concreteTypeId": "f219acbc9e3b812457419966b5454d10d51594afecacb87fb7745c9311b90012", + "metadataTypeId": 49 + }, + { + "type": "struct data_structures::StructD>>", + "concreteTypeId": "d0494e36b8daeafdf02dfbd1f65f82c66df872fb235c7fd2707fcd4147c6c292", + "metadataTypeId": 50, + "typeArguments": [ + "d7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc", + "d7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc", + "722eb56989dc44c372c470eb3a6ddb2f91e3924c1c4a0806d21e414046599d35" + ] + }, + { + "type": "struct data_structures::StructDoubleGeneric<[b256; 3],u8>", + "concreteTypeId": "7bdc2c1e9c4b8576fdf5be24c5c6569cba3a8feaba3755ed2b95d646a33c73e2", + "metadataTypeId": 51, + "typeArguments": [ + "81342782c917fcfd178741cb2b3a12ea1ebeaa57253fc4ee6700b4d7d6ab32d3", + "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + ] + }, + { + "type": "struct data_structures::StructDoubleGeneric,u32>", + "concreteTypeId": "08dbec793087c5686c1a493513b158a999bb653126ee51151dfa85fa683edce5", + "metadataTypeId": 51, + "typeArguments": [ + "4946973fc1adce1f6b23e80f9fad29b44e6a4ab25f2b45f3fab95114cfcd33a0", + "d7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc" + ] + }, + { + "type": "struct data_structures::StructDoubleGeneric", + "concreteTypeId": "4946973fc1adce1f6b23e80f9fad29b44e6a4ab25f2b45f3fab95114cfcd33a0", + "metadataTypeId": 51, + "typeArguments": [ + "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + ] + }, + { + "type": "struct data_structures::StructF>", + "concreteTypeId": "722eb56989dc44c372c470eb3a6ddb2f91e3924c1c4a0806d21e414046599d35", + "metadataTypeId": 53, + "typeArguments": [ + "49f761c61dce644e212b8182e30557d35b6b4ad46693140be677eee0d6ef2733" + ] + }, + { + "type": "struct data_structures::StructG", + "concreteTypeId": "dfd8875bb49716b14dd336285ba667f953ed9aec4e918c0d7a2eb19ff644d60e", + "metadataTypeId": 54 + }, + { + "type": "struct data_structures::StructGenericWithEnum", + "concreteTypeId": "8986b78b19c146ced98454ffbe32d17f1e9e468128ba8dcb2a32f16aaf208db2", + "metadataTypeId": 55, + "typeArguments": [ + "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + ] + }, + { + "type": "struct data_structures::StructSimple", + "concreteTypeId": "ef937135956e37401e0bc90406ca8becda92d1b4e387fe938ddef8d27ee192a1", + "metadataTypeId": 56 + }, + { + "type": "struct data_structures::StructSingleGeneric<(bool, u64)>", + "concreteTypeId": "fc0793960700fbabd2722134cff2a546743fc832b98d89aac1ec30fc669fd698", + "metadataTypeId": 57, + "typeArguments": [ + "c998ca9a5f221fe7b5c66ae70c8a9562b86d964408b00d17f883c906bc1fe4be" + ] + }, + { + "type": "struct data_structures::StructSingleGeneric", + "concreteTypeId": "7cbc352969caf2e9caa716d89c3be65e707447e2a197c779cc4ef382d0602de6", + "metadataTypeId": 57, + "typeArguments": [ + "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + ] + }, + { + "type": "struct data_structures::StructWithEnumArray", + "concreteTypeId": "d5266ee32061dbfec8c96f2ba8a054243875e4e6a586104d6366b11e3bc86f2e", + "metadataTypeId": 58 + }, + { + "type": "struct data_structures::StructWithGenericArray", + "concreteTypeId": "29843de0bbb48b2d3c601b61823f2e106cfa5833e18b482571f1fa58b507a7ad", + "metadataTypeId": 59, + "typeArguments": [ + "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + ] + }, + { + "type": "struct data_structures::StructWithImplicitGenerics", + "concreteTypeId": "549c0f0c43c9e33f7e958e0473d84e78eca4737f9f159c64614ca5dff2d91b60", + "metadataTypeId": 60, + "typeArguments": [ + "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b", + "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + ] + }, + { + "type": "struct data_structures::StructWithMultiOption", + "concreteTypeId": "aa87500bb34c8bb09ffd60ab55cb1725898c366c58d3ff3aaaf8c9b532934fd1", + "metadataTypeId": 61 + }, + { + "type": "struct data_structures::StructWithNestedArray", + "concreteTypeId": "e7807205e98b513a8beeb5bcf446f0b2d684d0dce6bfeff0f324fa31df1b8948", + "metadataTypeId": 62 + }, + { + "type": "struct data_structures::StructWithNestedStruct", + "concreteTypeId": "8651356d9584265a78cb58de01c22d405dfc7006ea2f5f74fddcbe3f047f109a", + "metadataTypeId": 63 + }, + { + "type": "struct data_structures::StructWithNestedTuple", + "concreteTypeId": "d042dca573565aa653542415397934b3e95452917664e04d27c32a22091aa9a5", + "metadataTypeId": 64 + }, + { + "type": "struct data_structures::StructWithSingleOption", + "concreteTypeId": "089f2c4466ef415255917812d05776ebcb386be53e5f94bdad1ca8095f02845c", + "metadataTypeId": 65 + }, + { + "type": "struct data_structures::StructWithVector", + "concreteTypeId": "eac45984af86a06e11e1c5ff744bc1242e004db8404308cb7e574b4c2afaf621", + "metadataTypeId": 66 + }, + { + "type": "struct std::address::Address", + "concreteTypeId": "f597b637c3b0f588fb8d7086c6f4735caa3122b85f0423b82e489f9bb58e2308", + "metadataTypeId": 67 + }, + { + "type": "struct std::asset_id::AssetId", + "concreteTypeId": "c0710b6731b1dd59799cf6bef33eee3b3b04a2e40e80a0724090215bbf2ca974", + "metadataTypeId": 68 + }, + { + "type": "struct std::b512::B512", + "concreteTypeId": "745e252e80bec590efc3999ae943f07ccea4d5b45b00bb6575499b64abdd3322", + "metadataTypeId": 69 + }, + { + "type": "struct std::bytes::Bytes", + "concreteTypeId": "cdd87b7d12fe505416570c294c884bca819364863efe3bf539245fa18515fbbb", + "metadataTypeId": 70 + }, + { + "type": "struct std::contract_id::ContractId", + "concreteTypeId": "29c10735d33b5159f0c71ee1dbd17b36a3e69e41f00fab0d42e1bd9f428d8a54", + "metadataTypeId": 72 + }, + { + "type": "struct std::string::String", + "concreteTypeId": "9a7f1d3e963c10e0a4ea70a8e20a4813d1dc5682e28f74cb102ae50d32f7f98c", + "metadataTypeId": 73 + }, + { + "type": "struct std::vec::Vec", + "concreteTypeId": "6b97d5d738359413c9fac402aced252c23902c28382469ffe27f07381e9f6f31", + "metadataTypeId": 75, + "typeArguments": [ + "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + ] + }, + { + "type": "struct std::vec::Vec", + "concreteTypeId": "49f761c61dce644e212b8182e30557d35b6b4ad46693140be677eee0d6ef2733", + "metadataTypeId": 75, + "typeArguments": [ + "dfd8875bb49716b14dd336285ba667f953ed9aec4e918c0d7a2eb19ff644d60e" + ] + }, + { + "type": "struct std::vec::Vec", + "concreteTypeId": "9168b00268bbefd158090041178f058b032504f76c4b9644157d5d6b5b183468", + "metadataTypeId": 75, + "typeArguments": [ + "ef937135956e37401e0bc90406ca8becda92d1b4e387fe938ddef8d27ee192a1" + ] + }, + { + "type": "struct std::vec::Vec", + "concreteTypeId": "c0de252b9f65a31c6d03071b4b18a935c88c5bb0b2401a447fd30d342fd5a04d", + "metadataTypeId": 75, + "typeArguments": [ + "aa87500bb34c8bb09ffd60ab55cb1725898c366c58d3ff3aaaf8c9b532934fd1" + ] + }, + { + "type": "struct std::vec::Vec>", + "concreteTypeId": "e06c82714c52b8afd2293d5d37d05783d09d71c956311c6050ac012cab06364e", + "metadataTypeId": 75, + "typeArguments": [ + "13c38f4111bad6468fad4f8ea82fd744546b63be49db9439fb3d94e14ae2bb3a" + ] + }, + { + "type": "struct std::vec::Vec", + "concreteTypeId": "13c38f4111bad6468fad4f8ea82fd744546b63be49db9439fb3d94e14ae2bb3a", + "metadataTypeId": 75, + "typeArguments": [ + "d7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc" + ] + }, + { + "type": "struct std::vec::Vec", + "concreteTypeId": "d5bfe1d4e1ace20166c9b50cadd47e862020561bde24f5189cfc2723f5ed76f4", + "metadataTypeId": 75, + "typeArguments": [ + "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + ] + }, + { + "type": "struct std::vec::Vec", + "concreteTypeId": "27a0fb3d3a821e04e7a3f17ab6a617f0eb10f11e6eeb0f2c0ff9e6237207319e", + "metadataTypeId": 75, + "typeArguments": [ + "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + ] + }, + { + "type": "struct std::vm::evm::evm_address::EvmAddress", + "concreteTypeId": "05a44d8c3e00faf7ed545823b7a2b32723545d8715d87a0ab3cf65904948e8d2", + "metadataTypeId": 76 + }, + { + "type": "u16", + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + }, + { + "type": "u256", + "concreteTypeId": "1b5759d94094368cfd443019e7ca5ec4074300e544e5ea993a979f5da627261e" + }, + { + "type": "u32", + "concreteTypeId": "d7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc" + }, + { + "type": "u64", + "concreteTypeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + }, + { + "type": "u8", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ], + "metadataTypes": [ + { + "type": "(_, _)", + "metadataTypeId": 0, + "components": [ + { + "name": "__tuple_element", + "typeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + }, + { + "name": "__tuple_element", + "typeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + ] + }, + { + "type": "(_, _)", + "metadataTypeId": 1, + "components": [ + { + "name": "__tuple_element", + "typeId": "84877f6e98274b9e4721db68b4c0bdb9e52b8e9572c5bd7811c07a41ced882c7" + }, + { + "name": "__tuple_element", + "typeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + ] + }, + { + "type": "(_, _)", + "metadataTypeId": 2, + "components": [ + { + "name": "__tuple_element", + "typeId": "84877f6e98274b9e4721db68b4c0bdb9e52b8e9572c5bd7811c07a41ced882c7" + }, + { + "name": "__tuple_element", + "typeId": "84877f6e98274b9e4721db68b4c0bdb9e52b8e9572c5bd7811c07a41ced882c7" + } + ] + }, + { + "type": "(_, _)", + "metadataTypeId": 3, + "components": [ + { + "name": "__tuple_element", + "typeId": 56 + }, + { + "name": "__tuple_element", + "typeId": 75, + "typeArguments": [ + { + "name": "", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ] + } + ] + }, + { + "type": "(_, _)", + "metadataTypeId": 4, + "components": [ + { + "name": "__tuple_element", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + }, + { + "name": "__tuple_element", + "typeId": 56 + } + ] + }, + { + "type": "(_, _)", + "metadataTypeId": 5, + "components": [ + { + "name": "__tuple_element", + "typeId": 75, + "typeArguments": [ + { + "name": "", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ] + }, + { + "name": "__tuple_element", + "typeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + } + ] + }, + { + "type": "(_, _)", + "metadataTypeId": 6, + "components": [ + { + "name": "__tuple_element", + "typeId": 75, + "typeArguments": [ + { + "name": "", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ] + }, + { + "name": "__tuple_element", + "typeId": 75, + "typeArguments": [ + { + "name": "", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ] + } + ] + }, + { + "type": "(_, _)", + "metadataTypeId": 7, + "components": [ + { + "name": "__tuple_element", + "typeId": 34 + }, + { + "name": "__tuple_element", + "typeId": 35 + } + ] + }, + { + "type": "(_, _)", + "metadataTypeId": 8, + "components": [ + { + "name": "__tuple_element", + "typeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + }, + { + "name": "__tuple_element", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ] + }, + { + "type": "(_, _, _)", + "metadataTypeId": 9, + "components": [ + { + "name": "__tuple_element", + "typeId": "d7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc" + }, + { + "name": "__tuple_element", + "typeId": 75, + "typeArguments": [ + { + "name": "", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ] + }, + { + "name": "__tuple_element", + "typeId": 75, + "typeArguments": [ + { + "name": "", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ] + } + ] + }, + { + "type": "(_, _, _)", + "metadataTypeId": 10, + "components": [ + { + "name": "__tuple_element", + "typeId": 68 + }, + { + "name": "__tuple_element", + "typeId": 68 + }, + { + "name": "__tuple_element", + "typeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + ] + }, + { + "type": "(_, _, _)", + "metadataTypeId": 11, + "components": [ + { + "name": "__tuple_element", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + }, + { + "name": "__tuple_element", + "typeId": 57, + "typeArguments": [ + { + "name": "", + "typeId": 57, + "typeArguments": [ + { + "name": "", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ] + } + ] + }, + { + "name": "__tuple_element", + "typeId": 44 + } + ] + }, + { + "type": "(_, _, _)", + "metadataTypeId": 12, + "components": [ + { + "name": "__tuple_element", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + }, + { + "name": "__tuple_element", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + }, + { + "name": "__tuple_element", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ] + }, + { + "type": "(_, _, _, _)", + "metadataTypeId": 13, + "components": [ + { + "name": "__tuple_element", + "typeId": 51, + "typeArguments": [ + { + "name": "", + "typeId": 17 + }, + { + "name": "", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ] + }, + { + "name": "__tuple_element", + "typeId": 22 + }, + { + "name": "__tuple_element", + "typeId": 1 + }, + { + "name": "__tuple_element", + "typeId": 56 + } + ] + }, + { + "type": "[_; 1]", + "metadataTypeId": 14, + "components": [ + { + "name": "__array_element", + "typeId": 75, + "typeArguments": [ + { + "name": "", + "typeId": "d7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc" + } + ] + } + ] + }, + { + "type": "[_; 2]", + "metadataTypeId": 15, + "components": [ + { + "name": "__array_element", + "typeId": 51, + "typeArguments": [ + { + "name": "", + "typeId": 57, + "typeArguments": [ + { + "name": "", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ] + }, + { + "name": "", + "typeId": 43 + } + ] + } + ] + }, + { + "type": "[_; 2]", + "metadataTypeId": 16, + "components": [ + { + "name": "__array_element", + "typeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + } + ] + }, + { + "type": "[_; 3]", + "metadataTypeId": 17, + "components": [ + { + "name": "__array_element", + "typeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + } + ] + }, + { + "type": "[_; 3]", + "metadataTypeId": 18, + "components": [ + { + "name": "__array_element", + "typeId": 56 + } + ] + }, + { + "type": "[_; 3]", + "metadataTypeId": 19, + "components": [ + { + "name": "__array_element", + "typeId": 51, + "typeArguments": [ + { + "name": "", + "typeId": 36 + }, + { + "name": "", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ] + } + ] + }, + { + "type": "[_; 3]", + "metadataTypeId": 20, + "components": [ + { + "name": "__array_element", + "typeId": 28 + } + ] + }, + { + "type": "[_; 3]", + "metadataTypeId": 21, + "components": [ + { + "name": "__array_element", + "typeId": 34 + } + ] + }, + { + "type": "[_; 4]", + "metadataTypeId": 22, + "components": [ + { + "name": "__array_element", + "typeId": 51, + "typeArguments": [ + { + "name": "", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + }, + { + "name": "", + "typeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + ] + } + ] + }, + { + "type": "[_; 4]", + "metadataTypeId": 23, + "components": [ + { + "name": "__array_element", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ] + }, + { + "type": "[_; 5]", + "metadataTypeId": 24, + "components": [ + { + "name": "__array_element", + "typeId": 32, + "typeArguments": [ + { + "name": "", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ] + } + ] + }, + { + "type": "enum abi-library::ExternalEnum", + "metadataTypeId": 25, + "components": [ + { + "name": "A", + "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d" + }, + { + "name": "B", + "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d" + } + ] + }, + { + "type": "enum data_structures::EnumDoubleGeneric", + "metadataTypeId": 26, + "components": [ + { + "name": "a", + "typeId": 38 + }, + { + "name": "b", + "typeId": 39 + } + ], + "typeParameters": [ + 38, + 39 + ] + }, + { + "type": "enum data_structures::EnumWithBuiltinType", + "metadataTypeId": 27, + "components": [ + { + "name": "a", + "typeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + }, + { + "name": "b", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ] + }, + { + "type": "enum data_structures::EnumWithNative", + "metadataTypeId": 28, + "components": [ + { + "name": "Checked", + "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d" + }, + { + "name": "Pending", + "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d" + } + ] + }, + { + "type": "enum data_structures::EnumWithStructs", + "metadataTypeId": 29, + "components": [ + { + "name": "a", + "typeId": 28 + }, + { + "name": "b", + "typeId": 56 + }, + { + "name": "c", + "typeId": 51, + "typeArguments": [ + { + "name": "", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + }, + { + "name": "", + "typeId": 56 + } + ] + } + ] + }, + { + "type": "enum data_structures::EnumWithVector", + "metadataTypeId": 30, + "components": [ + { + "name": "a", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + }, + { + "name": "b", + "typeId": 75, + "typeArguments": [ + { + "name": "", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ] + } + ] + }, + { + "type": "enum std::identity::Identity", + "metadataTypeId": 31, + "components": [ + { + "name": "Address", + "typeId": 67 + }, + { + "name": "ContractId", + "typeId": 72 + } + ] + }, + { + "type": "enum std::option::Option", + "metadataTypeId": 32, + "components": [ + { + "name": "None", + "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d" + }, + { + "name": "Some", + "typeId": 37 + } + ], + "typeParameters": [ + 37 + ] + }, + { + "type": "enum std::result::Result", + "metadataTypeId": 33, + "components": [ + { + "name": "Ok", + "typeId": 37 + }, + { + "name": "Err", + "typeId": 34 + } + ], + "typeParameters": [ + 37, + 34 + ] + }, + { + "type": "generic E", + "metadataTypeId": 34 + }, + { + "type": "generic F", + "metadataTypeId": 35 + }, + { + "type": "generic K", + "metadataTypeId": 36 + }, + { + "type": "generic T", + "metadataTypeId": 37 + }, + { + "type": "generic T1", + "metadataTypeId": 38 + }, + { + "type": "generic T2", + "metadataTypeId": 39 + }, + { + "type": "generic U", + "metadataTypeId": 40 + }, + { + "type": "generic V", + "metadataTypeId": 41 + }, + { + "type": "raw untyped ptr", + "metadataTypeId": 42 + }, + { + "type": "str[1]", + "metadataTypeId": 43 + }, + { + "type": "str[3]", + "metadataTypeId": 44 + }, + { + "type": "struct abi-library::ExternalStruct", + "metadataTypeId": 45, + "components": [ + { + "name": "value", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ] + }, + { + "type": "struct data_structures::Configurables", + "metadataTypeId": 46, + "components": [ + { + "name": "U8_VALUE", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + }, + { + "name": "BOOL_VALUE", + "typeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + }, + { + "name": "B256_VALUE", + "typeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + }, + { + "name": "OPTION_U8_VALUE", + "typeId": 32, + "typeArguments": [ + { + "name": "", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ] + }, + { + "name": "GENERIC_STRUCT_VALUE", + "typeId": 51, + "typeArguments": [ + { + "name": "", + "typeId": 51, + "typeArguments": [ + { + "name": "", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + }, + { + "name": "", + "typeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + } + ] + }, + { + "name": "", + "typeId": "d7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc" + } + ] + } + ] + }, + { + "type": "struct data_structures::StructA", + "metadataTypeId": 47, + "components": [ + { + "name": "propA1", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ] + }, + { + "type": "struct data_structures::StructB", + "metadataTypeId": 48, + "components": [ + { + "name": "propB1", + "typeId": 47 + }, + { + "name": "propB2", + "typeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + } + ] + }, + { + "type": "struct data_structures::StructC", + "metadataTypeId": 49, + "components": [ + { + "name": "propC1", + "typeId": 47 + }, + { + "name": "propC2", + "typeId": 75, + "typeArguments": [ + { + "name": "", + "typeId": 48 + } + ] + }, + { + "name": "propC3", + "typeId": 50, + "typeArguments": [ + { + "name": "", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + }, + { + "name": "", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + }, + { + "name": "", + "typeId": 53, + "typeArguments": [ + { + "name": "", + "typeId": 43 + } + ] + } + ] + } + ] + }, + { + "type": "struct data_structures::StructD", + "metadataTypeId": 50, + "components": [ + { + "name": "propD1", + "typeId": 75, + "typeArguments": [ + { + "name": "", + "typeId": 52, + "typeArguments": [ + { + "name": "", + "typeId": 37 + } + ] + } + ] + }, + { + "name": "propD2", + "typeId": 40 + }, + { + "name": "propD3", + "typeId": 41 + } + ], + "typeParameters": [ + 37, + 40, + 41 + ] + }, + { + "type": "struct data_structures::StructDoubleGeneric", + "metadataTypeId": 51, + "components": [ + { + "name": "a", + "typeId": 38 + }, + { + "name": "b", + "typeId": 39 + } + ], + "typeParameters": [ + 38, + 39 + ] + }, + { + "type": "struct data_structures::StructE", + "metadataTypeId": 52, + "components": [ + { + "name": "propE1", + "typeId": 47 + }, + { + "name": "propE2", + "typeId": 48 + }, + { + "name": "propE3", + "typeId": 37 + } + ], + "typeParameters": [ + 37 + ] + }, + { + "type": "struct data_structures::StructF", + "metadataTypeId": 53, + "components": [ + { + "name": "propF1", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + }, + { + "name": "propF2", + "typeId": 37 + } + ], + "typeParameters": [ + 37 + ] + }, + { + "type": "struct data_structures::StructG", + "metadataTypeId": 54, + "components": [ + { + "name": "propG1", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ] + }, + { + "type": "struct data_structures::StructGenericWithEnum", + "metadataTypeId": 55, + "components": [ + { + "name": "a", + "typeId": 38 + }, + { + "name": "b", + "typeId": 26, + "typeArguments": [ + { + "name": "", + "typeId": 38 + }, + { + "name": "", + "typeId": 39 + } + ] + } + ], + "typeParameters": [ + 38, + 39 + ] + }, + { + "type": "struct data_structures::StructSimple", + "metadataTypeId": 56, + "components": [ + { + "name": "a", + "typeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + }, + { + "name": "b", + "typeId": "d7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc" + } + ] + }, + { + "type": "struct data_structures::StructSingleGeneric", + "metadataTypeId": 57, + "components": [ + { + "name": "a", + "typeId": 37 + } + ], + "typeParameters": [ + 37 + ] + }, + { + "type": "struct data_structures::StructWithEnumArray", + "metadataTypeId": 58, + "components": [ + { + "name": "a", + "typeId": 20 + } + ] + }, + { + "type": "struct data_structures::StructWithGenericArray", + "metadataTypeId": 59, + "components": [ + { + "name": "a", + "typeId": 19 + } + ], + "typeParameters": [ + 36 + ] + }, + { + "type": "struct data_structures::StructWithImplicitGenerics", + "metadataTypeId": 60, + "components": [ + { + "name": "a", + "typeId": 21 + }, + { + "name": "b", + "typeId": 7 + } + ], + "typeParameters": [ + 34, + 35 + ] + }, + { + "type": "struct data_structures::StructWithMultiOption", + "metadataTypeId": 61, + "components": [ + { + "name": "a", + "typeId": 24 + } + ] + }, + { + "type": "struct data_structures::StructWithNestedArray", + "metadataTypeId": 62, + "components": [ + { + "name": "a", + "typeId": 15 + } + ] + }, + { + "type": "struct data_structures::StructWithNestedStruct", + "metadataTypeId": 63, + "components": [ + { + "name": "a", + "typeId": 51, + "typeArguments": [ + { + "name": "", + "typeId": 57, + "typeArguments": [ + { + "name": "", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ] + }, + { + "name": "", + "typeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + } + ] + } + ] + }, + { + "type": "struct data_structures::StructWithNestedTuple", + "metadataTypeId": 64, + "components": [ + { + "name": "a", + "typeId": 11 + } + ] + }, + { + "type": "struct data_structures::StructWithSingleOption", + "metadataTypeId": 65, + "components": [ + { + "name": "a", + "typeId": 32, + "typeArguments": [ + { + "name": "", + "typeId": 61 + } + ] + } + ] + }, + { + "type": "struct data_structures::StructWithVector", + "metadataTypeId": 66, + "components": [ + { + "name": "a", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + }, + { + "name": "b", + "typeId": 75, + "typeArguments": [ + { + "name": "", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ] + } + ] + }, + { + "type": "struct std::address::Address", + "metadataTypeId": 67, + "components": [ + { + "name": "bits", + "typeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + } + ] + }, + { + "type": "struct std::asset_id::AssetId", + "metadataTypeId": 68, + "components": [ + { + "name": "bits", + "typeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + } + ] + }, + { + "type": "struct std::b512::B512", + "metadataTypeId": 69, + "components": [ + { + "name": "bits", + "typeId": 16 + } + ] + }, + { + "type": "struct std::bytes::Bytes", + "metadataTypeId": 70, + "components": [ + { + "name": "buf", + "typeId": 71 + }, + { + "name": "len", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ] + }, + { + "type": "struct std::bytes::RawBytes", + "metadataTypeId": 71, + "components": [ + { + "name": "ptr", + "typeId": 42 + }, + { + "name": "cap", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ] + }, + { + "type": "struct std::contract_id::ContractId", + "metadataTypeId": 72, + "components": [ + { + "name": "bits", + "typeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + } + ] + }, + { + "type": "struct std::string::String", + "metadataTypeId": 73, + "components": [ + { + "name": "bytes", + "typeId": 70 + } + ] + }, + { + "type": "struct std::vec::RawVec", + "metadataTypeId": 74, + "components": [ + { + "name": "ptr", + "typeId": 42 + }, + { + "name": "cap", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ], + "typeParameters": [ + 37 + ] + }, + { + "type": "struct std::vec::Vec", + "metadataTypeId": 75, + "components": [ + { + "name": "buf", + "typeId": 74, + "typeArguments": [ + { + "name": "", + "typeId": 37 + } + ] + }, + { + "name": "len", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ], + "typeParameters": [ + 37 + ] + }, + { + "type": "struct std::vm::evm::evm_address::EvmAddress", + "metadataTypeId": 76, + "components": [ + { + "name": "bits", + "typeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + } + ] + } + ], + "functions": [ + { + "inputs": [], + "name": "configurables", + "output": "69d4f1cc5ce793681d98a55ab013f42ab56260131d39af6c1e71a5f3531557bc", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + }, + { + "name": "y", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + ], + "name": "multi_arg_b256_bool", + "output": "d5f6ab61fc224aae1bf15a89ab88840ed54e312a76a9735d1f60d4d0d1fae640", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "7bdc2c1e9c4b8576fdf5be24c5c6569cba3a8feaba3755ed2b95d646a33c73e2" + }, + { + "name": "y", + "concreteTypeId": "b22807669faa58263e636f6e2d194df8ddbc6686bb4ea14ee28005fa30adbe85" + }, + { + "name": "z", + "concreteTypeId": "a1e229302ed2f092752a6bc4fbe66bb9305e0802b1b01ecc5e1d59356702e956" + }, + { + "name": "a", + "concreteTypeId": "ef937135956e37401e0bc90406ca8becda92d1b4e387fe938ddef8d27ee192a1" + } + ], + "name": "multi_arg_complex", + "output": "343f07ddcd75b9385bc193e0419f2e89c75fad67cbf4ad1b36a01a136620817e", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "84877f6e98274b9e4721db68b4c0bdb9e52b8e9572c5bd7811c07a41ced882c7" + }, + { + "name": "y", + "concreteTypeId": "84877f6e98274b9e4721db68b4c0bdb9e52b8e9572c5bd7811c07a41ced882c7" + } + ], + "name": "multi_arg_str_str", + "output": "30022fd7ad3fda4035d30e4d86b705d4870924d4b4fe054624d2561fa12bb33e", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "ef937135956e37401e0bc90406ca8becda92d1b4e387fe938ddef8d27ee192a1" + }, + { + "name": "y", + "concreteTypeId": "27a0fb3d3a821e04e7a3f17ab6a617f0eb10f11e6eeb0f2c0ff9e6237207319e" + } + ], + "name": "multi_arg_struct_vector", + "output": "5ebb7c8cdd38d1f676f9c7089a2da12b27114ee3771c2047f3295d4d30f8fd2c", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "d7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc" + }, + { + "name": "y", + "concreteTypeId": "d5bfe1d4e1ace20166c9b50cadd47e862020561bde24f5189cfc2723f5ed76f4" + }, + { + "name": "z", + "concreteTypeId": "d5bfe1d4e1ace20166c9b50cadd47e862020561bde24f5189cfc2723f5ed76f4" + } + ], + "name": "multi_arg_u32_vector_vector", + "output": "18034e13b18b71de3c7e12f8f10a7bd48a23870e0dbb46eaf10faeb26d70f000", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + }, + { + "name": "y", + "concreteTypeId": "ef937135956e37401e0bc90406ca8becda92d1b4e387fe938ddef8d27ee192a1" + } + ], + "name": "multi_arg_u64_struct", + "output": "0088c28967dbcdaa34626c7e915e44b2afe72f12415f0e31edc0b5ce70e7c6dc", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + }, + { + "name": "y", + "concreteTypeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ], + "name": "multi_arg_u64_u64", + "output": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "27a0fb3d3a821e04e7a3f17ab6a617f0eb10f11e6eeb0f2c0ff9e6237207319e" + }, + { + "name": "y", + "concreteTypeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + } + ], + "name": "multi_arg_vector_b256", + "output": "52e2726988c7da304606fbe4ed696efac04beb29e9a22e15778f8a0539c9cb94", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "27a0fb3d3a821e04e7a3f17ab6a617f0eb10f11e6eeb0f2c0ff9e6237207319e" + }, + { + "name": "y", + "concreteTypeId": "27a0fb3d3a821e04e7a3f17ab6a617f0eb10f11e6eeb0f2c0ff9e6237207319e" + } + ], + "name": "multi_arg_vector_vector", + "output": "87a4626758542d7b6a03099839e440a052a4d5a00e3abfdf22bcc564ca19a4fd", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "f597b637c3b0f588fb8d7086c6f4735caa3122b85f0423b82e489f9bb58e2308" + } + ], + "name": "types_address", + "output": "f597b637c3b0f588fb8d7086c6f4735caa3122b85f0423b82e489f9bb58e2308", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "a95e1fcceb1451b8a76471f593f66c4a52ca04bde3c227c746ad7aaf988de5c6" + } + ], + "name": "types_alias_tuple_with_native_types", + "output": "a95e1fcceb1451b8a76471f593f66c4a52ca04bde3c227c746ad7aaf988de5c6", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "f28afa065fc5de602456160c4155d4de7d9a61e85a995d209a14eab0b34bd6b4" + } + ], + "name": "types_array", + "output": "f28afa065fc5de602456160c4155d4de7d9a61e85a995d209a14eab0b34bd6b4", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "38f2594527b516dab2c81b31356901226242d7c32554877e36797c6b23969237" + } + ], + "name": "types_array_struct", + "output": "38f2594527b516dab2c81b31356901226242d7c32554877e36797c6b23969237", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "b8164e36cce9d14142824b5cc55aebc1272036775b966af82c49c78aff114006" + } + ], + "name": "types_array_with_generic_struct", + "output": "b8164e36cce9d14142824b5cc55aebc1272036775b966af82c49c78aff114006", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "593b39347cc381516d8ed1f8e5e628a8d455bd3f833bd9dfdd5165ba16f9f980" + } + ], + "name": "types_array_with_vector", + "output": "593b39347cc381516d8ed1f8e5e628a8d455bd3f833bd9dfdd5165ba16f9f980", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "c0710b6731b1dd59799cf6bef33eee3b3b04a2e40e80a0724090215bbf2ca974" + } + ], + "name": "types_asset_id", + "output": "c0710b6731b1dd59799cf6bef33eee3b3b04a2e40e80a0724090215bbf2ca974", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + } + ], + "name": "types_b256", + "output": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "745e252e80bec590efc3999ae943f07ccea4d5b45b00bb6575499b64abdd3322" + } + ], + "name": "types_b512", + "output": "745e252e80bec590efc3999ae943f07ccea4d5b45b00bb6575499b64abdd3322", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + } + ], + "name": "types_bool", + "output": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "cdd87b7d12fe505416570c294c884bca819364863efe3bf539245fa18515fbbb" + } + ], + "name": "types_bytes", + "output": "cdd87b7d12fe505416570c294c884bca819364863efe3bf539245fa18515fbbb", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "29c10735d33b5159f0c71ee1dbd17b36a3e69e41f00fab0d42e1bd9f428d8a54" + } + ], + "name": "types_contract_id", + "output": "29c10735d33b5159f0c71ee1dbd17b36a3e69e41f00fab0d42e1bd9f428d8a54", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "58ae0e9c51da476db1149dd48b1cda83a12187df4c049f8df5021f0b1696fb93" + } + ], + "name": "types_enum", + "output": "58ae0e9c51da476db1149dd48b1cda83a12187df4c049f8df5021f0b1696fb93", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "9a24373d8ce7688609717fd5a9b75360cd8a6bdb224ae095f0c05cc891cadd42" + } + ], + "name": "types_enum_external", + "output": "9a24373d8ce7688609717fd5a9b75360cd8a6bdb224ae095f0c05cc891cadd42", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "2136f16aedeec1ab7f1d912c57cc0566e86c36f20a2cb313e3d679cead6a0e61" + } + ], + "name": "types_enum_with_builtin_type", + "output": "2136f16aedeec1ab7f1d912c57cc0566e86c36f20a2cb313e3d679cead6a0e61", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "9ed6dede3ae1e66e0f951e860e863f77fb9b9499f4666a1123bf244c4a201669" + } + ], + "name": "types_enum_with_structs", + "output": "9ed6dede3ae1e66e0f951e860e863f77fb9b9499f4666a1123bf244c4a201669", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "0272d5aecccd33822994b7be1494b72ec9ad860e4cb51f043deda7ac1e2cae26" + } + ], + "name": "types_enum_with_vector", + "output": "0272d5aecccd33822994b7be1494b72ec9ad860e4cb51f043deda7ac1e2cae26", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "05a44d8c3e00faf7ed545823b7a2b32723545d8715d87a0ab3cf65904948e8d2" + } + ], + "name": "types_evm_address", + "output": "05a44d8c3e00faf7ed545823b7a2b32723545d8715d87a0ab3cf65904948e8d2", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "d0ed93cd57cc3dfb1c119b22bf63f5d215122402536127bf17087ca6d8186307" + } + ], + "name": "types_generic_enum", + "output": "d0ed93cd57cc3dfb1c119b22bf63f5d215122402536127bf17087ca6d8186307", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "ab7cd04e05be58e3fc15d424c2c4a57f824a2a2d97d67252440a3925ebdc1335" + } + ], + "name": "types_identity_address", + "output": "ab7cd04e05be58e3fc15d424c2c4a57f824a2a2d97d67252440a3925ebdc1335", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "ab7cd04e05be58e3fc15d424c2c4a57f824a2a2d97d67252440a3925ebdc1335" + } + ], + "name": "types_identity_contract_id", + "output": "ab7cd04e05be58e3fc15d424c2c4a57f824a2a2d97d67252440a3925ebdc1335", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "2da102c46c7263beeed95818cd7bee801716ba8303dddafdcd0f6c9efda4a0f1" + } + ], + "name": "types_option", + "output": "2da102c46c7263beeed95818cd7bee801716ba8303dddafdcd0f6c9efda4a0f1", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "25616ce23be3ca41fd26f8c546c053ec256f8fb5593036f60c9c417e86dcc92e" + } + ], + "name": "types_option_struct", + "output": "25616ce23be3ca41fd26f8c546c053ec256f8fb5593036f60c9c417e86dcc92e", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "1e1c7c52c1c7a9901681337f8669555f62aac58911332c9ff6b4ea8e73786570" + } + ], + "name": "types_raw_slice", + "output": "1e1c7c52c1c7a9901681337f8669555f62aac58911332c9ff6b4ea8e73786570", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "b3131b4c08c16cfa55b3150d587c3afa3e4cdebe0399f3f599fa160baaa64e0c" + } + ], + "name": "types_result", + "output": "9891b1ee451eed790368ea3969e3c8f550efa87de489b5d7b933e2290800791b", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "9a7f1d3e963c10e0a4ea70a8e20a4813d1dc5682e28f74cb102ae50d32f7f98c" + } + ], + "name": "types_std_string", + "output": "9a7f1d3e963c10e0a4ea70a8e20a4813d1dc5682e28f74cb102ae50d32f7f98c", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "84877f6e98274b9e4721db68b4c0bdb9e52b8e9572c5bd7811c07a41ced882c7" + } + ], + "name": "types_str", + "output": "84877f6e98274b9e4721db68b4c0bdb9e52b8e9572c5bd7811c07a41ced882c7", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "8c25cb3686462e9a86d2883c5688a22fe738b0bbc85f458d2d2b5f3f667c6d5a" + } + ], + "name": "types_str_slice", + "output": "8c25cb3686462e9a86d2883c5688a22fe738b0bbc85f458d2d2b5f3f667c6d5a", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "8986b78b19c146ced98454ffbe32d17f1e9e468128ba8dcb2a32f16aaf208db2" + } + ], + "name": "types_struct_double_generic", + "output": "8986b78b19c146ced98454ffbe32d17f1e9e468128ba8dcb2a32f16aaf208db2", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "c3a770db33c4e755ad3ba4586b9c10520511fb80b767feb57dd41da1a88f6978" + } + ], + "name": "types_struct_external", + "output": "c3a770db33c4e755ad3ba4586b9c10520511fb80b767feb57dd41da1a88f6978", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "7cbc352969caf2e9caa716d89c3be65e707447e2a197c779cc4ef382d0602de6" + } + ], + "name": "types_struct_generic", + "output": "7cbc352969caf2e9caa716d89c3be65e707447e2a197c779cc4ef382d0602de6", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "ef937135956e37401e0bc90406ca8becda92d1b4e387fe938ddef8d27ee192a1" + } + ], + "name": "types_struct_simple", + "output": "ef937135956e37401e0bc90406ca8becda92d1b4e387fe938ddef8d27ee192a1", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "29843de0bbb48b2d3c601b61823f2e106cfa5833e18b482571f1fa58b507a7ad" + } + ], + "name": "types_struct_with_array", + "output": "29843de0bbb48b2d3c601b61823f2e106cfa5833e18b482571f1fa58b507a7ad", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "d5266ee32061dbfec8c96f2ba8a054243875e4e6a586104d6366b11e3bc86f2e" + } + ], + "name": "types_struct_with_array_of_enums", + "output": "d5266ee32061dbfec8c96f2ba8a054243875e4e6a586104d6366b11e3bc86f2e", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "d0494e36b8daeafdf02dfbd1f65f82c66df872fb235c7fd2707fcd4147c6c292" + } + ], + "name": "types_struct_with_complex_nested_struct", + "output": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "549c0f0c43c9e33f7e958e0473d84e78eca4737f9f159c64614ca5dff2d91b60" + } + ], + "name": "types_struct_with_implicit_generics", + "output": "549c0f0c43c9e33f7e958e0473d84e78eca4737f9f159c64614ca5dff2d91b60", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "db8b04f624965fbfd7eb7dc3fc3c6a54a71d0019b37d4011a9350d1870136c9d" + }, + { + "name": "y", + "concreteTypeId": "9f074fde9cb9194b90bd208c8c95e709bfb1a5c736b063302e5639ce4daad5aa" + }, + { + "name": "z", + "concreteTypeId": "f219acbc9e3b812457419966b5454d10d51594afecacb87fb7745c9311b90012" + } + ], + "name": "types_struct_with_multiple_struct_params", + "output": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "e7807205e98b513a8beeb5bcf446f0b2d684d0dce6bfeff0f324fa31df1b8948" + } + ], + "name": "types_struct_with_nested_array", + "output": "e7807205e98b513a8beeb5bcf446f0b2d684d0dce6bfeff0f324fa31df1b8948", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "8651356d9584265a78cb58de01c22d405dfc7006ea2f5f74fddcbe3f047f109a" + } + ], + "name": "types_struct_with_nested_struct", + "output": "8651356d9584265a78cb58de01c22d405dfc7006ea2f5f74fddcbe3f047f109a", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "d042dca573565aa653542415397934b3e95452917664e04d27c32a22091aa9a5" + } + ], + "name": "types_struct_with_nested_tuple", + "output": "d042dca573565aa653542415397934b3e95452917664e04d27c32a22091aa9a5", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "089f2c4466ef415255917812d05776ebcb386be53e5f94bdad1ca8095f02845c" + } + ], + "name": "types_struct_with_single_option", + "output": "089f2c4466ef415255917812d05776ebcb386be53e5f94bdad1ca8095f02845c", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "fc0793960700fbabd2722134cff2a546743fc832b98d89aac1ec30fc669fd698" + } + ], + "name": "types_struct_with_tuple", + "output": "fc0793960700fbabd2722134cff2a546743fc832b98d89aac1ec30fc669fd698", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "eac45984af86a06e11e1c5ff744bc1242e004db8404308cb7e574b4c2afaf621" + } + ], + "name": "types_struct_with_vector", + "output": "eac45984af86a06e11e1c5ff744bc1242e004db8404308cb7e574b4c2afaf621", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "79239b6d6f2383e2cfbaf4da7fdf7ee7fb59b7bf517acfff2d9433e9e76e8fc4" + } + ], + "name": "types_tuple", + "output": "79239b6d6f2383e2cfbaf4da7fdf7ee7fb59b7bf517acfff2d9433e9e76e8fc4", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "6f875be99a39d9920569678a34ffce676a6c3e14b958910db250b9cb4957157f" + } + ], + "name": "types_tuple_complex", + "output": "6f875be99a39d9920569678a34ffce676a6c3e14b958910db250b9cb4957157f", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "a95e1fcceb1451b8a76471f593f66c4a52ca04bde3c227c746ad7aaf988de5c6" + } + ], + "name": "types_tuple_with_native_types", + "output": "a95e1fcceb1451b8a76471f593f66c4a52ca04bde3c227c746ad7aaf988de5c6", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + } + ], + "name": "types_u16", + "output": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "1b5759d94094368cfd443019e7ca5ec4074300e544e5ea993a979f5da627261e" + } + ], + "name": "types_u256", + "output": "1b5759d94094368cfd443019e7ca5ec4074300e544e5ea993a979f5da627261e", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "d7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc" + } + ], + "name": "types_u32", + "output": "d7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ], + "name": "types_u64", + "output": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ], + "name": "types_u8", + "output": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + }, + { + "name": "y", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + }, + { + "name": "z", + "concreteTypeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d" + }, + { + "name": "a", + "concreteTypeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d" + } + ], + "name": "types_value_then_value_then_void_then_void", + "output": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + }, + { + "name": "y", + "concreteTypeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d" + } + ], + "name": "types_value_then_void", + "output": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + }, + { + "name": "y", + "concreteTypeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d" + }, + { + "name": "z", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ], + "name": "types_value_then_void_then_value", + "output": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "6b97d5d738359413c9fac402aced252c23902c28382469ffe27f07381e9f6f31" + } + ], + "name": "types_vector_boolean", + "output": "6b97d5d738359413c9fac402aced252c23902c28382469ffe27f07381e9f6f31", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "e06c82714c52b8afd2293d5d37d05783d09d71c956311c6050ac012cab06364e" + } + ], + "name": "types_vector_inside_vector", + "output": "e06c82714c52b8afd2293d5d37d05783d09d71c956311c6050ac012cab06364e", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "c0de252b9f65a31c6d03071b4b18a935c88c5bb0b2401a447fd30d342fd5a04d" + } + ], + "name": "types_vector_option", + "output": "c0de252b9f65a31c6d03071b4b18a935c88c5bb0b2401a447fd30d342fd5a04d", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "27a0fb3d3a821e04e7a3f17ab6a617f0eb10f11e6eeb0f2c0ff9e6237207319e" + } + ], + "name": "types_vector_u8", + "output": "27a0fb3d3a821e04e7a3f17ab6a617f0eb10f11e6eeb0f2c0ff9e6237207319e", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "9168b00268bbefd158090041178f058b032504f76c4b9644157d5d6b5b183468" + } + ], + "name": "types_vector_with_struct", + "output": "9168b00268bbefd158090041178f058b032504f76c4b9644157d5d6b5b183468", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d" + } + ], + "name": "types_void", + "output": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d", + "attributes": null + }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d" + }, + { + "name": "y", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ], + "name": "types_void_then_value", + "output": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d", + "attributes": null + } + ], + "loggedTypes": [ + { + "logId": "8961848586872524460", + "concreteTypeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + }, + { + "logId": "13213829929622723620", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + }, + { + "logId": "15417698811679754926", + "concreteTypeId": "d5f6ab61fc224aae1bf15a89ab88840ed54e312a76a9735d1f60d4d0d1fae640" + }, + { + "logId": "3764736462721235256", + "concreteTypeId": "343f07ddcd75b9385bc193e0419f2e89c75fad67cbf4ad1b36a01a136620817e" + }, + { + "logId": "10098701174489624218", + "concreteTypeId": "8c25cb3686462e9a86d2883c5688a22fe738b0bbc85f458d2d2b5f3f667c6d5a" + }, + { + "logId": "3459380067145079360", + "concreteTypeId": "30022fd7ad3fda4035d30e4d86b705d4870924d4b4fe054624d2561fa12bb33e" + }, + { + "logId": "6826186604658872822", + "concreteTypeId": "5ebb7c8cdd38d1f676f9c7089a2da12b27114ee3771c2047f3295d4d30f8fd2c" + }, + { + "logId": "1730312528330453470", + "concreteTypeId": "18034e13b18b71de3c7e12f8f10a7bd48a23870e0dbb46eaf10faeb26d70f000" + }, + { + "logId": "38494492241415594", + "concreteTypeId": "0088c28967dbcdaa34626c7e915e44b2afe72f12415f0e31edc0b5ce70e7c6dc" + }, + { + "logId": "1515152261580153489", + "concreteTypeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + }, + { + "logId": "5972461853438630448", + "concreteTypeId": "52e2726988c7da304606fbe4ed696efac04beb29e9a22e15778f8a0539c9cb94" + }, + { + "logId": "9774045287303884155", + "concreteTypeId": "87a4626758542d7b6a03099839e440a052a4d5a00e3abfdf22bcc564ca19a4fd" + }, + { + "logId": "17696813611398264200", + "concreteTypeId": "f597b637c3b0f588fb8d7086c6f4735caa3122b85f0423b82e489f9bb58e2308" + }, + { + "logId": "12204227005198389688", + "concreteTypeId": "a95e1fcceb1451b8a76471f593f66c4a52ca04bde3c227c746ad7aaf988de5c6" + }, + { + "logId": "17477056209248181856", + "concreteTypeId": "f28afa065fc5de602456160c4155d4de7d9a61e85a995d209a14eab0b34bd6b4" + }, + { + "logId": "4103440364041737946", + "concreteTypeId": "38f2594527b516dab2c81b31356901226242d7c32554877e36797c6b23969237" + }, + { + "logId": "13264875749739450689", + "concreteTypeId": "b8164e36cce9d14142824b5cc55aebc1272036775b966af82c49c78aff114006" + }, + { + "logId": "6429795790595785041", + "concreteTypeId": "593b39347cc381516d8ed1f8e5e628a8d455bd3f833bd9dfdd5165ba16f9f980" + }, + { + "logId": "13866877265493744985", + "concreteTypeId": "c0710b6731b1dd59799cf6bef33eee3b3b04a2e40e80a0724090215bbf2ca974" + }, + { + "logId": "8385180437869151632", + "concreteTypeId": "745e252e80bec590efc3999ae943f07ccea4d5b45b00bb6575499b64abdd3322" + }, + { + "logId": "14832741149864513620", + "concreteTypeId": "cdd87b7d12fe505416570c294c884bca819364863efe3bf539245fa18515fbbb" + }, + { + "logId": "3008693953818743129", + "concreteTypeId": "29c10735d33b5159f0c71ee1dbd17b36a3e69e41f00fab0d42e1bd9f428d8a54" + }, + { + "logId": "6390060985836259181", + "concreteTypeId": "58ae0e9c51da476db1149dd48b1cda83a12187df4c049f8df5021f0b1696fb93" + }, + { + "logId": "11107063318498994310", + "concreteTypeId": "9a24373d8ce7688609717fd5a9b75360cd8a6bdb224ae095f0c05cc891cadd42" + }, + { + "logId": "2393365693554672043", + "concreteTypeId": "2136f16aedeec1ab7f1d912c57cc0566e86c36f20a2cb313e3d679cead6a0e61" + }, + { + "logId": "11445580549060683374", + "concreteTypeId": "9ed6dede3ae1e66e0f951e860e863f77fb9b9499f4666a1123bf244c4a201669" + }, + { + "logId": "176438282157896578", + "concreteTypeId": "0272d5aecccd33822994b7be1494b72ec9ad860e4cb51f043deda7ac1e2cae26" + }, + { + "logId": "406535131101199095", + "concreteTypeId": "05a44d8c3e00faf7ed545823b7a2b32723545d8715d87a0ab3cf65904948e8d2" + }, + { + "logId": "15054851639520017915", + "concreteTypeId": "d0ed93cd57cc3dfb1c119b22bf63f5d215122402536127bf17087ca6d8186307" + }, + { + "logId": "12356980511120185571", + "concreteTypeId": "ab7cd04e05be58e3fc15d424c2c4a57f824a2a2d97d67252440a3925ebdc1335" + }, + { + "logId": "3287912245613454270", + "concreteTypeId": "2da102c46c7263beeed95818cd7bee801716ba8303dddafdcd0f6c9efda4a0f1" + }, + { + "logId": "2693553771067460161", + "concreteTypeId": "25616ce23be3ca41fd26f8c546c053ec256f8fb5593036f60c9c417e86dcc92e" + }, + { + "logId": "2169745815365986704", + "concreteTypeId": "1e1c7c52c1c7a9901681337f8669555f62aac58911332c9ff6b4ea8e73786570" + }, + { + "logId": "11132648958528852192", + "concreteTypeId": "9a7f1d3e963c10e0a4ea70a8e20a4813d1dc5682e28f74cb102ae50d32f7f98c" + }, + { + "logId": "9549741647838268318", + "concreteTypeId": "84877f6e98274b9e4721db68b4c0bdb9e52b8e9572c5bd7811c07a41ced882c7" + }, + { + "logId": "9909809838135789262", + "concreteTypeId": "8986b78b19c146ced98454ffbe32d17f1e9e468128ba8dcb2a32f16aaf208db2" + }, + { + "logId": "14098361245275318101", + "concreteTypeId": "c3a770db33c4e755ad3ba4586b9c10520511fb80b767feb57dd41da1a88f6978" + }, + { + "logId": "8988117408309506793", + "concreteTypeId": "7cbc352969caf2e9caa716d89c3be65e707447e2a197c779cc4ef382d0602de6" + }, + { + "logId": "17263266271595476800", + "concreteTypeId": "ef937135956e37401e0bc90406ca8becda92d1b4e387fe938ddef8d27ee192a1" + }, + { + "logId": "2991584087911992109", + "concreteTypeId": "29843de0bbb48b2d3c601b61823f2e106cfa5833e18b482571f1fa58b507a7ad" + }, + { + "logId": "15359085500973571070", + "concreteTypeId": "d5266ee32061dbfec8c96f2ba8a054243875e4e6a586104d6366b11e3bc86f2e" + }, + { + "logId": "6096764540904137535", + "concreteTypeId": "549c0f0c43c9e33f7e958e0473d84e78eca4737f9f159c64614ca5dff2d91b60" + }, + { + "logId": "16681458389498941754", + "concreteTypeId": "e7807205e98b513a8beeb5bcf446f0b2d684d0dce6bfeff0f324fa31df1b8948" + }, + { + "logId": "9678575818972079706", + "concreteTypeId": "8651356d9584265a78cb58de01c22d405dfc7006ea2f5f74fddcbe3f047f109a" + }, + { + "logId": "15006799511514667686", + "concreteTypeId": "d042dca573565aa653542415397934b3e95452917664e04d27c32a22091aa9a5" + }, + { + "logId": "621263945896771922", + "concreteTypeId": "089f2c4466ef415255917812d05776ebcb386be53e5f94bdad1ca8095f02845c" + }, + { + "logId": "18160646294966696875", + "concreteTypeId": "fc0793960700fbabd2722134cff2a546743fc832b98d89aac1ec30fc669fd698" + }, + { + "logId": "16916744526725816430", + "concreteTypeId": "eac45984af86a06e11e1c5ff744bc1242e004db8404308cb7e574b4c2afaf621" + }, + { + "logId": "8728991397092492258", + "concreteTypeId": "79239b6d6f2383e2cfbaf4da7fdf7ee7fb59b7bf517acfff2d9433e9e76e8fc4" + }, + { + "logId": "8036493118938929554", + "concreteTypeId": "6f875be99a39d9920569678a34ffce676a6c3e14b958910db250b9cb4957157f" + }, + { + "logId": "2992671284987479467", + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + }, + { + "logId": "1970142151624111756", + "concreteTypeId": "1b5759d94094368cfd443019e7ca5ec4074300e544e5ea993a979f5da627261e" + }, + { + "logId": "15520703124961489725", + "concreteTypeId": "d7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc" + }, + { + "logId": "14454674236531057292", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + }, + { + "logId": "7752900403879318547", + "concreteTypeId": "6b97d5d738359413c9fac402aced252c23902c28382469ffe27f07381e9f6f31" + }, + { + "logId": "16171443785104013487", + "concreteTypeId": "e06c82714c52b8afd2293d5d37d05783d09d71c956311c6050ac012cab06364e" + }, + { + "logId": "13897586369399989020", + "concreteTypeId": "c0de252b9f65a31c6d03071b4b18a935c88c5bb0b2401a447fd30d342fd5a04d" + }, + { + "logId": "2855558404146077188", + "concreteTypeId": "27a0fb3d3a821e04e7a3f17ab6a617f0eb10f11e6eeb0f2c0ff9e6237207319e" + }, + { + "logId": "10477818057471029201", + "concreteTypeId": "9168b00268bbefd158090041178f058b032504f76c4b9644157d5d6b5b183468" + }, + { + "logId": "3330666440490685604", + "concreteTypeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d" + } + ], + "messagesTypes": [], + "configurables": [ + { + "name": "U8_VALUE", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "offset": 119320 + }, + { + "name": "BOOL_VALUE", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903", + "offset": 119288 + }, + { + "name": "B256_VALUE", + "concreteTypeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b", + "offset": 119256 + }, + { + "name": "OPTION_U8_VALUE", + "concreteTypeId": "2da102c46c7263beeed95818cd7bee801716ba8303dddafdcd0f6c9efda4a0f1", + "offset": 119304 + }, + { + "name": "GENERIC_STRUCT_VALUE", + "concreteTypeId": "08dbec793087c5686c1a493513b158a999bb653126ee51151dfa85fa683edce5", + "offset": 119296 + } + ] +}; \ No newline at end of file diff --git a/packages/fuel-gauge/src/abi/fixtures/contracts/contract-bytecode.txt b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-bytecode.txt new file mode 100644 index 00000000000..3739f9803fe --- /dev/null +++ b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-bytecode.txt @@ -0,0 +1,14 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.98.0 + Forc version: 0.66.5 +*/ + + +import { decompressBytecode } from "fuels"; + +export const bytecode = decompressBytecode("H4sIAAAAAAAAA9x9eXxV1b3vCUlIQJQDSSCG6TAaEDFKgDCoJ7JjTiAxJ5BAFEJCAYkMikdQrANxQKlDxRmtA1oHqrZGBQVrW3qHV9u+9trevtbeDpfOtpJeK7XX3vZe33f9hn32Xmeffc59995/Hp8Pn5y199rrt4bf+q3fvKrer4lsj0SKIuZfwesH+O933un6+GhB9OOPI/dEIktS71bVRN976Wjyl5FY8lg8EvtodqTzL8cGJf9yrGh7ZP6v8T4p7wvwPuZ/v+AMvO+U9yV4P9F6fzne98j7IXg/33r/K7zf5mm/yf9+4WL0P1J1PIm+vlHZtfiD+6L1kaNVTk8klRiUjDaU91X9Nmr1eeHFVY1v4/3kY9GlB/u6B8qvSzmPHI02HoynmiOl1Q1T9PtElu+X8Pczevn7ipaU88pH3u/dcmJtp6lj2qj6VcxuZ7FpJ7n0jRi+i1Y3leO7R96SdqLcjpQTk99mWEWfTMUjJ+Pvtan4nKPRxQcjVLcedRMPUn/SbT24M91W0dGq38bQh4yx9FUtfjvSdeKD9VctPhrB/N1v5i8N95x3GG7JFwG3DH/fTMXPe9uCu8eCuy8PuJ8QuBsE7gN+uPVxhltaDbgj8Hd6Kn5+rwX3sAXXM3dZ4ToC9xKB+6Af7uIegbtF4G5NxZ0+C+5HfrgPleYBd5rA3ShwH/LDbd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/aVl259c+jCT+9uXZK4/o/fvV3v02Ny8OolNd3MP63v/H+JfBLfINIBAA=="); \ No newline at end of file diff --git a/packages/fuel-gauge/src/abi/fixtures/contracts/contract-factory.txt b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-factory.txt new file mode 100644 index 00000000000..e5137e5143c --- /dev/null +++ b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-factory.txt @@ -0,0 +1,35 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.98.0 + Forc version: 0.66.5 +*/ + + +import { ContractFactory } from 'fuels'; +import type { Account, Provider, DeployContractOptions } from 'fuels'; +import { AbiContract } from './AbiContract'; +import { bytecode } from './AbiContract-bytecode'; +import { abi } from './AbiContract-abi'; +import { storageSlots } from './AbiContract-storage-slots'; + +export class AbiContractFactory extends ContractFactory { + + static readonly bytecode = bytecode; + static readonly storageSlots = storageSlots; + + constructor(accountOrProvider: Account | Provider) { + super(bytecode, abi, accountOrProvider, AbiContractFactory.storageSlots); + } + + static deploy ( + wallet: Account, + options: DeployContractOptions = {} + ) { + const factory = new AbiContractFactory(wallet); + return factory.deploy(options); + } +} diff --git a/packages/fuel-gauge/src/abi/fixtures/contracts/contract-index.txt b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-index.txt new file mode 100644 index 00000000000..efaa702960c --- /dev/null +++ b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-index.txt @@ -0,0 +1,13 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.98.0 + Forc version: 0.66.5 +*/ + + +export { AbiContract } from './AbiContract'; +export { AbiContractFactory } from './AbiContractFactory'; diff --git a/packages/fuel-gauge/src/abi/fixtures/contracts/contract-storage-slots.txt b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-storage-slots.txt new file mode 100644 index 00000000000..c97394029a2 --- /dev/null +++ b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-storage-slots.txt @@ -0,0 +1,14 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.98.0 + Forc version: 0.66.5 +*/ + + +import type { StorageSlot } from 'fuels'; + +export const storageSlots: StorageSlot[] = []; \ No newline at end of file diff --git a/packages/fuel-gauge/src/abi/fixtures/contracts/contract-types.txt b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-types.txt new file mode 100644 index 00000000000..e59afc5265d --- /dev/null +++ b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-types.txt @@ -0,0 +1,373 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.98.0 + Forc version: 0.66.5 +*/ + + +import type { BN, BigNumberish, Bytes, EvmAddress, RawSlice, StdString, StrSlice } from 'fuels'; +import type { ArrayOfLength, Enum, Option, Result } from '../common'; + +export enum EnumWithNative { Checked = 'Checked', Pending = 'Pending' }; +export enum ExternalEnum { A = 'A', B = 'B' }; + +export type AddressInput = { bits: string }; +export type AddressOutput = AddressInput; +export type AssetIdInput = { bits: string }; +export type AssetIdOutput = AssetIdInput; +export type ConfigurablesInput = { U8_VALUE: BigNumberish, BOOL_VALUE: boolean, B256_VALUE: string, OPTION_U8_VALUE: Option, GENERIC_STRUCT_VALUE: StructDoubleGenericInput, BigNumberish> }; +export type ConfigurablesOutput = { U8_VALUE: number, BOOL_VALUE: boolean, B256_VALUE: string, OPTION_U8_VALUE: Option, GENERIC_STRUCT_VALUE: StructDoubleGenericOutput, number> }; +export type ContractIdInput = { bits: string }; +export type ContractIdOutput = ContractIdInput; +export type EnumDoubleGenericInput = Enum<{ a: T1, b: T2 }>; +export type EnumDoubleGenericOutput = EnumDoubleGenericInput; +export type EnumWithBuiltinTypeInput = Enum<{ a: boolean, b: BigNumberish }>; +export type EnumWithBuiltinTypeOutput = Enum<{ a: boolean, b: BN }>; +export type EnumWithStructsInput = Enum<{ a: EnumWithNative, b: StructSimpleInput, c: StructDoubleGenericInput }>; +export type EnumWithStructsOutput = Enum<{ a: EnumWithNative, b: StructSimpleOutput, c: StructDoubleGenericOutput }>; +export type EnumWithVectorInput = Enum<{ a: BigNumberish, b: BigNumberish[] }>; +export type EnumWithVectorOutput = Enum<{ a: number, b: number[] }>; +export type ExternalStructInput = { value: BigNumberish }; +export type ExternalStructOutput = { value: BN }; +export type IdentityInput = Enum<{ Address: AddressInput, ContractId: ContractIdInput }>; +export type IdentityOutput = Enum<{ Address: AddressOutput, ContractId: ContractIdOutput }>; +export type StructAInput = { propA1: BigNumberish }; +export type StructAOutput = { propA1: number }; +export type StructBInput = { propB1: StructAInput, propB2: BigNumberish }; +export type StructBOutput = { propB1: StructAOutput, propB2: number }; +export type StructCInput = { propC1: StructAInput, propC2: StructBInput[], propC3: StructDInput> }; +export type StructCOutput = { propC1: StructAOutput, propC2: StructBOutput[], propC3: StructDOutput> }; +export type StructDInput = { propD1: StructEInput[], propD2: U, propD3: V }; +export type StructDOutput = { propD1: StructEOutput[], propD2: U, propD3: V }; +export type StructDoubleGenericInput = { a: T1, b: T2 }; +export type StructDoubleGenericOutput = StructDoubleGenericInput; +export type StructEInput = { propE1: StructAInput, propE2: StructBInput, propE3: T }; +export type StructEOutput = { propE1: StructAOutput, propE2: StructBOutput, propE3: T }; +export type StructFInput = { propF1: BigNumberish, propF2: T }; +export type StructFOutput = { propF1: BN, propF2: T }; +export type StructGInput = { propG1: BigNumberish }; +export type StructGOutput = { propG1: number }; +export type StructGenericWithEnumInput = { a: T1, b: EnumDoubleGenericInput }; +export type StructGenericWithEnumOutput = { a: T1, b: EnumDoubleGenericOutput }; +export type StructSimpleInput = { a: boolean, b: BigNumberish }; +export type StructSimpleOutput = { a: boolean, b: number }; +export type StructSingleGenericInput = { a: T }; +export type StructSingleGenericOutput = StructSingleGenericInput; +export type StructWithEnumArrayInput = { a: ArrayOfLength }; +export type StructWithEnumArrayOutput = StructWithEnumArrayInput; +export type StructWithGenericArrayInput = { a: ArrayOfLength, 3> }; +export type StructWithGenericArrayOutput = { a: ArrayOfLength, 3> }; +export type StructWithImplicitGenericsInput = { a: ArrayOfLength, b: [E, F] }; +export type StructWithImplicitGenericsOutput = StructWithImplicitGenericsInput; +export type StructWithMultiOptionInput = { a: ArrayOfLength, 5> }; +export type StructWithMultiOptionOutput = { a: ArrayOfLength, 5> }; +export type StructWithNestedArrayInput = { a: ArrayOfLength, string>, 2> }; +export type StructWithNestedArrayOutput = { a: ArrayOfLength, string>, 2> }; +export type StructWithNestedStructInput = { a: StructDoubleGenericInput, BigNumberish> }; +export type StructWithNestedStructOutput = { a: StructDoubleGenericOutput, number> }; +export type StructWithNestedTupleInput = { a: [BigNumberish, StructSingleGenericInput>, string] }; +export type StructWithNestedTupleOutput = { a: [number, StructSingleGenericOutput>, string] }; +export type StructWithSingleOptionInput = { a: Option }; +export type StructWithSingleOptionOutput = { a: Option }; +export type StructWithVectorInput = { a: BigNumberish, b: BigNumberish[] }; +export type StructWithVectorOutput = { a: number, b: number[] }; + +export interface AbiContractTypes { + functions: { + configurables: { + inputs: []; + output: ConfigurablesOutput; + }; + multi_arg_b256_bool: { + inputs: [x: string, y: boolean]; + output: [string, boolean]; + }; + multi_arg_complex: { + inputs: [x: StructDoubleGenericInput, BigNumberish>, y: ArrayOfLength, 4>, z: [string, boolean], a: StructSimpleInput]; + output: [StructDoubleGenericOutput, number>, ArrayOfLength, 4>, [string, boolean], StructSimpleOutput]; + }; + multi_arg_str_str: { + inputs: [x: string, y: string]; + output: [string, string]; + }; + multi_arg_struct_vector: { + inputs: [x: StructSimpleInput, y: BigNumberish[]]; + output: [StructSimpleOutput, number[]]; + }; + multi_arg_u32_vector_vector: { + inputs: [x: BigNumberish, y: BigNumberish[], z: BigNumberish[]]; + output: [number, BN[], BN[]]; + }; + multi_arg_u64_struct: { + inputs: [x: BigNumberish, y: StructSimpleInput]; + output: [BN, StructSimpleOutput]; + }; + multi_arg_u64_u64: { + inputs: [x: BigNumberish, y: BigNumberish]; + output: BN; + }; + multi_arg_vector_b256: { + inputs: [x: BigNumberish[], y: string]; + output: [number[], string]; + }; + multi_arg_vector_vector: { + inputs: [x: BigNumberish[], y: BigNumberish[]]; + output: [number[], number[]]; + }; + types_address: { + inputs: [x: AddressInput]; + output: AddressOutput; + }; + types_alias_tuple_with_native_types: { + inputs: [x: [AssetIdInput, AssetIdInput, boolean]]; + output: [AssetIdOutput, AssetIdOutput, boolean]; + }; + types_array: { + inputs: [x: ArrayOfLength]; + output: ArrayOfLength; + }; + types_array_struct: { + inputs: [x: ArrayOfLength]; + output: ArrayOfLength; + }; + types_array_with_generic_struct: { + inputs: [x: ArrayOfLength, string>, 2>]; + output: ArrayOfLength, string>, 2>; + }; + types_array_with_vector: { + inputs: [x: ArrayOfLength]; + output: ArrayOfLength; + }; + types_asset_id: { + inputs: [x: AssetIdInput]; + output: AssetIdOutput; + }; + types_b256: { + inputs: [x: string]; + output: string; + }; + types_b512: { + inputs: [x: string]; + output: string; + }; + types_bool: { + inputs: [x: boolean]; + output: boolean; + }; + types_bytes: { + inputs: [x: Bytes]; + output: Bytes; + }; + types_contract_id: { + inputs: [x: ContractIdInput]; + output: ContractIdOutput; + }; + types_enum: { + inputs: [x: EnumWithNative]; + output: EnumWithNative; + }; + types_enum_external: { + inputs: [x: ExternalEnum]; + output: ExternalEnum; + }; + types_enum_with_builtin_type: { + inputs: [x: EnumWithBuiltinTypeInput]; + output: EnumWithBuiltinTypeOutput; + }; + types_enum_with_structs: { + inputs: [x: EnumWithStructsInput]; + output: EnumWithStructsOutput; + }; + types_enum_with_vector: { + inputs: [x: EnumWithVectorInput]; + output: EnumWithVectorOutput; + }; + types_evm_address: { + inputs: [x: EvmAddress]; + output: EvmAddress; + }; + types_generic_enum: { + inputs: [x: EnumDoubleGenericInput]; + output: EnumDoubleGenericOutput; + }; + types_identity_address: { + inputs: [x: IdentityInput]; + output: IdentityOutput; + }; + types_identity_contract_id: { + inputs: [x: IdentityInput]; + output: IdentityOutput; + }; + types_option: { + inputs: [x?: Option]; + output: Option; + }; + types_option_struct: { + inputs: [x?: Option]; + output: Option; + }; + types_raw_slice: { + inputs: [x: RawSlice]; + output: RawSlice; + }; + types_result: { + inputs: [x: Result]; + output: Result; + }; + types_std_string: { + inputs: [x: StdString]; + output: StdString; + }; + types_str: { + inputs: [x: string]; + output: string; + }; + types_str_slice: { + inputs: [x: StrSlice]; + output: StrSlice; + }; + types_struct_double_generic: { + inputs: [x: StructGenericWithEnumInput]; + output: StructGenericWithEnumOutput; + }; + types_struct_external: { + inputs: [x: ExternalStructInput]; + output: ExternalStructOutput; + }; + types_struct_generic: { + inputs: [x: StructSingleGenericInput]; + output: StructSingleGenericOutput; + }; + types_struct_simple: { + inputs: [x: StructSimpleInput]; + output: StructSimpleOutput; + }; + types_struct_with_array: { + inputs: [x: StructWithGenericArrayInput]; + output: StructWithGenericArrayOutput; + }; + types_struct_with_array_of_enums: { + inputs: [x: StructWithEnumArrayInput]; + output: StructWithEnumArrayOutput; + }; + types_struct_with_complex_nested_struct: { + inputs: [x: StructDInput>]; + output: boolean; + }; + types_struct_with_implicit_generics: { + inputs: [x: StructWithImplicitGenericsInput]; + output: StructWithImplicitGenericsOutput; + }; + types_struct_with_multiple_struct_params: { + inputs: [x: StructAInput, y: StructBInput, z: StructCInput]; + output: boolean; + }; + types_struct_with_nested_array: { + inputs: [x: StructWithNestedArrayInput]; + output: StructWithNestedArrayOutput; + }; + types_struct_with_nested_struct: { + inputs: [x: StructWithNestedStructInput]; + output: StructWithNestedStructOutput; + }; + types_struct_with_nested_tuple: { + inputs: [x: StructWithNestedTupleInput]; + output: StructWithNestedTupleOutput; + }; + types_struct_with_single_option: { + inputs: [x: StructWithSingleOptionInput]; + output: StructWithSingleOptionOutput; + }; + types_struct_with_tuple: { + inputs: [x: StructSingleGenericInput<[boolean, BigNumberish]>]; + output: StructSingleGenericOutput<[boolean, BN]>; + }; + types_struct_with_vector: { + inputs: [x: StructWithVectorInput]; + output: StructWithVectorOutput; + }; + types_tuple: { + inputs: [x: [BigNumberish, BigNumberish, BigNumberish]]; + output: [number, number, number]; + }; + types_tuple_complex: { + inputs: [x: [BigNumberish, StructSingleGenericInput>, string]]; + output: [number, StructSingleGenericOutput>, string]; + }; + types_tuple_with_native_types: { + inputs: [x: [AssetIdInput, AssetIdInput, boolean]]; + output: [AssetIdOutput, AssetIdOutput, boolean]; + }; + types_u16: { + inputs: [x: BigNumberish]; + output: number; + }; + types_u256: { + inputs: [x: BigNumberish]; + output: BN; + }; + types_u32: { + inputs: [x: BigNumberish]; + output: number; + }; + types_u64: { + inputs: [x: BigNumberish]; + output: BN; + }; + types_u8: { + inputs: [x: BigNumberish]; + output: number; + }; + types_value_then_value_then_void_then_void: { + inputs: [x: BigNumberish, y: BigNumberish, z?: undefined, a?: undefined]; + output: void; + }; + types_value_then_void: { + inputs: [x: BigNumberish, y?: undefined]; + output: void; + }; + types_value_then_void_then_value: { + inputs: [x: BigNumberish, y: undefined, z: BigNumberish]; + output: void; + }; + types_vector_boolean: { + inputs: [x: boolean[]]; + output: boolean[]; + }; + types_vector_inside_vector: { + inputs: [x: BigNumberish[][]]; + output: number[][]; + }; + types_vector_option: { + inputs: [x: StructWithMultiOptionInput[]]; + output: StructWithMultiOptionOutput[]; + }; + types_vector_u8: { + inputs: [x: BigNumberish[]]; + output: number[]; + }; + types_vector_with_struct: { + inputs: [x: StructSimpleInput[]]; + output: StructSimpleOutput[]; + }; + types_void: { + inputs: [x?: undefined]; + output: void; + }; + types_void_then_value: { + inputs: [x: undefined, y: BigNumberish]; + output: void; + }; + }; + configurables: Partial<{ + U8_VALUE: BigNumberish; + BOOL_VALUE: boolean; + B256_VALUE: string; + OPTION_U8_VALUE: Option; + GENERIC_STRUCT_VALUE: StructDoubleGenericInput, BigNumberish>; + }>; +} \ No newline at end of file diff --git a/packages/fuel-gauge/src/abi/fixtures/contracts/contract.txt b/packages/fuel-gauge/src/abi/fixtures/contracts/contract.txt new file mode 100644 index 00000000000..d3736139668 --- /dev/null +++ b/packages/fuel-gauge/src/abi/fixtures/contracts/contract.txt @@ -0,0 +1,42 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.98.0 + Forc version: 0.66.5 +*/ + + +import { Contract, Interface } from "fuels"; +import type { Address, Account, Provider } from 'fuels'; +import type { AbiContractTypes as Types } from './AbiContractTypes'; +import type { InterfaceFunctionMapper, ProgramFunctionMapper } from '../common'; +import { abi } from './AbiContract-abi'; + +export * from './AbiContractTypes'; + +export type AbiContractConfigurables = Types['configurables']; + +export class AbiContractInterface extends Interface { + declare functions: InterfaceFunctionMapper; + + constructor() { + super(abi); + } +} + +export class AbiContract extends Contract { + declare interface: AbiContractInterface; + declare functions: ProgramFunctionMapper; + + public static readonly abi = abi; + + constructor( + id: string | Address, + accountOrProvider: Account | Provider, + ) { + super(id, abi, accountOrProvider); + } +} \ No newline at end of file diff --git a/packages/fuel-gauge/src/abi/fixtures/index.txt b/packages/fuel-gauge/src/abi/fixtures/index.txt new file mode 100644 index 00000000000..a20ac585213 --- /dev/null +++ b/packages/fuel-gauge/src/abi/fixtures/index.txt @@ -0,0 +1,14 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.98.0 + Forc version: 0.66.5 +*/ + + +export * from './contracts'; +export * from './predicates'; +export * from './scripts'; diff --git a/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-abi.txt b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-abi.txt new file mode 100644 index 00000000000..c9ecda3ce96 --- /dev/null +++ b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-abi.txt @@ -0,0 +1,283 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.98.0 + Forc version: 0.66.5 +*/ + + +export const abi = { + "programType": "predicate", + "specVersion": "1", + "encodingVersion": "1", + "concreteTypes": [ + { + "type": "b256", + "concreteTypeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + }, + { + "type": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + }, + { + "type": "enum MyGenericEnum", + "concreteTypeId": "9d8b215a39e5f5f10fc294290b6ea401edbd53056cfe6e0c9331157abdbc87d0", + "metadataTypeId": 1, + "typeArguments": [ + "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + ] + }, + { + "type": "enum std::option::Option", + "concreteTypeId": "2da102c46c7263beeed95818cd7bee801716ba8303dddafdcd0f6c9efda4a0f1", + "metadataTypeId": 2, + "typeArguments": [ + "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + ] + }, + { + "type": "enum std::result::Result,u64>", + "concreteTypeId": "85dace7aaa469c8bb476be79ddec34883ef101b3cde470636f47e299bfcdc3da", + "metadataTypeId": 3, + "typeArguments": [ + "c397d34a45fb343f8315bb5af5eed88da9f13347c765e2d86089d99dbf952ef2", + "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + ] + }, + { + "type": "str[4]", + "concreteTypeId": "94f0fa95c830be5e4f711963e83259fe7e8bc723278ab6ec34449e791a99b53a" + }, + { + "type": "struct Configurables", + "concreteTypeId": "2770b4001b55ea9452a58b5063175844ad76bfd1bc30288792fe8962ef9d4169", + "metadataTypeId": 7 + }, + { + "type": "struct MyGenericStruct", + "concreteTypeId": "c397d34a45fb343f8315bb5af5eed88da9f13347c765e2d86089d99dbf952ef2", + "metadataTypeId": 8, + "typeArguments": [ + "94f0fa95c830be5e4f711963e83259fe7e8bc723278ab6ec34449e791a99b53a" + ] + }, + { + "type": "struct Validation", + "concreteTypeId": "c7cf8c2be429c961ccb5c32a2951a58f1bb2a4f748ffac2206d4d1761082beaa", + "metadataTypeId": 9 + }, + { + "type": "struct std::vec::Vec", + "concreteTypeId": "9b3ded85b5c6e502acc8b7834d5d6df0460764a7a47837eb2b32d4566c4d477b", + "metadataTypeId": 11, + "typeArguments": [ + "c7cf8c2be429c961ccb5c32a2951a58f1bb2a4f748ffac2206d4d1761082beaa" + ] + }, + { + "type": "u16", + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + }, + { + "type": "u64", + "concreteTypeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + }, + { + "type": "u8", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ], + "metadataTypes": [ + { + "type": "()", + "metadataTypeId": 0 + }, + { + "type": "enum MyGenericEnum", + "metadataTypeId": 1, + "components": [ + { + "name": "a", + "typeId": 5 + } + ], + "typeParameters": [ + 5 + ] + }, + { + "type": "enum std::option::Option", + "metadataTypeId": 2, + "components": [ + { + "name": "None", + "typeId": 0 + }, + { + "name": "Some", + "typeId": 5 + } + ], + "typeParameters": [ + 5 + ] + }, + { + "type": "enum std::result::Result", + "metadataTypeId": 3, + "components": [ + { + "name": "Ok", + "typeId": 5 + }, + { + "name": "Err", + "typeId": 4 + } + ], + "typeParameters": [ + 5, + 4 + ] + }, + { + "type": "generic E", + "metadataTypeId": 4 + }, + { + "type": "generic T", + "metadataTypeId": 5 + }, + { + "type": "raw untyped ptr", + "metadataTypeId": 6 + }, + { + "type": "struct Configurables", + "metadataTypeId": 7, + "components": [ + { + "name": "U8_VALUE", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + }, + { + "name": "B256_VALUE", + "typeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + } + ] + }, + { + "type": "struct MyGenericStruct", + "metadataTypeId": 8, + "components": [ + { + "name": "a", + "typeId": 5 + } + ], + "typeParameters": [ + 5 + ] + }, + { + "type": "struct Validation", + "metadataTypeId": 9, + "components": [ + { + "name": "has_account", + "typeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + }, + { + "name": "total_complete", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ] + }, + { + "type": "struct std::vec::RawVec", + "metadataTypeId": 10, + "components": [ + { + "name": "ptr", + "typeId": 6 + }, + { + "name": "cap", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ], + "typeParameters": [ + 5 + ] + }, + { + "type": "struct std::vec::Vec", + "metadataTypeId": 11, + "components": [ + { + "name": "buf", + "typeId": 10, + "typeArguments": [ + { + "name": "", + "typeId": 5 + } + ] + }, + { + "name": "len", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ], + "typeParameters": [ + 5 + ] + } + ], + "functions": [ + { + "inputs": [ + { + "name": "configurables", + "concreteTypeId": "2770b4001b55ea9452a58b5063175844ad76bfd1bc30288792fe8962ef9d4169" + }, + { + "name": "vec", + "concreteTypeId": "9b3ded85b5c6e502acc8b7834d5d6df0460764a7a47837eb2b32d4566c4d477b" + }, + { + "name": "enm", + "concreteTypeId": "9d8b215a39e5f5f10fc294290b6ea401edbd53056cfe6e0c9331157abdbc87d0" + }, + { + "name": "opt", + "concreteTypeId": "2da102c46c7263beeed95818cd7bee801716ba8303dddafdcd0f6c9efda4a0f1" + }, + { + "name": "res", + "concreteTypeId": "85dace7aaa469c8bb476be79ddec34883ef101b3cde470636f47e299bfcdc3da" + } + ], + "name": "main", + "output": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903", + "attributes": null + } + ], + "loggedTypes": [], + "messagesTypes": [], + "configurables": [ + { + "name": "U8_VALUE", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "offset": 1936 + }, + { + "name": "B256_VALUE", + "concreteTypeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b", + "offset": 1904 + } + ] +}; \ No newline at end of file diff --git a/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-index.txt b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-index.txt new file mode 100644 index 00000000000..c3352040e5a --- /dev/null +++ b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-index.txt @@ -0,0 +1,12 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.98.0 + Forc version: 0.66.5 +*/ + + +export { AbiPredicate } from './AbiPredicate'; diff --git a/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-types.txt b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-types.txt new file mode 100644 index 00000000000..4c8c57d7ecd --- /dev/null +++ b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-types.txt @@ -0,0 +1,32 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.98.0 + Forc version: 0.66.5 +*/ + + +import type { BN, BigNumberish } from 'fuels'; +import type { Enum, Option, Result } from '../common'; + + +export type ConfigurablesInput = { U8_VALUE: BigNumberish, B256_VALUE: string }; +export type ConfigurablesOutput = { U8_VALUE: number, B256_VALUE: string }; +export type MyGenericEnumInput = Enum<{ a: T }>; +export type MyGenericEnumOutput = MyGenericEnumInput; +export type MyGenericStructInput = { a: T }; +export type MyGenericStructOutput = MyGenericStructInput; +export type ValidationInput = { has_account: boolean, total_complete: BigNumberish }; +export type ValidationOutput = { has_account: boolean, total_complete: BN }; + +export interface AbiPredicateTypes { + inputs: [configurables: ConfigurablesInput, vec: ValidationInput[], enm: MyGenericEnumInput, opt: Option, res: Result, BigNumberish>]; + output: boolean; + configurables: Partial<{ + U8_VALUE: BigNumberish; + B256_VALUE: string; + }>; +} \ No newline at end of file diff --git a/packages/fuel-gauge/src/abi/fixtures/predicates/predicate.txt b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate.txt new file mode 100644 index 00000000000..4f6d898662e --- /dev/null +++ b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate.txt @@ -0,0 +1,42 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.98.0 + Forc version: 0.66.5 +*/ + + +import { Predicate } from 'fuels'; +import type { PredicateParams } from 'fuels'; +import { abi } from './AbiPredicate-abi'; +import { bytecode } from './AbiPredicate-bytecode'; +import type { AbiPredicateTypes as Types } from './AbiPredicateTypes'; + +export * from './AbiPredicateTypes'; + +export type AbiPredicateInputs = Types['inputs']; +export type AbiPredicateOutput = Types['output']; +export type AbiPredicateConfigurables = Types['configurables']; + +export type AbiPredicateParameters = Omit< + PredicateParams< + Types['inputs'], + Types['configurables'] + >, + 'abi' | 'bytecode' +>; + +export class AbiPredicate extends Predicate< + Types['inputs'], + Types['configurables'] +> { + public static readonly abi = abi; + public static readonly bytecode = bytecode; + + constructor(params: AbiPredicateParameters) { + super({ abi, bytecode, ...params }); + } +} \ No newline at end of file diff --git a/packages/fuel-gauge/src/abi/fixtures/scripts/script-abi.txt b/packages/fuel-gauge/src/abi/fixtures/scripts/script-abi.txt new file mode 100644 index 00000000000..713d91f674f --- /dev/null +++ b/packages/fuel-gauge/src/abi/fixtures/scripts/script-abi.txt @@ -0,0 +1,283 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.98.0 + Forc version: 0.66.5 +*/ + + +export const abi = { + "programType": "script", + "specVersion": "1", + "encodingVersion": "1", + "concreteTypes": [ + { + "type": "b256", + "concreteTypeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + }, + { + "type": "bool", + "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + }, + { + "type": "enum MyGenericEnum", + "concreteTypeId": "9d8b215a39e5f5f10fc294290b6ea401edbd53056cfe6e0c9331157abdbc87d0", + "metadataTypeId": 1, + "typeArguments": [ + "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + ] + }, + { + "type": "enum std::option::Option", + "concreteTypeId": "2da102c46c7263beeed95818cd7bee801716ba8303dddafdcd0f6c9efda4a0f1", + "metadataTypeId": 2, + "typeArguments": [ + "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + ] + }, + { + "type": "enum std::result::Result,u64>", + "concreteTypeId": "85dace7aaa469c8bb476be79ddec34883ef101b3cde470636f47e299bfcdc3da", + "metadataTypeId": 3, + "typeArguments": [ + "c397d34a45fb343f8315bb5af5eed88da9f13347c765e2d86089d99dbf952ef2", + "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + ] + }, + { + "type": "str[4]", + "concreteTypeId": "94f0fa95c830be5e4f711963e83259fe7e8bc723278ab6ec34449e791a99b53a" + }, + { + "type": "struct Configurables", + "concreteTypeId": "2770b4001b55ea9452a58b5063175844ad76bfd1bc30288792fe8962ef9d4169", + "metadataTypeId": 7 + }, + { + "type": "struct MyGenericStruct", + "concreteTypeId": "c397d34a45fb343f8315bb5af5eed88da9f13347c765e2d86089d99dbf952ef2", + "metadataTypeId": 8, + "typeArguments": [ + "94f0fa95c830be5e4f711963e83259fe7e8bc723278ab6ec34449e791a99b53a" + ] + }, + { + "type": "struct Validation", + "concreteTypeId": "c7cf8c2be429c961ccb5c32a2951a58f1bb2a4f748ffac2206d4d1761082beaa", + "metadataTypeId": 9 + }, + { + "type": "struct std::vec::Vec", + "concreteTypeId": "9b3ded85b5c6e502acc8b7834d5d6df0460764a7a47837eb2b32d4566c4d477b", + "metadataTypeId": 11, + "typeArguments": [ + "c7cf8c2be429c961ccb5c32a2951a58f1bb2a4f748ffac2206d4d1761082beaa" + ] + }, + { + "type": "u16", + "concreteTypeId": "29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef" + }, + { + "type": "u64", + "concreteTypeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + }, + { + "type": "u8", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + } + ], + "metadataTypes": [ + { + "type": "()", + "metadataTypeId": 0 + }, + { + "type": "enum MyGenericEnum", + "metadataTypeId": 1, + "components": [ + { + "name": "a", + "typeId": 5 + } + ], + "typeParameters": [ + 5 + ] + }, + { + "type": "enum std::option::Option", + "metadataTypeId": 2, + "components": [ + { + "name": "None", + "typeId": 0 + }, + { + "name": "Some", + "typeId": 5 + } + ], + "typeParameters": [ + 5 + ] + }, + { + "type": "enum std::result::Result", + "metadataTypeId": 3, + "components": [ + { + "name": "Ok", + "typeId": 5 + }, + { + "name": "Err", + "typeId": 4 + } + ], + "typeParameters": [ + 5, + 4 + ] + }, + { + "type": "generic E", + "metadataTypeId": 4 + }, + { + "type": "generic T", + "metadataTypeId": 5 + }, + { + "type": "raw untyped ptr", + "metadataTypeId": 6 + }, + { + "type": "struct Configurables", + "metadataTypeId": 7, + "components": [ + { + "name": "U8_VALUE", + "typeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b" + }, + { + "name": "B256_VALUE", + "typeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b" + } + ] + }, + { + "type": "struct MyGenericStruct", + "metadataTypeId": 8, + "components": [ + { + "name": "a", + "typeId": 5 + } + ], + "typeParameters": [ + 5 + ] + }, + { + "type": "struct Validation", + "metadataTypeId": 9, + "components": [ + { + "name": "has_account", + "typeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903" + }, + { + "name": "total_complete", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ] + }, + { + "type": "struct std::vec::RawVec", + "metadataTypeId": 10, + "components": [ + { + "name": "ptr", + "typeId": 6 + }, + { + "name": "cap", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ], + "typeParameters": [ + 5 + ] + }, + { + "type": "struct std::vec::Vec", + "metadataTypeId": 11, + "components": [ + { + "name": "buf", + "typeId": 10, + "typeArguments": [ + { + "name": "", + "typeId": 5 + } + ] + }, + { + "name": "len", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ], + "typeParameters": [ + 5 + ] + } + ], + "functions": [ + { + "inputs": [ + { + "name": "configurables", + "concreteTypeId": "2770b4001b55ea9452a58b5063175844ad76bfd1bc30288792fe8962ef9d4169" + }, + { + "name": "vec", + "concreteTypeId": "9b3ded85b5c6e502acc8b7834d5d6df0460764a7a47837eb2b32d4566c4d477b" + }, + { + "name": "enm", + "concreteTypeId": "9d8b215a39e5f5f10fc294290b6ea401edbd53056cfe6e0c9331157abdbc87d0" + }, + { + "name": "opt", + "concreteTypeId": "2da102c46c7263beeed95818cd7bee801716ba8303dddafdcd0f6c9efda4a0f1" + }, + { + "name": "res", + "concreteTypeId": "85dace7aaa469c8bb476be79ddec34883ef101b3cde470636f47e299bfcdc3da" + } + ], + "name": "main", + "output": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903", + "attributes": null + } + ], + "loggedTypes": [], + "messagesTypes": [], + "configurables": [ + { + "name": "U8_VALUE", + "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", + "offset": 2360 + }, + { + "name": "B256_VALUE", + "concreteTypeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b", + "offset": 2328 + } + ] +}; \ No newline at end of file diff --git a/packages/fuel-gauge/src/abi/fixtures/scripts/script-index.txt b/packages/fuel-gauge/src/abi/fixtures/scripts/script-index.txt new file mode 100644 index 00000000000..39aff230e0b --- /dev/null +++ b/packages/fuel-gauge/src/abi/fixtures/scripts/script-index.txt @@ -0,0 +1,12 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.98.0 + Forc version: 0.66.5 +*/ + + +export { AbiScript } from './AbiScript'; diff --git a/packages/fuel-gauge/src/abi/fixtures/scripts/script-types.txt b/packages/fuel-gauge/src/abi/fixtures/scripts/script-types.txt new file mode 100644 index 00000000000..84e911f7f88 --- /dev/null +++ b/packages/fuel-gauge/src/abi/fixtures/scripts/script-types.txt @@ -0,0 +1,32 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.98.0 + Forc version: 0.66.5 +*/ + + +import type { BN, BigNumberish } from 'fuels'; +import type { Enum, Option, Result } from '../common'; + + +export type ConfigurablesInput = { U8_VALUE: BigNumberish, B256_VALUE: string }; +export type ConfigurablesOutput = { U8_VALUE: number, B256_VALUE: string }; +export type MyGenericEnumInput = Enum<{ a: T }>; +export type MyGenericEnumOutput = MyGenericEnumInput; +export type MyGenericStructInput = { a: T }; +export type MyGenericStructOutput = MyGenericStructInput; +export type ValidationInput = { has_account: boolean, total_complete: BigNumberish }; +export type ValidationOutput = { has_account: boolean, total_complete: BN }; + +export interface AbiScriptTypes { + inputs: [configurables: ConfigurablesInput, vec: ValidationInput[], enm: MyGenericEnumInput, opt: Option, res: Result, BigNumberish>]; + output: boolean; + configurables: Partial<{ + U8_VALUE: BigNumberish; + B256_VALUE: string; + }>; +} \ No newline at end of file diff --git a/packages/fuel-gauge/src/abi/fixtures/scripts/script.txt b/packages/fuel-gauge/src/abi/fixtures/scripts/script.txt new file mode 100644 index 00000000000..2eeb2cdaa03 --- /dev/null +++ b/packages/fuel-gauge/src/abi/fixtures/scripts/script.txt @@ -0,0 +1,34 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.98.0 + Forc version: 0.66.5 +*/ + + +import { Script } from 'fuels'; +import type { Account } from 'fuels'; +import { abi } from './AbiScript-abi'; +import { bytecode } from './AbiScript-bytecode'; +import type { AbiScriptTypes as Types } from './AbiScriptTypes'; + +export * from './AbiScriptTypes'; + +export type AbiScriptInputs = Types['inputs']; +export type AbiScriptOutput = Types['output']; +export type AbiScriptConfigurables = Types['configurables']; + +export class AbiScript extends Script< + Types['inputs'], + Types['output'] +> { + public static readonly abi = abi; + public static readonly bytecode = bytecode; + + constructor(wallet: Account) { + super(bytecode, abi, wallet); + } +} \ No newline at end of file diff --git a/packages/fuel-gauge/src/contract-factory.test.ts b/packages/fuel-gauge/src/contract-factory.test.ts index bfd3f176507..b42612b9115 100644 --- a/packages/fuel-gauge/src/contract-factory.test.ts +++ b/packages/fuel-gauge/src/contract-factory.test.ts @@ -135,7 +135,7 @@ describe('Contract Factory', () => { using contract = await launchTestContract({ factory: StorageTestContractFactory, - storageSlots: StorageTestContract.storageSlots, + storageSlots: StorageTestContractFactory.storageSlots, }); const call1 = await contract.functions.return_var1().call(); @@ -203,7 +203,7 @@ describe('Contract Factory', () => { const { waitForResult } = await factory.deploy({ storageSlots: [ - ...StorageTestContract.storageSlots, // initializing from storage_slots.json + ...StorageTestContractFactory.storageSlots, // initializing from storage_slots.json { key: '0000000000000000000000000000000000000000000000000000000000000001', value: b256 }, // Initializing manual value ], }); @@ -510,7 +510,7 @@ describe('Contract Factory', () => { ); const deploy = await factory.deployAsBlobTx({ - storageSlots: StorageTestContract.storageSlots, + storageSlots: StorageTestContractFactory.storageSlots, }); const { contract } = await deploy.waitForResult(); diff --git a/packages/fuel-gauge/src/coverage-contract.test.ts b/packages/fuel-gauge/src/coverage-contract.test.ts index 876c7ca207f..8cd440410f1 100644 --- a/packages/fuel-gauge/src/coverage-contract.test.ts +++ b/packages/fuel-gauge/src/coverage-contract.test.ts @@ -12,9 +12,11 @@ import { import { TestMessage, type LaunchTestNodeOptions } from 'fuels/test-utils'; import { CoverageContractFactory } from '../test/typegen/contracts'; -import type { MixedNativeEnumInput } from '../test/typegen/contracts/CoverageContract'; -import { SmallEnumInput } from '../test/typegen/contracts/Vectors'; -import type { Vec } from '../test/typegen/contracts/common'; +import { + ColorEnum, + type MixedNativeEnumInput, +} from '../test/typegen/contracts/CoverageContractTypes'; +import { SmallEnum } from '../test/typegen/contracts/VectorsTypes'; import { launchTestContract } from './utils'; @@ -26,18 +28,6 @@ const B256 = '0x000000000000000000000000000000000000000000000000000000000000002a const B512 = '0x059bc9c43ea1112f3eb2bd30415de72ed24c1c4416a1316f0f48cc6f958073f42a6d8c12e4829826316d8dcf444498717b5a2fbf27defac367271065f6a1d4a5'; -enum ColorEnumInput { - Red = 'Red', - Green = 'Green', - Blue = 'Blue', -} - -enum ColorEnumOutput { - Red = 'Red', - Green = 'Green', - Blue = 'Blue', -} - enum MixedNativeEnum { Native = 'Native', NotNative = 12, @@ -100,7 +90,7 @@ describe('Coverage Contract', { timeout: 15_000 }, () => { expect(result.value).toStrictEqual(expectedValue); - expectedValue = SmallEnumInput.Empty; + expectedValue = SmallEnum.Empty; call = await contractInstance.functions.get_empty_enum().call(); result = await call.waitForResult(); @@ -321,7 +311,7 @@ describe('Coverage Contract', { timeout: 15_000 }, () => { it('should test enum < 8 byte variable type', async () => { using contractInstance = await setupContract(); - const INPUT = SmallEnumInput.Empty; + const INPUT = SmallEnum.Empty; const { waitForResult } = await contractInstance.functions.echo_enum_small(INPUT).call(); const { value } = await waitForResult(); expect(value).toStrictEqual(INPUT); @@ -713,8 +703,9 @@ describe('Coverage Contract', { timeout: 15_000 }, () => { it('should test native enum [Red->Green]', async () => { using contractInstance = await setupContract(); - const INPUT: ColorEnumInput = ColorEnumInput.Red; - const OUTPUT: ColorEnumOutput = ColorEnumOutput.Green; + const INPUT = ColorEnum.Red; + const OUTPUT = ColorEnum.Green; + const { waitForResult } = await contractInstance.functions.color_enum(INPUT).call(); const { value } = await waitForResult(); @@ -724,8 +715,8 @@ describe('Coverage Contract', { timeout: 15_000 }, () => { it('should test native enum [Green->Blue]', async () => { using contractInstance = await setupContract(); - const INPUT: ColorEnumInput = ColorEnumInput.Green; - const OUTPUT: ColorEnumOutput = ColorEnumOutput.Blue; + const INPUT = ColorEnum.Green; + const OUTPUT = ColorEnum.Blue; const { waitForResult } = await contractInstance.functions.color_enum(INPUT).call(); const { value } = await waitForResult(); @@ -735,8 +726,8 @@ describe('Coverage Contract', { timeout: 15_000 }, () => { it('should test native enum [Blue->Red]', async () => { using contractInstance = await setupContract(); - const INPUT: ColorEnumInput = ColorEnumInput.Blue; - const OUTPUT: ColorEnumOutput = ColorEnumOutput.Red; + const INPUT = ColorEnum.Blue; + const OUTPUT = ColorEnum.Red; const { waitForResult } = await contractInstance.functions.color_enum(INPUT).call(); const { value } = await waitForResult(); @@ -817,10 +808,10 @@ describe('Coverage Contract', { timeout: 15_000 }, () => { expect(isStatusSuccess).toBeTruthy(); }); - it('should support array in vec', async () => { + it('should support vec in array', async () => { using contractInstance = await setupContract(); - const INPUT: [Vec, Vec] = [ + const INPUT: [Array, Array] = [ [0, 1, 2], [0, 1, 2], ]; @@ -864,14 +855,14 @@ describe('Coverage Contract', { timeout: 15_000 }, () => { contractInstance.functions.echo_b256_middle(INPUT_A, INPUT_B, INPUT_C, INPUT_D), contractInstance.functions.echo_u8(13), contractInstance.functions.echo_u8(23), - contractInstance.functions.echo_enum_small(SmallEnumInput.Empty), + contractInstance.functions.echo_enum_small(SmallEnum.Empty), contractInstance.functions.echo_b256_middle(INPUT_B, INPUT_A, INPUT_C, INPUT_D), ]) .call(); const { value: results } = await waitForResult(); - expect(results).toStrictEqual([INPUT_B, 13, 23, SmallEnumInput.Empty, INPUT_A]); + expect(results).toStrictEqual([INPUT_B, 13, 23, SmallEnum.Empty, INPUT_A]); }); it('should handle multiple calls [with vectors + stack data first]', async () => { @@ -886,7 +877,7 @@ describe('Coverage Contract', { timeout: 15_000 }, () => { .multiCall([ contractInstance.functions.echo_u8(1), contractInstance.functions.echo_u8(2), - contractInstance.functions.echo_enum_small(SmallEnumInput.Empty), + contractInstance.functions.echo_enum_small(SmallEnum.Empty), contractInstance.functions.echo_b256_middle(INPUT_A, INPUT_B, INPUT_C, INPUT_D), contractInstance.functions.echo_b256_middle(INPUT_B, INPUT_A, INPUT_C, INPUT_D), ]) @@ -894,7 +885,7 @@ describe('Coverage Contract', { timeout: 15_000 }, () => { const { value: results } = await waitForResult(); - expect(results).toStrictEqual([1, 2, SmallEnumInput.Empty, INPUT_B, INPUT_A]); + expect(results).toStrictEqual([1, 2, SmallEnum.Empty, INPUT_B, INPUT_A]); }); it('should handle an enum from a library', async () => { diff --git a/packages/fuel-gauge/src/min-gas.test.ts b/packages/fuel-gauge/src/min-gas.test.ts index 788244ada8d..19d08ccec08 100644 --- a/packages/fuel-gauge/src/min-gas.test.ts +++ b/packages/fuel-gauge/src/min-gas.test.ts @@ -42,7 +42,7 @@ describe('Minimum gas tests', () => { ); const { transactionRequest: request } = contractFactory.createTransactionRequest({ - storageSlots: CoverageContract.storageSlots, + storageSlots: CoverageContractFactory.storageSlots, }); const resources = await provider.getResourcesToSpend(wallet.address, [ diff --git a/packages/fuel-gauge/src/options.test.ts b/packages/fuel-gauge/src/options.test.ts index 15b1c3be5db..6e7cfd30178 100644 --- a/packages/fuel-gauge/src/options.test.ts +++ b/packages/fuel-gauge/src/options.test.ts @@ -1,9 +1,9 @@ import type { BigNumberish } from 'fuels'; import { launchTestNode } from 'fuels/test-utils'; +import type { Option } from '../test/typegen/common'; import type { DeepStructInput } from '../test/typegen/contracts/Options'; import { OptionsFactory } from '../test/typegen/contracts/OptionsFactory'; -import type { Option } from '../test/typegen/contracts/common'; import { launchTestContract } from './utils'; diff --git a/packages/fuel-gauge/src/recipes.test.ts b/packages/fuel-gauge/src/recipes.test.ts index 6fa4daec1ed..32e5343bb04 100644 --- a/packages/fuel-gauge/src/recipes.test.ts +++ b/packages/fuel-gauge/src/recipes.test.ts @@ -34,13 +34,13 @@ describe('recipes', () => { .proxy_target() .call(); const firstTarget = await waitForFirstTarget(); - expect(firstTarget.value.bits).toEqual(targetAddress); + expect(firstTarget.value?.bits).toEqual(targetAddress); const anotherProxy = new Src14OwnedProxy(proxyAddress, wallet); const { waitForResult: waitForAnotherTarget } = await anotherProxy.functions .proxy_target() .call(); const anotherTarget = await waitForAnotherTarget(); - expect(anotherTarget.value.bits).toEqual(targetAddress); + expect(anotherTarget.value?.bits).toEqual(targetAddress); }); }); diff --git a/packages/fuel-gauge/src/reentrant-contract-calls.test.ts b/packages/fuel-gauge/src/reentrant-contract-calls.test.ts index d7d56989587..914ab20888d 100644 --- a/packages/fuel-gauge/src/reentrant-contract-calls.test.ts +++ b/packages/fuel-gauge/src/reentrant-contract-calls.test.ts @@ -71,7 +71,7 @@ describe('Reentrant Contract Calls', () => { StorageTestContractFactory.bytecode, StorageTestContract.abi, wallet - ).deploy({ storageSlots: StorageTestContract.storageSlots }); + ).deploy({ storageSlots: StorageTestContractFactory.storageSlots }); const { contract: storageContract } = await deploy.waitForResult(); diff --git a/packages/fuel-gauge/src/script-with-configurable.test.ts b/packages/fuel-gauge/src/script-with-configurable.test.ts index 3fdb883659c..c2004172124 100644 --- a/packages/fuel-gauge/src/script-with-configurable.test.ts +++ b/packages/fuel-gauge/src/script-with-configurable.test.ts @@ -36,7 +36,9 @@ describe('Script With Configurable', () => { wallets: [wallet], } = launched; - const configurableConstants: Required = { FEE: 71 }; + const configurableConstants: Required = { + FEE: 71, + }; expect(configurableConstants.FEE).not.toEqual(defaultValues.FEE); @@ -57,7 +59,9 @@ describe('Script With Configurable', () => { wallets: [wallet], } = launched; - const configurableConstants: Required = { FEE: 35 }; + const configurableConstants: Required = { + FEE: 35, + }; const script = new ScriptWithConfigurable(wallet); diff --git a/packages/fuel-gauge/src/script-with-options.test.ts b/packages/fuel-gauge/src/script-with-options.test.ts index e47cd37c08f..ac0143e6734 100644 --- a/packages/fuel-gauge/src/script-with-options.test.ts +++ b/packages/fuel-gauge/src/script-with-options.test.ts @@ -3,7 +3,7 @@ import { bn } from 'fuels'; import { launchTestNode } from 'fuels/test-utils'; import { ScriptWithOptions } from '../test/typegen'; -import type { Option } from '../test/typegen/contracts/common'; +import type { Option } from '../test/typegen/common'; /** * @group node diff --git a/packages/fuel-gauge/src/script-with-vectors.test.ts b/packages/fuel-gauge/src/script-with-vectors.test.ts index 77c4daa804c..a24723eda5b 100644 --- a/packages/fuel-gauge/src/script-with-vectors.test.ts +++ b/packages/fuel-gauge/src/script-with-vectors.test.ts @@ -7,7 +7,7 @@ import { ScriptWithVectorAdvanced, ScriptWithVectorMixed, } from '../test/typegen'; -import { StateErrorInput, UserErrorInput } from '../test/typegen/scripts/ScriptWithVectorAdvanced'; +import { StateError, UserError } from '../test/typegen/scripts/ScriptWithVectorAdvanced'; /** * @group node @@ -144,15 +144,15 @@ describe('Script With Vectors', () => { ]; const errors = [ - { StateError: StateErrorInput.Void }, - { StateError: StateErrorInput.Pending }, - { StateError: StateErrorInput.Completed }, - { UserError: UserErrorInput.InsufficientPermissions }, - { UserError: UserErrorInput.Unauthorized }, - { UserError: UserErrorInput.Unauthorized }, - { UserError: UserErrorInput.Unauthorized }, - { UserError: UserErrorInput.Unauthorized }, - { UserError: UserErrorInput.Unauthorized }, + { StateError: StateError.Void }, + { StateError: StateError.Pending }, + { StateError: StateError.Completed }, + { UserError: UserError.InsufficientPermissions }, + { UserError: UserError.Unauthorized }, + { UserError: UserError.Unauthorized }, + { UserError: UserError.Unauthorized }, + { UserError: UserError.Unauthorized }, + { UserError: UserError.Unauthorized }, ]; const vectorOfStructs = [ diff --git a/packages/fuel-gauge/src/storage-test-contract.test.ts b/packages/fuel-gauge/src/storage-test-contract.test.ts index 64d59f4cafc..300b533f014 100644 --- a/packages/fuel-gauge/src/storage-test-contract.test.ts +++ b/packages/fuel-gauge/src/storage-test-contract.test.ts @@ -15,7 +15,7 @@ describe('StorageTestContract', () => { wallets: [wallet], } = launched; - const { storageSlots } = StorageTestContract; + const { storageSlots } = StorageTestContractFactory; const factory = new ContractFactory( StorageTestContractFactory.bytecode, @@ -96,7 +96,7 @@ describe('StorageTestContract', () => { }); it('should automatically load storage slots', async () => { - const { storageSlots } = StorageTestContract; + const { storageSlots } = StorageTestContractFactory; const expectedStorageSlots = storageSlots.map(({ key, value }) => ({ key: `0x${key}`, value: `0x${value}`, @@ -123,7 +123,7 @@ describe('StorageTestContract', () => { }); it('should allow for overriding storage slots', async () => { - const { storageSlots } = StorageTestContract; + const { storageSlots } = StorageTestContractFactory; expect(storageSlots.length).toBeGreaterThan(2); const modifiedStorageSlots = storageSlots.slice(1).map(({ key }) => ({ @@ -176,7 +176,7 @@ describe('StorageTestContract', () => { }); test('automatically loads storage slots when using deployAsCreateTx', async () => { - const { storageSlots } = StorageTestContract; + const { storageSlots } = StorageTestContractFactory; const expectedStorageSlots = storageSlots.map(({ key, value }) => ({ key: `0x${key}`, value: `0x${value}`, @@ -197,7 +197,7 @@ describe('StorageTestContract', () => { }); test('automatically loads storage slots when using deployAsBlobTx', async () => { - const { storageSlots } = StorageTestContract; + const { storageSlots } = StorageTestContractFactory; const expectedStorageSlots = storageSlots.map(({ key, value }) => ({ key: `0x${key}`, value: `0x${value}`, diff --git a/packages/fuel-gauge/src/str-slice.test.ts b/packages/fuel-gauge/src/str-slice.test.ts index 0d505efd452..4e047260603 100644 --- a/packages/fuel-gauge/src/str-slice.test.ts +++ b/packages/fuel-gauge/src/str-slice.test.ts @@ -2,10 +2,7 @@ import { bn } from 'fuels'; import { launchTestNode } from 'fuels/test-utils'; import { StrSliceContractFactory, ScriptStrSlice } from '../test/typegen'; -import { - PredicateStrSlice, - type PredicateStrSliceInputs, -} from '../test/typegen/predicates/PredicateStrSlice'; +import { PredicateStrSlice } from '../test/typegen/predicates/PredicateStrSlice'; /** * @group node @@ -37,10 +34,9 @@ describe('str slice', () => { provider, } = launched; - const predicateData: PredicateStrSliceInputs = ['predicate-input']; const predicate = new PredicateStrSlice({ provider, - data: predicateData, + data: ['predicate-input'], }); const baseAssetId = await provider.getBaseAssetId(); diff --git a/packages/fuel-gauge/src/vectors.test.ts b/packages/fuel-gauge/src/vectors.test.ts index 9c94d76f40d..c3b1df2f34c 100644 --- a/packages/fuel-gauge/src/vectors.test.ts +++ b/packages/fuel-gauge/src/vectors.test.ts @@ -2,8 +2,7 @@ import { bn, randomBytes, hexlify } from 'fuels'; import type { BigNumberish, BN } from 'fuels'; import { VectorsFactory } from '../test/typegen/contracts'; -import { SmallEnumInput } from '../test/typegen/contracts/CoverageContract'; -import type { Vec } from '../test/typegen/contracts/common'; +import { SmallEnum } from '../test/typegen/contracts/CoverageContract'; import { launchTestContract } from './utils'; @@ -120,7 +119,7 @@ describe('Vector Tests', () => { it('should test (u8, u8) vector input/output', async () => { using contractInstance = await setupContract(); - const INPUT: Vec<[BigNumberish, BigNumberish]> = [ + const INPUT: Array<[BigNumberish, BigNumberish]> = [ [1, 2], [3, 4], [5, 6], @@ -137,7 +136,7 @@ describe('Vector Tests', () => { it('should test (u64, u64) vector input/output', async () => { using contractInstance = await setupContract(); - const INPUT: Vec<[BigNumberish, BigNumberish]> = [ + const INPUT: Array<[BigNumberish, BigNumberish]> = [ [111, 2222], [333, 4445], [5555, 6], @@ -168,7 +167,7 @@ describe('Vector Tests', () => { it('should test [u64; 5] vector input/output', async () => { using contractInstance = await setupContract(); - const INPUT: Vec<[BigNumberish, BigNumberish, BigNumberish, BigNumberish, BigNumberish]> = [ + const INPUT: Array<[BigNumberish, BigNumberish, BigNumberish, BigNumberish, BigNumberish]> = [ [1, 2, 3, 4, 5], [500, 600, 700, 9000, 9999], [11500, 22600, 33700, 55000, 669999], @@ -183,7 +182,7 @@ describe('Vector Tests', () => { it('should test [bool; 2] vector input/output', async () => { using contractInstance = await setupContract(); - const INPUT: Vec<[boolean, boolean]> = [ + const INPUT: Array<[boolean, boolean]> = [ [true, true], [true, false], [false, true], @@ -283,12 +282,12 @@ describe('Vector Tests', () => { it('should test SmallEnum vector input/output', async () => { using contractInstance = await setupContract(); - const INPUT: Vec = [ - SmallEnumInput.Empty, - SmallEnumInput.Empty, - SmallEnumInput.Empty, - SmallEnumInput.Empty, - SmallEnumInput.Empty, + const INPUT: Array = [ + SmallEnum.Empty, + SmallEnum.Empty, + SmallEnum.Empty, + SmallEnum.Empty, + SmallEnum.Empty, ]; const { waitForResult } = await contractInstance.functions @@ -404,7 +403,7 @@ describe('Vector Tests', () => { it('should test Vec and b256 tuple input/output', async () => { using contractInstance = await setupContract(); - const INPUT: [Vec, string] = [[1, 8, 3, 2, 55, 215], hexlify(randomBytes(32))]; + const INPUT: [Array, string] = [[1, 8, 3, 2, 55, 215], hexlify(randomBytes(32))]; const { waitForResult } = await contractInstance.functions .echo_vector_and_b256_tuple(...INPUT) @@ -417,7 +416,7 @@ describe('Vector Tests', () => { it('should test two vectors tuple input/output', async () => { using contractInstance = await setupContract(); - const INPUT: [Vec, Vec] = [ + const INPUT: [Array, Array] = [ [219, 229], [1, 254, 55], ]; @@ -433,7 +432,7 @@ describe('Vector Tests', () => { it('should test u32 and three different vectors tuple input/output', async () => { using contractInstance = await setupContract(); - const INPUT: [BigNumberish, Vec, Vec, Vec] = [ + const INPUT: [BigNumberish, Array, Array, Array] = [ 91000, [true, true, false], [95000, 153333], diff --git a/packages/fuel-gauge/src/void.test.ts b/packages/fuel-gauge/src/void.test.ts index bdd24c8003a..a46105e67ce 100644 --- a/packages/fuel-gauge/src/void.test.ts +++ b/packages/fuel-gauge/src/void.test.ts @@ -1,8 +1,8 @@ import { launchTestNode } from 'fuels/test-utils'; import { VoidFactory } from '../test/typegen'; -import type { NativeEnumInput } from '../test/typegen/contracts/Void'; -import type { Option } from '../test/typegen/contracts/common'; +import type { Option } from '../test/typegen/common'; +import { NativeEnum } from '../test/typegen/contracts/VoidTypes'; /** * @group node @@ -35,12 +35,10 @@ describe('Void Tests', () => { contracts: [voidContract], } = launched; - const enumValue: NativeEnumInput = 'C' as NativeEnumInput; - - const { waitForResult } = await voidContract.functions.echo_native_enum(enumValue).call(); + const { waitForResult } = await voidContract.functions.echo_native_enum(NativeEnum.C).call(); const { value } = await waitForResult(); - expect(value).toEqual(enumValue); + expect(value).toEqual(NativeEnum.C); }); it('should handle input arguments of type [42, void]', async () => { diff --git a/packages/fuels/.gitignore b/packages/fuels/.gitignore index 289ea019274..d6ba43d5252 100644 --- a/packages/fuels/.gitignore +++ b/packages/fuels/.gitignore @@ -1,2 +1,3 @@ README.md test/__temp__* +test/fixtures/typegend \ No newline at end of file diff --git a/packages/fuels/package.json b/packages/fuels/package.json index 771de89c397..43104abf4ee 100644 --- a/packages/fuels/package.json +++ b/packages/fuels/package.json @@ -64,7 +64,6 @@ "dependencies": { "@fuel-ts/abi": "workspace:*", "@fuel-ts/abi-coder": "workspace:*", - "@fuel-ts/abi-typegen": "workspace:*", "@fuel-ts/account": "workspace:*", "@fuel-ts/address": "workspace:*", "@fuel-ts/contract": "workspace:*", diff --git a/packages/fuels/src/cli.ts b/packages/fuels/src/cli.ts index 9a716cbfb7d..9887df494d2 100644 --- a/packages/fuels/src/cli.ts +++ b/packages/fuels/src/cli.ts @@ -1,4 +1,4 @@ -import { configureCliOptions as configureTypegenCliOptions } from '@fuel-ts/abi-typegen/cli'; +import { configureTypegenCliOptions } from '@fuel-ts/abi/cli'; import { versions } from '@fuel-ts/versions'; import { runVersions } from '@fuel-ts/versions/cli'; import { Command, Option } from 'commander'; @@ -98,11 +98,7 @@ export const configureCli = () => { /** * Routing external commands from sub-packages' CLIs */ - - // Typegen - configureTypegenCliOptions( - program.command('typegen').description(`Generate Typescript from Sway ABI JSON files`) - ); + command = configureTypegenCliOptions(program.command(Commands.typegen)); // Versions (command = program.command('versions')) diff --git a/packages/fuels/src/cli/commands/build/generateTypes.ts b/packages/fuels/src/cli/commands/build/generateTypes.ts deleted file mode 100644 index dbcb17fe4bf..00000000000 --- a/packages/fuels/src/cli/commands/build/generateTypes.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { ProgramTypeEnum } from '@fuel-ts/abi-typegen'; -import { runTypegen } from '@fuel-ts/abi-typegen/runTypegen'; -import { getBinaryVersions } from '@fuel-ts/versions/cli'; -import { writeFileSync, mkdirSync } from 'fs'; -import { globSync } from 'glob'; -import { join } from 'path'; - -import { getABIPaths } from '../../config/forcUtils'; -import { renderIndexTemplate } from '../../templates'; -import type { FuelsConfig } from '../../types'; -import { debug, log, loggingConfig } from '../../utils/logger'; - -async function generateTypesForProgramType( - config: FuelsConfig, - paths: string[], - programType: ProgramTypeEnum -) { - debug('Generating types..'); - - let filepaths = await getABIPaths(paths, config); - const pluralizedDirName = `${String(programType).toLocaleLowerCase()}s`; - const versions = getBinaryVersions(config); - - const isScript = programType === ProgramTypeEnum.SCRIPT; - const isPredicate = programType === ProgramTypeEnum.PREDICATE; - - if (isScript || isPredicate) { - const loaderFiles = paths.flatMap((dirpath) => { - const glob = `*-abi.json`; - const cwd = `${dirpath}/out`; - return globSync(glob, { cwd }).map((filename) => `${dirpath}/out/${filename}`); - }); - filepaths = filepaths.concat(loaderFiles); - } - - runTypegen({ - programType, - cwd: config.basePath, - filepaths, - output: join(config.output, pluralizedDirName), - silent: !loggingConfig.isDebugEnabled, - versions, - }); - - return pluralizedDirName; -} - -export async function generateTypes(config: FuelsConfig) { - log('Generating types..'); - - const { contracts, scripts, predicates, output } = config; - - mkdirSync(output, { recursive: true }); - - const members = [ - { type: ProgramTypeEnum.CONTRACT, programs: contracts }, - { type: ProgramTypeEnum.SCRIPT, programs: scripts }, - { type: ProgramTypeEnum.PREDICATE, programs: predicates }, - ]; - - const pluralizedDirNames = await Promise.all( - members - .filter(({ programs }) => !!programs.length) - .map(({ programs, type }) => generateTypesForProgramType(config, programs, type)) - ); - - const indexFile = await renderIndexTemplate(pluralizedDirNames); - - writeFileSync(join(config.output, 'index.ts'), indexFile); -} diff --git a/packages/fuels/src/cli/commands/build/index.test.ts b/packages/fuels/src/cli/commands/build/index.test.ts index 2983713940f..4deed12d989 100644 --- a/packages/fuels/src/cli/commands/build/index.test.ts +++ b/packages/fuels/src/cli/commands/build/index.test.ts @@ -1,9 +1,9 @@ import { fuelsConfig } from '../../../../test/fixtures/fuels.config'; import { mockLogger } from '../../../../test/utils/mockLogger'; +import * as generateTypesMod from '../generate-types'; import { build } from '.'; import * as buildSwayProgramsMod from './buildSwayPrograms'; -import * as generateTypesMod from './generateTypes'; /** * @group node diff --git a/packages/fuels/src/cli/commands/build/index.ts b/packages/fuels/src/cli/commands/build/index.ts index 65cf4799c6d..88c77a21bc4 100644 --- a/packages/fuels/src/cli/commands/build/index.ts +++ b/packages/fuels/src/cli/commands/build/index.ts @@ -4,15 +4,15 @@ import type { FuelsConfig } from '../../types'; import { log } from '../../utils/logger'; import { deploy } from '../deploy'; import { autoStartFuelCore } from '../dev/autoStartFuelCore'; +import { generateTypes } from '../generate-types'; import { buildSwayPrograms } from './buildSwayPrograms'; -import { generateTypes } from './generateTypes'; export async function build(config: FuelsConfig, program?: Command) { log('Building..'); await buildSwayPrograms(config); - await generateTypes(config); + generateTypes(config); config.onBuild?.(config); const options = program?.opts(); diff --git a/packages/fuels/src/cli/commands/deploy/deployContracts.ts b/packages/fuels/src/cli/commands/deploy/deployContracts.ts index a7c6da13d2b..52aac577516 100644 --- a/packages/fuels/src/cli/commands/deploy/deployContracts.ts +++ b/packages/fuels/src/cli/commands/deploy/deployContracts.ts @@ -48,7 +48,7 @@ export async function deployContract( const proxyBytecode = Src14OwnedProxyFactory.bytecode; const proxyAbi = Src14OwnedProxy.abi; - const proxyStorageSlots = Src14OwnedProxy.storageSlots ?? []; + const proxyStorageSlots = Src14OwnedProxyFactory.storageSlots ?? []; const isProxyEnabled = tomlContents?.proxy?.enabled; const proxyAddress = tomlContents?.proxy?.address; diff --git a/packages/fuels/src/cli/commands/deploy/index.ts b/packages/fuels/src/cli/commands/deploy/index.ts index 28b14181d41..c223b7b5488 100644 --- a/packages/fuels/src/cli/commands/deploy/index.ts +++ b/packages/fuels/src/cli/commands/deploy/index.ts @@ -1,5 +1,5 @@ import type { FuelsConfig } from '../../types'; -import { generateTypes } from '../build/generateTypes'; +import { generateTypes } from '../generate-types'; import { deployContracts } from './deployContracts'; import { deployPredicates } from './deployPredicates'; @@ -35,9 +35,9 @@ export async function deploy(config: FuelsConfig) { /** * After deploying scripts/predicates, we need to - * re-generate factory classe with the loader coee + * re-generate factory classes with the loader code */ - await generateTypes(config); + generateTypes(config); return { contracts, diff --git a/packages/fuels/src/cli/commands/generate-types.ts b/packages/fuels/src/cli/commands/generate-types.ts new file mode 100644 index 00000000000..ac992252b67 --- /dev/null +++ b/packages/fuels/src/cli/commands/generate-types.ts @@ -0,0 +1,16 @@ +import { runTypegen } from '@fuel-ts/abi/cli'; + +import type { FuelsConfig } from '../types'; + +export function generateTypes(config: FuelsConfig) { + const { contracts, scripts, predicates, output } = config; + + const loaderPaths = scripts.concat(predicates).map((path) => `${path}/out`); + + const paths = contracts + .concat(scripts, predicates) + .map((path) => `${path}/out/${config.buildMode}`) + .concat(loaderPaths); + + runTypegen({ inputs: paths, output }); +} diff --git a/packages/fuels/src/cli/templates/index.hbs b/packages/fuels/src/cli/templates/index.hbs index 569e0ad5e15..81a242dac7b 100644 --- a/packages/fuels/src/cli/templates/index.hbs +++ b/packages/fuels/src/cli/templates/index.hbs @@ -1,3 +1,3 @@ {{#each paths}} export * from './{{this}}'; -{{/each}} +{{/each}} \ No newline at end of file diff --git a/packages/fuels/src/cli/types.ts b/packages/fuels/src/cli/types.ts index f44c32cd93e..e9d641ba83e 100644 --- a/packages/fuels/src/cli/types.ts +++ b/packages/fuels/src/cli/types.ts @@ -8,6 +8,7 @@ export enum Commands { init = 'init', versions = 'versions', node = 'node', + typegen = 'typegen', } export type CommandEvent = @@ -34,6 +35,10 @@ export type CommandEvent = | { type: Commands.node; data: void; + } + | { + type: Commands.typegen; + data: void; }; export type DeployedContract = { diff --git a/packages/fuels/src/index.ts b/packages/fuels/src/index.ts index 07665e7e8c5..6cf58959170 100644 --- a/packages/fuels/src/index.ts +++ b/packages/fuels/src/index.ts @@ -15,5 +15,6 @@ export * from '@fuel-ts/utils'; export * from '@fuel-ts/account'; export * from '@fuel-ts/transactions/configs'; export * from '@fuel-ts/account/configs'; +export * from '@fuel-ts/abi'; export * from '@fuel-ts/recipes'; export * from '@fuel-ts/abi'; diff --git a/packages/fuels/test/features/build.test.ts b/packages/fuels/test/features/build.test.ts index f03a6388419..68e159870df 100644 --- a/packages/fuels/test/features/build.test.ts +++ b/packages/fuels/test/features/build.test.ts @@ -98,7 +98,7 @@ describe('build', { timeout: 180000 }, () => { ].map((f) => join(paths.outputDir, f)); files.forEach((file) => expect(existsSync(file), `${file} does not exist`).toBeTruthy()); - expect(readdirSync(paths.outputContractsDir)).toHaveLength(3); + expect(readdirSync(paths.outputContractsDir)).toHaveLength(7); expect(autoStartFuelCore).toHaveBeenCalledTimes(0); expect(deploy).toHaveBeenCalledTimes(0); @@ -132,7 +132,7 @@ describe('build', { timeout: 180000 }, () => { ].map((f) => join(paths.outputDir, f)); files.forEach((file) => expect(existsSync(file), `${file} does not exist`).toBeTruthy()); - expect(readdirSync(paths.outputContractsDir)).toHaveLength(9); + expect(readdirSync(paths.outputContractsDir)).toHaveLength(25); expect(autoStartFuelCore).toHaveBeenCalledTimes(0); expect(deploy).toHaveBeenCalledTimes(0); diff --git a/packages/fuels/test/fixtures/fuels.config.ts b/packages/fuels/test/fixtures/fuels.config.ts index 2e25eae894c..4aeb67ebf9b 100644 --- a/packages/fuels/test/fixtures/fuels.config.ts +++ b/packages/fuels/test/fixtures/fuels.config.ts @@ -19,7 +19,7 @@ export const fuelsConfig: FuelsConfig = { ], scripts: [join(scriptsDir, 'script')], predicates: [join(predicatesDir, 'predicate')], - output: '/output', + output: './typegen', forcPath: 'fuels-forc', fuelCorePath: 'fuels-core', deployConfig: {}, @@ -27,6 +27,8 @@ export const fuelsConfig: FuelsConfig = { fuelCorePort: 4000, providerUrl: 'http://127.0.0.1:4000/v1/graphql', configPath: __filename, - forcBuildFlags: [], - buildMode: 'debug', + forcBuildFlags: ['--release'], + buildMode: 'release', }; + +export default fuelsConfig; diff --git a/packages/recipes/package.json b/packages/recipes/package.json index 41246099cac..76ca83985a3 100644 --- a/packages/recipes/package.json +++ b/packages/recipes/package.json @@ -28,9 +28,9 @@ }, "license": "Apache-2.0", "dependencies": { + "@fuel-ts/abi": "workspace:*", "@fuel-ts/address": "workspace:*", "@fuel-ts/abi-coder": "workspace:*", - "@fuel-ts/abi-typegen": "workspace:*", "@fuel-ts/account": "workspace:*", "@fuel-ts/program": "workspace:*", "@fuel-ts/transactions": "workspace:*", diff --git a/packages/recipes/scripts/build-recipes.ts b/packages/recipes/scripts/build-recipes.ts index 9df639cbcfa..bf5c190f7b3 100644 --- a/packages/recipes/scripts/build-recipes.ts +++ b/packages/recipes/scripts/build-recipes.ts @@ -2,9 +2,15 @@ import { execSync } from 'child_process'; import { readFileSync, writeFileSync } from 'fs'; import { join } from 'path'; -execSync(`fuels-typegen -i src/contracts/**/*-abi.json -o src/types`); +execSync(`fuels-typegen -i src/contracts/src14 -o src/types`); + +const typesPath = join(__dirname, '..', 'src', 'types'); +const supportedRecipes = ['Src14OwnedProxy'] + .map((s) => [s, `${s}Factory`, `${s}Types`, `${s}-bytecode`, `${s}-storage-slots`]) + .flat() + .map((s) => join(typesPath, 'contracts', `${s}.ts`)) + .concat([join(typesPath, 'common.ts')]); -const supportedRecipes = ['Src14OwnedProxy'].map((s) => [s, `${s}Factory`]).flat(); const importReplacementMap = { Contract: '@fuel-ts/program', ContractFactory: '@fuel-ts/contract', @@ -20,12 +26,11 @@ const importReplacementMap = { decompressBytecode: '@fuel-ts/utils', }; -for (const recipe of supportedRecipes) { - const contractPath = join(__dirname, '..', 'src', 'types', `${recipe}.ts`); - let contractContents = readFileSync(contractPath, 'utf-8'); +for (const filepath of supportedRecipes) { + let contents = readFileSync(filepath, 'utf-8'); // Find all imports from 'fuels' const fuelImportsRegex = /import\s+(type\s+)?{([^}]+)}\s+from\s+['"]fuels['"];?/gs; - const matches = [...contractContents.matchAll(fuelImportsRegex)]; + const matches = [...contents.matchAll(fuelImportsRegex)]; // Extract the imported items and create new import statements const importsByPackage = new Map>(); @@ -58,18 +63,15 @@ for (const recipe of supportedRecipes) { .map(([pkg, imports]) => `import { ${Array.from(imports).join(', ')} } from '${pkg}';`) .join('\n'); + // Add new imports at the top of the file + const importRegex = /.*(?=import )/s; + contents = contents.replace(importRegex, (match) => `${match}\n${newImports}`); + // Replace all 'fuels' imports with the new imports matches.forEach((match) => { - contractContents = contractContents.replace(match[0], ''); + contents = contents.replace(match[0], ''); }); - // Add new imports at the top of the file - const versionCommentRegex = /\/\*\s*Fuels version: \d+\.\d+\.\d+\s*\*\/\s*/; - contractContents = contractContents.replace( - versionCommentRegex, - (match) => `${match}\n${newImports}` - ); - // Write the modified contents back to the file - writeFileSync(contractPath, contractContents); + writeFileSync(filepath, contents); } diff --git a/packages/recipes/src/types/common.d.ts b/packages/recipes/src/types/common.d.ts deleted file mode 100644 index ef3dec5e95c..00000000000 --- a/packages/recipes/src/types/common.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ - -/* eslint-disable max-classes-per-file */ -/* eslint-disable @typescript-eslint/no-unused-vars */ -/* eslint-disable @typescript-eslint/consistent-type-imports */ - -/* - Fuels version: 0.97.2 -*/ - -/** - * Mimics Sway Enum. - * Requires one and only one Key-Value pair and raises error if more are provided. - */ -export type Enum = { - [K in keyof T]: Pick & { [P in Exclude]?: never }; -}[keyof T]; - -/** - * Mimics Sway Option and Vectors. - * Vectors are treated like arrays in Typescript. - */ -export type Option = T | undefined; - -export type Vec = T[]; - -/** - * Mimics Sway Result enum type. - * Ok represents the success case, while Err represents the error case. - */ -export type Result = Enum<{ Ok: T; Err: E }>; diff --git a/packages/recipes/src/types/common.ts b/packages/recipes/src/types/common.ts new file mode 100644 index 00000000000..7d2f1f7d0ee --- /dev/null +++ b/packages/recipes/src/types/common.ts @@ -0,0 +1,53 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.98.0 + Forc version: 0.66.5 +*/ + +import { type FunctionFragment } from '@fuel-ts/abi-coder'; +import { type InvokeFunction } from '@fuel-ts/program'; + +/** + * Mimics Sway Enum. + * Requires one and only one Key-Value pair and raises error if more are provided. + */ +export type Enum = { + [K in keyof T]: Pick & { [P in Exclude]?: never }; +}[keyof T]; + +/** + * Mimics Sway Option type. + */ +export type Option = T | undefined; + +/** + * Mimics Sway Result enum type. + * Ok represents the success case, while Err represents the error case. + */ +export type Result = Enum<{ Ok: T; Err: E }>; + +/** + * Mimics Sway array type. For example, [u64; 10] is converted to ArrayOfLength. + */ +export type ArrayOfLength< + T, + Length extends number, + Arr extends unknown[] = [], +> = Arr['length'] extends Length ? Arr : ArrayOfLength; + +interface Types { + functions: Record; + configurables: Partial>; +} + +export type ProgramFunctionMapper = { + [K in keyof T]: InvokeFunction; +}; + +export type InterfaceFunctionMapper = { + [K in keyof T]: FunctionFragment; +}; diff --git a/packages/recipes/src/types/Src14OwnedProxy.ts b/packages/recipes/src/types/contracts/Src14OwnedProxy-abi.ts similarity index 80% rename from packages/recipes/src/types/Src14OwnedProxy.ts rename to packages/recipes/src/types/contracts/Src14OwnedProxy-abi.ts index 494f285063c..8c5bcd0e3e3 100644 --- a/packages/recipes/src/types/Src14OwnedProxy.ts +++ b/packages/recipes/src/types/contracts/Src14OwnedProxy-abi.ts @@ -1,62 +1,14 @@ /* Autogenerated file. Do not edit manually. */ -/* eslint-disable max-classes-per-file */ -/* eslint-disable @typescript-eslint/no-unused-vars */ -/* eslint-disable @typescript-eslint/consistent-type-imports */ +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ /* - Fuels version: 0.97.2 + Fuels version: 0.98.0 + Forc version: 0.66.5 */ -import { Contract, type InvokeFunction } from '@fuel-ts/program'; -import { Interface, type FunctionFragment, type StrSlice } from '@fuel-ts/abi-coder'; -import { type Provider, type Account } from '@fuel-ts/account'; -import { type StorageSlot } from '@fuel-ts/transactions'; -import { type Address } from '@fuel-ts/address'; -import type { Option, Enum } from './common'; - -export enum AccessErrorInput { - NotOwner = 'NotOwner', -} -export enum AccessErrorOutput { - NotOwner = 'NotOwner', -} -export type IdentityInput = Enum<{ Address: AddressInput; ContractId: ContractIdInput }>; -export type IdentityOutput = Enum<{ Address: AddressOutput; ContractId: ContractIdOutput }>; -export enum InitializationErrorInput { - CannotReinitialized = 'CannotReinitialized', -} -export enum InitializationErrorOutput { - CannotReinitialized = 'CannotReinitialized', -} -export enum SetProxyOwnerErrorInput { - CannotUninitialize = 'CannotUninitialize', -} -export enum SetProxyOwnerErrorOutput { - CannotUninitialize = 'CannotUninitialize', -} -export type StateInput = Enum<{ - Uninitialized: undefined; - Initialized: IdentityInput; - Revoked: undefined; -}>; -export type StateOutput = Enum<{ Uninitialized: void; Initialized: IdentityOutput; Revoked: void }>; - -export type AddressInput = { bits: string }; -export type AddressOutput = AddressInput; -export type ContractIdInput = { bits: string }; -export type ContractIdOutput = ContractIdInput; -export type ProxyOwnerSetInput = { new_proxy_owner: StateInput }; -export type ProxyOwnerSetOutput = { new_proxy_owner: StateOutput }; -export type ProxyTargetSetInput = { new_target: ContractIdInput }; -export type ProxyTargetSetOutput = { new_target: ContractIdOutput }; - -export type Src14OwnedProxyConfigurables = Partial<{ - INITIAL_TARGET: Option; - INITIAL_OWNER: StateInput; -}>; - -const abi = { +export const abi = { programType: 'contract', specVersion: '1', encodingVersion: '1', @@ -633,53 +585,3 @@ const abi = { }, ], }; - -const storageSlots: StorageSlot[] = [ - { - key: '7bb458adc1d118713319a5baa00a2d049dd64d2916477d2688d76970c898cd55', - value: '0000000000000000000000000000000000000000000000000000000000000000', - }, - { - key: '7bb458adc1d118713319a5baa00a2d049dd64d2916477d2688d76970c898cd56', - value: '0000000000000000000000000000000000000000000000000000000000000000', - }, - { - key: 'bb79927b15d9259ea316f2ecb2297d6cc8851888a98278c0a2e03e1a091ea754', - value: '0000000000000000000000000000000000000000000000000000000000000000', - }, - { - key: 'bb79927b15d9259ea316f2ecb2297d6cc8851888a98278c0a2e03e1a091ea755', - value: '0000000000000000000000000000000000000000000000000000000000000000', - }, -]; -export class Src14OwnedProxyInterface extends Interface { - constructor() { - super(abi); - } - - declare functions: { - proxy_target: FunctionFragment; - set_proxy_target: FunctionFragment; - proxy_owner: FunctionFragment; - initialize_proxy: FunctionFragment; - set_proxy_owner: FunctionFragment; - }; -} - -export class Src14OwnedProxy extends Contract { - static readonly abi = abi; - static readonly storageSlots = storageSlots; - - declare interface: Src14OwnedProxyInterface; - declare functions: { - proxy_target: InvokeFunction<[], Option>; - set_proxy_target: InvokeFunction<[new_target: ContractIdInput], void>; - proxy_owner: InvokeFunction<[], StateOutput>; - initialize_proxy: InvokeFunction<[], void>; - set_proxy_owner: InvokeFunction<[new_proxy_owner: StateInput], void>; - }; - - constructor(id: string | Address, accountOrProvider: Account | Provider) { - super(id, abi, accountOrProvider); - } -} diff --git a/packages/recipes/src/types/Src14OwnedProxyFactory.ts b/packages/recipes/src/types/contracts/Src14OwnedProxy-bytecode.ts similarity index 89% rename from packages/recipes/src/types/Src14OwnedProxyFactory.ts rename to packages/recipes/src/types/contracts/Src14OwnedProxy-bytecode.ts index 30762b7a0e9..a27e69cb2be 100644 --- a/packages/recipes/src/types/Src14OwnedProxyFactory.ts +++ b/packages/recipes/src/types/contracts/Src14OwnedProxy-bytecode.ts @@ -1,31 +1,15 @@ /* Autogenerated file. Do not edit manually. */ -/* eslint-disable max-classes-per-file */ -/* eslint-disable @typescript-eslint/no-unused-vars */ -/* eslint-disable @typescript-eslint/consistent-type-imports */ +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ /* - Fuels version: 0.97.2 + Fuels version: 0.98.0 + Forc version: 0.66.5 */ -import { ContractFactory, type DeployContractOptions } from '@fuel-ts/contract'; import { decompressBytecode } from '@fuel-ts/utils'; -import { type Provider, type Account } from '@fuel-ts/account'; -import { Src14OwnedProxy } from './Src14OwnedProxy'; -const bytecode = decompressBytecode( +export const bytecode = decompressBytecode( 'H4sIAAAAAAAAA9Vbe3Abx3lfgCAFvayz+TAFSjaUUjJkRwosUQ4ly9IhIATSEM2DSVpUGBhg64c0cSyIlVQ5tsccN001aSZlHcdlO06GrtOp6z4GAB+C7T7YR2bUiTtlZhxbTeMWmiatFAst60YZqm6j/r5v93DHw4GOJ84f0QznFne73+5+j9/32FVgISxOCOEV/K/Dn7o259GuXRO/JcSQ8c6CML4nwkZJF8HFnWLovZLXeK/kOyG89+JbGN9C+BZe+q2uEfRE4LIBGiv1VHThdi0i5gJdGTHa7TW0WNNY4JLmoFfXE4jPi3T5ep/q112j337Vr8WIF3PV373nAol5YfTls6OG8Id6m9E3+DG0tVB5F96/onG7b0akejWh9XaMpWNhYcSnL44exPv49JzLnNtoTtDMpMvaR0FvmxHPaaPd6B/rGDMSxRCP7WmaMxJ5I10Wt47qYg2etxnR/CJ/i7Tj29nuSr/42Tlux3yYLygC36+aMxiIzotTuuck+LeD+If9hoxEIQS6MdDX8DxgRAudNvrzNvql96Hvl/TFJdDfaaPfDbo9oL8az7tBf8hGf8GiXxTL0/cuKPpPg36Hjf4R0O1V678H9E9b9IuaRX+m9X3on1f0HwD9XTb6Z0A3Cfrr8LwX9Ccs+jOWnOIzkm+16c8p+juXvl/9f0Z0GnonHP19CeqfigmR6hGeVER4jb5Z7FH7a+jL32Atf2tEp84ELoUxV9XYQzQWOnVO6pRvzIi+AhugdTehPVtpV8/r/TyPTcxWdIv246CfIf3dHNGEES0Gj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f23ZVr+sG7/m8Uv9HxR0fvemvl2vu9D6f3bfzxUz/47sbnHn7u7V/9ja6rX/3i3kfH/9To/dHLkms7/1c+d7yuns+r50H5vF19335ePtvfkM8W9X3lEfn0qff1n1PPDvV8Vj7rJuXT88b/AzdExjYINgAA' ); - -export class Src14OwnedProxyFactory extends ContractFactory { - static readonly bytecode = bytecode; - - constructor(accountOrProvider: Account | Provider) { - super(bytecode, Src14OwnedProxy.abi, accountOrProvider, Src14OwnedProxy.storageSlots); - } - - static deploy(wallet: Account, options: DeployContractOptions = {}) { - const factory = new Src14OwnedProxyFactory(wallet); - return factory.deploy(options); - } -} diff --git a/packages/recipes/src/types/contracts/Src14OwnedProxy-storage-slots.ts b/packages/recipes/src/types/contracts/Src14OwnedProxy-storage-slots.ts new file mode 100644 index 00000000000..2c9d2c2f4a9 --- /dev/null +++ b/packages/recipes/src/types/contracts/Src14OwnedProxy-storage-slots.ts @@ -0,0 +1,30 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.98.0 + Forc version: 0.66.5 +*/ + +import { type StorageSlot } from '@fuel-ts/transactions'; + +export const storageSlots: StorageSlot[] = [ + { + key: '7bb458adc1d118713319a5baa00a2d049dd64d2916477d2688d76970c898cd55', + value: '0000000000000000000000000000000000000000000000000000000000000000', + }, + { + key: '7bb458adc1d118713319a5baa00a2d049dd64d2916477d2688d76970c898cd56', + value: '0000000000000000000000000000000000000000000000000000000000000000', + }, + { + key: 'bb79927b15d9259ea316f2ecb2297d6cc8851888a98278c0a2e03e1a091ea754', + value: '0000000000000000000000000000000000000000000000000000000000000000', + }, + { + key: 'bb79927b15d9259ea316f2ecb2297d6cc8851888a98278c0a2e03e1a091ea755', + value: '0000000000000000000000000000000000000000000000000000000000000000', + }, +]; diff --git a/packages/recipes/src/types/contracts/Src14OwnedProxy.ts b/packages/recipes/src/types/contracts/Src14OwnedProxy.ts new file mode 100644 index 00000000000..66e88b77019 --- /dev/null +++ b/packages/recipes/src/types/contracts/Src14OwnedProxy.ts @@ -0,0 +1,41 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.98.0 + Forc version: 0.66.5 +*/ + +import type { Src14OwnedProxyTypes as Types } from './Src14OwnedProxyTypes'; +import type { InterfaceFunctionMapper, ProgramFunctionMapper } from '../common'; + +import { Contract } from '@fuel-ts/program'; +import { Interface } from '@fuel-ts/abi-coder'; +import { type Address } from '@fuel-ts/address'; +import { type Account, type Provider } from '@fuel-ts/account'; +import { abi } from './Src14OwnedProxy-abi'; + +export * from './Src14OwnedProxyTypes'; + +export type Src14OwnedProxyConfigurables = Types['configurables']; + +export class Src14OwnedProxyInterface extends Interface { + declare functions: InterfaceFunctionMapper; + + constructor() { + super(abi); + } +} + +export class Src14OwnedProxy extends Contract { + declare interface: Src14OwnedProxyInterface; + declare functions: ProgramFunctionMapper; + + public static readonly abi = abi; + + constructor(id: string | Address, accountOrProvider: Account | Provider) { + super(id, abi, accountOrProvider); + } +} diff --git a/packages/recipes/src/types/contracts/Src14OwnedProxyFactory.ts b/packages/recipes/src/types/contracts/Src14OwnedProxyFactory.ts new file mode 100644 index 00000000000..ccc1e94ccf7 --- /dev/null +++ b/packages/recipes/src/types/contracts/Src14OwnedProxyFactory.ts @@ -0,0 +1,31 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.98.0 + Forc version: 0.66.5 +*/ + +import { Src14OwnedProxy } from './Src14OwnedProxy'; +import { bytecode } from './Src14OwnedProxy-bytecode'; +import { abi } from './Src14OwnedProxy-abi'; + +import { ContractFactory, type DeployContractOptions } from '@fuel-ts/contract'; +import { type Account, type Provider } from '@fuel-ts/account'; +import { storageSlots } from './Src14OwnedProxy-storage-slots'; + +export class Src14OwnedProxyFactory extends ContractFactory { + static readonly bytecode = bytecode; + static readonly storageSlots = storageSlots; + + constructor(accountOrProvider: Account | Provider) { + super(bytecode, abi, accountOrProvider, Src14OwnedProxyFactory.storageSlots); + } + + static deploy(wallet: Account, options: DeployContractOptions = {}) { + const factory = new Src14OwnedProxyFactory(wallet); + return factory.deploy(options); + } +} diff --git a/packages/recipes/src/types/contracts/Src14OwnedProxyTypes.ts b/packages/recipes/src/types/contracts/Src14OwnedProxyTypes.ts new file mode 100644 index 00000000000..7da08d737ae --- /dev/null +++ b/packages/recipes/src/types/contracts/Src14OwnedProxyTypes.ts @@ -0,0 +1,68 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.98.0 + Forc version: 0.66.5 +*/ + +import { type StrSlice } from '@fuel-ts/abi-coder'; +import type { Enum, Option } from '../common'; + +export enum AccessError { + NotOwner = 'NotOwner', +} +export enum InitializationError { + CannotReinitialized = 'CannotReinitialized', +} +export enum SetProxyOwnerError { + CannotUninitialize = 'CannotUninitialize', +} + +export type AddressInput = { bits: string }; +export type AddressOutput = AddressInput; +export type ContractIdInput = { bits: string }; +export type ContractIdOutput = ContractIdInput; +export type IdentityInput = Enum<{ Address: AddressInput; ContractId: ContractIdInput }>; +export type IdentityOutput = Enum<{ Address: AddressOutput; ContractId: ContractIdOutput }>; +export type ProxyOwnerSetInput = { new_proxy_owner: StateInput }; +export type ProxyOwnerSetOutput = { new_proxy_owner: StateOutput }; +export type ProxyTargetSetInput = { new_target: ContractIdInput }; +export type ProxyTargetSetOutput = { new_target: ContractIdOutput }; +export type StateInput = Enum<{ + Uninitialized: undefined; + Initialized: IdentityInput; + Revoked: undefined; +}>; +export type StateOutput = Enum<{ Uninitialized: void; Initialized: IdentityOutput; Revoked: void }>; + +export interface Src14OwnedProxyTypes { + functions: { + proxy_target: { + inputs: []; + output: Option; + }; + set_proxy_target: { + inputs: [new_target: ContractIdInput]; + output: void; + }; + proxy_owner: { + inputs: []; + output: StateOutput; + }; + initialize_proxy: { + inputs: []; + output: void; + }; + set_proxy_owner: { + inputs: [new_proxy_owner: StateInput]; + output: void; + }; + }; + configurables: Partial<{ + INITIAL_TARGET: Option; + INITIAL_OWNER: StateInput; + }>; +} diff --git a/packages/recipes/src/types/contracts/index.ts b/packages/recipes/src/types/contracts/index.ts new file mode 100644 index 00000000000..da6555813c5 --- /dev/null +++ b/packages/recipes/src/types/contracts/index.ts @@ -0,0 +1,12 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.98.0 + Forc version: 0.66.5 +*/ + +export { Src14OwnedProxy } from './Src14OwnedProxy'; +export { Src14OwnedProxyFactory } from './Src14OwnedProxyFactory'; diff --git a/packages/recipes/src/types/index.ts b/packages/recipes/src/types/index.ts index 15dc6b12ae3..427c4de30dc 100644 --- a/packages/recipes/src/types/index.ts +++ b/packages/recipes/src/types/index.ts @@ -1,12 +1,11 @@ /* Autogenerated file. Do not edit manually. */ -/* eslint-disable max-classes-per-file */ -/* eslint-disable @typescript-eslint/no-unused-vars */ -/* eslint-disable @typescript-eslint/consistent-type-imports */ +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ /* - Fuels version: 0.97.2 + Fuels version: 0.98.0 + Forc version: 0.66.5 */ -export { Src14OwnedProxy } from './Src14OwnedProxy'; -export { Src14OwnedProxyFactory } from './Src14OwnedProxyFactory'; +export * from './contracts'; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a77ebeb9c62..d9bb030d0c9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -581,6 +581,18 @@ importers: '@fuel-ts/utils': specifier: workspace:* version: link:../utils + '@fuel-ts/versions': + specifier: workspace:* + version: link:../versions + commander: + specifier: 12.1.0 + version: 12.1.0 + glob: + specifier: 10.4.5 + version: 10.4.5 + handlebars: + specifier: 4.7.8 + version: 4.7.8 packages/abi-coder: dependencies: @@ -835,6 +847,9 @@ importers: specifier: workspace:* version: link:../fuels devDependencies: + '@fuel-ts/abi': + specifier: workspace:* + version: link:../abi '@fuel-ts/account': specifier: workspace:* version: link:../account @@ -856,9 +871,6 @@ importers: '@fuel-ts/abi-coder': specifier: workspace:* version: link:../abi-coder - '@fuel-ts/abi-typegen': - specifier: workspace:* - version: link:../abi-typegen '@fuel-ts/account': specifier: workspace:* version: link:../account @@ -1033,12 +1045,12 @@ importers: packages/recipes: dependencies: + '@fuel-ts/abi': + specifier: workspace:* + version: link:../abi '@fuel-ts/abi-coder': specifier: workspace:* version: link:../abi-coder - '@fuel-ts/abi-typegen': - specifier: workspace:* - version: link:../abi-typegen '@fuel-ts/account': specifier: workspace:* version: link:../account diff --git a/templates/nextjs/src/sway-api/common.ts b/templates/nextjs/src/sway-api/common.ts new file mode 100644 index 00000000000..43cb6e6689e --- /dev/null +++ b/templates/nextjs/src/sway-api/common.ts @@ -0,0 +1,53 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.98.0 + Forc version: 0.66.5 +*/ + + +import type { FunctionFragment, InvokeFunction } from 'fuels'; + +/** + * Mimics Sway Enum. + * Requires one and only one Key-Value pair and raises error if more are provided. + */ +export type Enum = { + [K in keyof T]: Pick & { [P in Exclude]?: never }; +}[keyof T]; + +/** + * Mimics Sway Option type. + */ +export type Option = T | undefined; + +/** + * Mimics Sway Result enum type. + * Ok represents the success case, while Err represents the error case. + */ +export type Result = Enum<{ Ok: T; Err: E }>; + +/** + * Mimics Sway array type. For example, [u64; 10] is converted to ArrayOfLength. + */ +export type ArrayOfLength< + T, + Length extends number, + Arr extends unknown[] = [], +> = Arr['length'] extends Length ? Arr : ArrayOfLength; + +interface Types { + functions: Record; + configurables: Partial>; +} + +export type ProgramFunctionMapper = { + [K in keyof T]: InvokeFunction; +}; + +export type InterfaceFunctionMapper = { + [K in keyof T]: FunctionFragment; +}; \ No newline at end of file diff --git a/templates/vite/src/sway-api/common.ts b/templates/vite/src/sway-api/common.ts new file mode 100644 index 00000000000..43cb6e6689e --- /dev/null +++ b/templates/vite/src/sway-api/common.ts @@ -0,0 +1,53 @@ +/* Autogenerated file. Do not edit manually. */ + +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ + +/* + Fuels version: 0.98.0 + Forc version: 0.66.5 +*/ + + +import type { FunctionFragment, InvokeFunction } from 'fuels'; + +/** + * Mimics Sway Enum. + * Requires one and only one Key-Value pair and raises error if more are provided. + */ +export type Enum = { + [K in keyof T]: Pick & { [P in Exclude]?: never }; +}[keyof T]; + +/** + * Mimics Sway Option type. + */ +export type Option = T | undefined; + +/** + * Mimics Sway Result enum type. + * Ok represents the success case, while Err represents the error case. + */ +export type Result = Enum<{ Ok: T; Err: E }>; + +/** + * Mimics Sway array type. For example, [u64; 10] is converted to ArrayOfLength. + */ +export type ArrayOfLength< + T, + Length extends number, + Arr extends unknown[] = [], +> = Arr['length'] extends Length ? Arr : ArrayOfLength; + +interface Types { + functions: Record; + configurables: Partial>; +} + +export type ProgramFunctionMapper = { + [K in keyof T]: InvokeFunction; +}; + +export type InterfaceFunctionMapper = { + [K in keyof T]: FunctionFragment; +}; \ No newline at end of file From 9266d3d0250c5b8e450ee078f267d58879e7d3a8 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Thu, 23 Jan 2025 15:02:54 +0000 Subject: [PATCH 26/26] feat: ABI coder (#3402) * feat: ABI parser * feat: ABI coder * remove casts * remove unnecessary throw * centralize abi cleanup logic * fix function signature for bytes * remove rawUntypedPtr from swayTypeMatchers * remove rawUntypedPtr from swayTypeMatchers * remove rawUntypedPtr * fix lint * rename method * Update cleanup-abi.ts * Update cleanup-abi.ts * refactor abi type mappers * refactor into using maps for types * refactor from array of tuples into `Map` * rename variables * refactor out function * fix comments, add comments * refactorings, comments * split test up into multiple tests * docs: update variable * chore: applying unsafe integer validation * chore: refactored coder matchers * chore: perform renames * chore: fix package version * chore: missing lock file * chore: finalize integration with the ABI * chore: remove parser from export * chore: added auto-update for typegen fixtures * chore: added auto-update for typegen fixtures * chore: updated fixtures * chore: removed unused dependency --------- Co-authored-by: nedsalk --- .changeset/nice-books-tease.md | 2 + .../src/guide/encoding/encode-and-decode.md | 12 +- .../encoding/snippets/encode-and-decode.ts | 26 +- .../encoding/snippets/working-with-bytes.ts | 129 +- .../src/guide/encoding/working-with-bytes.md | 2 +- .../scripts/snippets/initialising-scripts.ts | 3 +- internal/check-imports/package.json | 1 + internal/check-imports/src/imports.ts | 2 + internal/check-imports/src/references.ts | 5 + packages/abi-coder/src/FunctionFragment.ts | 2 +- .../src/encoding/coders/B256Coder.test.ts | 2 +- .../src/encoding/coders/OptionCoder.test.ts | 12 +- .../src/templates/contract/main.hbs | 15 +- .../src/templates/contract/main.ts | 2 +- .../src/templates/predicate/main.hbs | 2 +- .../src/templates/predicate/main.ts | 9 +- .../abi-typegen/src/templates/script/main.hbs | 2 +- .../abi-typegen/src/templates/script/main.ts | 2 +- .../fixtures/forc-projects/full/src/main.sw | 12 +- .../contract-with-configurable/main.hbs | 17 +- .../test/fixtures/templates/contract/main.hbs | 147 +- .../predicate-with-configurable/main.hbs | 3 +- .../fixtures/templates/predicate/main.hbs | 3 +- .../script-with-configurable/main.hbs | 3 +- .../test/fixtures/templates/script/main.hbs | 3 +- packages/abi/package.json | 4 + packages/abi/src/coder/AbiCoder.ts | 148 + packages/abi/src/coder/abi-coder-types.ts | 38 +- packages/abi/src/coder/abi-coder.ts | 2 - packages/abi/src/coder/constants.ts | 28 + .../src/coder/encoding/encoding-constants.ts | 43 + .../abi/src/coder/encoding/encoding-types.ts | 112 + packages/abi/src/coder/encoding/encoding.ts | 74 + packages/abi/src/coder/encoding/index.ts | 2 + packages/abi/src/coder/encoding/v1/array.ts | 46 + packages/abi/src/coder/encoding/v1/enum.ts | 90 + .../src/coder/encoding/v1/factories/array.ts | 34 + .../src/coder/encoding/v1/factories/enum.ts | 29 + .../src/coder/encoding/v1/factories/index.ts | 17 + .../src/coder/encoding/v1/factories/option.ts | 28 + .../src/coder/encoding/v1/factories/string.ts | 22 + .../src/coder/encoding/v1/factories/struct.ts | 27 + .../src/coder/encoding/v1/factories/tuple.ts | 23 + .../src/coder/encoding/v1/factories/vector.ts | 21 + packages/abi/src/coder/encoding/v1/fixed.ts | 194 ++ packages/abi/src/coder/encoding/v1/heap.ts | 138 + packages/abi/src/coder/encoding/v1/index.ts | 66 + packages/abi/src/coder/encoding/v1/option.ts | 45 + packages/abi/src/coder/encoding/v1/string.ts | 25 + packages/abi/src/coder/encoding/v1/struct.ts | 44 + packages/abi/src/coder/encoding/v1/tuple.ts | 45 + packages/abi/src/coder/encoding/validation.ts | 240 ++ packages/abi/src/coder/index.ts | 5 +- .../abi/src/coder/utils/createConfigurable.ts | 23 + .../abi/src/coder/utils/createFunction.ts | 59 + .../src/coder/utils/createFunctionSelector.ts | 18 + .../coder/utils/createFunctionSignature.ts | 88 + packages/abi/src/coder/utils/createLog.ts | 20 + packages/abi/src/coder/utils/createType.ts | 22 + .../abi/src/coder/utils/getFunctionInputs.ts | 33 + .../src/coder/utils/padValuesWithUndefined.ts | 9 + .../src/gen/renderers/ts/templates/abi.hbs | 4 +- .../src/gen/renderers/ts/templates/common.hbs | 4 +- .../gen/renderers/ts/templates/contract.hbs | 6 +- .../abi/src/gen/renderers/ts/typers/enums.ts | 2 +- packages/abi/src/index.ts | 2 +- .../abi/src/matchers/sway-type-matchers.ts | 62 +- .../specifications/v1/resolvable-type.ts | 2 +- .../evaluate-function-inputs-optionality.ts | 2 +- packages/abi/test/encoding/AbiCoder.test.ts | 361 +++ .../abi/test/encoding/AbiEncoding.test.ts | 136 + packages/abi/test/encoding/v1/array.test.ts | 229 ++ packages/abi/test/encoding/v1/b256.test.ts | 138 + packages/abi/test/encoding/v1/b512.test.ts | 146 + packages/abi/test/encoding/v1/boolean.test.ts | 107 + packages/abi/test/encoding/v1/byte.test.ts | 84 + packages/abi/test/encoding/v1/enum.test.ts | 272 ++ packages/abi/test/encoding/v1/option.test.ts | 133 + .../abi/test/encoding/v1/raw-slice.test.ts | 74 + .../abi/test/encoding/v1/std-string.test.ts | 93 + packages/abi/test/encoding/v1/str.test.ts | 93 + packages/abi/test/encoding/v1/string.test.ts | 95 + packages/abi/test/encoding/v1/struct.test.ts | 141 + packages/abi/test/encoding/v1/tuple.test.ts | 90 + packages/abi/test/encoding/v1/u16.test.ts | 114 + packages/abi/test/encoding/v1/u256.test.ts | 210 ++ packages/abi/test/encoding/v1/u32.test.ts | 114 + packages/abi/test/encoding/v1/u64.test.ts | 197 ++ packages/abi/test/encoding/v1/u8.test.ts | 110 + packages/abi/test/encoding/v1/vector.test.ts | 212 ++ packages/abi/test/encoding/v1/void.test.ts | 32 + packages/abi/test/fixtures/v1.ts | 2836 +++++++++++++++++ packages/abi/test/utils/constants.ts | 58 + packages/account/package.json | 2 +- packages/account/src/account.ts | 2 +- .../account/src/connectors/types/data-type.ts | 4 +- packages/account/src/predicate/predicate.ts | 34 +- .../providers/transaction-request/input.ts | 2 +- .../script-transaction-request.ts | 8 +- .../transaction-request.ts | 2 +- .../providers/transaction-request/types.ts | 6 +- .../transaction-response/getDecodedLogs.ts | 17 +- .../src/providers/transaction-summary/call.ts | 11 +- .../providers/transaction-summary/types.ts | 4 +- .../src/providers/utils/receipts.test.ts | 79 +- packages/account/src/test-utils/launchNode.ts | 2 +- packages/account/src/test-utils/resources.ts | 2 +- .../src/test-utils/transactionRequest.ts | 2 +- .../src/utils/deployScriptOrPredicate.ts | 12 +- ...formatTransferToContractScriptData.test.ts | 6 +- .../formatTransferToContractScriptData.ts | 4 +- .../account/test/fixtures/predicate-abi.ts | 4 +- .../test/fixtures/transaction-summary.ts | 4 +- packages/contract/package.json | 2 +- packages/contract/src/contract-factory.ts | 14 +- .../contract/src/loader/loader-script.test.ts | 2 +- packages/contract/src/loader/loader-script.ts | 2 +- packages/contract/src/loader/utils.test.ts | 2 +- packages/contract/src/loader/utils.ts | 2 +- .../src/test-utils/launch-test-node.test.ts | 4 +- .../crypto/src/browser/bufferFromString.ts | 4 +- .../crypto/src/browser/stringFromBuffer.ts | 4 +- packages/crypto/src/node/bufferFromString.ts | 4 +- packages/crypto/src/node/stringFromBuffer.ts | 4 +- packages/crypto/src/types.ts | 6 +- packages/fuel-gauge/package.json | 4 +- packages/fuel-gauge/src/abi/abi-coder.test.ts | 184 +- packages/fuel-gauge/src/abi/abi-gen.test.ts | 8 +- .../fuel-gauge/src/abi/fixtures/common.txt | 4 +- .../abi/fixtures/contracts/contract-abi.txt | 129 +- .../fixtures/contracts/contract-bytecode.txt | 2 +- .../abi/fixtures/contracts/contract-types.txt | 36 + .../src/abi/fixtures/contracts/contract.txt | 6 +- .../abi/fixtures/predicates/predicate-abi.txt | 6 +- .../src/abi/fixtures/scripts/script-abi.txt | 6 +- packages/fuel-gauge/src/abi/utils.ts | 13 + packages/fuel-gauge/src/blob-deploy.test.ts | 7 +- .../fuel-gauge/src/contract-factory.test.ts | 6 +- .../src/mapped-error-messages.test.ts | 6 +- packages/fuel-gauge/src/min-gas.test.ts | 6 +- .../predicate/predicate-duplication.test.ts | 8 +- .../src/token-test-contract.test.ts | 4 +- .../forc-projects/abi-contract/src/main.sw | 62 + packages/fuels/package.json | 1 - .../cli/commands/deploy/deployPredicates.ts | 4 +- .../src/cli/commands/deploy/deployScripts.ts | 4 +- packages/fuels/src/cli/types.ts | 4 +- packages/fuels/src/index.test.ts | 4 +- packages/fuels/src/index.ts | 2 +- packages/fuels/test/features/deploy.test.ts | 4 +- packages/program/package.json | 2 +- packages/program/src/contract-call-script.ts | 20 +- packages/program/src/contract.test.ts | 4 +- packages/program/src/contract.ts | 12 +- .../src/functions/base-invocation-scope.ts | 6 +- .../program/src/functions/invocation-scope.ts | 8 +- packages/program/src/response.ts | 2 +- packages/program/src/script-request.ts | 5 +- packages/program/src/types.ts | 10 +- packages/program/src/utils.ts | 5 +- packages/recipes/package.json | 5 +- packages/recipes/scripts/build-recipes.ts | 9 +- packages/recipes/src/types/common.ts | 4 +- .../types/contracts/Src14OwnedProxy-abi.ts | 4 +- .../src/types/contracts/Src14OwnedProxy.ts | 6 +- .../types/contracts/Src14OwnedProxyTypes.ts | 2 +- packages/script/package.json | 2 +- packages/script/src/script.test.ts | 11 +- packages/script/src/script.ts | 14 +- packages/script/test/fixtures/index.ts | 4 +- packages/script/test/mocks.ts | 4 +- packages/transactions/package.json | 2 +- .../src/coders/byte-array.test.ts | 10 +- .../transactions/src/coders/byte-array.ts | 60 +- packages/transactions/src/coders/coders.ts | 18 + .../transactions/src/coders/input.test.ts | 2 +- packages/transactions/src/coders/input.ts | 234 +- packages/transactions/src/coders/output.ts | 208 +- .../transactions/src/coders/pad-coder.test.ts | 76 + packages/transactions/src/coders/pad-coder.ts | 18 + .../transactions/src/coders/policy.test.ts | 16 +- packages/transactions/src/coders/policy.ts | 38 +- .../transactions/src/coders/storage-slot.ts | 27 +- .../transactions/src/coders/transaction.ts | 280 +- .../transactions/src/coders/tx-pointer.ts | 29 +- .../src/coders/upgrade-purpose.test.ts | 8 +- .../src/coders/upgrade-purpose.ts | 74 +- packages/transactions/src/coders/utxo-id.ts | 27 +- .../transactions/src/coders/witness.test.ts | 3 +- packages/transactions/src/coders/witness.ts | 30 +- packages/transactions/src/receipt.test.ts | 20 +- packages/transactions/src/receipt.ts | 12 +- pnpm-lock.yaml | 41 +- templates/nextjs/src/sway-api/common.ts | 4 +- templates/vite/src/sway-api/common.ts | 4 +- tsconfig.test.json | 2 +- vitest.d.ts | 12 + 197 files changed, 9413 insertions(+), 1197 deletions(-) create mode 100644 .changeset/nice-books-tease.md create mode 100644 packages/abi/src/coder/AbiCoder.ts delete mode 100644 packages/abi/src/coder/abi-coder.ts create mode 100644 packages/abi/src/coder/constants.ts create mode 100644 packages/abi/src/coder/encoding/encoding-constants.ts create mode 100644 packages/abi/src/coder/encoding/encoding-types.ts create mode 100644 packages/abi/src/coder/encoding/encoding.ts create mode 100644 packages/abi/src/coder/encoding/index.ts create mode 100644 packages/abi/src/coder/encoding/v1/array.ts create mode 100644 packages/abi/src/coder/encoding/v1/enum.ts create mode 100644 packages/abi/src/coder/encoding/v1/factories/array.ts create mode 100644 packages/abi/src/coder/encoding/v1/factories/enum.ts create mode 100644 packages/abi/src/coder/encoding/v1/factories/index.ts create mode 100644 packages/abi/src/coder/encoding/v1/factories/option.ts create mode 100644 packages/abi/src/coder/encoding/v1/factories/string.ts create mode 100644 packages/abi/src/coder/encoding/v1/factories/struct.ts create mode 100644 packages/abi/src/coder/encoding/v1/factories/tuple.ts create mode 100644 packages/abi/src/coder/encoding/v1/factories/vector.ts create mode 100644 packages/abi/src/coder/encoding/v1/fixed.ts create mode 100644 packages/abi/src/coder/encoding/v1/heap.ts create mode 100644 packages/abi/src/coder/encoding/v1/option.ts create mode 100644 packages/abi/src/coder/encoding/v1/string.ts create mode 100644 packages/abi/src/coder/encoding/v1/struct.ts create mode 100644 packages/abi/src/coder/encoding/v1/tuple.ts create mode 100644 packages/abi/src/coder/encoding/validation.ts create mode 100644 packages/abi/src/coder/utils/createConfigurable.ts create mode 100644 packages/abi/src/coder/utils/createFunction.ts create mode 100644 packages/abi/src/coder/utils/createFunctionSelector.ts create mode 100644 packages/abi/src/coder/utils/createFunctionSignature.ts create mode 100644 packages/abi/src/coder/utils/createLog.ts create mode 100644 packages/abi/src/coder/utils/createType.ts create mode 100644 packages/abi/src/coder/utils/getFunctionInputs.ts create mode 100644 packages/abi/src/coder/utils/padValuesWithUndefined.ts create mode 100644 packages/abi/test/encoding/AbiCoder.test.ts create mode 100644 packages/abi/test/encoding/AbiEncoding.test.ts create mode 100644 packages/abi/test/encoding/v1/array.test.ts create mode 100644 packages/abi/test/encoding/v1/b256.test.ts create mode 100644 packages/abi/test/encoding/v1/b512.test.ts create mode 100644 packages/abi/test/encoding/v1/boolean.test.ts create mode 100644 packages/abi/test/encoding/v1/byte.test.ts create mode 100644 packages/abi/test/encoding/v1/enum.test.ts create mode 100644 packages/abi/test/encoding/v1/option.test.ts create mode 100644 packages/abi/test/encoding/v1/raw-slice.test.ts create mode 100644 packages/abi/test/encoding/v1/std-string.test.ts create mode 100644 packages/abi/test/encoding/v1/str.test.ts create mode 100644 packages/abi/test/encoding/v1/string.test.ts create mode 100644 packages/abi/test/encoding/v1/struct.test.ts create mode 100644 packages/abi/test/encoding/v1/tuple.test.ts create mode 100644 packages/abi/test/encoding/v1/u16.test.ts create mode 100644 packages/abi/test/encoding/v1/u256.test.ts create mode 100644 packages/abi/test/encoding/v1/u32.test.ts create mode 100644 packages/abi/test/encoding/v1/u64.test.ts create mode 100644 packages/abi/test/encoding/v1/u8.test.ts create mode 100644 packages/abi/test/encoding/v1/vector.test.ts create mode 100644 packages/abi/test/encoding/v1/void.test.ts create mode 100644 packages/abi/test/fixtures/v1.ts create mode 100644 packages/abi/test/utils/constants.ts create mode 100644 packages/transactions/src/coders/coders.ts create mode 100644 packages/transactions/src/coders/pad-coder.test.ts create mode 100644 packages/transactions/src/coders/pad-coder.ts create mode 100644 vitest.d.ts diff --git a/.changeset/nice-books-tease.md b/.changeset/nice-books-tease.md new file mode 100644 index 00000000000..a845151cc84 --- /dev/null +++ b/.changeset/nice-books-tease.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/apps/docs/src/guide/encoding/encode-and-decode.md b/apps/docs/src/guide/encoding/encode-and-decode.md index 6ed76fad5ad..561e7feeaa1 100644 --- a/apps/docs/src/guide/encoding/encode-and-decode.md +++ b/apps/docs/src/guide/encoding/encode-and-decode.md @@ -1,13 +1,13 @@ # Encode and Decode -To interact with the FuelVM, types must be encoded and decoded per the [argument encoding specification](https://docs.fuel.network/docs/specs/abi/argument-encoding/). The SDK provides the `Interface` class to encode and decode data. +To interact with the FuelVM, types must be encoded and decoded per the [argument encoding specification](https://docs.fuel.network/docs/specs/abi/argument-encoding/). The SDK provides the `AbiCoder` class to encode and decode data. -The relevant methods of `Interface` are: +To encode and decode types, the `AbiCoder` class provides the `getType` method which returns a `AbiCoderType` instance that provides the following methods: -- `encodeType` -- `decodeType` +- `encode` +- `decode` -The `Interface` class requires you to pass the [ABI](https://docs.fuel.network/docs/specs/abi/json-abi-format/) on initialization. Both methods accept a `concreteTypeId`, which must exist in the ABI's `concreteTypes` array. After that, a suitable coder will be assigned to encode/decode that type. +The `AbiCoder` class requires you to pass the [ABI](https://docs.fuel.network/docs/specs/abi/json-abi-format/) on initialization. Both methods accept a `concreteTypeId`, which must exist in the ABI's `concreteTypes` array. After that, a suitable coder will be assigned to encode/decode that type. Imagine we are working with the following script that returns the sum of two `u32` integers: @@ -23,7 +23,7 @@ It will produce the following ABI: <<< @./snippets/encode-and-decode.jsonc#encode-and-decode-2{json:line-numbers} -Now, let's prepare some data to pass to the `main` function to retrieve the combined integer. The function expects and returns a `u32` integer. So here, we will encode the `u32` to pass it to the function and receive the same `u32` back, as bytes, that we'll use for decoding. We can do both of these with the `Interface`. +Now, let's prepare some data to pass to the `main` function to retrieve the combined integer. The function expects and returns a `u32` integer. So here, we will encode the `u32` to pass it to the function and receive the same `u32` back, as bytes, that we'll use for decoding. We can do both of these with the `AbiCoder`. First, let's prepare the transaction: diff --git a/apps/docs/src/guide/encoding/snippets/encode-and-decode.ts b/apps/docs/src/guide/encoding/snippets/encode-and-decode.ts index 0565c7b16b8..3640ae93e8a 100644 --- a/apps/docs/src/guide/encoding/snippets/encode-and-decode.ts +++ b/apps/docs/src/guide/encoding/snippets/encode-and-decode.ts @@ -1,12 +1,15 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ // #region full -import type { JsonAbi, TransactionResultReturnDataReceipt } from 'fuels'; +import type { + AbiSpecification, + TransactionResultReturnDataReceipt, +} from 'fuels'; import { buildFunctionResult, ReceiptType, arrayify, Script, - Interface, + AbiCoder, Provider, Wallet, } from 'fuels'; @@ -20,7 +23,7 @@ const wallet = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider); // First we need to build out the transaction via the script that we want to encode. // For that we'll need the ABI and the bytecode of the script -const abi: JsonAbi = ScriptSum.abi; +const abi: AbiSpecification = ScriptSum.abi; const bytecode = ScriptSum.bytecode; // Create the invocation scope for the script call, passing the initial @@ -43,13 +46,13 @@ const argument = abi.functions .find((f) => f.name === 'main') ?.inputs.find((i) => i.name === 'inputted_amount')?.concreteTypeId as string; -// The `Interface` class (imported from `fuels`) is the entry point for encoding and decoding all things abi-related. -// We will use its `encodeType` method and create the encoding required for -// a u32 which takes 4 bytes up of property space. +// The `AbiCoder` class (imported from `fuels`) is the entry point for encoding and decoding all things abi-related. +// We will use its `getType` method to get the coder for the argument and then call its `encode` method to +// create the encoding required for a u32 which takes 4 bytes up of property space. -const abiInterface = new Interface(abi); +const abiCoder = AbiCoder.fromAbi(abi); const argumentToAdd = 10; -const encodedArguments = abiInterface.encodeType(argument, [argumentToAdd]); +const encodedArguments = abiCoder.getType(argument).encode([argumentToAdd]); // Therefore the value of 10 will be encoded to: // Uint8Array([0, 0, 0, 10] @@ -91,10 +94,13 @@ const returnData = arrayify(returnDataReceipt.data); // returnData = new Uint8Array([0, 0, 0, 20] // And now we can decode the returned bytes in a similar fashion to how they were -// encoded, via the `Interface` -const [decodedReturnData] = abiInterface.decodeType(argument, returnData); +// encoded, via the `AbiCoder` +const decodedReturnData = abiCoder.getType(argument).decode(returnData); // 20 const totalValue = argumentToAdd + initialValue; // #endregion encode-and-decode-5 // #endregion full + +console.log('decodedReturnData should be 20', decodedReturnData === 20); +console.log('totalValue should be 20', totalValue === 20); diff --git a/apps/docs/src/guide/encoding/snippets/working-with-bytes.ts b/apps/docs/src/guide/encoding/snippets/working-with-bytes.ts index 1dc89c369dd..814b7645cec 100644 --- a/apps/docs/src/guide/encoding/snippets/working-with-bytes.ts +++ b/apps/docs/src/guide/encoding/snippets/working-with-bytes.ts @@ -1,88 +1,115 @@ -/* eslint-disable @typescript-eslint/no-unused-vars */ // #region full import { randomBytes } from 'crypto'; -import { - ArrayCoder, - B256Coder, - B512Coder, - BigNumberCoder, - BooleanCoder, - EnumCoder, - NumberCoder, - RawSliceCoder, - StdStringCoder, - StringCoder, - StructCoder, - TupleCoder, - VecCoder, - hexlify, -} from 'fuels'; +import { encoding, hexlify } from 'fuels'; // #region working-with-bytes-1 -const u8Coder = new NumberCoder('u8'); -const encodedU8 = u8Coder.encode(255); +const encodedU8 = encoding.u8.encode(255); -const u16Coder = new NumberCoder('u16'); -const encodedU16 = u16Coder.encode(255); +const encodedU16 = encoding.u16.encode(255); -const u32Coder = new NumberCoder('u32'); -const encodedU32 = u32Coder.encode(255); +const encodedU32 = encoding.u32.encode(255); -const u64Coder = new BigNumberCoder('u64'); -const encodedU64 = u64Coder.encode(255); +const encodedU64 = encoding.u64.encode(255); -const u256Coder = new BigNumberCoder('u256'); -const encodedU256 = u256Coder.encode(255); +const encodedU256 = encoding.u256.encode(255); // #endregion working-with-bytes-1 // #region working-with-bytes-2 -const booleanCoder = new BooleanCoder(); -const encodedTrue = booleanCoder.encode(true); - -const encodedFalse = booleanCoder.encode(false); +const encodedTrue = encoding.bool.encode(true); +const encodedFalse = encoding.bool.encode(false); // #endregion working-with-bytes-2 // #region working-with-bytes-3 -const stringCoder = new StringCoder(5); -const encoded = stringCoder.encode('hello'); +const stringCoder = encoding.string(5); +const encodedString = stringCoder.encode('hello'); // #endregion working-with-bytes-3 // #region working-with-bytes-4 -const b256Coder = new B256Coder(); -const encodedB256 = b256Coder.encode(hexlify(randomBytes(32))); -const b512Coder = new B512Coder(); -const encodedB512 = b512Coder.encode(hexlify(randomBytes(64))); +const encodedB256 = encoding.b256.encode(hexlify(randomBytes(32))); + +const encodedB512 = encoding.b512.encode(hexlify(randomBytes(64))); // #endregion working-with-bytes-4 // #region working-with-bytes-5 -const tupleCoder = new TupleCoder([ - new NumberCoder('u8'), - new NumberCoder('u16'), -]); +const tupleCoder = encoding.tuple([encoding.u8, encoding.u16]); const encodedTuple = tupleCoder.encode([255, 255]); -const structCoder = new StructCoder('struct', { - a: new NumberCoder('u8'), - b: new NumberCoder('u16'), +const structCoder = encoding.struct({ + a: encoding.u8, + b: encoding.u16, }); const encodedStruct = structCoder.encode({ a: 255, b: 255 }); -const arrayCoder = new ArrayCoder(new NumberCoder('u8'), 4); +const arrayCoder = encoding.array(encoding.u8, 4); const encodedArray = arrayCoder.encode([255, 0, 255, 0]); -const enumCoder = new EnumCoder('enum', { a: new NumberCoder('u32') }); +const enumCoder = encoding.enum({ a: encoding.u32 }); const encodedEnum = enumCoder.encode({ a: 255 }); // #endregion working-with-bytes-5 // #region working-with-bytes-6 -const vecCoder = new VecCoder(new NumberCoder('u8')); +const vecCoder = encoding.vector(encoding.u8); const encodedVec = vecCoder.encode([255, 0, 255]); -const stdStringCoder = new StdStringCoder(); -const encodedStdString = stdStringCoder.encode('hello'); +const encodedStdString = encoding.stdString.encode('hello'); -const rawSliceCoder = new RawSliceCoder(); -const encodedRawSlice = rawSliceCoder.encode([1, 2, 3, 4]); +const encodedRawSlice = encoding.rawSlice.encode([1, 2, 3, 4]); // #endregion working-with-bytes-6 // #endregion full + +console.log('encodedU8 should be [255]', encodedU8.toString() === '255'); +console.log('encodedU16 should be [0, 255]', encodedU16.toString() === '0,255'); +console.log( + 'encodedU32 should be [0, 0, 0, 255]', + encodedU32.toString() === '0,0,0,255' +); +console.log( + 'encodedU64 should be [0, 0, 0, 0, 0, 0, 0, 255]', + encodedU64.toString() === '0,0,0,0,0,0,0,255' +); +console.log( + 'encodedU256 should be [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255]', + encodedU256.toString() === + '0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255' +); + +console.log('encodedTrue should be [1]', encodedTrue.toString() === '1'); +console.log('encodedFalse should be [0]', encodedFalse.toString() === '0'); + +console.log( + 'encodedString should be [104, 101, 108, 108, 111]', + encodedString.toString() === '104,101,108,108,111' +); + +console.log('encodedB256 should be 32', encodedB256.length === 32); +console.log('encodedB512 should be 64', encodedB512.length === 64); + +console.log( + 'encodedTuple should be [255, 0, 255]', + encodedTuple.toString() === '255,0,255' +); +console.log( + 'encodedStruct should be [255, 0, 255]', + encodedStruct.toString() === '255,0,255' +); +console.log( + 'encodedArray should be [255, 0, 255, 0]', + encodedArray.toString() === '255,0,255,0' +); +console.log( + 'encodedEnum should be [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255]', + encodedEnum.toString() === '0,0,0,0,0,0,0,0,0,0,0,255' +); +console.log( + 'encodedVec should be [0, 0, 0, 0, 0, 0, 0, 3, 255, 0, 255]', + encodedVec.toString() === '0,0,0,0,0,0,0,3,255,0,255' +); +console.log( + 'encodedStdString should be [0, 0, 0, 0, 0, 0, 0, 5, 104, 101, 108, 108, 111]', + encodedStdString.toString() === '0,0,0,0,0,0,0,5,104,101,108,108,111' +); +console.log( + 'encodedRawSlice should be [0, 0, 0, 0, 0, 0, 0, 4, 1, 2, 3, 4]', + encodedRawSlice.toString() === '0,0,0,0,0,0,0,4,1,2,3,4' +); diff --git a/apps/docs/src/guide/encoding/working-with-bytes.md b/apps/docs/src/guide/encoding/working-with-bytes.md index 9d1f8149cbb..e82bb7e9cea 100644 --- a/apps/docs/src/guide/encoding/working-with-bytes.md +++ b/apps/docs/src/guide/encoding/working-with-bytes.md @@ -6,7 +6,7 @@ This guide aims to give a high-level overview of how to work with bytes in the S We know the sizes of all core types at compile time. They are the building blocks of the more complex types and are the most common types you will encounter. -### Unsigned Integer (`u8` / `u16` / `u32` / `u64` / `u128` / `u256`) +### Unsigned Integer (`u8` / `u16` / `u32` / `u64` / `u256`) Each type will only contain the number of bits specified in the name. For example, a `u8` will contain 8 bits, and a `u256` will contain 256 bits and take up the exact property space with no additional padding. diff --git a/apps/docs/src/guide/scripts/snippets/initialising-scripts.ts b/apps/docs/src/guide/scripts/snippets/initialising-scripts.ts index 6516ba10849..bae140341c4 100644 --- a/apps/docs/src/guide/scripts/snippets/initialising-scripts.ts +++ b/apps/docs/src/guide/scripts/snippets/initialising-scripts.ts @@ -29,10 +29,9 @@ const scriptRequest = new ScriptRequest( throw new Error('fail'); } - const [decodedResult] = script.interface.functions.main.decodeOutput( + return script.interface.functions.main.decodeOutput( scriptResult.returnReceipt.data ); - return decodedResult; } ); // #endregion script-init diff --git a/internal/check-imports/package.json b/internal/check-imports/package.json index 1b8d66bf044..a34d3cf4852 100644 --- a/internal/check-imports/package.json +++ b/internal/check-imports/package.json @@ -9,6 +9,7 @@ }, "license": "Apache-2.0", "dependencies": { + "@fuel-ts/abi": "workspace:*", "@fuel-ts/abi-coder": "workspace:*", "@fuel-ts/abi-typegen": "workspace:*", "@fuel-ts/address": "workspace:*", diff --git a/internal/check-imports/src/imports.ts b/internal/check-imports/src/imports.ts index 570ede6e6a6..3cd0aa73f9f 100644 --- a/internal/check-imports/src/imports.ts +++ b/internal/check-imports/src/imports.ts @@ -1,3 +1,4 @@ +import * as abi from '@fuel-ts/abi'; import * as abiCoder from '@fuel-ts/abi-coder'; import * as abiTypegen from '@fuel-ts/abi-typegen'; import * as account from '@fuel-ts/account'; @@ -20,6 +21,7 @@ import * as fuels from 'fuels'; const { log } = console; log([ + abi, abiCoder, abiTypegen, address, diff --git a/internal/check-imports/src/references.ts b/internal/check-imports/src/references.ts index b1a1479a66c..508c8f40655 100644 --- a/internal/check-imports/src/references.ts +++ b/internal/check-imports/src/references.ts @@ -1,3 +1,4 @@ +import { AbiCoder, encoding } from '@fuel-ts/abi'; import { Interface, StringCoder } from '@fuel-ts/abi-coder'; import { AbiTypeGen } from '@fuel-ts/abi-typegen'; import { runCliAction } from '@fuel-ts/abi-typegen/cli'; @@ -45,6 +46,10 @@ const { log } = console; /** * abi */ +log(AbiCoder); +log(encoding); +log(encoding.v1.string); +log(encoding.v1.string(8)); log(AbiParser); /** diff --git a/packages/abi-coder/src/FunctionFragment.ts b/packages/abi-coder/src/FunctionFragment.ts index 32087c21d19..9aabd92f021 100644 --- a/packages/abi-coder/src/FunctionFragment.ts +++ b/packages/abi-coder/src/FunctionFragment.ts @@ -75,7 +75,7 @@ export class FunctionFragment { return new TupleCoder(coders).encode(argumentValues); } - decodeArguments(data: BytesLike) { + decodeArguments(data: BytesLike): unknown[] | undefined { const bytes = arrayify(data); const nonVoidInputs = findNonVoidInputs(this.jsonAbiOld, this.jsonFnOld.inputs); diff --git a/packages/abi-coder/src/encoding/coders/B256Coder.test.ts b/packages/abi-coder/src/encoding/coders/B256Coder.test.ts index b2c19ff78df..64df40ac176 100644 --- a/packages/abi-coder/src/encoding/coders/B256Coder.test.ts +++ b/packages/abi-coder/src/encoding/coders/B256Coder.test.ts @@ -18,7 +18,7 @@ describe('B256Coder', () => { const coder = new B256Coder(); - it('should encode zero as a 256 bit hash string', () => { + it('should encode [zero] as a 256 bit hash string', () => { const expected = B256_ZERO_ENCODED; const actual = coder.encode(B256_ZERO_DECODED); diff --git a/packages/abi-coder/src/encoding/coders/OptionCoder.test.ts b/packages/abi-coder/src/encoding/coders/OptionCoder.test.ts index e43ca579211..e930ef911fe 100644 --- a/packages/abi-coder/src/encoding/coders/OptionCoder.test.ts +++ b/packages/abi-coder/src/encoding/coders/OptionCoder.test.ts @@ -8,36 +8,36 @@ import { VoidCoder } from './VoidCoder'; */ describe('OptionCoder', () => { const coder = new OptionCoder('std::option::Option', { - Some: new NumberCoder('u8'), None: new VoidCoder(), + Some: new NumberCoder('u8'), }); describe('encode', () => { it('should encode a Some value', () => { const encoded = coder.encode(100); - const expected = Uint8Array.from([0, 0, 0, 0, 0, 0, 0, 0, 100]); + const expected = Uint8Array.from([0, 0, 0, 0, 0, 0, 0, 1, 100]); expect(encoded).toEqual(expected); }); it('should encode a None value', () => { const encoded = coder.encode(undefined); - const expected = Uint8Array.from([0, 0, 0, 0, 0, 0, 0, 1]); + const expected = Uint8Array.from([0, 0, 0, 0, 0, 0, 0, 0]); expect(encoded).toEqual(expected); }); it('should encode a None value [optional]', () => { const encoded = coder.encode(); - const expected = Uint8Array.from([0, 0, 0, 0, 0, 0, 0, 1]); + const expected = Uint8Array.from([0, 0, 0, 0, 0, 0, 0, 0]); expect(encoded).toEqual(expected); }); }); describe('decode', () => { it('should decode a Some value', () => { - const input = Uint8Array.from([0, 0, 0, 0, 0, 0, 0, 0, 100]); + const input = Uint8Array.from([0, 0, 0, 0, 0, 0, 0, 1, 100]); const expected = [100, 9]; const decoded = coder.decode(input, 0); @@ -46,7 +46,7 @@ describe('OptionCoder', () => { }); it('should decode a None value', () => { - const input = Uint8Array.from([0, 0, 0, 0, 0, 0, 0, 1]); + const input = Uint8Array.from([0, 0, 0, 0, 0, 0, 0, 0]); const expected = [undefined, 8]; const decoded = coder.decode(input, 0); diff --git a/packages/abi-typegen/src/templates/contract/main.hbs b/packages/abi-typegen/src/templates/contract/main.hbs index eef7efd30a2..ba606c1c975 100644 --- a/packages/abi-typegen/src/templates/contract/main.hbs +++ b/packages/abi-typegen/src/templates/contract/main.hbs @@ -1,12 +1,13 @@ {{header}} -import { Contract, Interface } from "fuels"; +import { Contract, AbiCoder } from "fuels"; {{#if imports}} import type { Provider, Account, StorageSlot, Address, + AbiSpecification, {{#each imports}} {{this}}, {{/each}} @@ -53,18 +54,14 @@ export type {{capitalizedName}}Configurables = Partial<{ }>; {{/if}} -const abi = {{abiJsonString}}; +const abi: AbiSpecification = {{abiJsonString}}; const storageSlots: StorageSlot[] = {{storageSlotsJsonString}}; -export class {{capitalizedName}}Interface extends Interface { - constructor() { - super(abi); - } - +export class {{capitalizedName}}AbiCoder extends AbiCoder { declare functions: { {{#each functionsFragments}} - {{this}}: FunctionFragment; + {{this}}: AbiCoderFunction; {{/each}} }; } @@ -73,7 +70,7 @@ export class {{capitalizedName}} extends Contract { static readonly abi = abi; static readonly storageSlots = storageSlots; - declare interface: {{capitalizedName}}Interface; + declare interface: {{capitalizedName}}AbiCoder; declare functions: { {{#each functionsTypedefs}} {{this}}; diff --git a/packages/abi-typegen/src/templates/contract/main.ts b/packages/abi-typegen/src/templates/contract/main.ts index 759f3624f78..258296f8061 100644 --- a/packages/abi-typegen/src/templates/contract/main.ts +++ b/packages/abi-typegen/src/templates/contract/main.ts @@ -32,7 +32,7 @@ export function renderMainTemplate(params: { abi: Abi; versions: BinaryVersions const { structs } = formatStructs({ types }); const { imports } = formatImports({ types, - baseMembers: ['FunctionFragment', 'InvokeFunction'], + baseMembers: ['AbiCoderFunction', 'InvokeFunction'], }); const { rawContents, storageSlotsContents } = params.abi; diff --git a/packages/abi-typegen/src/templates/predicate/main.hbs b/packages/abi-typegen/src/templates/predicate/main.hbs index 03cbaf76dd6..56f68ed8a79 100644 --- a/packages/abi-typegen/src/templates/predicate/main.hbs +++ b/packages/abi-typegen/src/templates/predicate/main.hbs @@ -57,7 +57,7 @@ export type {{capitalizedName}}Parameters = Omit< 'abi' | 'bytecode' >; -const abi = {{abiJsonString}}; +const abi: AbiSpecification = {{abiJsonString}}; const bytecode = decompressBytecode('{{compressedBytecode}}'); diff --git a/packages/abi-typegen/src/templates/predicate/main.ts b/packages/abi-typegen/src/templates/predicate/main.ts index a2c928ecf94..01e0fee0134 100644 --- a/packages/abi-typegen/src/templates/predicate/main.ts +++ b/packages/abi-typegen/src/templates/predicate/main.ts @@ -34,7 +34,14 @@ export function renderMainTemplate(params: { abi: Abi; versions: BinaryVersions const { structs } = formatStructs({ types }); const { imports } = formatImports({ types, - baseMembers: ['Predicate', 'Provider', 'InputValue', 'PredicateParams', 'decompressBytecode'], + baseMembers: [ + 'Predicate', + 'Provider', + 'InputValue', + 'PredicateParams', + 'decompressBytecode', + 'AbiSpecification', + ], }); const { prefixedInputs: inputs, output } = func.attributes; diff --git a/packages/abi-typegen/src/templates/script/main.hbs b/packages/abi-typegen/src/templates/script/main.hbs index 225d540e9ca..403aec80ba3 100644 --- a/packages/abi-typegen/src/templates/script/main.hbs +++ b/packages/abi-typegen/src/templates/script/main.hbs @@ -51,7 +51,7 @@ export type {{capitalizedName}}Configurables = Partial<{ }>; {{/if}} -const abi = {{abiJsonString}}; +const abi: AbiSpecification = {{abiJsonString}}; const bytecode = decompressBytecode('{{compressedBytecode}}'); diff --git a/packages/abi-typegen/src/templates/script/main.ts b/packages/abi-typegen/src/templates/script/main.ts index 36b76d2ce74..3ce3e15615a 100644 --- a/packages/abi-typegen/src/templates/script/main.ts +++ b/packages/abi-typegen/src/templates/script/main.ts @@ -34,7 +34,7 @@ export function renderMainTemplate(params: { abi: Abi; versions: BinaryVersions const { structs } = formatStructs({ types }); const { imports } = formatImports({ types, - baseMembers: ['Script', 'Account', 'decompressBytecode'], + baseMembers: ['Script', 'Account', 'decompressBytecode', 'AbiSpecification'], }); const { prefixedInputs: inputs, output } = func.attributes; diff --git a/packages/abi-typegen/test/fixtures/forc-projects/full/src/main.sw b/packages/abi-typegen/test/fixtures/forc-projects/full/src/main.sw index 500f8639108..74af47c4e97 100644 --- a/packages/abi-typegen/test/fixtures/forc-projects/full/src/main.sw +++ b/packages/abi-typegen/test/fixtures/forc-projects/full/src/main.sw @@ -81,15 +81,15 @@ abi MyContract { fn types_vector_geo(x: Vec) -> Vec; fn types_vector_option(x: Vec) -> Vec; fn types_option(x: Option) -> Option; - fn types_option_geo(x: Option) -> Option; + fn types_option_struct(x: Option) -> Option; fn types_evm_address(x: EvmAddress) -> EvmAddress; fn types_bytes(x: Bytes) -> Bytes; fn types_raw_slice(x: raw_slice) -> raw_slice; fn types_str_slice(x: str) -> str; fn types_std_string(x: String) -> String; fn types_result(x: Result) -> Result; - fn type_address(x: Address) -> Address; - fn type_contract_id(x: ContractId) -> ContractId; + fn types_address(x: Address) -> Address; + fn types_contract_id(x: ContractId) -> ContractId; fn type_identity(x: Identity) -> Identity; fn type_external_struct(x: ExternalStruct) -> ExternalStruct; fn type_external_enum(x: ExternalEnum) -> ExternalEnum; @@ -182,7 +182,7 @@ impl MyContract for Contract { fn types_option(x: Option) -> Option { x } - fn types_option_geo(x: Option) -> Option { + fn types_option_struct(x: Option) -> Option { x } fn types_evm_address(x: EvmAddress) -> EvmAddress { @@ -211,10 +211,10 @@ impl MyContract for Contract { Err(MyContractError::DivisionByZero) => Err(__to_str_array("DivisError")), } } - fn type_address(x: Address) -> Address { + fn types_address(x: Address) -> Address { x } - fn type_contract_id(x: ContractId) -> ContractId { + fn types_contract_id(x: ContractId) -> ContractId { x } fn type_identity(x: Identity) -> Identity { diff --git a/packages/abi-typegen/test/fixtures/templates/contract-with-configurable/main.hbs b/packages/abi-typegen/test/fixtures/templates/contract-with-configurable/main.hbs index 992052611ff..9e76887d9fe 100644 --- a/packages/abi-typegen/test/fixtures/templates/contract-with-configurable/main.hbs +++ b/packages/abi-typegen/test/fixtures/templates/contract-with-configurable/main.hbs @@ -10,14 +10,15 @@ Fuel-Core version: 33.33.33 */ -import { Contract, Interface } from "fuels"; +import { Contract, AbiCoder } from "fuels"; import type { Provider, Account, StorageSlot, Address, + AbiSpecification, + AbiCoderFunction, BigNumberish, - FunctionFragment, InvokeFunction, } from 'fuels'; @@ -32,7 +33,7 @@ export type MyContractConfigurables = Partial<{ A_GENERIC_STRUCT: GenericStructInput, BigNumberish>; }>; -const abi = { +const abi: AbiSpecification = { "programType": "contract", "specVersion": "1", "encodingVersion": "1", @@ -177,13 +178,9 @@ const abi = { const storageSlots: StorageSlot[] = []; -export class MyContractInterface extends Interface { - constructor() { - super(abi); - } - +export class MyContractAbiCoder extends AbiCoder { declare functions: { - main: FunctionFragment; + main: AbiCoderFunction; }; } @@ -191,7 +188,7 @@ export class MyContract extends Contract { static readonly abi = abi; static readonly storageSlots = storageSlots; - declare interface: MyContractInterface; + declare interface: MyContractAbiCoder; declare functions: { main: InvokeFunction<[x: string, y: string], boolean>; }; diff --git a/packages/abi-typegen/test/fixtures/templates/contract/main.hbs b/packages/abi-typegen/test/fixtures/templates/contract/main.hbs index a0350d966f7..cacdab706d7 100644 --- a/packages/abi-typegen/test/fixtures/templates/contract/main.hbs +++ b/packages/abi-typegen/test/fixtures/templates/contract/main.hbs @@ -10,17 +10,18 @@ Fuel-Core version: 33.33.33 */ -import { Contract, Interface } from "fuels"; +import { Contract, AbiCoder } from "fuels"; import type { Provider, Account, StorageSlot, Address, + AbiSpecification, + AbiCoderFunction, BigNumberish, BN, Bytes, EvmAddress, - FunctionFragment, InvokeFunction, RawSlice, StdString, @@ -55,7 +56,7 @@ export type MyStructOutput = { x: number, y: number, state: MyEnumOutput }; export type StructWithMultiOptionInput = { multiple: [Option, Option, Option, Option, Option] }; export type StructWithMultiOptionOutput = { multiple: [Option, Option, Option, Option, Option] }; -const abi = { +const abi: AbiSpecification = { "programType": "contract", "specVersion": "1", "encodingVersion": "1", @@ -685,28 +686,6 @@ const abi = { "output": "a95e1fcceb1451b8a76471f593f66c4a52ca04bde3c227c746ad7aaf988de5c6", "attributes": null }, - { - "inputs": [ - { - "name": "x", - "concreteTypeId": "f597b637c3b0f588fb8d7086c6f4735caa3122b85f0423b82e489f9bb58e2308" - } - ], - "name": "type_address", - "output": "f597b637c3b0f588fb8d7086c6f4735caa3122b85f0423b82e489f9bb58e2308", - "attributes": null - }, - { - "inputs": [ - { - "name": "x", - "concreteTypeId": "29c10735d33b5159f0c71ee1dbd17b36a3e69e41f00fab0d42e1bd9f428d8a54" - } - ], - "name": "type_contract_id", - "output": "29c10735d33b5159f0c71ee1dbd17b36a3e69e41f00fab0d42e1bd9f428d8a54", - "attributes": null - }, { "inputs": [ { @@ -740,6 +719,17 @@ const abi = { "output": "ab7cd04e05be58e3fc15d424c2c4a57f824a2a2d97d67252440a3925ebdc1335", "attributes": null }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "f597b637c3b0f588fb8d7086c6f4735caa3122b85f0423b82e489f9bb58e2308" + } + ], + "name": "types_address", + "output": "f597b637c3b0f588fb8d7086c6f4735caa3122b85f0423b82e489f9bb58e2308", + "attributes": null + }, { "inputs": [ { @@ -806,6 +796,17 @@ const abi = { "output": "cdd87b7d12fe505416570c294c884bca819364863efe3bf539245fa18515fbbb", "attributes": null }, + { + "inputs": [ + { + "name": "x", + "concreteTypeId": "29c10735d33b5159f0c71ee1dbd17b36a3e69e41f00fab0d42e1bd9f428d8a54" + } + ], + "name": "types_contract_id", + "output": "29c10735d33b5159f0c71ee1dbd17b36a3e69e41f00fab0d42e1bd9f428d8a54", + "attributes": null + }, { "inputs": [ { @@ -905,7 +906,7 @@ const abi = { "concreteTypeId": "3597e0782bd4dbaf5c8025b40ff3a325845ee34caa713a6d664bda034a31d02a" } ], - "name": "types_option_geo", + "name": "types_option_struct", "output": "3597e0782bd4dbaf5c8025b40ff3a325845ee34caa713a6d664bda034a31d02a", "attributes": null }, @@ -1150,52 +1151,48 @@ const abi = { const storageSlots: StorageSlot[] = []; -export class MyContractInterface extends Interface { - constructor() { - super(abi); - } - +export class MyContractAbiCoder extends AbiCoder { declare functions: { - alias_types_tuple_with_native_types: FunctionFragment; - type_address: FunctionFragment; - type_contract_id: FunctionFragment; - type_external_enum: FunctionFragment; - type_external_struct: FunctionFragment; - type_identity: FunctionFragment; - types_array: FunctionFragment; - types_asset_id: FunctionFragment; - types_b256: FunctionFragment; - types_b512: FunctionFragment; - types_bool: FunctionFragment; - types_bytes: FunctionFragment; - types_empty: FunctionFragment; - types_empty_then_value: FunctionFragment; - types_enum: FunctionFragment; - types_enum_with_vector: FunctionFragment; - types_evm_address: FunctionFragment; - types_generic_enum: FunctionFragment; - types_generic_struct: FunctionFragment; - types_option: FunctionFragment; - types_option_geo: FunctionFragment; - types_raw_slice: FunctionFragment; - types_result: FunctionFragment; - types_std_string: FunctionFragment; - types_str: FunctionFragment; - types_str_slice: FunctionFragment; - types_struct: FunctionFragment; - types_tuple: FunctionFragment; - types_tuple_with_native_types: FunctionFragment; - types_u16: FunctionFragment; - types_u256: FunctionFragment; - types_u32: FunctionFragment; - types_u64: FunctionFragment; - types_u8: FunctionFragment; - types_value_then_empty: FunctionFragment; - types_value_then_empty_then_value: FunctionFragment; - types_value_then_value_then_empty_then_empty: FunctionFragment; - types_vector_geo: FunctionFragment; - types_vector_option: FunctionFragment; - types_vector_u8: FunctionFragment; + alias_types_tuple_with_native_types: AbiCoderFunction; + type_external_enum: AbiCoderFunction; + type_external_struct: AbiCoderFunction; + type_identity: AbiCoderFunction; + types_address: AbiCoderFunction; + types_array: AbiCoderFunction; + types_asset_id: AbiCoderFunction; + types_b256: AbiCoderFunction; + types_b512: AbiCoderFunction; + types_bool: AbiCoderFunction; + types_bytes: AbiCoderFunction; + types_contract_id: AbiCoderFunction; + types_empty: AbiCoderFunction; + types_empty_then_value: AbiCoderFunction; + types_enum: AbiCoderFunction; + types_enum_with_vector: AbiCoderFunction; + types_evm_address: AbiCoderFunction; + types_generic_enum: AbiCoderFunction; + types_generic_struct: AbiCoderFunction; + types_option: AbiCoderFunction; + types_option_struct: AbiCoderFunction; + types_raw_slice: AbiCoderFunction; + types_result: AbiCoderFunction; + types_std_string: AbiCoderFunction; + types_str: AbiCoderFunction; + types_str_slice: AbiCoderFunction; + types_struct: AbiCoderFunction; + types_tuple: AbiCoderFunction; + types_tuple_with_native_types: AbiCoderFunction; + types_u16: AbiCoderFunction; + types_u256: AbiCoderFunction; + types_u32: AbiCoderFunction; + types_u64: AbiCoderFunction; + types_u8: AbiCoderFunction; + types_value_then_empty: AbiCoderFunction; + types_value_then_empty_then_value: AbiCoderFunction; + types_value_then_value_then_empty_then_empty: AbiCoderFunction; + types_vector_geo: AbiCoderFunction; + types_vector_option: AbiCoderFunction; + types_vector_u8: AbiCoderFunction; }; } @@ -1203,20 +1200,20 @@ export class MyContract extends Contract { static readonly abi = abi; static readonly storageSlots = storageSlots; - declare interface: MyContractInterface; + declare interface: MyContractAbiCoder; declare functions: { alias_types_tuple_with_native_types: InvokeFunction<[x: [AssetIdInput, AssetIdInput, boolean]], [AssetIdOutput, AssetIdOutput, boolean]>; - type_address: InvokeFunction<[x: AddressInput], AddressOutput>; - type_contract_id: InvokeFunction<[x: ContractIdInput], ContractIdOutput>; type_external_enum: InvokeFunction<[x: ExternalEnumInput], ExternalEnumOutput>; type_external_struct: InvokeFunction<[x: ExternalStructInput], ExternalStructOutput>; type_identity: InvokeFunction<[x: IdentityInput], IdentityOutput>; + types_address: InvokeFunction<[x: AddressInput], AddressOutput>; types_array: InvokeFunction<[x: [BigNumberish, BigNumberish, BigNumberish]], [number, number, number]>; types_asset_id: InvokeFunction<[x: AssetIdInput], AssetIdOutput>; types_b256: InvokeFunction<[x: string], string>; types_b512: InvokeFunction<[x: string], string>; types_bool: InvokeFunction<[x: boolean], boolean>; types_bytes: InvokeFunction<[x: Bytes], Bytes>; + types_contract_id: InvokeFunction<[x: ContractIdInput], ContractIdOutput>; types_empty: InvokeFunction<[x?: undefined], void>; types_empty_then_value: InvokeFunction<[x: undefined, y: BigNumberish], void>; types_enum: InvokeFunction<[x: MyEnumInput], MyEnumOutput>; @@ -1225,7 +1222,7 @@ export class MyContract extends Contract { types_generic_enum: InvokeFunction<[x: GenericEnumInput], GenericEnumOutput>; types_generic_struct: InvokeFunction<[x: GenericStructWithEnumInput], GenericStructWithEnumOutput>; types_option: InvokeFunction<[x?: Option], Option>; - types_option_geo: InvokeFunction<[x?: Option], Option>; + types_option_struct: InvokeFunction<[x?: Option], Option>; types_raw_slice: InvokeFunction<[x: RawSlice], RawSlice>; types_result: InvokeFunction<[x: Result], Result>; types_std_string: InvokeFunction<[x: StdString], StdString>; diff --git a/packages/abi-typegen/test/fixtures/templates/predicate-with-configurable/main.hbs b/packages/abi-typegen/test/fixtures/templates/predicate-with-configurable/main.hbs index c40afd5a99d..4fb4f6f1738 100644 --- a/packages/abi-typegen/test/fixtures/templates/predicate-with-configurable/main.hbs +++ b/packages/abi-typegen/test/fixtures/templates/predicate-with-configurable/main.hbs @@ -11,6 +11,7 @@ */ import { + AbiSpecification, BigNumberish, decompressBytecode, InputValue, @@ -31,7 +32,7 @@ export type MyPredicateParameters = Omit< 'abi' | 'bytecode' >; -const abi = { +const abi: AbiSpecification = { "programType": "predicate", "specVersion": "1", "encodingVersion": "1", diff --git a/packages/abi-typegen/test/fixtures/templates/predicate/main.hbs b/packages/abi-typegen/test/fixtures/templates/predicate/main.hbs index 8eaed3fbf41..fe83ed8aba1 100644 --- a/packages/abi-typegen/test/fixtures/templates/predicate/main.hbs +++ b/packages/abi-typegen/test/fixtures/templates/predicate/main.hbs @@ -11,6 +11,7 @@ */ import { + AbiSpecification, BigNumberish, BN, decompressBytecode, @@ -39,7 +40,7 @@ export type MyPredicateParameters = Omit< 'abi' | 'bytecode' >; -const abi = { +const abi: AbiSpecification = { "programType": "predicate", "specVersion": "1", "encodingVersion": "1", diff --git a/packages/abi-typegen/test/fixtures/templates/script-with-configurable/main.hbs b/packages/abi-typegen/test/fixtures/templates/script-with-configurable/main.hbs index 34c9a4f1722..4dd791da2b7 100644 --- a/packages/abi-typegen/test/fixtures/templates/script-with-configurable/main.hbs +++ b/packages/abi-typegen/test/fixtures/templates/script-with-configurable/main.hbs @@ -11,6 +11,7 @@ */ import { + AbiSpecification, Account, BigNumberish, decompressBytecode, @@ -27,7 +28,7 @@ export type MyScriptConfigurables = Partial<{ SHOULD_RETURN: boolean; }>; -const abi = { +const abi: AbiSpecification = { "programType": "script", "specVersion": "1", "encodingVersion": "1", diff --git a/packages/abi-typegen/test/fixtures/templates/script/main.hbs b/packages/abi-typegen/test/fixtures/templates/script/main.hbs index aa93e951140..0d08fdbfabd 100644 --- a/packages/abi-typegen/test/fixtures/templates/script/main.hbs +++ b/packages/abi-typegen/test/fixtures/templates/script/main.hbs @@ -11,6 +11,7 @@ */ import { + AbiSpecification, Account, BigNumberish, BN, @@ -31,7 +32,7 @@ export type ScoreOutput = { user: number, points: number }; export type MyScriptInputs = [vec: Vec, enm: MyGenericEnumInput, opt: Option, res: Result, BigNumberish>]; export type MyScriptOutput = boolean; -const abi = { +const abi: AbiSpecification = { "programType": "script", "specVersion": "1", "encodingVersion": "1", diff --git a/packages/abi/package.json b/packages/abi/package.json index dc3a5066347..077818f53cd 100644 --- a/packages/abi/package.json +++ b/packages/abi/package.json @@ -41,8 +41,12 @@ "postbuild": "tsx ../../scripts/postbuild.ts" }, "dependencies": { + "@fuel-ts/crypto": "workspace:*", "@fuel-ts/errors": "workspace:*", + "@fuel-ts/hasher": "workspace:*", + "@fuel-ts/math": "workspace:*", "@fuel-ts/utils": "workspace:*", + "type-fest": "4.26.1", "@fuel-ts/versions": "workspace:*", "handlebars": "4.7.8", "commander": "12.1.0", diff --git a/packages/abi/src/coder/AbiCoder.ts b/packages/abi/src/coder/AbiCoder.ts new file mode 100644 index 00000000000..5073916bd4a --- /dev/null +++ b/packages/abi/src/coder/AbiCoder.ts @@ -0,0 +1,148 @@ +import { FuelError } from '@fuel-ts/errors'; + +import type { Abi, AbiSpecification } from '../parser'; +import { AbiParser } from '../parser'; + +import type { + AbiCoderConfigurable, + AbiCoderFunction, + AbiCoderLog, + AbiCoderType, +} from './abi-coder-types'; +import type { AbiEncoding } from './encoding'; +import { encoding } from './encoding'; +import { createConfigurable } from './utils/createConfigurable'; +import { createFunction } from './utils/createFunction'; +import { createLog } from './utils/createLog'; +import { createType } from './utils/createType'; + +export class AbiCoder { + public readonly abi: Abi; + public readonly specification: AbiSpecification; + + private readonly encoding: AbiEncoding; + private readonly functionLookup: Map; + public readonly functions: Record; + public readonly configurables: Record; + public readonly logs: Record; + + /** + * Create an instance of `AbiCoder` from an ABI specification + * + * @param specification - The ABI specification + */ + public constructor(specification: AbiSpecification) { + this.abi = AbiParser.parse(specification); + this.specification = specification; + this.encoding = encoding.fromVersion(this.abi.encodingVersion); + + const { functions, configurables, loggedTypes } = this.abi; + this.functionLookup = new Map(); + this.functions = Object.fromEntries( + functions.map((fn) => { + const func = createFunction(fn, this.encoding); + this.functionLookup.set(fn.name, func); + this.functionLookup.set(func.signature, func); + this.functionLookup.set(func.selector, func); + return [fn.name, func]; + }) + ); + this.configurables = Object.fromEntries( + configurables.map((conf) => [conf.name, createConfigurable(conf, this.encoding)]) + ); + this.logs = Object.fromEntries( + loggedTypes.map((log) => [log.logId, createLog(log, this.encoding)]) + ); + } + + /** + * Create an instance of `AbiCoder` from an ABI specification + * + * @param abi - The ABI specification + * @returns The `AbiCoder` instance + */ + static fromAbi(abi: AbiSpecification): AbiCoder { + return new AbiCoder(abi); + } + + /** + * Get a function by its name, signature or selector + * + * @param nameOrSignatureOrSelector - The function name, signature or selector + * @returns The function + * + * @throws FuelError - when the function is not found + */ + public getFunction(nameOrSignatureOrSelector: string): AbiCoderFunction { + const fn = this.functionLookup.get(nameOrSignatureOrSelector); + + if (fn === undefined) { + throw new FuelError( + FuelError.CODES.FUNCTION_NOT_FOUND, + `Unable to find function with the name or signature or selector of "${nameOrSignatureOrSelector}".` + ); + } + + return fn; + } + + /** + * Get a configurable by its name + * + * @param name - The configurable name + * @returns The configurable + * + * @throws FuelError - when the configurable is not found + */ + public getConfigurable(name: string): AbiCoderConfigurable { + const configurable = this.configurables[name]; + if (configurable === undefined) { + throw new FuelError( + FuelError.CODES.CONFIGURABLE_NOT_FOUND, + `Configurable with name '${name}' doesn't exist in the ABI.` + ); + } + + return configurable; + } + + /** + * Get a log by its log ID + * + * @param logId - The log ID + * @returns The log + * + * @throws FuelError - when the log is not found + */ + public getLog(logId: string): AbiCoderLog { + const log = this.logs[logId]; + if (log === undefined) { + throw new FuelError( + FuelError.CODES.LOG_TYPE_NOT_FOUND, + `Log type with logId '${logId}' doesn't exist in the ABI.` + ); + } + + return log; + } + + /** + * Get a type by its concrete type ID + * + * @param concreteTypeId - The concrete type ID + * @returns The type + * + * @throws FuelError - when the type is not found + */ + public getType(concreteTypeId: string): AbiCoderType { + const type = this.abi.concreteTypes.find((t) => t.concreteTypeId === concreteTypeId); + if (type === undefined) { + throw new FuelError( + FuelError.CODES.TYPE_NOT_FOUND, + `Type with concreteTypeId '${concreteTypeId}' doesn't exist in the ABI.` + ); + } + + return createType(type, this.encoding); + } +} diff --git a/packages/abi/src/coder/abi-coder-types.ts b/packages/abi/src/coder/abi-coder-types.ts index 10051c76805..9c5bb1e24e6 100644 --- a/packages/abi/src/coder/abi-coder-types.ts +++ b/packages/abi/src/coder/abi-coder-types.ts @@ -1 +1,37 @@ -// Placeholder +import type { BytesLike } from '@fuel-ts/utils'; + +import type { AbiConfigurable, AbiFunction, AbiLoggedType } from '../parser'; + +import type { DecodedValue, InputValue } from './encoding/encoding-types'; + +export interface AbiCoderFunction { + name: AbiFunction['name']; + inputs: AbiFunction['inputs']; + signature: string; + selector: string; + selectorBytes: Uint8Array; + attributes: AbiFunction['attributes']; + isReadOnly: () => boolean; + encodeArguments: (values: InputValue[]) => Uint8Array; + decodeArguments: (data: BytesLike) => DecodedValue[]; + encodeOutput: (value: InputValue) => Uint8Array; + decodeOutput: (data: BytesLike) => DecodedValue; +} + +export interface AbiCoderConfigurable { + name: AbiConfigurable['name']; + offset: AbiConfigurable['offset']; + encode: (values: InputValue) => Uint8Array; + decode: (data: BytesLike) => DecodedValue; +} + +export interface AbiCoderLog { + logId: AbiLoggedType['logId']; + encode: (values: InputValue) => Uint8Array; + decode: (data: BytesLike) => DecodedValue; +} + +export interface AbiCoderType { + encode: (value: InputValue) => Uint8Array; + decode: (data: BytesLike) => DecodedValue; +} diff --git a/packages/abi/src/coder/abi-coder.ts b/packages/abi/src/coder/abi-coder.ts deleted file mode 100644 index 38325e4eff3..00000000000 --- a/packages/abi/src/coder/abi-coder.ts +++ /dev/null @@ -1,2 +0,0 @@ -// Placeholder -export class AbiCoder {} diff --git a/packages/abi/src/coder/constants.ts b/packages/abi/src/coder/constants.ts new file mode 100644 index 00000000000..96eb8e36ac6 --- /dev/null +++ b/packages/abi/src/coder/constants.ts @@ -0,0 +1,28 @@ +/** + * Property space and config constants + */ +export const WORD_SIZE = 8; +export const BYTES_32 = 32; +export const UTXO_ID_LEN = BYTES_32 + 2; +export const ASSET_ID_LEN = BYTES_32; +export const CONTRACT_ID_LEN = BYTES_32; +export const MAX_BYTES = 2 ** 32 - 1; // Max u32 + +export const calculateVmTxMemory = ({ maxInputs }: { maxInputs: number }) => + BYTES_32 + // Tx ID + ASSET_ID_LEN + // Base asset ID + // Asset ID/Balance coin input pairs + maxInputs * (ASSET_ID_LEN + WORD_SIZE) + + WORD_SIZE; // Tx size + +// SCRIPT_FIXED_SIZE = 104 +export const SCRIPT_FIXED_SIZE = + WORD_SIZE + // Identifier + WORD_SIZE + // Gas limit + WORD_SIZE + // Script size + WORD_SIZE + // Script data size + WORD_SIZE + // Policies + WORD_SIZE + // Inputs size + WORD_SIZE + // Outputs size + WORD_SIZE + // Witnesses size + BYTES_32; // Receipts root diff --git a/packages/abi/src/coder/encoding/encoding-constants.ts b/packages/abi/src/coder/encoding/encoding-constants.ts new file mode 100644 index 00000000000..2fa4621b5fe --- /dev/null +++ b/packages/abi/src/coder/encoding/encoding-constants.ts @@ -0,0 +1,43 @@ +export const BOOL_TYPE = 'bool'; +export const U8_TYPE = 'u8'; +export const U16_TYPE = 'u16'; +export const U32_TYPE = 'u32'; +export const U64_TYPE = 'u64'; +export const U256_TYPE = 'u256'; +export const B256_TYPE = 'b256'; +export const B512_TYPE = 'b512'; +export const VOID_TYPE = 'void'; +export const BYTES_TYPE = 'bytes'; +export const RAW_SLICE_TYPE = 'raw slice'; +export const STD_STRING_TYPE = 'std string'; +export const STR_SLICE_TYPE = 'str'; +export const VECTOR_TYPE = 'vector'; +export const STRING_TYPE = 'string'; +export const STRUCT_TYPE = 'struct'; +export const ARRAY_TYPE = 'array'; +export const ENUM_TYPE = 'enum'; +export const OPTION_TYPE = 'option'; +export const TUPLE_TYPE = 'tuple'; + +export const ENCODING_TYPES = [ + U8_TYPE, + U16_TYPE, + U32_TYPE, + U64_TYPE, + U256_TYPE, + BOOL_TYPE, + B256_TYPE, + B512_TYPE, + VOID_TYPE, + BYTES_TYPE, + RAW_SLICE_TYPE, + STD_STRING_TYPE, + STR_SLICE_TYPE, + VECTOR_TYPE, + STRING_TYPE, + STRUCT_TYPE, + ARRAY_TYPE, + ENUM_TYPE, + OPTION_TYPE, + TUPLE_TYPE, +] as const; diff --git a/packages/abi/src/coder/encoding/encoding-types.ts b/packages/abi/src/coder/encoding/encoding-types.ts new file mode 100644 index 00000000000..5a9e6a1512a --- /dev/null +++ b/packages/abi/src/coder/encoding/encoding-types.ts @@ -0,0 +1,112 @@ +import type { BN } from '@fuel-ts/math'; +import type { BytesLike } from '@fuel-ts/utils'; + +import type { AbiConcreteType, AbiTypeComponent } from '../../parser'; + +import type { coders as v1 } from './v1'; + +export type SupportedCodersV1 = typeof v1; + +/** + * All the supported coders, across all versions. + */ +export type SupportedCoders = SupportedCodersV1; +export type SupportedCoder = SupportedCoders[keyof SupportedCoders]; + +/** + * A primitive type value + */ +export type Primitive = string | number | boolean; + +/** + * An option type value + */ +export type Option = T | undefined; + +export type Bytes = Uint8Array | number[]; +export type RawSlice = Uint8Array | number[]; +export type StdString = string; +export type StrSlice = string; + +/** + * The type of value you can provide to `Coder.encode` + */ +export type InputValue = + | Primitive + | BN + | Option + | BytesLike + | InputValue[] + | { [key: string]: InputValue } + | Record; + +/** + * The type of value you can get from `Coder.decode` + */ +export type DecodedValue = + | Primitive + | DecodedValue[] + | { [key: string]: DecodedValue } + | Record; + +/** + * Used to infer the encoded and decoded values of a coder. + */ +export type TypesOfCoder = + TCoder extends Coder ? { Input: TInput; Decoded: TDecoded } : never; + +export abstract class Coder { + /** + * The type of the coder + */ + abstract type: string; + + /** + * Encode a value. + * + * @param value - The value to encode. + * @returns The encoded value. + * + * @throws FuelError - with a ENCODE_ERROR code + */ + abstract encode(value: TEncoded): Uint8Array; + + /** + * Decode a value. + * + * @param value - The value to decode. + * @param offset - The offset to start decoding from. + * @returns A tuple with the [decoded value, offset of the final decoded] + * + * @throws FuelError - with a DECODE_ERROR code + */ + abstract decode(value: Uint8Array, offset?: number): [TDecoded, number]; +} + +export type CoderFactoryParameters = { + name?: string; + type: AbiConcreteType | AbiTypeComponent['type']; +}; +export type CoderFactory = ( + params: CoderFactoryParameters, + factory: CoderFactory +) => TCoder; + +type CurrentEncoding = typeof v1; + +export type Encoding = CurrentEncoding & { + v1: typeof v1; + fromVersion: (version: string) => AbiEncoding; +}; + +export type AbiEncoding = { + coders: SupportedCoders; + + /** + * Get a coder for a given type and name + * + * @param opts - The options object + * @returns A coder + */ + getCoder: (params: CoderFactoryParameters) => Coder; +}; diff --git a/packages/abi/src/coder/encoding/encoding.ts b/packages/abi/src/coder/encoding/encoding.ts new file mode 100644 index 00000000000..de0090c25f5 --- /dev/null +++ b/packages/abi/src/coder/encoding/encoding.ts @@ -0,0 +1,74 @@ +import { FuelError } from '@fuel-ts/errors'; +import { assertUnreachable } from '@fuel-ts/utils'; + +import type { Matcher } from '../../matchers/sway-type-matchers'; + +import type { + AbiEncoding, + Coder, + CoderFactoryParameters, + Encoding, + SupportedCoder, + SupportedCoders, +} from './encoding-types'; +import * as v1 from './v1'; + +interface SupportedEncoding { + coders: SupportedCoders; + matcher: Matcher; +} + +const currentEncoding = v1.coders; +const supportedEncodings: Record = { + '1': { coders: v1.coders, matcher: v1.matcher }, +}; + +export const encoding: Encoding = { + ...currentEncoding, + v1: v1.coders, + fromVersion: (version: string): AbiEncoding => { + const supportedEncoding = supportedEncodings[version as keyof typeof supportedEncodings]; + if (!supportedEncoding) { + throw new FuelError( + FuelError.CODES.UNSUPPORTED_ENCODING_VERSION, + `Unsupported encoding version "${version}"` + ); + } + + const getCoder = (opts: CoderFactoryParameters) => { + const { type, name } = opts; + let coder: SupportedCoder | undefined; + try { + coder = supportedEncoding.matcher(type); + } catch (error) { + throw new FuelError( + FuelError.CODES.CODER_NOT_FOUND, + `Unsupported coder type "${type.swayType}" for element "${name}"` + ); + } + + if (!coder) { + throw new FuelError( + FuelError.CODES.CODER_NOT_FOUND, + `Unsupported coder type "${type.swayType}" for element "${name}"` + ); + } + + if (typeof coder === 'object') { + return coder as Coder; + } + + if (typeof coder === 'function') { + return coder.factory(opts, getCoder); + } + + // Coders should always be either an object or function + return assertUnreachable(coder as never); + }; + + return { + coders: supportedEncoding.coders, + getCoder, + }; + }, +}; diff --git a/packages/abi/src/coder/encoding/index.ts b/packages/abi/src/coder/encoding/index.ts new file mode 100644 index 00000000000..9fc5c4794dd --- /dev/null +++ b/packages/abi/src/coder/encoding/index.ts @@ -0,0 +1,2 @@ +export { encoding } from './encoding'; +export * from './encoding-types'; diff --git a/packages/abi/src/coder/encoding/v1/array.ts b/packages/abi/src/coder/encoding/v1/array.ts new file mode 100644 index 00000000000..f90d53ced99 --- /dev/null +++ b/packages/abi/src/coder/encoding/v1/array.ts @@ -0,0 +1,46 @@ +import { concat } from '@fuel-ts/utils'; + +import { ARRAY_TYPE } from '../encoding-constants'; +import type { Coder, TypesOfCoder } from '../encoding-types'; +import { + assertValueIsArray, + assertDataLengthLessThanMax, + assertValueLengthEqualsExpected, +} from '../validation'; + +/** + * `array` coder + */ +export type ArrayEncodeValue = Array['Input']>; +export type ArrayDecodeData = Array['Decoded']>; +export type ArrayCoder = Coder< + ArrayEncodeValue, + ArrayDecodeData +>; + +export const arrayCoder = ( + coder: TCoder, + size: number +): ArrayCoder => ({ + type: ARRAY_TYPE, + encode: (value: ArrayEncodeValue): Uint8Array => { + assertValueIsArray(value, ARRAY_TYPE); + assertValueLengthEqualsExpected(value, size, ARRAY_TYPE); + const encodedValues = value.map((elementValue) => coder.encode(elementValue)); + return concat(encodedValues); + }, + decode: (data: Uint8Array, initialOffset: number = 0): [ArrayDecodeData, number] => { + assertDataLengthLessThanMax(data, ARRAY_TYPE); + + let decoded; + let offset = initialOffset; + + const decodedValue = Array(size) + .fill(0) + .map(() => { + [decoded, offset] = coder.decode(data, offset); + return decoded; + }); + return [decodedValue as ArrayDecodeData, offset]; + }, +}); diff --git a/packages/abi/src/coder/encoding/v1/enum.ts b/packages/abi/src/coder/encoding/v1/enum.ts new file mode 100644 index 00000000000..01171d1d88c --- /dev/null +++ b/packages/abi/src/coder/encoding/v1/enum.ts @@ -0,0 +1,90 @@ +import { concat } from '@fuel-ts/utils'; +import type { RequireExactlyOne } from 'type-fest'; + +import { ENUM_TYPE, VOID_TYPE } from '../encoding-constants'; +import type { Coder, TypesOfCoder } from '../encoding-types'; +import { errors } from '../validation'; + +import { u64 } from './fixed'; + +export type EnumEncodeValue> = RequireExactlyOne<{ + [P in keyof TCoders]: TypesOfCoder['Input']; +}>; +export type EnumDecodeValue> = RequireExactlyOne<{ + [P in keyof TCoders]: TypesOfCoder['Decoded']; +}>; +export type EnumCoder = Record> = Coder< + EnumEncodeValue, + EnumDecodeValue +>; + +const isNativeCoder = (coder: Coder) => coder.type === VOID_TYPE; +const extractCaseKeysFromValue = >( + value: EnumEncodeValue +): string[] => (typeof value === 'string' ? [value] : Object.keys(value)); +const extractCaseValueFromValue = >( + value: EnumEncodeValue +) => (typeof value === 'string' ? undefined : Object.values(value)[0]); +const extractCaseIndexFromData = (data: Uint8Array, initialOffset: number) => { + const [decoded, offset] = u64.decode(data, initialOffset); + return [decoded.toNumber(), offset]; +}; + +const createCaseValueCoder = (key: string, index: number, coder: TCoder) => { + const isNative = isNativeCoder(coder); + return { + type: ENUM_TYPE, + encode: (value: TypesOfCoder['Input']): Uint8Array => { + const encodedIndex = u64.encode(index); + const encodedValue = coder.encode(value); + return concat([encodedIndex, encodedValue]); + }, + decode: (data: Uint8Array, initialOffset = 0): [TypesOfCoder['Decoded'], number] => { + const [decoded, offset] = coder.decode(data, initialOffset); + return [isNative ? key : { [key]: decoded }, offset]; + }, + }; +}; + +export const enumCoder = >( + initialCoders: TCoders, + type: string = ENUM_TYPE +) => { + const coders = Object.fromEntries( + Object.entries(initialCoders).map(([key, coder], index) => [ + key, + createCaseValueCoder(key, index, coder), + ]) + ); + const validKeys = Object.keys(coders); + + return { + type, + encode: (value: EnumEncodeValue) => { + const [caseKey, ...shouldBeEmpty] = extractCaseKeysFromValue(value); + if (!caseKey) { + throw errors.invalidEnumValueCaseKeyMissing(type, value, validKeys); + } + if (!validKeys.includes(caseKey)) { + throw errors.invalidEnumValueCaseKey(type, value, caseKey, validKeys); + } + if (shouldBeEmpty.length > 0) { + throw errors.invalidEnumValueMultipleCaseKeys(type, value, validKeys); + } + const caseValue = extractCaseValueFromValue(value); + return coders[caseKey].encode(caseValue); + }, + decode: (data: Uint8Array, initialOffset = 0): [EnumDecodeValue, number] => { + if (data.length < initialOffset + 8) { + throw errors.invalidEnumDataCaseKey(type, validKeys); + } + const [caseIndex, indexOffset] = extractCaseIndexFromData(data, initialOffset); + if (caseIndex < 0 || caseIndex >= validKeys.length) { + throw errors.invalidEnumDataCaseKey(type, validKeys); + } + const caseKey = validKeys[caseIndex]; + const [decoded, offset] = coders[caseKey].decode(data, indexOffset); + return [decoded as EnumDecodeValue, offset]; + }, + }; +}; diff --git a/packages/abi/src/coder/encoding/v1/factories/array.ts b/packages/abi/src/coder/encoding/v1/factories/array.ts new file mode 100644 index 00000000000..2a3df18d745 --- /dev/null +++ b/packages/abi/src/coder/encoding/v1/factories/array.ts @@ -0,0 +1,34 @@ +import { FuelError } from '@fuel-ts/errors'; + +import type { AbiTypeComponent } from '../../../..'; +import { ARRAY_REGEX } from '../../../../matchers/sway-type-matchers'; +import { ARRAY_TYPE } from '../../encoding-constants'; +import type { CoderFactory, CoderFactoryParameters } from '../../encoding-types'; +import type { ArrayCoder } from '../array'; +import { arrayCoder } from '../array'; + +export const arrayCoderFactory: CoderFactory = ( + { type: { swayType, components } }: CoderFactoryParameters, + factory: CoderFactory +) => { + const arrayMatch = ARRAY_REGEX.exec(swayType)?.groups; + if (!arrayMatch) { + throw new FuelError( + FuelError.CODES.CODER_NOT_FOUND, + `The provided ${ARRAY_TYPE} type is missing ABI components.`, + { swayType, components } + ); + } + + const arraySize = parseInt(arrayMatch.length, 10); + const arrayElement: AbiTypeComponent | undefined = components?.[0]; + if (!arrayElement) { + throw new FuelError( + FuelError.CODES.CODER_NOT_FOUND, + `The provided ${ARRAY_TYPE} type is missing a ABI component.` + ); + } + + const arrayElementCoder = factory(arrayElement, factory); + return arrayCoder(arrayElementCoder, arraySize); +}; diff --git a/packages/abi/src/coder/encoding/v1/factories/enum.ts b/packages/abi/src/coder/encoding/v1/factories/enum.ts new file mode 100644 index 00000000000..795a4e948ff --- /dev/null +++ b/packages/abi/src/coder/encoding/v1/factories/enum.ts @@ -0,0 +1,29 @@ +import { FuelError } from '@fuel-ts/errors'; + +import type { AbiTypeComponent } from '../../../../parser'; +import { ENUM_TYPE } from '../../encoding-constants'; +import type { Coder, CoderFactory, CoderFactoryParameters } from '../../encoding-types'; +import { enumCoder } from '../enum'; +import type { EnumCoder } from '../enum'; + +export const enumCoderFactory: CoderFactory = ( + { type: { swayType, components } }: CoderFactoryParameters, + factory: CoderFactory +) => { + if (!components) { + throw new FuelError( + FuelError.CODES.CODER_NOT_FOUND, + `The provided ${ENUM_TYPE} type is missing ABI components.`, + { swayType, components } + ); + } + + const coders = components.reduce((obj, component: AbiTypeComponent) => { + const o: Record = obj; + + o[component.name] = factory(component, factory); + return o; + }, {}); + + return enumCoder(coders); +}; diff --git a/packages/abi/src/coder/encoding/v1/factories/index.ts b/packages/abi/src/coder/encoding/v1/factories/index.ts new file mode 100644 index 00000000000..4bb7663a80c --- /dev/null +++ b/packages/abi/src/coder/encoding/v1/factories/index.ts @@ -0,0 +1,17 @@ +import { arrayCoderFactory } from './array'; +import { enumCoderFactory } from './enum'; +import { optionFactory } from './option'; +import { stringFactory } from './string'; +import { structCoderFactory } from './struct'; +import { tupleCoderFactory } from './tuple'; +import { vectorFactory } from './vector'; + +export const factories = { + array: arrayCoderFactory, + enum: enumCoderFactory, + tuple: tupleCoderFactory, + struct: structCoderFactory, + vector: vectorFactory, + string: stringFactory, + option: optionFactory, +}; diff --git a/packages/abi/src/coder/encoding/v1/factories/option.ts b/packages/abi/src/coder/encoding/v1/factories/option.ts new file mode 100644 index 00000000000..d1da469eeae --- /dev/null +++ b/packages/abi/src/coder/encoding/v1/factories/option.ts @@ -0,0 +1,28 @@ +import { FuelError } from '@fuel-ts/errors'; + +import type { AbiTypeComponent } from '../../../../parser'; +import { OPTION_TYPE } from '../../encoding-constants'; +import type { CoderFactory, CoderFactoryParameters, Coder } from '../../encoding-types'; +import { option } from '../option'; + +export const optionFactory = ( + { type: { swayType, components } }: CoderFactoryParameters, + factory: CoderFactory +) => { + if (!components) { + throw new FuelError( + FuelError.CODES.CODER_NOT_FOUND, + `The provided ${OPTION_TYPE} type is missing ABI components.`, + { swayType, components } + ); + } + + const coders = components.reduce((obj, component: AbiTypeComponent) => { + const o: Record = obj; + + o[component.name] = factory(component, factory); + return o; + }, {}); + + return option(coders); +}; diff --git a/packages/abi/src/coder/encoding/v1/factories/string.ts b/packages/abi/src/coder/encoding/v1/factories/string.ts new file mode 100644 index 00000000000..4cf47dd60e7 --- /dev/null +++ b/packages/abi/src/coder/encoding/v1/factories/string.ts @@ -0,0 +1,22 @@ +import { FuelError } from '@fuel-ts/errors'; + +import { STRING_REGEX } from '../../../../matchers/sway-type-matchers'; +import { STRING_TYPE } from '../../encoding-constants'; +import type { CoderFactory, CoderFactoryParameters } from '../../encoding-types'; +import { string } from '../string'; + +export const stringFactory = ( + { type: { swayType } }: CoderFactoryParameters, + _factory: CoderFactory +) => { + const match = STRING_REGEX.exec(swayType)?.groups; + if (!match) { + throw new FuelError( + FuelError.CODES.CODER_NOT_FOUND, + `Unable to find ${STRING_TYPE} coder for the provided type "${swayType}".`, + { swayType } + ); + } + const encodedLength = parseInt(match.length, 10); + return string(encodedLength); +}; diff --git a/packages/abi/src/coder/encoding/v1/factories/struct.ts b/packages/abi/src/coder/encoding/v1/factories/struct.ts new file mode 100644 index 00000000000..87964cacc5e --- /dev/null +++ b/packages/abi/src/coder/encoding/v1/factories/struct.ts @@ -0,0 +1,27 @@ +import { FuelError } from '@fuel-ts/errors'; + +import type { AbiTypeComponent } from '../../../../parser'; +import { STRUCT_TYPE } from '../../encoding-constants'; +import type { Coder, CoderFactory, CoderFactoryParameters } from '../../encoding-types'; +import { struct } from '../struct'; + +export const structCoderFactory = ( + { type: { swayType, components } }: CoderFactoryParameters, + factory: CoderFactory +) => { + if (!components) { + throw new FuelError( + FuelError.CODES.CODER_NOT_FOUND, + `The provided ${STRUCT_TYPE} type is missing ABI components.`, + { swayType, components } + ); + } + + const coders = components.reduce((obj, component: AbiTypeComponent) => { + const o: Record = obj; + + o[component.name] = factory(component, factory); + return o; + }, {}); + return struct(coders); +}; diff --git a/packages/abi/src/coder/encoding/v1/factories/tuple.ts b/packages/abi/src/coder/encoding/v1/factories/tuple.ts new file mode 100644 index 00000000000..ca4e0495cd7 --- /dev/null +++ b/packages/abi/src/coder/encoding/v1/factories/tuple.ts @@ -0,0 +1,23 @@ +import { FuelError } from '@fuel-ts/errors'; + +import type { AbiTypeComponent } from '../../../../parser'; +import { TUPLE_TYPE } from '../../encoding-constants'; +import type { CoderFactory, CoderFactoryParameters } from '../../encoding-types'; +import { tuple } from '../tuple'; +import type { TupleCoder } from '../tuple'; + +export const tupleCoderFactory: CoderFactory = ( + { type: { swayType, components } }: CoderFactoryParameters, + factory: CoderFactory +) => { + if (!components) { + throw new FuelError( + FuelError.CODES.CODER_NOT_FOUND, + `The provided ${TUPLE_TYPE} type is missing ABI components.`, + { swayType, components } + ); + } + + const coders = components.map((component: AbiTypeComponent) => factory(component, factory)); + return tuple(coders); +}; diff --git a/packages/abi/src/coder/encoding/v1/factories/vector.ts b/packages/abi/src/coder/encoding/v1/factories/vector.ts new file mode 100644 index 00000000000..8310b7e2af4 --- /dev/null +++ b/packages/abi/src/coder/encoding/v1/factories/vector.ts @@ -0,0 +1,21 @@ +import { FuelError } from '@fuel-ts/errors'; + +import { VECTOR_TYPE } from '../../encoding-constants'; +import type { CoderFactory, CoderFactoryParameters } from '../../encoding-types'; +import { vector } from '../heap'; + +export const vectorFactory = ( + { type: { swayType, components } }: CoderFactoryParameters, + factory: CoderFactory +) => { + if (!components) { + throw new FuelError( + FuelError.CODES.CODER_NOT_FOUND, + `The provided ${VECTOR_TYPE} type is missing ABI components.`, + { swayType, components } + ); + } + + const vecElementCoder = factory(components[0], factory); + return vector(vecElementCoder); +}; diff --git a/packages/abi/src/coder/encoding/v1/fixed.ts b/packages/abi/src/coder/encoding/v1/fixed.ts new file mode 100644 index 00000000000..73d3fe33b0c --- /dev/null +++ b/packages/abi/src/coder/encoding/v1/fixed.ts @@ -0,0 +1,194 @@ +import type { BN, BNInput } from '@fuel-ts/math'; +import { toNumber, toBytes, bn, toHex } from '@fuel-ts/math'; +import { arrayify } from '@fuel-ts/utils'; + +import { + B256_TYPE, + B512_TYPE, + BOOL_TYPE, + U16_TYPE, + U256_TYPE, + U32_TYPE, + U64_TYPE, + U8_TYPE, + VOID_TYPE, +} from '../encoding-constants'; +import type { Coder } from '../encoding-types'; +import { + assertBnValueByteLengthLessThan, + assertBnValueNonNegative, + assertBooleanValue, + assertDataLengthMoreThanExpected, + assertEncode, + assertEncodedLengthEquals, + assertSafeNumberValue, + errors, +} from '../validation'; + +/** + * A number coder (u8, u16, u32) + * + * @param encodedLength - The number of bytes to encode the value. + * @param type - The type of the coder. + * @returns A number based coder. + */ +const createNumberCoder = (encodedLength: number, type: string): Coder => ({ + type, + /** + * Encode a number value. + * + * @param value - The number value to encode. + * @returns The encoded number value. + */ + encode: (value: number): Uint8Array => { + const bnValue = bn(value); + assertBnValueNonNegative(bnValue, type); + assertBnValueByteLengthLessThan(bnValue, encodedLength, type); + return toBytes(bnValue, encodedLength); + }, + decode: (data: Uint8Array, offset: number = 0): [number, number] => { + const elementData = data.slice(offset, offset + encodedLength); + assertEncodedLengthEquals(elementData, encodedLength, type); + return [toNumber(elementData), offset + encodedLength]; + }, +}); + +/** + * A big number coder (u64, u256) + * + * @param encodedLength - The number of bytes to encode the value. + * @param type - The type of the coder. + * @returns A big number based coder. + */ +const createBigNumberCoder = (encodedLength: number, type: string): Coder => ({ + type, + /** + * Encode a big number value. + * + * @param value - The big number value to encode. + * @returns The encoded big number value. + */ + encode: (value: BN | BNInput): Uint8Array => { + assertSafeNumberValue(value, type); + const bnValue = assertEncode(bn, value, errors.invalidBnValue(type, value)); + assertBnValueNonNegative(bnValue, type); + assertBnValueByteLengthLessThan(bnValue, encodedLength, type); + return toBytes(bnValue, encodedLength); + }, + /** + * Decode a big number value. + * + * @param data - The encoded data to decode. + * @param offset - The offset to start decoding from. + * @returns A tuple with the [decoded value, offset of the final decoded] + */ + decode: (data: Uint8Array, offset: number = 0): [BN, number] => { + const elementData = data.slice(offset, offset + encodedLength); + assertEncodedLengthEquals(elementData, encodedLength, type); + return [bn(elementData), offset + encodedLength]; + }, +}); + +/** + * A hex coder (b256, b512) + * + * @param encodedLength - The number of bytes to encode the value. + * @param type - The type of the coder. + * @returns A hex based coder. + */ +const createHexCoder = (encodedLength: number, type: string): Coder => ({ + type, + /** + * Encode a hex value. + * + * @param value - The hex value to encode. + * @returns The encoded hex value. + * + * @throws {@link FuelError} - when a malformed hex value is provided + * @throws {@link FuelError} - when the encoded value's byte length does not match the expected length + */ + encode: (value: string): Uint8Array => { + let encodedValue; + try { + encodedValue = arrayify(value); + } catch (error) { + throw errors.malformedHexValue(type, value, encodedLength); + } + + assertEncodedLengthEquals(encodedValue, encodedLength, type); + return encodedValue; + }, + /** + * Decode a hex value. + * + * @param data - The encoded data to decode. + * @param offset - The offset to start decoding from. + * @returns A tuple with the [decoded value, offset of the final decoded] + * + * @throws {@link FuelError} - when the encoded data length does not match the expected length + */ + decode: (data: Uint8Array, offset: number = 0): [string, number] => { + let bytes = data.slice(offset, offset + encodedLength); + assertEncodedLengthEquals(bytes, encodedLength, type); + + if (bn(bytes).isZero()) { + bytes = new Uint8Array(encodedLength); + } + return [toHex(bytes, encodedLength), offset + encodedLength]; + }, +}); + +export const u8: Coder = createNumberCoder(1, U8_TYPE); +export const u16: Coder = createNumberCoder(2, U16_TYPE); +export const u32: Coder = createNumberCoder(4, U32_TYPE); +export const u64: Coder = createBigNumberCoder(8, U64_TYPE); +export const u256: Coder = createBigNumberCoder(32, U256_TYPE); +export const b256: Coder = createHexCoder(32, B256_TYPE); +export const b512: Coder = createHexCoder(64, B512_TYPE); +export const voidCoder: Coder = { + type: VOID_TYPE, + /** + * Encode a void value. + * + * @returns The encoded void value. + */ + encode: (): Uint8Array => new Uint8Array(), + /** + * Decode a void value. + * + * @param data - The encoded data to decode. + * @param offset - The offset to start decoding from. + * @returns A tuple with the [decoded value, offset of the final decoded] + */ + decode: (_data: Uint8Array, offset: number = 0): [undefined, number] => [undefined, offset], +}; + +export const bool: Coder = { + type: BOOL_TYPE, + /** + * Encode a boolean value. + * + * @param value - The boolean value to encode. + * @returns The encoded boolean value. + */ + encode: (value: boolean): Uint8Array => { + assertBooleanValue(value); + return toBytes(value ? 1 : 0); + }, + /** + * Decode a boolean value. + * + * @param data - The encoded data to decode. + * @param offset - The offset to start decoding from. + * @returns A tuple with the [decoded value, offset of the final decoded] + */ + decode: (data: Uint8Array, initialOffset: number = 0): [boolean, number] => { + assertDataLengthMoreThanExpected(data, 1, BOOL_TYPE); + + const [value, offset] = u8.decode(data, initialOffset); + if (value !== 0 && value !== 1) { + throw errors.invalidBooleanData(BOOL_TYPE, data, value); + } + return [Boolean(value), offset]; + }, +}; diff --git a/packages/abi/src/coder/encoding/v1/heap.ts b/packages/abi/src/coder/encoding/v1/heap.ts new file mode 100644 index 00000000000..37b2ccce751 --- /dev/null +++ b/packages/abi/src/coder/encoding/v1/heap.ts @@ -0,0 +1,138 @@ +import { FuelError } from '@fuel-ts/errors'; +import { concat, toUtf8Bytes, toUtf8String } from '@fuel-ts/utils'; + +import { + BYTES_TYPE, + RAW_SLICE_TYPE, + STD_STRING_TYPE, + STR_SLICE_TYPE, + VECTOR_TYPE, +} from '../encoding-constants'; +import type { Coder } from '../encoding-types'; +import { assertDataLengthLessThanMax, assertEncodedLengthEquals, errors } from '../validation'; + +import { u64 } from './fixed'; + +const createHeapType = ({ + type, + encode, + decode, +}: Coder): Coder => ({ + type, + encode: (value: TEncoded) => { + try { + // Encode the length of the bytes + const dataLengthBytes = u64.encode(value.length); + + // Encode the value + const valueBytes = encode(value); + + // Concatenate the encoded length with the bytes + return concat([dataLengthBytes, valueBytes]); + } catch (error) { + throw errors.invalidValue(type, value); + } + }, + decode: (data: Uint8Array, initialOffset = 0): [TDecoded, number] => { + try { + // Obtain the length of the bytes + const [dataLengthBn, dataLowerOffset] = u64.decode(data, initialOffset); + const dataLength = dataLengthBn.toNumber(); + + // Obtain the data bytes + const dataUpperOffset = dataLowerOffset + dataLength; + const dataBytes = data.slice(dataLowerOffset, dataUpperOffset); + assertEncodedLengthEquals(dataBytes, dataLength, type); + + return decode(dataBytes, dataUpperOffset); + } catch (error) { + throw errors.malformedBytes(type, data); + } + }, +}); + +const bytesTransformer: Coder = { + type: BYTES_TYPE, + encode: (value: Uint8Array | number[]) => (Array.isArray(value) ? new Uint8Array(value) : value), + decode: (data: Uint8Array, offset: number): [Uint8Array, number] => [data, offset], +}; +export const bytes: Coder = createHeapType(bytesTransformer); + +const rawSliceTransformer: Coder = { + type: RAW_SLICE_TYPE, + encode: (value: number[]) => new Uint8Array(value), + decode: (data: Uint8Array, offset: number): [number[], number] => [Array.from(data), offset], +}; +export const rawSlice: Coder = createHeapType(rawSliceTransformer); + +const createStringCoder = (type: string): Coder => + createHeapType({ + type, + encode: (value: string) => toUtf8Bytes(value), + decode: (data: Uint8Array, offset: number): [string, number] => [toUtf8String(data), offset], + }); + +export const stdString = createStringCoder(STD_STRING_TYPE); +export const str = createStringCoder(STR_SLICE_TYPE); + +export type VecEncodedValue = + | Array[0]> + | Uint8Array; +export type VecDecodedValue = + | Array[0]> + | Uint8Array; + +const isUint8Array = (value: unknown): value is Uint8Array => value instanceof Uint8Array; + +export const vector = (coder: TCoder): Coder> => ({ + type: VECTOR_TYPE, + encode: (value: VecEncodedValue): Uint8Array => { + if (!Array.isArray(value) && !isUint8Array(value)) { + throw new FuelError( + FuelError.CODES.ENCODE_ERROR, + `Invalid ${VECTOR_TYPE} value - expected array value, or a Uint8Array.`, + { value } + ); + } + + const valueArray = Array.isArray(value) ? value : Array.from(value); + + // Encode the length of the bytes + const dataLengthBytes = u64.encode(valueArray.length); + + // Encode the value + const valueBytes = valueArray.map((elementValue) => coder.encode(elementValue)); + + // Concatenate the encoded length with the bytes + return concat([dataLengthBytes, ...valueBytes]); + }, + decode: (data: Uint8Array, initialOffset = 0): [VecDecodedValue, number] => { + assertDataLengthLessThanMax(data, VECTOR_TYPE); + + let dataLengthBn; + let dataLowerOffset; + + try { + // Obtain the length of the bytes + [dataLengthBn, dataLowerOffset] = u64.decode(data, initialOffset); + } catch (error) { + throw new FuelError( + FuelError.CODES.DECODE_ERROR, + `Invalid ${VECTOR_TYPE} data - malformed bytes.`, + { data } + ); + } + + // Obtain the data bytes + const elements: unknown[] = []; + const dataLength = dataLengthBn.toNumber(); + let offset = dataLowerOffset; + for (let i = 0; i < dataLength; i++) { + const [decodedElement, elementOffset] = coder.decode(data, offset); + offset = elementOffset; + elements.push(decodedElement); + } + + return [elements as VecDecodedValue, offset]; + }, +}); diff --git a/packages/abi/src/coder/encoding/v1/index.ts b/packages/abi/src/coder/encoding/v1/index.ts index e69de29bb2d..53c0cf4c78c 100644 --- a/packages/abi/src/coder/encoding/v1/index.ts +++ b/packages/abi/src/coder/encoding/v1/index.ts @@ -0,0 +1,66 @@ +import { createMatcher } from '../../../matchers/sway-type-matchers'; +import type { SupportedCoder } from '../encoding-types'; + +import { arrayCoder } from './array'; +import { enumCoder } from './enum'; +import { factories } from './factories'; +import { voidCoder, u16, u32, u8, u64, u256, b256, b512, bool } from './fixed'; +import { bytes, rawSlice, stdString, str, vector } from './heap'; +import { option } from './option'; +import { string } from './string'; +import { struct } from './struct'; +import { tuple } from './tuple'; + +export const coders = { + u8, + u16, + u32, + u64, + u256, + b256, + b512, + bool, + void: voidCoder, + bytes, + rawSlice, + str, + stdString, + array: Object.assign(arrayCoder, { factory: factories.array }), + tuple: Object.assign(tuple, { factory: factories.tuple }), + struct: Object.assign(struct, { factory: factories.struct }), + enum: Object.assign(enumCoder, { factory: factories.enum }), + vector: Object.assign(vector, { factory: factories.vector }), + string: Object.assign(string, { factory: factories.string }), + option: Object.assign(option, { factory: factories.option }), +} as const; + +export const matcher = createMatcher({ + u8: coders.u8, + u16: coders.u16, + u32: coders.u32, + u64: coders.u64, + u256: coders.u256, + rawUntypedSlice: coders.rawSlice, + b256: coders.b256, + b512: coders.b512, + bool: coders.bool, + void: coders.void, + + string: coders.string, + array: coders.array, + tuple: coders.tuple, + vector: coders.vector, + struct: coders.struct, + bytes: coders.bytes, + stdString: coders.stdString, + str: coders.str, + enum: coders.enum, + option: coders.option, + + assetId: coders.struct, + evmAddress: coders.struct, + result: coders.enum, + + // Unmatchable + generic: undefined, +}); diff --git a/packages/abi/src/coder/encoding/v1/option.ts b/packages/abi/src/coder/encoding/v1/option.ts new file mode 100644 index 00000000000..643df9f7d12 --- /dev/null +++ b/packages/abi/src/coder/encoding/v1/option.ts @@ -0,0 +1,45 @@ +import { OPTION_TYPE } from '../encoding-constants'; +import type { Coder, Option } from '../encoding-types'; +import { assertDecode, assertEncode, errors } from '../validation'; + +import { enumCoder } from './enum'; +import type { EnumDecodeValue, EnumEncodeValue } from './enum'; + +type SwayOption = 'None' | { Some: T }; + +export type OptionEncodeValue> = + | EnumEncodeValue['Some'] + | undefined; +export type OptionDecodeData> = + EnumDecodeValue[keyof TCoders]; +export type OptionCoder> = Coder< + OptionEncodeValue, + OptionDecodeData +>; + +export const option = >( + coders: TCoders +): OptionCoder => { + const valueCoder = enumCoder(coders, OPTION_TYPE); + return { + type: OPTION_TYPE, + encode: (value: Option): Uint8Array => { + const input: SwayOption = value === undefined ? 'None' : { Some: value }; + return assertEncode( + valueCoder.encode, + input as unknown as EnumEncodeValue, + errors.invalidValue(OPTION_TYPE, input) + ); + }, + decode: (data: Uint8Array, initialOffset = 0): [OptionDecodeData, number] => { + const [decoded, offset] = assertDecode( + valueCoder.decode, + data, + initialOffset, + errors.malformedBytes(OPTION_TYPE, data) + ); + const optionValue = typeof decoded === 'string' ? undefined : decoded.Some; + return [optionValue as OptionDecodeData, offset]; + }, + }; +}; diff --git a/packages/abi/src/coder/encoding/v1/string.ts b/packages/abi/src/coder/encoding/v1/string.ts new file mode 100644 index 00000000000..9211c0393b0 --- /dev/null +++ b/packages/abi/src/coder/encoding/v1/string.ts @@ -0,0 +1,25 @@ +import { toUtf8Bytes, toUtf8String } from '@fuel-ts/utils'; + +import { STRING_TYPE } from '../encoding-constants'; +import type { Coder } from '../encoding-types'; +import { assertEncodedLengthEquals, assertValueLengthEqualsExpected } from '../validation'; + +/** + * `string` coder + * + * @param encodedLength - The length of the encoded array. + * @returns + */ +export const string = (encodedLength: number): Coder => ({ + type: 'string', + encode: (value: string): Uint8Array => { + assertValueLengthEqualsExpected(value, encodedLength, STRING_TYPE); + return toUtf8Bytes(value); + }, + decode: (data: Uint8Array, offset: number = 0): [string, number] => { + const upperOffset = offset + encodedLength; + const bytes = data.slice(offset, upperOffset); + assertEncodedLengthEquals(bytes, encodedLength, STRING_TYPE); + return [toUtf8String(bytes), upperOffset]; + }, +}); diff --git a/packages/abi/src/coder/encoding/v1/struct.ts b/packages/abi/src/coder/encoding/v1/struct.ts new file mode 100644 index 00000000000..42eec900507 --- /dev/null +++ b/packages/abi/src/coder/encoding/v1/struct.ts @@ -0,0 +1,44 @@ +import { concatBytes } from '@fuel-ts/utils'; + +import { STRUCT_TYPE } from '../encoding-constants'; +import type { Coder, TypesOfCoder } from '../encoding-types'; +import { assertObjectKeysAllPresent } from '../validation'; + +/** + * `struct` coder + */ +export type StructEncodeValue> = { + [P in keyof TCoders]: TypesOfCoder['Input']; +}; +export type StructDecodeData> = { + [P in keyof TCoders]: TypesOfCoder['Decoded']; +}; +export type StructCoder = Record> = Coder< + StructEncodeValue, + StructDecodeData +>; + +export const struct = >( + coders: TCoders +): StructCoder => ({ + type: STRUCT_TYPE, + encode: (value: StructEncodeValue): Uint8Array => { + assertObjectKeysAllPresent(value, coders, STRUCT_TYPE); + + // Encode each value + const encodedValues = Object.entries(coders).map(([key, coder]) => coder.encode(value[key])); + + return concatBytes(encodedValues); + }, + decode: (data: Uint8Array, initialOffset = 0): [StructDecodeData, number] => { + let offset = initialOffset; + let decoded; + + const decodedValue = Object.entries(coders).reduce((acc, [caseKey, fieldCoder]) => { + [decoded, offset] = fieldCoder.decode(data, offset); + acc[caseKey as keyof StructDecodeData] = decoded; + return acc; + }, {} as StructDecodeData); + return [decodedValue, offset]; + }, +}); diff --git a/packages/abi/src/coder/encoding/v1/tuple.ts b/packages/abi/src/coder/encoding/v1/tuple.ts new file mode 100644 index 00000000000..430dbe79fcb --- /dev/null +++ b/packages/abi/src/coder/encoding/v1/tuple.ts @@ -0,0 +1,45 @@ +import { concat } from '@fuel-ts/utils'; + +import { TUPLE_TYPE } from '../encoding-constants'; +import type { Coder, TypesOfCoder } from '../encoding-types'; +import { assertValueLengthEqualsExpected, errors } from '../validation'; + +/** + * Tuple coder + */ +export type TupleEncodeValue = { + [P in keyof TCoders]: TypesOfCoder['Input']; +}; +export type TupleDecodeValue = { + [P in keyof TCoders]: TypesOfCoder['Decoded']; +}; +export type TupleCoder = Coder< + TupleEncodeValue, + TupleDecodeValue +>; + +export const tuple = (coders: TCoders): TupleCoder => ({ + type: TUPLE_TYPE, + encode: (value: TupleEncodeValue): Uint8Array => { + assertValueLengthEqualsExpected(value, coders.length, TUPLE_TYPE); + const encodedValues = coders.map((elementCoder, elementIndex) => { + const elementValue = value[elementIndex]; + return elementCoder.encode(elementValue); + }); + return concat(encodedValues); + }, + decode: (data: Uint8Array, initialOffset = 0): [TupleDecodeValue, number] => { + try { + let offset = initialOffset; + let decoded; + + const decodedValue = coders.map((coder) => { + [decoded, offset] = coder.decode(data, offset); + return decoded; + }); + return [decodedValue as TupleDecodeValue, offset]; + } catch (error) { + throw errors.malformedData(TUPLE_TYPE, data, initialOffset); + } + }, +}); diff --git a/packages/abi/src/coder/encoding/validation.ts b/packages/abi/src/coder/encoding/validation.ts new file mode 100644 index 00000000000..1cbb55d1ab7 --- /dev/null +++ b/packages/abi/src/coder/encoding/validation.ts @@ -0,0 +1,240 @@ +import { FuelError } from '@fuel-ts/errors'; +import type { BN, BNInput } from '@fuel-ts/math'; + +import type { Coder } from '../..'; +import { MAX_BYTES } from '../constants'; + +export const errors = { + /** + * Encode errors + */ + invalidValue: (type: string, value: unknown) => + new FuelError(FuelError.CODES.ENCODE_ERROR, `Invalid ${type} value - malformed value.`, { + value, + }), + invalidBnValue: (type: string, value: BNInput) => + new FuelError(FuelError.CODES.ENCODE_ERROR, `Invalid ${type} value - expected a BNInput.`, { + value, + }), + malformedHexValue: (type: string, value: string, expectedLength: number) => + new FuelError(FuelError.CODES.ENCODE_ERROR, `Invalid ${type} value - malformed hex value.`, { + value, + expectedLength, + }), + invalidEnumValueCaseKeyMissing: (type: string, value: unknown, validKeys: string[]) => + new FuelError( + FuelError.CODES.ENCODE_ERROR, + `Invalid ${type} value - a valid case key must be provided.`, + { + value, + validKeys, + } + ), + invalidEnumValueCaseKey: (type: string, value: unknown, caseKey: string, validKeys: string[]) => + new FuelError( + FuelError.CODES.ENCODE_ERROR, + `Invalid ${type} value - invalid case key "${caseKey}".`, + { value, validKeys } + ), + invalidEnumValueMultipleCaseKeys: (type: string, value: unknown, validKeys: string[]) => + new FuelError( + FuelError.CODES.ENCODE_ERROR, + `Invalid ${type} value - only one field must be provided.`, + { value, validKeys } + ), + /** + * Decode errors + */ + malformedData: (type: string, data: Uint8Array, expectedLength: number) => + new FuelError(FuelError.CODES.DECODE_ERROR, `Invalid ${type} data - malformed data.`, { + data, + expectedLength, + }), + malformedBytes: (type: string, data: Uint8Array) => + new FuelError(FuelError.CODES.DECODE_ERROR, `Invalid ${type} data - malformed bytes.`, { + data, + }), + invalidEnumDataCaseKey: (type: string, validKeys: string[]) => + new FuelError(FuelError.CODES.DECODE_ERROR, `Invalid ${type} data - invalid case key.`, { + validKeys, + }), + invalidBooleanData: (type: string, data: Uint8Array, decoded: unknown) => + new FuelError(FuelError.CODES.DECODE_ERROR, `Invalid ${type} value - invalid boolean value.`, { + data, + type, + value: decoded, + }), +}; + +export const assertEncode = ( + encode: (value: TValue) => TOutput, + value: TValue, + thrownError: FuelError +) => { + try { + return encode(value); + } catch (error) { + throw thrownError; + } +}; + +/** + * Asserts that a value is a boolean. + * + * @throws {@link FuelError} - with a ENCODE_ERROR code if the value is not a boolean + */ +export const assertBooleanValue = (value: unknown) => { + if (typeof value !== 'boolean') { + throw new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid boolean value.', { value }); + } +}; + +export const assertValueIsArray = (value: unknown, type: string) => { + if (!Array.isArray(value)) { + throw new FuelError( + FuelError.CODES.ENCODE_ERROR, + `Invalid ${type} value - expected array value.`, + { + value, + type, + } + ); + } +}; + +/** + * Asserts that a number value is less than the max safe integer. + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER#description + * + * @throws {@link FuelError} - with a ENCODE_ERROR code if the value is more than the max safe integer + */ +export const assertSafeNumberValue = (value: unknown, type: string) => { + if (typeof value === 'number' && value > Number.MAX_SAFE_INTEGER) { + throw new FuelError( + FuelError.CODES.ENCODE_ERROR, + `Invalid ${type} type - number value is too large. Number can only safely handle up to 53 bits.` + ); + } +}; + +/** + * Asserts that a BN value is non-negative. + * + * @throws {@link FuelError} - with a ENCODE_ERROR code if the value is less than zero + */ +export const assertBnValueNonNegative = (value: BN, type: string) => { + if (value.isNeg()) { + throw new FuelError( + FuelError.CODES.ENCODE_ERROR, + `Invalid ${type} value - value is less than zero.`, + { value: value.toString(), type } + ); + } +}; + +/** + * Asserts that a BN value's byte length is less than a maximum. + * + * @throws {@link FuelError} - with a ENCODE_ERROR code if the value's byte length exceeds the maximum + */ +export const assertBnValueByteLengthLessThan = (value: BN, max: number, type: string) => { + if (value.byteLength() > max) { + throw new FuelError( + FuelError.CODES.ENCODE_ERROR, + `Invalid ${type} value - value exceeds maximum.`, + { value: value.toString(), type } + ); + } +}; + +export function assertValueLengthEqualsExpected( + value: ArrayLike, + expectedLength: number, + type: string +) { + if (value.length !== expectedLength) { + throw new FuelError( + FuelError.CODES.ENCODE_ERROR, + `Invalid ${type} value - unexpected length.`, + { value, expectedLength } + ); + } +} + +export function assertObjectKeysAllPresent>( + value: Record, + coders: TCoders, + type: string +) { + const actualKeys = Object.keys(value); + const expectedKeys = Object.keys(coders); + + // Check if there are any missing keys or extra keys + const missingKeys = expectedKeys.filter((key) => !actualKeys.includes(key)); + if (missingKeys.length > 0) { + const paths = missingKeys.map((key) => ({ path: key, error: 'Field not present.' })); + throw new FuelError(FuelError.CODES.ENCODE_ERROR, `Invalid ${type} value - malformed object.`, { + value, + paths, + }); + } +} + +export const assertDecode = ( + decode: (data: Uint8Array, offset: number) => [T, number], + data: Uint8Array, + offset: number, + thrownError: FuelError +) => { + try { + return decode(data, offset); + } catch (error) { + throw thrownError; + } +}; + +/** + * Asserts that the encoded data length matches the expected length + * + * @throws {@link FuelError} - with a DECODE_ERROR code if the encoded data length does not match the expected length + */ +export const assertEncodedLengthEquals = ( + data: Uint8Array, + expectedLength: number, + type: string +) => { + if (data.length !== expectedLength) { + throw new FuelError(FuelError.CODES.DECODE_ERROR, `Invalid ${type} data - unexpected length.`, { + data, + type, + expectedLength, + }); + } +}; + +export function assertDataLengthLessThanMax(data: Uint8Array, type: string) { + if (data.length > MAX_BYTES) { + throw new FuelError( + FuelError.CODES.DECODE_ERROR, + `Invalid ${type} data - exceeds maximum bytes.`, + { + data, + length: data.length, + maxLength: MAX_BYTES, + } + ); + } +} + +export function assertDataLengthMoreThanExpected( + data: Uint8Array, + expectedLength: number, + type: string +) { + if (data.length < expectedLength) { + throw new FuelError(FuelError.CODES.DECODE_ERROR, `Invalid ${type} data - not enough data.`, { + data, + expectedLength, + }); + } +} diff --git a/packages/abi/src/coder/index.ts b/packages/abi/src/coder/index.ts index 242ad2e5a73..1c4e5254600 100644 --- a/packages/abi/src/coder/index.ts +++ b/packages/abi/src/coder/index.ts @@ -1 +1,4 @@ -export { AbiCoder } from './abi-coder'; +export { AbiCoder } from './AbiCoder'; +export * from './abi-coder-types'; +export * from './constants'; +export * from './encoding'; diff --git a/packages/abi/src/coder/utils/createConfigurable.ts b/packages/abi/src/coder/utils/createConfigurable.ts new file mode 100644 index 00000000000..49129e7c065 --- /dev/null +++ b/packages/abi/src/coder/utils/createConfigurable.ts @@ -0,0 +1,23 @@ +import type { BytesLike } from '@fuel-ts/utils'; +import { arrayify } from '@fuel-ts/utils'; + +import type { AbiConfigurable } from '../../parser'; +import type { AbiCoderConfigurable } from '../abi-coder-types'; +import type { AbiEncoding, DecodedValue } from '../encoding'; + +export const createConfigurable = ( + configurable: AbiConfigurable, + encoding: AbiEncoding +): AbiCoderConfigurable => { + const configurableCoder = encoding.getCoder(configurable); + return { + name: configurable.name, + offset: configurable.offset, + encode: configurableCoder.encode, + decode: (data: BytesLike): DecodedValue => { + const bytes = arrayify(data); + const [decodedValue] = configurableCoder.decode(bytes); + return decodedValue as DecodedValue; + }, + }; +}; diff --git a/packages/abi/src/coder/utils/createFunction.ts b/packages/abi/src/coder/utils/createFunction.ts new file mode 100644 index 00000000000..00cd02c8ce8 --- /dev/null +++ b/packages/abi/src/coder/utils/createFunction.ts @@ -0,0 +1,59 @@ +import { FuelError } from '@fuel-ts/errors'; +import type { BytesLike } from '@fuel-ts/utils'; +import { arrayify } from '@fuel-ts/utils'; + +import type { AbiFunction } from '../../parser'; +import type { AbiCoderFunction } from '../abi-coder-types'; +import type { AbiEncoding, DecodedValue, InputValue } from '../encoding'; + +import { createFunctionSelector } from './createFunctionSelector'; +import { createFunctionSignature } from './createFunctionSignature'; +import { getFunctionInputs } from './getFunctionInputs'; +import { padValuesWithUndefined } from './padValuesWithUndefined'; + +export const createFunction = (fn: AbiFunction, encoding: AbiEncoding): AbiCoderFunction => { + const signature = createFunctionSignature(fn); + const argumentCoder = encoding.coders.tuple(fn.inputs.map((input) => encoding.getCoder(input))); + const outputCoder = encoding.getCoder({ type: fn.output }); + + const storageAttribute = fn.attributes?.find((attr) => attr.name === 'storage'); + const isReadOnly = !storageAttribute?.arguments?.includes('write'); + + const functionInputs = getFunctionInputs({ inputs: fn.inputs }); + const mandatoryInputLength = functionInputs.filter((i) => !i.isOptional).length; + + return { + // Function fields + name: fn.name, + inputs: fn.inputs, + signature, + selector: createFunctionSelector(signature), + selectorBytes: encoding.coders.stdString.encode(fn.name), + attributes: fn.attributes ?? [], + isReadOnly: () => isReadOnly, + + // Coders + encodeArguments: (values: InputValue[]): Uint8Array => { + if (values.length < mandatoryInputLength) { + throw new FuelError( + FuelError.CODES.ENCODE_ERROR, + `Invalid number of arguments. Expected a minimum of ${mandatoryInputLength} arguments, received ${values.length}` + ); + } + + const paddedValues = padValuesWithUndefined(values, functionInputs); + return argumentCoder.encode(paddedValues); + }, + decodeArguments: (data: BytesLike): DecodedValue[] => { + const bytes = arrayify(data); + const [decoded] = argumentCoder.decode(bytes); + return decoded as DecodedValue[]; + }, + encodeOutput: (value: InputValue): Uint8Array => outputCoder.encode(value), + decodeOutput: (data: BytesLike): DecodedValue => { + const bytes = arrayify(data); + const [decoded] = outputCoder.decode(bytes); + return decoded as DecodedValue; + }, + }; +}; diff --git a/packages/abi/src/coder/utils/createFunctionSelector.ts b/packages/abi/src/coder/utils/createFunctionSelector.ts new file mode 100644 index 00000000000..febcdbf73cf --- /dev/null +++ b/packages/abi/src/coder/utils/createFunctionSelector.ts @@ -0,0 +1,18 @@ +import { bufferFromString } from '@fuel-ts/crypto'; +import { sha256 } from '@fuel-ts/hasher'; +import { bn } from '@fuel-ts/math'; + +/** + * Creates a function selector from a function signature. This acts as a unique identifier for the function + * that can be used to identify the function in the contract. Previously, this was used in contract calls adhering + * to the v0 specification. This has since been superseded to be a StdString representation of a function name. + * However this selector still exists as a unique identifier for the function. + * + * @param functionSignature - The function signature to create a selector from. + * @returns The function selector. + */ +export const createFunctionSelector = (functionSignature: string): string => { + const hashedFunctionSignature = sha256(bufferFromString(functionSignature, 'utf-8')); + // get first 4 bytes of signature + 0x prefix. then left-pad it to 8 bytes using toHex(8) + return bn(hashedFunctionSignature.slice(0, 10)).toHex(8); +}; diff --git a/packages/abi/src/coder/utils/createFunctionSignature.ts b/packages/abi/src/coder/utils/createFunctionSignature.ts new file mode 100644 index 00000000000..6a492692b00 --- /dev/null +++ b/packages/abi/src/coder/utils/createFunctionSignature.ts @@ -0,0 +1,88 @@ +/* eslint-disable @typescript-eslint/no-use-before-define */ +import { + ARRAY_REGEX, + ENUM_REGEX, + STRING_REGEX, + STRUCT_REGEX, + swayTypeMatchers, +} from '../../matchers/sway-type-matchers'; +import type { AbiFunction, AbiConcreteType, AbiTypeComponent } from '../../parser'; + +const HEAP_TYPE_SIGNATURE = '(rawptr,u64),u64'; + +const createSignaturePrefix = ({ + type, +}: { + type: AbiConcreteType | AbiTypeComponent['type']; +}): string => { + switch (true) { + case STRUCT_REGEX.test(type.swayType): + return 's'; + + case ARRAY_REGEX.test(type.swayType): + return 'a'; + + case ENUM_REGEX.test(type.swayType): + return 'e'; + + default: + return ''; + } +}; + +const createSignatureContents = ({ + type, +}: { + type: AbiConcreteType | AbiTypeComponent['type']; +}): string => { + const { swayType, components, metadata } = type; + + if (swayTypeMatchers.rawUntypedSlice(type)) { + return 'rawslice'; + } + + const strMatch = STRING_REGEX.exec(swayType)?.groups; + if (strMatch) { + return `str[${strMatch.length}]`; + } + + if (swayTypeMatchers.bytes(type)) { + return `(s${HEAP_TYPE_SIGNATURE})`; + } + + if (components === undefined) { + return swayType; + } + + const arrayMatch = ARRAY_REGEX.exec(swayType)?.groups; + if (arrayMatch) { + const arrayElementSignature = createSignatureForType(components[0]); + return `[${arrayElementSignature};${arrayMatch.length}]`; + } + + const typeArgumentsSignature = metadata?.typeArguments + ? `<${metadata.typeArguments + ?.map((typeArgument) => createSignatureForType({ type: typeArgument })) + .join(',')}>` + : ''; + + const componentsSignature = swayTypeMatchers.vector(type) + ? `s${typeArgumentsSignature}${HEAP_TYPE_SIGNATURE}` + : components.map(createSignatureForType).join(','); + + return `${typeArgumentsSignature}(${componentsSignature})`; +}; + +const createSignatureForType = (input: { + type: AbiConcreteType | AbiTypeComponent['type']; +}): string => { + const prefix = createSignaturePrefix(input); + const contents = createSignatureContents(input); + + return `${prefix}${contents}`; +}; + +export const createFunctionSignature = (fn: AbiFunction): string => { + const functionInputsSignature = fn.inputs.map(createSignatureForType).join(','); + return `${fn.name}(${functionInputsSignature})`; +}; diff --git a/packages/abi/src/coder/utils/createLog.ts b/packages/abi/src/coder/utils/createLog.ts new file mode 100644 index 00000000000..371825c766c --- /dev/null +++ b/packages/abi/src/coder/utils/createLog.ts @@ -0,0 +1,20 @@ +import type { BytesLike } from '@fuel-ts/utils'; +import { arrayify } from '@fuel-ts/utils'; + +import type { AbiLoggedType } from '../../parser'; +import type { AbiCoderLog } from '../abi-coder-types'; +import type { AbiEncoding } from '../encoding'; +import type { DecodedValue } from '../encoding/encoding-types'; + +export const createLog = (loggedType: AbiLoggedType, encoding: AbiEncoding): AbiCoderLog => { + const loggedTypeCoder = encoding.getCoder(loggedType); + return { + logId: loggedType.logId, + encode: loggedTypeCoder.encode, + decode: (data: BytesLike): DecodedValue => { + const bytes = arrayify(data); + const [decoded] = loggedTypeCoder.decode(bytes); + return decoded as DecodedValue; + }, + }; +}; diff --git a/packages/abi/src/coder/utils/createType.ts b/packages/abi/src/coder/utils/createType.ts new file mode 100644 index 00000000000..fa395031489 --- /dev/null +++ b/packages/abi/src/coder/utils/createType.ts @@ -0,0 +1,22 @@ +import type { BytesLike } from '@fuel-ts/utils'; +import { arrayify } from '@fuel-ts/utils'; + +import type { AbiConcreteType, AbiTypeComponent } from '../../parser'; +import type { AbiCoderType } from '../abi-coder-types'; +import type { AbiEncoding } from '../encoding'; +import type { DecodedValue } from '../encoding/encoding-types'; + +export function createType( + type: AbiConcreteType | AbiTypeComponent['type'], + encoding: AbiEncoding +): AbiCoderType { + const coder = encoding.getCoder({ type }); + return { + encode: coder.encode, + decode: (data: BytesLike): DecodedValue => { + const bytes = arrayify(data); + const [decoded] = coder.decode(bytes); + return decoded as DecodedValue; + }, + }; +} diff --git a/packages/abi/src/coder/utils/getFunctionInputs.ts b/packages/abi/src/coder/utils/getFunctionInputs.ts new file mode 100644 index 00000000000..a71c8d96296 --- /dev/null +++ b/packages/abi/src/coder/utils/getFunctionInputs.ts @@ -0,0 +1,33 @@ +import { swayTypeMatchers } from '../../matchers/sway-type-matchers'; +import type { AbiFunctionInput } from '../../parser'; + +export type FunctionInput = TArg & { + isOptional: boolean; +}; + +const isMandatoryInput = (input: AbiFunctionInput) => + !swayTypeMatchers.void(input.type) && !swayTypeMatchers.option(input.type); + +/** + * Get the function inputs with the `isOptional` flag set to true for optional inputs. + * + * Optional parameters are ones which don't require inputs (void or Option) + * Given a function input of (u8, Option), the second input will be marked as optional as it could take a value or not. + * + * @param params - The function inputs. + * @returns an array of function inputs with the `isOptional` flag set to true for optional inputs. + */ +export const getFunctionInputs = (params: { + inputs: readonly AbiFunctionInput[]; +}): Array => { + const { inputs } = params; + let isMandatory = false; + + /** + * We iterate over the inputs in reverse order to ensure that the first optional input is marked as such. + */ + return inputs.reduceRight((result, input) => { + isMandatory = isMandatory || isMandatoryInput(input); + return [{ ...input, isOptional: !isMandatory }, ...result]; + }, [] as FunctionInput[]); +}; diff --git a/packages/abi/src/coder/utils/padValuesWithUndefined.ts b/packages/abi/src/coder/utils/padValuesWithUndefined.ts new file mode 100644 index 00000000000..179c265037a --- /dev/null +++ b/packages/abi/src/coder/utils/padValuesWithUndefined.ts @@ -0,0 +1,9 @@ +import type { InputValue } from '../encoding/encoding-types'; + +export const padValuesWithUndefined = (values: InputValue[], inputs: ArrayLike) => { + if (values.length >= inputs.length) { + return values; + } + + return [...values, ...Array(inputs.length - values.length).fill(undefined)]; +}; diff --git a/packages/abi/src/gen/renderers/ts/templates/abi.hbs b/packages/abi/src/gen/renderers/ts/templates/abi.hbs index 0516073cc70..0f1e0f35b16 100644 --- a/packages/abi/src/gen/renderers/ts/templates/abi.hbs +++ b/packages/abi/src/gen/renderers/ts/templates/abi.hbs @@ -1,3 +1,5 @@ {{header}} -export const abi = {{abiContents}}; \ No newline at end of file +import { AbiSpecification } from 'fuels'; + +export const abi: AbiSpecification = {{abiContents}}; diff --git a/packages/abi/src/gen/renderers/ts/templates/common.hbs b/packages/abi/src/gen/renderers/ts/templates/common.hbs index c6bb8343a05..bf8285b0218 100644 --- a/packages/abi/src/gen/renderers/ts/templates/common.hbs +++ b/packages/abi/src/gen/renderers/ts/templates/common.hbs @@ -1,6 +1,6 @@ {{header}} -import type { FunctionFragment, InvokeFunction } from 'fuels'; +import type { AbiCoderFunction, InvokeFunction } from 'fuels'; /** * Mimics Sway Enum. @@ -40,5 +40,5 @@ export type ProgramFunctionMapper = { }; export type InterfaceFunctionMapper = { - [K in keyof T]: FunctionFragment; + [K in keyof T]: AbiCoderFunction; }; \ No newline at end of file diff --git a/packages/abi/src/gen/renderers/ts/templates/contract.hbs b/packages/abi/src/gen/renderers/ts/templates/contract.hbs index 87ddcf43d43..16de85e0f4c 100644 --- a/packages/abi/src/gen/renderers/ts/templates/contract.hbs +++ b/packages/abi/src/gen/renderers/ts/templates/contract.hbs @@ -1,6 +1,6 @@ {{header}} -import { Contract, Interface } from "fuels"; +import { Contract, AbiCoder } from "fuels"; import type { Address, Account, Provider } from 'fuels'; import type { {{name}}Types as Types } from './{{name}}Types'; import type { InterfaceFunctionMapper, ProgramFunctionMapper } from '../common'; @@ -10,7 +10,7 @@ export * from './{{name}}Types'; export type {{name}}Configurables = Types['configurables']; -export class {{name}}Interface extends Interface { +export class {{name}}AbiCoder extends AbiCoder { declare functions: InterfaceFunctionMapper; constructor() { @@ -19,7 +19,7 @@ export class {{name}}Interface extends Interface { } export class {{name}} extends Contract { - declare interface: {{name}}Interface; + declare interface: {{name}}AbiCoder; declare functions: ProgramFunctionMapper; public static readonly abi = abi; diff --git a/packages/abi/src/gen/renderers/ts/typers/enums.ts b/packages/abi/src/gen/renderers/ts/typers/enums.ts index 31e81835330..4e583219d8b 100644 --- a/packages/abi/src/gen/renderers/ts/typers/enums.ts +++ b/packages/abi/src/gen/renderers/ts/typers/enums.ts @@ -4,7 +4,7 @@ import { structTyper } from './struct'; import type { Typer, TyperAbiType } from './types'; function isNativeEnum(abiType: TyperAbiType) { - return abiType.components?.every((t) => swayTypeMatchers.void(t.type.swayType)) === true; + return abiType.components?.every((t) => swayTypeMatchers.void(t.type)) === true; } export const enumTyper: Typer = (params, typer) => { diff --git a/packages/abi/src/index.ts b/packages/abi/src/index.ts index 463cc711a6c..c589c25a433 100644 --- a/packages/abi/src/index.ts +++ b/packages/abi/src/index.ts @@ -1,3 +1,3 @@ +export * from './parser'; export * from './coder'; export * from './gen'; -export * from './parser'; diff --git a/packages/abi/src/matchers/sway-type-matchers.ts b/packages/abi/src/matchers/sway-type-matchers.ts index c48f10c3c4e..ab47080192b 100644 --- a/packages/abi/src/matchers/sway-type-matchers.ts +++ b/packages/abi/src/matchers/sway-type-matchers.ts @@ -26,49 +26,51 @@ export type SwayType = | 'evmAddress' | 'rawUntypedSlice'; -type Matcher = (type: string) => boolean; +export type Matcher = (opts: { swayType: string }) => T; -const voidMatcher: Matcher = (type) => type === '()'; -const bool: Matcher = (type) => type === 'bool'; -const u8: Matcher = (type) => type === 'u8'; -const u16: Matcher = (type) => type === 'u16'; -const u32: Matcher = (type) => type === 'u32'; -const u64: Matcher = (type) => type === 'u64'; -const u256: Matcher = (type) => type === 'u256'; -const b256: Matcher = (type) => type === 'b256'; +const voidMatcher: Matcher = ({ swayType }) => swayType === '()'; +const bool: Matcher = ({ swayType }) => swayType === 'bool'; +const u8: Matcher = ({ swayType }) => swayType === 'u8'; +const u16: Matcher = ({ swayType }) => swayType === 'u16'; +const u32: Matcher = ({ swayType }) => swayType === 'u32'; +const u64: Matcher = ({ swayType }) => swayType === 'u64'; +const u256: Matcher = ({ swayType }) => swayType === 'u256'; +const b256: Matcher = ({ swayType }) => swayType === 'b256'; export const GENERIC_REGEX = /^generic ([^\s]+)$/m; -const generic: Matcher = (type) => GENERIC_REGEX.test(type); +const generic: Matcher = ({ swayType }) => GENERIC_REGEX.test(swayType); export const STRING_REGEX = /^str\[(?[0-9]+)\]/; -const string: Matcher = (type) => STRING_REGEX.test(type); - -const str: Matcher = (type) => type === 'str'; +const string: Matcher = ({ swayType }) => STRING_REGEX.test(swayType); +const str: Matcher = ({ swayType }) => swayType === 'str'; export const TUPLE_REGEX = /^\((?.+)\)$/m; -const tuple: Matcher = (type) => TUPLE_REGEX.test(type); +const tuple: Matcher = ({ swayType }) => TUPLE_REGEX.test(swayType); export const ARRAY_REGEX = /^\[(?[\w\s\\[\]]+);\s*(?[0-9]+)\]/; -const array: Matcher = (type) => ARRAY_REGEX.test(type); +const array: Matcher = ({ swayType }) => ARRAY_REGEX.test(swayType); export const STRUCT_REGEX = /^struct (.+::)?(?.+)$/m; const STRUCT_STD_REGEX = /^struct std::.*(AssetId|B512|Vec|RawVec|EvmAddress|Bytes|String|RawBytes)$/m; -const struct: Matcher = (type) => STRUCT_REGEX.test(type) && !STRUCT_STD_REGEX.test(type); -const assetId: Matcher = (type) => type === 'struct std::asset_id::AssetId'; -const b512: Matcher = (type) => type === 'struct std::b512::B512'; -const bytes: Matcher = (type) => type === 'struct std::bytes::Bytes'; -const evmAddress: Matcher = (type) => type === 'struct std::vm::evm::evm_address::EvmAddress'; -const stdString: Matcher = (type) => type === 'struct std::string::String'; -const vector: Matcher = (type) => type === 'struct std::vec::Vec'; - -const option: Matcher = (type) => type === 'enum std::option::Option'; -const result: Matcher = (type) => type === 'enum std::result::Result'; +const struct: Matcher = ({ swayType }) => + STRUCT_REGEX.test(swayType) && !STRUCT_STD_REGEX.test(swayType); +const assetId: Matcher = ({ swayType }) => swayType === 'struct std::asset_id::AssetId'; +const b512: Matcher = ({ swayType }) => swayType === 'struct std::b512::B512'; +const bytes: Matcher = ({ swayType }) => swayType === 'struct std::bytes::Bytes'; +const evmAddress: Matcher = ({ swayType }) => + swayType === 'struct std::vm::evm::evm_address::EvmAddress'; +const stdString: Matcher = ({ swayType }) => swayType === 'struct std::string::String'; +const vector: Matcher = ({ swayType }) => swayType === 'struct std::vec::Vec'; + +const option: Matcher = ({ swayType }) => swayType === 'enum std::option::Option'; +const result: Matcher = ({ swayType }) => swayType === 'enum std::result::Result'; export const ENUM_REGEX = /^enum (.+::)?(?.+)$/m; -const enumMatcher: Matcher = (type) => !option(type) && !result(type) && ENUM_REGEX.test(type); +const enumMatcher: Matcher = (opts) => + !option(opts) && !result(opts) && ENUM_REGEX.test(opts.swayType); -const rawUntypedSlice: Matcher = (type) => type === 'raw untyped slice'; +const rawUntypedSlice: Matcher = ({ swayType }) => swayType === 'raw untyped slice'; export const swayTypeMatchers: Record = { void: voidMatcher, @@ -80,9 +82,9 @@ export const swayTypeMatchers: Record = { u64, u256, b256, - str, string, + str, tuple, array, @@ -103,12 +105,12 @@ export const swayTypeMatchers: Record = { const swayTypeMatcherEntries = Object.entries(swayTypeMatchers); -export function createMatcher(mappings: Record) { +export function createMatcher(mappings: Record): Matcher { return (opts: { swayType: string }): T => { const { swayType } = opts; for (const [key, matcher] of swayTypeMatcherEntries) { - if (matcher(swayType)) { + if (matcher({ swayType })) { if (key in mappings) { return mappings[key as SwayType]; } diff --git a/packages/abi/src/parser/specifications/v1/resolvable-type.ts b/packages/abi/src/parser/specifications/v1/resolvable-type.ts index 04f297a9bf0..94aa367dc19 100644 --- a/packages/abi/src/parser/specifications/v1/resolvable-type.ts +++ b/packages/abi/src/parser/specifications/v1/resolvable-type.ts @@ -177,7 +177,7 @@ export class ResolvableType { * This propagates to the parent type, forcing it to be a `ResolvableType` as well, * as it can't be resolved until this generic type is substituted with a type argument. */ - if (swayTypeMatchers.generic(metadataType.type)) { + if (swayTypeMatchers.generic({ swayType: metadataType.type })) { /** * This search solves the case where an e.g. `generic T` is being substituted by `generic E`. * This can happen when a generic type is nested in another generic type and they have differently-named type parameters. diff --git a/packages/abi/src/utils/evaluate-function-inputs-optionality.ts b/packages/abi/src/utils/evaluate-function-inputs-optionality.ts index 280e64c917a..0664e920df2 100644 --- a/packages/abi/src/utils/evaluate-function-inputs-optionality.ts +++ b/packages/abi/src/utils/evaluate-function-inputs-optionality.ts @@ -7,7 +7,7 @@ export function evaluateFunctionInputsOptionality( let isMandatory = false; return fn.inputs.reduceRight<(AbiFunctionInput & { isOptional: boolean })[]>((result, input) => { const isTypeMandatory = - !swayTypeMatchers.void(input.type.swayType) && !swayTypeMatchers.option(input.type.swayType); + !swayTypeMatchers.void(input.type) && !swayTypeMatchers.option(input.type); isMandatory = isMandatory || isTypeMandatory; return [{ ...input, isOptional: !isMandatory }, ...result]; diff --git a/packages/abi/test/encoding/AbiCoder.test.ts b/packages/abi/test/encoding/AbiCoder.test.ts new file mode 100644 index 00000000000..db86b96c5e1 --- /dev/null +++ b/packages/abi/test/encoding/AbiCoder.test.ts @@ -0,0 +1,361 @@ +import { FuelError } from '@fuel-ts/errors'; +import { expectToThrowFuelError } from '@fuel-ts/errors/test-utils'; + +import { AbiCoder } from '../../src'; +import { v1 as specificationV1 } from '../fixtures/v1'; + +/** + * @group node + * @group browser + */ +describe('AbiCoder', () => { + describe('intialisation', () => { + it('should create an ABI coder', () => { + const coder = AbiCoder.fromAbi(specificationV1); + + expect(coder).toBeDefined(); + expect(coder.abi).toBeInstanceOf(Object); + expect(coder.specification).toEqual(specificationV1); + + expect(coder.functions).toBeInstanceOf(Object); + expect(coder.logs).toBeInstanceOf(Object); + expect(coder.configurables).toBeInstanceOf(Object); + + expect(coder.getFunction).toBeInstanceOf(Function); + expect(coder.getLog).toBeInstanceOf(Function); + expect(coder.getType).toBeInstanceOf(Function); + expect(coder.getConfigurable).toBeInstanceOf(Function); + }); + }); + + describe('getFunction', () => { + describe('properties', () => { + it('should get a function and return the correct values', () => { + const coder = AbiCoder.fromAbi(specificationV1); + + const fn = coder.getFunction('types_u8'); + + expect(fn).toBeDefined(); + expect(fn.name).toBe('types_u8'); + expect(fn.inputs).toStrictEqual([ + { + name: 'x', + type: { + concreteTypeId: 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + swayType: 'u8', + }, + }, + ]); + expect(fn.signature).toStrictEqual('types_u8(u8)'); + expect(fn.selector).toStrictEqual('0x00000000469feadd'); + expect(fn.selectorBytes).toStrictEqual( + new Uint8Array([0, 0, 0, 0, 0, 0, 0, 8, 116, 121, 112, 101, 115, 95, 117, 56]) + ); + expect(fn.attributes).toStrictEqual([]); + expect(fn.isReadOnly()).toBe(true); + }); + + it('should get a function by name', () => { + const coder = AbiCoder.fromAbi(specificationV1); + + const fn = coder.getFunction('configurables'); + + expect(fn).toBeDefined(); + expect(fn.name).toStrictEqual('configurables'); + expect(fn.signature).toStrictEqual('configurables()'); + expect(fn.selector).toStrictEqual('0x00000000fdaf4480'); + }); + + it('should get a function by signature', () => { + const coder = AbiCoder.fromAbi(specificationV1); + + const fn = coder.getFunction('configurables()'); + + expect(fn).toBeDefined(); + expect(fn.name).toStrictEqual('configurables'); + expect(fn.signature).toStrictEqual('configurables()'); + expect(fn.selector).toStrictEqual('0x00000000fdaf4480'); + }); + + it('should get a function by selector', () => { + const coder = AbiCoder.fromAbi(specificationV1); + + const fn = coder.getFunction('0x00000000fdaf4480'); + + expect(fn).toBeDefined(); + expect(fn.name).toStrictEqual('configurables'); + expect(fn.signature).toStrictEqual('configurables()'); + expect(fn.selector).toStrictEqual('0x00000000fdaf4480'); + }); + + it('should throw an error if the function is not found', async () => { + const coder = AbiCoder.fromAbi(specificationV1); + + await expectToThrowFuelError( + () => coder.getFunction('unknown'), + new FuelError( + FuelError.CODES.FUNCTION_NOT_FOUND, + 'Unable to find function with the name or signature or selector of "unknown".' + ) + ); + }); + }); + + describe('getFunction::encodeArguments', () => { + it('should encode the arguments correctly', () => { + const coder = AbiCoder.fromAbi(specificationV1); + const fn = coder.getFunction('types_u8'); + + const encoded = fn.encodeArguments([1]); + + expect(encoded).toStrictEqual(new Uint8Array([1])); + }); + + it('should pad the arguments with undefined if the number of arguments is less than the expected number', () => { + const coder = AbiCoder.fromAbi(specificationV1); + const fn = coder.getFunction('types_void'); + + const encoded = fn.encodeArguments([]); + + expect(encoded).toStrictEqual(new Uint8Array([])); + }); + + it('should throw an error if the number of arguments is less than the expected number', async () => { + const coder = AbiCoder.fromAbi(specificationV1); + const fn = coder.getFunction('types_u8'); + + await expectToThrowFuelError( + () => fn.encodeArguments([]), + new FuelError( + FuelError.CODES.ENCODE_ERROR, + 'Invalid number of arguments. Expected a minimum of 1 arguments, received 0' + ) + ); + }); + }); + + describe('decodeArguments', () => { + it('should decode the arguments correctly', () => { + const coder = AbiCoder.fromAbi(specificationV1); + const fn = coder.getFunction('types_u8'); + + const decoded = fn.decodeArguments(new Uint8Array([1])); + + expect(decoded).toStrictEqual([1]); + }); + + it('should arrayify the arguments', () => { + const coder = AbiCoder.fromAbi(specificationV1); + const fn = coder.getFunction('types_u8'); + + const decoded = fn.decodeArguments('0x01'); + + expect(decoded).toStrictEqual([1]); + }); + }); + + describe('encodeOutput', () => { + it('should encode the output correctly', () => { + const coder = AbiCoder.fromAbi(specificationV1); + const fn = coder.getFunction('types_u8'); + + const encoded = fn.encodeOutput(1); + + expect(encoded).toStrictEqual(new Uint8Array([1])); + }); + }); + + describe('decodeOutput', () => { + it('should decode the output correctly', () => { + const coder = AbiCoder.fromAbi(specificationV1); + const fn = coder.getFunction('types_u8'); + + const decoded = fn.decodeOutput(new Uint8Array([1])); + + expect(decoded).toStrictEqual(1); + }); + + it('should arrayify the output', () => { + const coder = AbiCoder.fromAbi(specificationV1); + const fn = coder.getFunction('types_u8'); + + const decoded = fn.decodeOutput('0x01'); + + expect(decoded).toStrictEqual(1); + }); + }); + }); + + describe('getConfigurable', () => { + describe('properties', () => { + it('should get a configurable by name', () => { + const coder = AbiCoder.fromAbi(specificationV1); + + const configurable = coder.getConfigurable('U8_VALUE'); + + expect(configurable).toBeDefined(); + expect(configurable.name).toBe('U8_VALUE'); + expect(configurable.offset).toBe(113392); + expect(configurable.encode).toBeDefined(); + expect(configurable.decode).toBeDefined(); + }); + + it('should throw an error if the configurable is not found', async () => { + const coder = AbiCoder.fromAbi(specificationV1); + + await expectToThrowFuelError( + () => coder.getConfigurable('unknown'), + new FuelError( + FuelError.CODES.CONFIGURABLE_NOT_FOUND, + "Configurable with name 'unknown' doesn't exist in the ABI." + ) + ); + }); + }); + + describe('encode', () => { + it('should encode the value correctly', () => { + const coder = AbiCoder.fromAbi(specificationV1); + const configurable = coder.getConfigurable('U8_VALUE'); + + const encoded = configurable.encode(1); + + expect(encoded).toStrictEqual(new Uint8Array([1])); + }); + }); + + describe('decode', () => { + it('should decode the value correctly', () => { + const coder = AbiCoder.fromAbi(specificationV1); + const configurable = coder.getConfigurable('U8_VALUE'); + + const decoded = configurable.decode(new Uint8Array([1])); + + expect(decoded).toStrictEqual(1); + }); + + it('should arrayify the value correctly', () => { + const coder = AbiCoder.fromAbi(specificationV1); + const configurable = coder.getConfigurable('U8_VALUE'); + + const decoded = configurable.decode('0x01'); + + expect(decoded).toStrictEqual(1); + }); + }); + }); + + describe('getLog', () => { + it('should get a log by id', () => { + const coder = AbiCoder.fromAbi(specificationV1); + + const log = coder.getLog('8961848586872524460'); + + expect(log).toBeDefined(); + }); + + it('should throw an error if the log is not found', async () => { + const coder = AbiCoder.fromAbi(specificationV1); + + await expectToThrowFuelError( + () => coder.getLog('unknown'), + new FuelError( + FuelError.CODES.LOG_TYPE_NOT_FOUND, + `Log type with logId 'unknown' doesn't exist in the ABI.` + ) + ); + }); + + describe('encode', () => { + it('should encode the value correctly', () => { + const coder = AbiCoder.fromAbi(specificationV1); + const log = coder.getLog('8961848586872524460'); + const expected = new Uint8Array([ + -1, 58, 156, 113, 34, 38, 148, 86, 145, 26, 238, 58, 41, 126, 101, 222, 26, 221, 83, 216, + 61, 217, 86, 108, 149, 69, 160, 219, 244, 168, 219, 162, + ]); + const value = '0xff3a9c7122269456911aee3a297e65de1add53d83dd9566c9545a0dbf4a8dba2'; + + const encoded = log.encode(value); + + expect(encoded).toStrictEqual(expected); + }); + }); + + describe('decode', () => { + it('should decode the value correctly', () => { + const coder = AbiCoder.fromAbi(specificationV1); + const log = coder.getLog('8961848586872524460'); + const expected = '0xff3a9c7122269456911aee3a297e65de1add53d83dd9566c9545a0dbf4a8dba2'; + const data = new Uint8Array([ + -1, 58, 156, 113, 34, 38, 148, 86, 145, 26, 238, 58, 41, 126, 101, 222, 26, 221, 83, 216, + 61, 217, 86, 108, 149, 69, 160, 219, 244, 168, 219, 162, 209, + ]); + + const decoded = log.decode(data); + + expect(decoded).toStrictEqual(expected); + }); + }); + }); + + describe('getType', () => { + it('should get a type by concreteTypeId', () => { + const coder = AbiCoder.fromAbi(specificationV1); + + const type = coder.getType( + '7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b' + ); + + expect(type).toBeDefined(); + }); + + it('should throw an error if the type is not found', async () => { + const coder = AbiCoder.fromAbi(specificationV1); + + await expectToThrowFuelError( + () => coder.getType('unknown'), + new FuelError( + FuelError.CODES.TYPE_NOT_FOUND, + `Type with concreteTypeId 'unknown' doesn't exist in the ABI.` + ) + ); + }); + + describe('encode', () => { + it('should encode the value correctly', () => { + const coder = AbiCoder.fromAbi(specificationV1); + const type = coder.getType( + '7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b' + ); + const expected = new Uint8Array([ + -1, 58, 156, 113, 34, 38, 148, 86, 145, 26, 238, 58, 41, 126, 101, 222, 26, 221, 83, 216, + 61, 217, 86, 108, 149, 69, 160, 219, 244, 168, 219, 162, + ]); + const value = '0xff3a9c7122269456911aee3a297e65de1add53d83dd9566c9545a0dbf4a8dba2'; + + const encoded = type.encode(value); + + expect(encoded).toStrictEqual(expected); + }); + }); + + describe('decode', () => { + it('should decode the value correctly', () => { + const coder = AbiCoder.fromAbi(specificationV1); + const type = coder.getType( + '7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b' + ); + const expected = '0xff3a9c7122269456911aee3a297e65de1add53d83dd9566c9545a0dbf4a8dba2'; + const data = new Uint8Array([ + -1, 58, 156, 113, 34, 38, 148, 86, 145, 26, 238, 58, 41, 126, 101, 222, 26, 221, 83, 216, + 61, 217, 86, 108, 149, 69, 160, 219, 244, 168, 219, 162, 209, + ]); + + const decoded = type.decode(data); + + expect(decoded).toStrictEqual(expected); + }); + }); + }); +}); diff --git a/packages/abi/test/encoding/AbiEncoding.test.ts b/packages/abi/test/encoding/AbiEncoding.test.ts new file mode 100644 index 00000000000..b0830ed9dab --- /dev/null +++ b/packages/abi/test/encoding/AbiEncoding.test.ts @@ -0,0 +1,136 @@ +import { FuelError } from '@fuel-ts/errors'; +import { expectToThrowFuelError } from '@fuel-ts/errors/test-utils'; + +import type { CoderFactoryParameters } from '../../src/coder/encoding'; +import { encoding } from '../../src/coder/encoding'; +import { coders as v1 } from '../../src/coder/encoding/v1'; + +/** + * @group node + * @group browser + */ +describe('encoding', () => { + describe('from', () => { + it('should create a encoding instance just fine', () => { + expect(encoding).toBeDefined(); + + // Current version (v1) + expect(encoding.array).toEqual(v1.array); + expect(encoding.enum).toEqual(v1.enum); + expect(encoding.option).toEqual(v1.option); + expect(encoding.vector).toEqual(v1.vector); + expect(encoding.u8).toEqual(v1.u8); + expect(encoding.u16).toEqual(v1.u16); + expect(encoding.u32).toEqual(v1.u32); + expect(encoding.u64).toEqual(v1.u64); + expect(encoding.u256).toEqual(v1.u256); + expect(encoding.b256).toEqual(v1.b256); + expect(encoding.b512).toEqual(v1.b512); + expect(encoding.bool).toEqual(v1.bool); + expect(encoding.void).toEqual(v1.void); + expect(encoding.bytes).toEqual(v1.bytes); + expect(encoding.rawSlice).toEqual(v1.rawSlice); + expect(encoding.str).toEqual(v1.str); + expect(encoding.stdString).toEqual(v1.stdString); + expect(encoding.string).toEqual(v1.string); + expect(encoding.vector).toEqual(v1.vector); + expect(encoding.array).toEqual(v1.array); + expect(encoding.tuple).toEqual(v1.tuple); + expect(encoding.struct).toEqual(v1.struct); + expect(encoding.enum).toEqual(v1.enum); + expect(encoding.option).toEqual(v1.option); + + // V1 + expect(encoding.v1.array).toEqual(v1.array); + expect(encoding.v1.enum).toEqual(v1.enum); + expect(encoding.v1.option).toEqual(v1.option); + expect(encoding.v1.vector).toEqual(v1.vector); + expect(encoding.v1.u8).toEqual(v1.u8); + expect(encoding.v1.u16).toEqual(v1.u16); + expect(encoding.v1.u32).toEqual(v1.u32); + expect(encoding.v1.u64).toEqual(v1.u64); + expect(encoding.v1.u256).toEqual(v1.u256); + expect(encoding.v1.b256).toEqual(v1.b256); + expect(encoding.v1.b512).toEqual(v1.b512); + expect(encoding.v1.bool).toEqual(v1.bool); + expect(encoding.v1.void).toEqual(v1.void); + expect(encoding.v1.bytes).toEqual(v1.bytes); + expect(encoding.v1.rawSlice).toEqual(v1.rawSlice); + expect(encoding.v1.str).toEqual(v1.str); + expect(encoding.v1.stdString).toEqual(v1.stdString); + expect(encoding.v1.string).toEqual(v1.string); + expect(encoding.v1.vector).toEqual(v1.vector); + expect(encoding.v1.array).toEqual(v1.array); + expect(encoding.v1.tuple).toEqual(v1.tuple); + expect(encoding.v1.struct).toEqual(v1.struct); + expect(encoding.v1.enum).toEqual(v1.enum); + expect(encoding.v1.option).toEqual(v1.option); + }); + + it('should throw an error if the version is not supported', async () => { + await expectToThrowFuelError( + () => encoding.fromVersion('0'), + new FuelError( + FuelError.CODES.UNSUPPORTED_ENCODING_VERSION, + 'Unsupported encoding version "0"' + ) + ); + }); + }); + + describe('getCoder', () => { + const encodingV1 = encoding.fromVersion('1'); + + it('should get a coder for a given type and name [u8]', () => { + const params: CoderFactoryParameters = { + name: 'test', + type: { swayType: 'u8', concreteTypeId: '0x1' }, + }; + + const coder = encodingV1.getCoder(params); + + expect(coder).toBeDefined(); + }); + + it('should get a coder for a given type and name [string]', () => { + const params: CoderFactoryParameters = { + name: 'test', + type: { swayType: 'str[4]', concreteTypeId: '0x1' }, + }; + + const coder = encodingV1.getCoder(params); + + expect(coder).toBeDefined(); + }); + + it('should throw an error if the coder is not supported', async () => { + const params: CoderFactoryParameters = { + name: 'test', + type: { swayType: 'unknown', concreteTypeId: '0x1' }, + }; + + await expectToThrowFuelError( + () => encodingV1.getCoder(params), + new FuelError( + FuelError.CODES.CODER_NOT_FOUND, + 'Unsupported coder type "unknown" for element "test"' + ) + ); + }); + + it('should throw an error if a generic coder is used [should not happen]', async () => { + const params: CoderFactoryParameters = { + name: 'test', + type: { swayType: 'generic', concreteTypeId: '0x1' }, + }; + + await expectToThrowFuelError( + () => encodingV1.getCoder(params), + new FuelError( + FuelError.CODES.CODER_NOT_FOUND, + 'Unsupported coder type "generic" for element "test"' + ) + ); + }); + }); +}); diff --git a/packages/abi/test/encoding/v1/array.test.ts b/packages/abi/test/encoding/v1/array.test.ts new file mode 100644 index 00000000000..c28d6802ea9 --- /dev/null +++ b/packages/abi/test/encoding/v1/array.test.ts @@ -0,0 +1,229 @@ +import { FuelError } from '@fuel-ts/errors'; +import { expectToThrowFuelError } from '@fuel-ts/errors/test-utils'; + +import type { AbiTypeComponent, CoderFactoryParameters } from '../../../src'; +import { encoding, MAX_BYTES } from '../../../src'; +import { U8_MAX } from '../../utils/constants'; + +const isBrowser = typeof window !== 'undefined'; + +/** + * @group node + * @group browser + */ +describe('v1/array', () => { + describe('fromAbi', () => { + it('should throw when a component is not provided', async () => { + const swayType = 'enum MyEnum'; + const components: AbiTypeComponent[] = []; + const factory = vi.fn(); + + await expectToThrowFuelError( + () => + encoding.v1.array.factory( + { type: { swayType, components } } as CoderFactoryParameters, + factory + ), + new FuelError( + FuelError.CODES.CODER_NOT_FOUND, + 'The provided array type is missing ABI components.', + { swayType } + ) + ); + }); + + it('should throw when a component is not provided', async () => { + const swayType = '[u8; 4]'; + const components: AbiTypeComponent[] = []; + const factory = vi.fn(); + + await expectToThrowFuelError( + () => + encoding.v1.array.factory( + { type: { swayType, components } } as CoderFactoryParameters, + factory + ), + new FuelError( + FuelError.CODES.CODER_NOT_FOUND, + 'The provided array type is missing a ABI component.' + ) + ); + }); + + it('should get the coder for a valid array type', () => { + const swayType = '[u8; 4]'; + const components: AbiTypeComponent[] = [{} as AbiTypeComponent]; + const factory = vi.fn(); + + const coder = encoding.v1.array.factory( + { type: { swayType, components } } as CoderFactoryParameters, + factory + ); + + expect(factory).toHaveBeenCalledWith(components[0], factory); + expect(factory).toHaveBeenCalledTimes(1); + expect(coder).toBeDefined(); + }); + }); + + describe('encode', () => { + it('should encode an array [u8, length = 0]', () => { + const coder = encoding.v1.array(encoding.v1.u8, 0); + const input: number[] = []; + const expected = new Uint8Array([]); + + const actual = coder.encode(input); + + expect(actual).toEqual(expected); + }); + + it('should encode an array [u8, length = 4]', () => { + const coder = encoding.v1.array(encoding.v1.u8, 4); + const input = [0, 13, 37, 255]; + const expected = new Uint8Array(input); + + const actual = coder.encode(input); + + expect(actual).toEqual(expected); + }); + + it('should encode an array of enums [enum, length = 4]', () => { + const coder = encoding.v1.array( + encoding.v1.enum({ a: encoding.v1.u8, b: encoding.v1.bool }), + 4 + ); + const input = [{ a: 0 }, { b: false }, { b: true }, { a: U8_MAX }]; + const expected = new Uint8Array([ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 255, + ]); + + const actual = coder.encode(input); + + expect(actual).toEqual(expected); + }); + + it('should throw when value to encode is not an array [u8, length = 1]', async () => { + const coder = encoding.v1.array(encoding.v1.u8, 1); + const input = { object: true }; + + await expectToThrowFuelError( + // @ts-expect-error - testing a non-array value + () => coder.encode(input), + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid array value - expected array value.', { + value: input, + }) + ); + }); + + it('should throw when value to encode is not an array of the expected length [u8, length = 1]', async () => { + const coder = encoding.v1.array(encoding.v1.u8, 1); + const input = [1, 2, 3]; + + await expectToThrowFuelError( + () => coder.encode(input), + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid array value - unexpected length.', { + value: input, + expectedLength: 1, + }) + ); + }); + + it('should throw when value to encode is invalid [u8, length = 1]', async () => { + const coder = encoding.v1.array(encoding.v1.u8, 1); + const input = [256]; + + await expectToThrowFuelError( + () => coder.encode(input), + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid u8 value - value exceeds maximum.', { + type: 'u8', + value: '256', + }) + ); + }); + }); + + describe('decode', () => { + it('should decode an array [u8, length = 0]', () => { + const coder = encoding.v1.array(encoding.v1.u8, 0); + const input = new Uint8Array([]); + const expected: number[] = []; + + const [actual, offset] = coder.decode(input); + + expect(actual).toEqual(expected); + expect(offset).toEqual(0); + }); + + it('should decode an array [u8, length = 4]', () => { + const coder = encoding.v1.array(encoding.v1.u8, 4); + const input = new Uint8Array([0, 13, 37, 255]); + const expected = [0, 13, 37, 255]; + + const [actual, offset] = coder.decode(input); + + expect(actual).toEqual(expected); + expect(offset).toEqual(4); + }); + + it('should decode an array of enums [enum, length = 4]', () => { + const coder = encoding.v1.array( + encoding.v1.enum({ a: encoding.v1.u8, b: encoding.v1.bool }), + 4 + ); + const expected = [{ a: 0 }, { b: false }, { b: true }, { a: U8_MAX }]; + const data = new Uint8Array([ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 255, + ]); + + const [actual, offset] = coder.decode(data); + + expect(actual).toEqual(expected); + expect(offset).toEqual(36); + }); + + /** + * TODO: this test is failing on browser, need to investigate why. + * + * RangeError: Array buffer allocation failed + */ + it.skipIf(isBrowser)('should throw when decoding too many bytes [u8, length = 1]', async () => { + const coder = encoding.v1.array(encoding.v1.u8, 1); + const data = new Uint8Array(MAX_BYTES + 1); + + await expectToThrowFuelError( + () => coder.decode(data), + new FuelError(FuelError.CODES.DECODE_ERROR, 'Invalid array data - exceeds maximum bytes.', { + data, + length: data.length, + maxLength: MAX_BYTES, + }) + ); + }); + + it('should throw when decoding empty bytes [u8, length = 1]', async () => { + const coder = encoding.v1.array(encoding.v1.u8, 1); + const data = new Uint8Array(0); + + await expectToThrowFuelError( + () => coder.decode(data), + new FuelError(FuelError.CODES.DECODE_ERROR, 'Invalid u8 data - unexpected length.', { + data, + }) + ); + }); + + it('should throw when decoding too few bytes [u8, length = 1]', async () => { + const coder = encoding.v1.array(encoding.v1.u8, 1); + const data = new Uint8Array([]); + + await expectToThrowFuelError( + () => coder.decode(data), + new FuelError(FuelError.CODES.DECODE_ERROR, 'Invalid u8 data - unexpected length.', { + data, + }) + ); + }); + }); +}); diff --git a/packages/abi/test/encoding/v1/b256.test.ts b/packages/abi/test/encoding/v1/b256.test.ts new file mode 100644 index 00000000000..82ebec9c69c --- /dev/null +++ b/packages/abi/test/encoding/v1/b256.test.ts @@ -0,0 +1,138 @@ +import { ErrorCode, FuelError } from '@fuel-ts/errors'; +import { expectToThrowFuelError } from '@fuel-ts/errors/test-utils'; + +import { encoding } from '../../../src'; + +/** + * @group node + * @group browser + */ +describe('b256', () => { + describe('encode', () => { + it('should encode a b256 [zero]', () => { + const coder = encoding.v1.b256; + const expected = new Uint8Array(32).fill(0); + const value = '0x0000000000000000000000000000000000000000000000000000000000000000'; + + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + + it(`should encode a b256 [address]`, () => { + const coder = encoding.v1.b256; + const expected = new Uint8Array([ + 213, 87, 156, 70, 223, 204, 127, 24, 32, 112, 19, 230, 91, 68, 228, 203, 78, 44, 34, 152, + 244, 172, 69, 123, 168, 248, 39, 67, 243, 30, 147, 11, + ]); + const value = '0xd5579c46dfcc7f18207013e65b44e4cb4e2c2298f4ac457ba8f82743f31e930b'; + + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + + it('should throw an error encoding a b256 [too short]', async () => { + const coder = encoding.v1.b256; + const value = '0xTooShort'; + + await expectToThrowFuelError( + () => coder.encode(value), + new FuelError(ErrorCode.ENCODE_ERROR, 'Invalid b256 value - malformed hex value.', { + value, + expectedLength: 32, + }) + ); + }); + + it('should throw an error encoding a b256 [too long]', async () => { + const coder = encoding.v1.b256; + const value = `0x${'a'.repeat(33)}`; + + await expectToThrowFuelError( + () => coder.encode(value), + new FuelError(ErrorCode.ENCODE_ERROR, 'Invalid b256 value - malformed hex value.', { + value, + expectedLength: 32, + }) + ); + }); + + it('should throw an error encoding a b256 [not a hex string]', async () => { + const coder = encoding.v1.b256; + const value = 'not a hex string'; + + await expectToThrowFuelError( + () => coder.encode(value), + new FuelError(ErrorCode.ENCODE_ERROR, 'Invalid b256 value - malformed hex value.') + ); + }); + }); + + describe('decode', () => { + it('should decode a b256 [zero]', () => { + const coder = encoding.v1.b256; + const expected = '0x0000000000000000000000000000000000000000000000000000000000000000'; + const data = new Uint8Array(32).fill(0); + + const [actual, offset] = coder.decode(data); + + expect(actual).toStrictEqual(expected); + expect(offset).toStrictEqual(32); + }); + + it(`should decode a b256 [address]`, () => { + const coder = encoding.v1.b256; + const expected = '0xd5579c46dfcc7f18207013e65b44e4cb4e2c2298f4ac457ba8f82743f31e930b'; + const data = new Uint8Array([ + 213, 87, 156, 70, 223, 204, 127, 24, 32, 112, 19, 230, 91, 68, 228, 203, 78, 44, 34, 152, + 244, 172, 69, 123, 168, 248, 39, 67, 243, 30, 147, 11, + ]); + + const [actual, offset] = coder.decode(data); + + expect(actual).toStrictEqual(expected); + expect(offset).toStrictEqual(32); + }); + + it('should throw an error decoding a b256 [too short]', async () => { + const coder = encoding.v1.b256; + const data = new Uint8Array(31); + + await expectToThrowFuelError( + () => coder.decode(data), + new FuelError(ErrorCode.DECODE_ERROR, 'Invalid b256 data - unexpected length.', { + data, + expectedLength: 32, + }) + ); + }); + + it('should throw an error decoding a b256 [empty]', async () => { + const coder = encoding.v1.b256; + const data = new Uint8Array(0); + + await expectToThrowFuelError( + () => coder.decode(data), + new FuelError(ErrorCode.DECODE_ERROR, 'Invalid b256 data - unexpected length.', { + data, + expectedLength: 32, + }) + ); + }); + + it('should throw an error decoding a b256 [with offset]', async () => { + const coder = encoding.v1.b256; + const offset = 10; + const data = new Uint8Array(32); + + await expectToThrowFuelError( + () => coder.decode(data, offset), + new FuelError(ErrorCode.DECODE_ERROR, 'Invalid b256 data - unexpected length.', { + data: data.slice(offset), + expectedLength: 32, + }) + ); + }); + }); +}); diff --git a/packages/abi/test/encoding/v1/b512.test.ts b/packages/abi/test/encoding/v1/b512.test.ts new file mode 100644 index 00000000000..7709f250338 --- /dev/null +++ b/packages/abi/test/encoding/v1/b512.test.ts @@ -0,0 +1,146 @@ +import { ErrorCode, FuelError } from '@fuel-ts/errors'; +import { expectToThrowFuelError } from '@fuel-ts/errors/test-utils'; + +import { encoding } from '../../../src'; + +/** + * @group node + * @group browser + */ +describe('b512', () => { + describe('encode', () => { + it('should encode a b512 [zero]', () => { + const coder = encoding.v1.b512; + const expected = new Uint8Array(64).fill(0); + const value = + '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'; + + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + + it(`should encode a b512 [address]`, () => { + const coder = encoding.v1.b512; + const expected = new Uint8Array([ + 142, 157, 218, 111, 119, 147, 116, 90, 197, 170, 207, 158, 144, 124, 174, 48, 178, 160, 31, + 223, 13, 35, 183, 117, 10, 133, 198, 164, 79, 202, 12, 41, 240, 144, 111, 157, 31, 30, 146, + 230, 161, 251, 60, 61, 206, 243, 204, 59, 60, 219, 170, 226, 126, 71, 185, 217, 164, 198, + 164, 252, 228, 207, 22, 178, + ]); + const value = + '0x8e9dda6f7793745ac5aacf9e907cae30b2a01fdf0d23b7750a85c6a44fca0c29f0906f9d1f1e92e6a1fb3c3dcef3cc3b3cdbaae27e47b9d9a4c6a4fce4cf16b2'; + + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + + it('should throw an error encoding a b512 [too short]', async () => { + const coder = encoding.v1.b512; + const value = '0xTooShort'; + + await expectToThrowFuelError( + () => coder.encode(value), + new FuelError(ErrorCode.ENCODE_ERROR, 'Invalid b512 value - malformed hex value.', { + value, + expectedLength: 64, + }) + ); + }); + + it('should throw an error encoding a b512 [too long]', async () => { + const coder = encoding.v1.b512; + const value = `0x${'a'.repeat(33)}`; + + await expectToThrowFuelError( + () => coder.encode(value), + new FuelError(ErrorCode.ENCODE_ERROR, 'Invalid b512 value - malformed hex value.', { + value, + expectedLength: 64, + }) + ); + }); + + it('should throw an error encoding a b512 [not a hex string]', async () => { + const coder = encoding.v1.b512; + const value = 'not a hex string'; + + await expectToThrowFuelError( + () => coder.encode(value), + new FuelError(ErrorCode.ENCODE_ERROR, 'Invalid b512 value - malformed hex value.') + ); + }); + }); + + describe('decode', () => { + it('should decode a b512 [zero]', () => { + const coder = encoding.v1.b512; + const expected = + '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'; + const data = new Uint8Array(64).fill(0); + + const [actual, offset] = coder.decode(data); + + expect(actual).toStrictEqual(expected); + expect(offset).toStrictEqual(64); + }); + + it(`should decode a b512 [address]`, () => { + const coder = encoding.v1.b512; + const expected = + '0x8e9dda6f7793745ac5aacf9e907cae30b2a01fdf0d23b7750a85c6a44fca0c29f0906f9d1f1e92e6a1fb3c3dcef3cc3b3cdbaae27e47b9d9a4c6a4fce4cf16b2'; + const data = new Uint8Array([ + 142, 157, 218, 111, 119, 147, 116, 90, 197, 170, 207, 158, 144, 124, 174, 48, 178, 160, 31, + 223, 13, 35, 183, 117, 10, 133, 198, 164, 79, 202, 12, 41, 240, 144, 111, 157, 31, 30, 146, + 230, 161, 251, 60, 61, 206, 243, 204, 59, 60, 219, 170, 226, 126, 71, 185, 217, 164, 198, + 164, 252, 228, 207, 22, 178, + ]); + + const [actual, offset] = coder.decode(data); + + expect(actual).toStrictEqual(expected); + expect(offset).toStrictEqual(64); + }); + + it('should throw an error decoding a b512 [too short]', async () => { + const coder = encoding.v1.b512; + const data = new Uint8Array(31); + + await expectToThrowFuelError( + () => coder.decode(data), + new FuelError(ErrorCode.DECODE_ERROR, 'Invalid b512 data - unexpected length.', { + data, + expectedLength: 64, + }) + ); + }); + + it('should throw an error decoding a b512 [empty]', async () => { + const coder = encoding.v1.b512; + const data = new Uint8Array(0); + + await expectToThrowFuelError( + () => coder.decode(data), + new FuelError(ErrorCode.DECODE_ERROR, 'Invalid b512 data - unexpected length.', { + data, + expectedLength: 64, + }) + ); + }); + + it('should throw an error decoding a b512 [with offset]', async () => { + const coder = encoding.v1.b512; + const offset = 10; + const data = new Uint8Array(64); + + await expectToThrowFuelError( + () => coder.decode(data, offset), + new FuelError(ErrorCode.DECODE_ERROR, 'Invalid b512 data - unexpected length.', { + data: data.slice(offset), + expectedLength: 64, + }) + ); + }); + }); +}); diff --git a/packages/abi/test/encoding/v1/boolean.test.ts b/packages/abi/test/encoding/v1/boolean.test.ts new file mode 100644 index 00000000000..d64e5b63e9f --- /dev/null +++ b/packages/abi/test/encoding/v1/boolean.test.ts @@ -0,0 +1,107 @@ +import { FuelError } from '@fuel-ts/errors'; +import { expectToThrowFuelError } from '@fuel-ts/errors/test-utils'; + +import { encoding } from '../../../src'; + +/** + * @group node + * @group browser + */ +describe('boolean', () => { + describe('encode', () => { + it('should encode a boolean [true]', () => { + const coder = encoding.v1.bool; + const value = true; + const expected = new Uint8Array([1]); + + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + + it('should encode a boolean [false]', () => { + const coder = encoding.v1.bool; + const value = false; + const expected = new Uint8Array([0]); + + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + + it('should throw when encoding an invalid boolean value [undefined]', async () => { + const coder = encoding.v1.bool; + const value = undefined; + + await expectToThrowFuelError( + // @ts-expect-error or expects a boolean value + () => coder.encode(value), + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid boolean value.', { + value: undefined, + }) + ); + }); + + it('should throw when encoding an invalid boolean value [string value]', async () => { + const coder = encoding.v1.bool; + const value = 'true'; + + await expectToThrowFuelError( + // @ts-expect-error or expects a boolean value + () => coder.encode(value), + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid boolean value.', { value: 'true' }) + ); + }); + }); + + describe('decode', () => { + it('should decode a boolean [1 = true]', () => { + const coder = encoding.v1.bool; + const value = new Uint8Array([1]); + const expected = true; + + const [actual, offset] = coder.decode(value); + + expect(actual).toStrictEqual(expected); + expect(offset).toStrictEqual(value.length); + }); + + it('should decode a boolean [0 = false]', () => { + const coder = encoding.v1.bool; + const value = new Uint8Array([0]); + const expected = false; + + const [actual, offset] = coder.decode(value); + + expect(actual).toStrictEqual(expected); + expect(offset).toStrictEqual(value.length); + }); + + it('should throw when decoding an invalid boolean value [empty]', async () => { + const coder = encoding.v1.bool; + const data = new Uint8Array(0); + + await expectToThrowFuelError( + () => coder.decode(data), + new FuelError(FuelError.CODES.DECODE_ERROR, 'Invalid bool data - not enough data.', { + data, + expectedLength: 1, + }) + ); + }); + + it('should throw when decoding an invalid boolean value [2]', async () => { + const coder = encoding.v1.bool; + const data = new Uint8Array([2]); + + await expectToThrowFuelError( + () => coder.decode(data), + new FuelError(FuelError.CODES.DECODE_ERROR, 'Invalid bool value - invalid boolean value.', { + data, + type: 'bool', + value: 2, + }) + ); + }); + }); +}); diff --git a/packages/abi/test/encoding/v1/byte.test.ts b/packages/abi/test/encoding/v1/byte.test.ts new file mode 100644 index 00000000000..c7ceaadb780 --- /dev/null +++ b/packages/abi/test/encoding/v1/byte.test.ts @@ -0,0 +1,84 @@ +import { FuelError } from '@fuel-ts/errors'; +import { expectToThrowFuelError } from '@fuel-ts/errors/test-utils'; + +import { encoding } from '../../../src'; + +/** + * @group node + * @group browser + */ +describe('byte', () => { + describe('encode', () => { + it('should encode an array of numbers [1, 2, 3]', () => { + const coder = encoding.v1.bytes; + const value = [1, 2, 3]; + const expected = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 3, 1, 2, 3]); + + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + + it('should encode a Uint8Array [1, 2, 3]', () => { + const coder = encoding.v1.bytes; + const value = new Uint8Array([1, 2, 3]); + const expected = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 3, 1, 2, 3]); + + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + + it('should encode a full word size [1, 2, 3, 4, 5, 6, 7, 8]', () => { + const coder = encoding.v1.bytes; + const value = new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8]); + const expected = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 8, 1, 2, 3, 4, 5, 6, 7, 8]); + + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + }); + + describe('decode', () => { + it('should decode a byte array [1, 2, 3]', () => { + const coder = encoding.v1.bytes; + const data = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 3, 1, 2, 3]); + const expected = new Uint8Array([1, 2, 3]); + + const [actual, offset] = coder.decode(data); + + expect(actual).toStrictEqual(expected); + expect(offset).toEqual(11); + }); + + it('should throw when decoding an empty byte array', async () => { + const coder = encoding.v1.bytes; + const data = new Uint8Array(0); + + await expectToThrowFuelError( + () => coder.decode(data), + new FuelError(FuelError.CODES.DECODE_ERROR, 'Invalid bytes data - malformed bytes.', { + data, + }) + ); + }); + + it('should throw when decoding a byte array with not enough data', async () => { + const coder = encoding.v1.bytes; + const data = new Uint8Array([ + // Length = 0 + 0, 0, 0, 0, 0, 0, 0, 3, + // Data = [1, 2] + 1, 2, + ]); + + await expectToThrowFuelError( + () => coder.decode(data), + new FuelError(FuelError.CODES.DECODE_ERROR, 'Invalid bytes data - malformed bytes.', { + data, + }) + ); + }); + }); +}); diff --git a/packages/abi/test/encoding/v1/enum.test.ts b/packages/abi/test/encoding/v1/enum.test.ts new file mode 100644 index 00000000000..00fbbbfa796 --- /dev/null +++ b/packages/abi/test/encoding/v1/enum.test.ts @@ -0,0 +1,272 @@ +import { FuelError } from '@fuel-ts/errors'; +import { expectToThrowFuelError } from '@fuel-ts/errors/test-utils'; +import { bn } from '@fuel-ts/math'; + +import type { AbiTypeComponent, CoderFactoryParameters } from '../../../src'; +import { encoding } from '../../../src'; +import { U64_MAX } from '../../utils/constants'; + +/** + * @group node + * @group browser + */ +describe('enum', () => { + describe('fromAbi', () => { + it('should throw when a component is not provided', async () => { + const factory = vi.fn(); + const swayType = 'enum MyEnum'; + const components: AbiTypeComponent[] | undefined = undefined; + + await expectToThrowFuelError( + () => + encoding.v1.enum.factory( + { type: { swayType, components } } as CoderFactoryParameters, + factory + ), + new FuelError( + FuelError.CODES.CODER_NOT_FOUND, + 'The provided enum type is missing ABI components.', + { swayType, components } + ) + ); + }); + + it('should get the coder for a valid enum type', () => { + const components: AbiTypeComponent[] = [ + { name: 'a', type: 'bool' } as unknown as AbiTypeComponent, + { name: 'b', type: 'u64' } as unknown as AbiTypeComponent, + ]; + const factory = vi.fn(); + factory.mockReturnValue(encoding.v1.bool); + factory.mockReturnValue(encoding.v1.u64); + + const coder = encoding.v1.enum.factory( + { type: { components } } as CoderFactoryParameters, + factory + ); + + expect(factory).toHaveBeenCalledWith(components[0], factory); + expect(factory).toHaveBeenCalledWith(components[1], factory); + expect(factory).toHaveBeenCalledTimes(2); + expect(coder).toBeDefined(); + }); + }); + + describe('encode', () => { + it('should encode an enum [boolean]', () => { + const coder = encoding.v1.enum({ a: encoding.v1.bool, b: encoding.v1.u64 }); + const expected = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 1]); + const value = { a: true }; + + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + + it('should encode an enum [u64]', () => { + const coder = encoding.v1.enum({ a: encoding.v1.bool, b: encoding.v1.u64 }); + const expected = new Uint8Array([ + 0, 0, 0, 0, 0, 0, 0, 1, 255, 255, 255, 255, 255, 255, 255, 255, + ]); + const value = { b: bn(U64_MAX) }; + + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + + it('should encode an enum [non-native]', () => { + const coder = encoding.v1.enum({ + nonNative: encoding.v1.bool, + b: encoding.v1.u64, + native: encoding.v1.void, + }); + const expected = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 1]); + const value = { nonNative: true }; + + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + + it('should encode an enum [native]', () => { + const coder = encoding.v1.enum({ + nonNative: encoding.v1.bool, + b: encoding.v1.u64, + native: encoding.v1.void, + }); + const expected = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 2]); + const value = 'native'; + + // @ts-expect-error native + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + + it('should throw when encoding [no enum key]', async () => { + const coder = encoding.v1.enum({ + a: encoding.v1.bool, + b: encoding.v1.u64, + native: encoding.v1.void, + }); + const value = {}; + await expectToThrowFuelError( + // @ts-expect-error no enum key + () => coder.encode(value), + new FuelError( + FuelError.CODES.ENCODE_ERROR, + 'Invalid enum value - a valid case key must be provided.', + { value, validKeys: ['a', 'b', 'native'] } + ) + ); + }); + + it('should throw when encoding [non-existent enum key]', async () => { + const coder = encoding.v1.enum({ + a: encoding.v1.bool, + b: encoding.v1.u64, + native: encoding.v1.void, + }); + const value = { nonExistentKey: true }; + + await expectToThrowFuelError( + // @ts-expect-error non-existent enum key + () => coder.encode(value), + new FuelError( + FuelError.CODES.ENCODE_ERROR, + 'Invalid enum value - invalid case key "nonExistentKey".', + { value, validKeys: ['a', 'b', 'native'] } + ) + ); + }); + + it('should throw when encoding [multiple fields]', async () => { + const coder = encoding.v1.enum({ + a: encoding.v1.bool, + b: encoding.v1.u64, + native: encoding.v1.void, + }); + const value = { a: true, b: bn(1) }; + + await expectToThrowFuelError( + // @ts-expect-error multiple fields + () => coder.encode(value), + new FuelError( + FuelError.CODES.ENCODE_ERROR, + 'Invalid enum value - only one field must be provided.', + { value, validKeys: ['a', 'b', 'native'] } + ) + ); + }); + + it('should throw when encoding [invalid case value]', async () => { + const coder = encoding.v1.enum({ + a: encoding.v1.bool, + b: encoding.v1.u64, + native: encoding.v1.void, + }); + const value = { b: true }; + + await expectToThrowFuelError( + // @ts-expect-error invalid case value + () => coder.encode(value), + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid u64 value - expected a BNInput.', { + value: true, + }) + ); + }); + }); + + describe('decode', () => { + it('should decode an enum [boolean]', () => { + const coder = encoding.v1.enum({ a: encoding.v1.bool, b: encoding.v1.u64 }); + const data = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 1]); + const expected = { a: true }; + + const [actual, offset] = coder.decode(data); + + expect(actual).toStrictEqual(expected); + expect(offset).toBe(9); + }); + + it('should decode an enum [u64]', () => { + const coder = encoding.v1.enum({ a: encoding.v1.bool, b: encoding.v1.u64 }); + const data = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 1, 255, 255, 255, 255, 255, 255, 255, 255]); + const expected = { b: bn(U64_MAX) }; + + const [actual, offset] = coder.decode(data); + + expect(actual).toStrictEqual(expected); + expect(offset).toBe(16); + }); + + it('should decode an enum [non-native]', () => { + const coder = encoding.v1.enum({ + nonNative: encoding.v1.bool, + b: encoding.v1.u64, + native: encoding.v1.void, + }); + const data = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 1]); + const expected = { nonNative: true }; + + const [actual, offset] = coder.decode(data); + + expect(actual).toStrictEqual(expected); + expect(offset).toBe(9); + }); + + it('should decode an enum [native]', () => { + const coder = encoding.v1.enum({ + nonNative: encoding.v1.bool, + b: encoding.v1.u64, + native: encoding.v1.void, + }); + const data = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 2]); + const expected = 'native'; + + const [actual, offset] = coder.decode(data); + + expect(actual).toStrictEqual(expected); + expect(offset).toBe(8); + }); + + it('should throw an error [invalid case key]', async () => { + const coder = encoding.v1.enum({ a: encoding.v1.bool, b: encoding.v1.u64 }); + const data = new Uint8Array([0, 0, 0, 0, 0, 0, 255, 255]); + + await expectToThrowFuelError( + () => coder.decode(data, 0), + new FuelError(FuelError.CODES.DECODE_ERROR, 'Invalid enum data - invalid case key.', { + validKeys: ['a', 'b'], + }) + ); + }); + + it('should throw an error [empty bytes]', async () => { + const coder = encoding.v1.enum({ a: encoding.v1.bool, b: encoding.v1.u64 }); + const data = new Uint8Array(0); + + await expectToThrowFuelError( + () => coder.decode(data, 0), + new FuelError(FuelError.CODES.DECODE_ERROR, 'Invalid enum data - invalid case key.', { + validKeys: ['a', 'b'], + }) + ); + }); + + it('should throw an error [empty case element]', async () => { + const coder = encoding.v1.enum({ a: encoding.v1.bool, b: encoding.v1.u64 }); + const data = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 1]); + + await expectToThrowFuelError( + () => coder.decode(data, 0), + new FuelError(FuelError.CODES.DECODE_ERROR, 'Invalid u64 data - unexpected length.', { + data: new Uint8Array([]), + expectedLength: 8, + type: 'u64', + }) + ); + }); + }); +}); diff --git a/packages/abi/test/encoding/v1/option.test.ts b/packages/abi/test/encoding/v1/option.test.ts new file mode 100644 index 00000000000..0a91b6fde85 --- /dev/null +++ b/packages/abi/test/encoding/v1/option.test.ts @@ -0,0 +1,133 @@ +import { FuelError } from '@fuel-ts/errors'; +import { expectToThrowFuelError } from '@fuel-ts/errors/test-utils'; + +import type { AbiTypeComponent, CoderFactoryParameters } from '../../../src'; +import { encoding } from '../../../src'; + +/** + * @group node + * @group browser + */ +describe('option', () => { + describe('fromAbi', () => { + it('should throw when a component is not provided', async () => { + const swayType = 'enum std::option::Option'; + const components: AbiTypeComponent[] | undefined = undefined; + const factory = vi.fn(); + + await expectToThrowFuelError( + () => + encoding.v1.option.factory( + { type: { swayType, components } } as CoderFactoryParameters, + factory + ), + new FuelError( + FuelError.CODES.CODER_NOT_FOUND, + 'The provided option type is missing ABI components.', + { swayType, components } + ) + ); + }); + + it('should get the coder for a valid option type', () => { + const components: AbiTypeComponent[] = [ + { name: 'None', type: '()' } as unknown as AbiTypeComponent, + { name: 'Some', type: 'u64' } as unknown as AbiTypeComponent, + ]; + const factory = vi.fn(); + factory.mockReturnValue(encoding.v1.void); + factory.mockReturnValue(encoding.v1.u64); + + const coder = encoding.v1.option.factory( + { type: { components } } as CoderFactoryParameters, + factory + ); + + expect(factory).toHaveBeenCalledWith(components[0], factory); + expect(factory).toHaveBeenCalledWith(components[1], factory); + expect(factory).toHaveBeenCalledTimes(2); + expect(coder).toBeDefined(); + }); + }); + + describe('encode', () => { + it('should encode a value [Some]', () => { + const coder = encoding.v1.option({ None: encoding.v1.void, Some: encoding.v1.u8 }); + const value = 100; + + const actual = coder.encode(value); + + const expected = Uint8Array.from([0, 0, 0, 0, 0, 0, 0, 1, 100]); + expect(actual).toEqual(expected); + }); + + it('should encode a value [None]', () => { + const coder = encoding.v1.option({ None: encoding.v1.void, Some: encoding.v1.u8 }); + const value = undefined; + + const actual = coder.encode(value); + + const expected = Uint8Array.from([0, 0, 0, 0, 0, 0, 0, 0]); + expect(actual).toEqual(expected); + }); + + it('should encode a value [None - optional]', () => { + const coder = encoding.v1.option({ None: encoding.v1.void, Some: encoding.v1.u8 }); + + // @ts-expect-error optional value + const actual = coder.encode(); + + const expected = Uint8Array.from([0, 0, 0, 0, 0, 0, 0, 0]); + expect(actual).toEqual(expected); + }); + + it('should throw when encoding [malformed value]', async () => { + const coder = encoding.v1.option({ None: encoding.v1.void, Some: encoding.v1.u8 }); + const value = 'malformed value'; + + await expectToThrowFuelError( + // @ts-expect-error invalid option value + () => coder.encode(value), + new FuelError(FuelError.CODES.ENCODE_ERROR, `Invalid option value - malformed value.`, { + value: { Some: value }, + }) + ); + }); + }); + + describe('decode', () => { + it('should decode a value [Some]', () => { + const coder = encoding.v1.option({ None: encoding.v1.void, Some: encoding.v1.u8 }); + const input = Uint8Array.from([0, 0, 0, 0, 0, 0, 0, 1, 100]); + const expected = 100; + + const [decoded, length] = coder.decode(input, 0); + + expect(decoded).toEqual(expected); + expect(length).toEqual(9); + }); + + it('should decode a value [None]', () => { + const coder = encoding.v1.option({ None: encoding.v1.void, Some: encoding.v1.u8 }); + const input = Uint8Array.from([0, 0, 0, 0, 0, 0, 0, 0]); + const expected = undefined; + + const [decoded, length] = coder.decode(input, 0); + + expect(decoded).toEqual(expected); + expect(length).toEqual(8); + }); + + it('should throw when decoding [malformed value]', async () => { + const coder = encoding.v1.option({ None: encoding.v1.void, Some: encoding.v1.u8 }); + const data = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 1]); + + await expectToThrowFuelError( + () => coder.decode(data, 0), + new FuelError(FuelError.CODES.DECODE_ERROR, `Invalid option data - malformed bytes.`, { + data: new Uint8Array([0, 0, 0, 0, 0, 0, 0, 1]), + }) + ); + }); + }); +}); diff --git a/packages/abi/test/encoding/v1/raw-slice.test.ts b/packages/abi/test/encoding/v1/raw-slice.test.ts new file mode 100644 index 00000000000..f8abaa69065 --- /dev/null +++ b/packages/abi/test/encoding/v1/raw-slice.test.ts @@ -0,0 +1,74 @@ +import { FuelError } from '@fuel-ts/errors'; +import { expectToThrowFuelError } from '@fuel-ts/errors/test-utils'; + +import { encoding } from '../../../src'; + +/** + * @group node + * @group browser + */ +describe('raw_slice', () => { + describe('encode', () => { + it('should encode an array of numbers [1, 2, 3]', () => { + const coder = encoding.v1.rawSlice; + const value = [1, 2, 3]; + const expected = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 3, 1, 2, 3]); + + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + + it('should encode a full word size [1, 2, 3, 4, 5, 6, 7, 8]', () => { + const coder = encoding.v1.rawSlice; + const value = [1, 2, 3, 4, 5, 6, 7, 8]; + const expected = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 8, 1, 2, 3, 4, 5, 6, 7, 8]); + + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + }); + + describe('decode', () => { + it('should decode a rawSlice array [1, 2, 3]', () => { + const coder = encoding.v1.rawSlice; + const data = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 3, 1, 2, 3]); + const expected = [1, 2, 3]; + + const [actual, offset] = coder.decode(data); + + expect(actual).toStrictEqual(expected); + expect(offset).toEqual(11); + }); + + it('should throw when decoding an empty rawSlice array', async () => { + const coder = encoding.v1.rawSlice; + const data = new Uint8Array(0); + + await expectToThrowFuelError( + () => coder.decode(data), + new FuelError(FuelError.CODES.DECODE_ERROR, 'Invalid raw slice data - malformed bytes.', { + data, + }) + ); + }); + + it('should throw when decoding a rawSlice array with not enough data', async () => { + const coder = encoding.v1.rawSlice; + const data = new Uint8Array([ + // Length = 0 + 0, 0, 0, 0, 0, 0, 0, 3, + // Data = [1, 2] + 1, 2, + ]); + + await expectToThrowFuelError( + () => coder.decode(data), + new FuelError(FuelError.CODES.DECODE_ERROR, 'Invalid raw slice data - malformed bytes.', { + data, + }) + ); + }); + }); +}); diff --git a/packages/abi/test/encoding/v1/std-string.test.ts b/packages/abi/test/encoding/v1/std-string.test.ts new file mode 100644 index 00000000000..6e7bba6afab --- /dev/null +++ b/packages/abi/test/encoding/v1/std-string.test.ts @@ -0,0 +1,93 @@ +import { FuelError } from '@fuel-ts/errors'; +import { expectToThrowFuelError } from '@fuel-ts/errors/test-utils'; + +import { encoding } from '../../../src'; + +/** + * @group node + * @group browser + */ +describe('std_string', () => { + describe('encode', () => { + it('should encode an empty string [""]', () => { + const coder = encoding.v1.stdString; + const value = ''; + const expected = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0]); + + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + + it('should encode an empty string [hello world]', () => { + const coder = encoding.v1.stdString; + const value = 'hello world'; + const expected = new Uint8Array([ + 0, 0, 0, 0, 0, 0, 0, 11, 104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100, + ]); + + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + + it('should encode an empty string [H3llo W0rld]', () => { + const coder = encoding.v1.stdString; + const value = 'H3llo W0rld'; + const expected = new Uint8Array([ + 0, 0, 0, 0, 0, 0, 0, 11, 72, 51, 108, 108, 111, 32, 87, 48, 114, 108, 100, + ]); + + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + + it('should encode an empty string [abcdefghijklmnopqrstuvwxyz1234567890]', () => { + const coder = encoding.v1.stdString; + const value = 'abcdefghijklmnopqrstuvwxyz1234567890'; + const expected = new Uint8Array([ + 0, 0, 0, 0, 0, 0, 0, 36, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 48, + ]); + + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + }); + + describe('decode', () => { + it('should decode a rawSlice array [1, 2, 3]', () => { + const coder = encoding.v1.stdString; + const data = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 4, 102, 117, 101, 108]); + const expected = 'fuel'; + + const [actual, offset] = coder.decode(data); + + expect(actual).toStrictEqual(expected); + expect(offset).toEqual(12); + }); + + it('should throw when decoding a string with empty bytes', async () => { + const coder = encoding.v1.stdString; + const data = new Uint8Array(0); + + await expectToThrowFuelError( + () => coder.decode(data), + new FuelError(FuelError.CODES.DECODE_ERROR, 'Invalid std string data - malformed bytes.') + ); + }); + + it('should throw when decoding a string with empty byte data', async () => { + const coder = encoding.v1.stdString; + const data = new Uint8Array([0, 0, 0, 0, 0, 0, 255, 255, 1]); + + await expectToThrowFuelError( + () => coder.decode(data, 0), + new FuelError(FuelError.CODES.DECODE_ERROR, 'Invalid std string data - malformed bytes.') + ); + }); + }); +}); diff --git a/packages/abi/test/encoding/v1/str.test.ts b/packages/abi/test/encoding/v1/str.test.ts new file mode 100644 index 00000000000..93710b3eb22 --- /dev/null +++ b/packages/abi/test/encoding/v1/str.test.ts @@ -0,0 +1,93 @@ +import { FuelError } from '@fuel-ts/errors'; +import { expectToThrowFuelError } from '@fuel-ts/errors/test-utils'; + +import { encoding } from '../../../src'; + +/** + * @group node + * @group browser + */ +describe('str', () => { + describe('encode', () => { + it('should encode an empty string [""]', () => { + const coder = encoding.v1.str; + const value = ''; + const expected = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0]); + + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + + it('should encode an empty string [hello world]', () => { + const coder = encoding.v1.str; + const value = 'hello world'; + const expected = new Uint8Array([ + 0, 0, 0, 0, 0, 0, 0, 11, 104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100, + ]); + + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + + it('should encode an empty string [H3llo W0rld]', () => { + const coder = encoding.v1.str; + const value = 'H3llo W0rld'; + const expected = new Uint8Array([ + 0, 0, 0, 0, 0, 0, 0, 11, 72, 51, 108, 108, 111, 32, 87, 48, 114, 108, 100, + ]); + + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + + it('should encode an empty string [abcdefghijklmnopqrstuvwxyz1234567890]', () => { + const coder = encoding.v1.str; + const value = 'abcdefghijklmnopqrstuvwxyz1234567890'; + const expected = new Uint8Array([ + 0, 0, 0, 0, 0, 0, 0, 36, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 48, + ]); + + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + }); + + describe('decode', () => { + it('should decode a rawSlice array [1, 2, 3]', () => { + const coder = encoding.v1.str; + const data = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 4, 102, 117, 101, 108]); + const expected = 'fuel'; + + const [actual, offset] = coder.decode(data); + + expect(actual).toStrictEqual(expected); + expect(offset).toEqual(12); + }); + + it('throws when decoding a string with empty bytes', async () => { + const coder = encoding.v1.str; + const data = new Uint8Array(0); + + await expectToThrowFuelError( + () => coder.decode(data), + new FuelError(FuelError.CODES.DECODE_ERROR, 'Invalid str data - malformed bytes.') + ); + }); + + it('throws when decoding a string with empty byte data', async () => { + const coder = encoding.v1.str; + const data = new Uint8Array([0, 0, 0, 0, 0, 0, 255, 255, 1]); + + await expectToThrowFuelError( + () => coder.decode(data, 0), + new FuelError(FuelError.CODES.DECODE_ERROR, 'Invalid str data - malformed bytes.') + ); + }); + }); +}); diff --git a/packages/abi/test/encoding/v1/string.test.ts b/packages/abi/test/encoding/v1/string.test.ts new file mode 100644 index 00000000000..b626cbe83fd --- /dev/null +++ b/packages/abi/test/encoding/v1/string.test.ts @@ -0,0 +1,95 @@ +import { FuelError } from '@fuel-ts/errors'; +import { expectToThrowFuelError } from '@fuel-ts/errors/test-utils'; + +import type { CoderFactoryParameters } from '../../../src'; +import { encoding } from '../../../src'; + +/** + * @group node + * @group browser + */ +describe('string', () => { + describe('fromAbi', () => { + it('should throw when the array type is not valid', async () => { + const factory = vi.fn(); + const swayType = 'invalid[123]'; + + await expectToThrowFuelError( + () => encoding.v1.string.factory({ type: { swayType } } as CoderFactoryParameters, factory), + new FuelError( + FuelError.CODES.CODER_NOT_FOUND, + 'Unable to find string coder for the provided type "invalid[123]".', + { swayType } + ) + ); + }); + + it('should get the coder for a valid array type', () => { + const factory = vi.fn(); + const swayType = 'str[1]'; + + const coder = encoding.v1.string.factory( + { type: { swayType } } as CoderFactoryParameters, + factory + ); + + expect(coder).toBeDefined(); + }); + }); + + describe('encode', () => { + it('should encode a string', () => { + const coder = encoding.v1.string(4); + const value = 'fuel'; + const expected = new Uint8Array([102, 117, 101, 108]); + + const actual = coder.encode(value); + + expect(actual).toEqual(expected); + }); + + it('should throw when encoding a string [mismatch length]', async () => { + const coder = encoding.v1.string(2); + const value = 'fuel'; + + await expectToThrowFuelError( + () => coder.encode(value), + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid string value - unexpected length.') + ); + }); + }); + + describe('decode', () => { + it('should decode a string', () => { + const coder = encoding.v1.string(4); + const data = new Uint8Array([102, 117, 101, 108]); + const expected = 'fuel'; + + const [actual, offset] = coder.decode(data, 0); + + expect(actual).toEqual(expected); + expect(offset).toEqual(4); + }); + + it('should throw when decoding a string [too few bytes]', async () => { + const coder = encoding.v1.string(4); + const data = new Uint8Array([0, 0]); + + await expectToThrowFuelError( + () => coder.decode(data, 0), + new FuelError(FuelError.CODES.DECODE_ERROR, 'Invalid string data - unexpected length.') + ); + }); + + it('should throw when decoding a string [too few bytes w/ offset]', async () => { + const coder = encoding.v1.string(4); + const offset = 10; + const data = new Uint8Array([0, 0, 0, 0]); + + await expectToThrowFuelError( + () => coder.decode(data, offset), + new FuelError(FuelError.CODES.DECODE_ERROR, 'Invalid string data - unexpected length.') + ); + }); + }); +}); diff --git a/packages/abi/test/encoding/v1/struct.test.ts b/packages/abi/test/encoding/v1/struct.test.ts new file mode 100644 index 00000000000..9d5379a2e5b --- /dev/null +++ b/packages/abi/test/encoding/v1/struct.test.ts @@ -0,0 +1,141 @@ +import { FuelError } from '@fuel-ts/errors'; +import { expectToThrowFuelError } from '@fuel-ts/errors/test-utils'; + +import type { AbiTypeComponent, CoderFactoryParameters } from '../../../src'; +import { encoding } from '../../../src'; +import { U32_MAX, U64_MAX } from '../../utils/constants'; + +/** + * @group node + * @group browser + */ +describe('struct', () => { + describe('fromAbi', () => { + it('should throw when a component is not provided', async () => { + const swayType = 'struct MyStruct'; + const components: AbiTypeComponent[] | undefined = undefined; + const factory = vi.fn(); + + await expectToThrowFuelError( + () => + encoding.v1.struct.factory( + { type: { swayType, components } } as CoderFactoryParameters, + factory + ), + new FuelError( + FuelError.CODES.CODER_NOT_FOUND, + 'The provided struct type is missing ABI components.', + { swayType, components } + ) + ); + }); + + it('should get the coder for a valid struct type', () => { + const components: AbiTypeComponent[] = [{}] as AbiTypeComponent[]; + const factory = vi.fn(); + + const coder = encoding.v1.struct.factory( + { type: { components } } as CoderFactoryParameters, + factory + ); + + expect(coder).toBeDefined(); + }); + }); + + describe('encode', () => { + it('should encode a struct [{ a: boolean, b: u64 }]', () => { + const coder = encoding.v1.struct({ + a: encoding.v1.bool, + b: encoding.v1.u64, + }); + const expected = new Uint8Array([1, 0, 0, 0, 0, 255, 255, 255, 255]); + const value = { a: true, b: U32_MAX }; + + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + + it('should throw when encoding [missing element]', async () => { + const coder = encoding.v1.struct({ + a: encoding.v1.bool, + b: encoding.v1.u64, + }); + const value = { a: true }; + + await expectToThrowFuelError( + // @ts-expect-error - expected missing field + () => coder.encode(value), + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid struct value - malformed object.', { + value, + paths: [{ path: 'b', error: 'Field not present.' }], + }) + ); + }); + + it('should throw when encoding [missing and extra elements]', async () => { + const coder = encoding.v1.struct({ + a: encoding.v1.bool, + b: encoding.v1.u64, + }); + const value = { a: true, c: 1 }; + + await expectToThrowFuelError( + // @ts-expect-error - expected missing field + () => coder.encode(value), + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid struct value - malformed object.', { + value, + paths: [{ path: 'b', error: 'Field not present.' }], + }) + ); + }); + + it('should throw when encoding [invalid element]', async () => { + const coder = encoding.v1.struct({ + a: encoding.v1.bool, + b: encoding.v1.u64, + }); + const value = { a: true, b: U64_MAX.add(1) }; + + await expectToThrowFuelError( + () => coder.encode(value), + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid u64 value - value exceeds maximum.', { + type: 'u64', + value: U64_MAX.add(1).toString(), + }) + ); + }); + }); + + describe('decode', () => { + it('should decode a struct [{ a: boolean, b: u64 }]', () => { + const coder = encoding.v1.struct({ + a: encoding.v1.bool, + b: encoding.v1.u64, + }); + const expected = { a: true, b: expect.toEqualBn(U32_MAX) }; + const data = new Uint8Array([1, 0, 0, 0, 0, 255, 255, 255, 255]); + + const [actual, offset] = coder.decode(data); + + expect(actual).toStrictEqual(expected); + expect(offset).toEqual(9); + }); + + it('should throw when decoding empty bytes', async () => { + const coder = encoding.v1.struct({ + a: encoding.v1.bool, + b: encoding.v1.u64, + }); + const data = new Uint8Array(0); + + await expectToThrowFuelError( + () => coder.decode(data), + new FuelError(FuelError.CODES.DECODE_ERROR, 'Invalid bool data - not enough data.', { + data, + }) + ); + }); + }); +}); diff --git a/packages/abi/test/encoding/v1/tuple.test.ts b/packages/abi/test/encoding/v1/tuple.test.ts new file mode 100644 index 00000000000..383e2c9a002 --- /dev/null +++ b/packages/abi/test/encoding/v1/tuple.test.ts @@ -0,0 +1,90 @@ +import { FuelError } from '@fuel-ts/errors'; +import { expectToThrowFuelError } from '@fuel-ts/errors/test-utils'; + +import type { AbiTypeComponent, CoderFactoryParameters } from '../../../src'; +import { encoding } from '../../../src'; +import { U64_MAX } from '../../utils/constants'; + +/** + * @group node + * @group browser + */ +describe('tuple', () => { + describe('fromAbi', () => { + it('should throw when a component is not provided', async () => { + const swayType = '(u8, bool)'; + const components: AbiTypeComponent[] | undefined = undefined; + const factory = vi.fn(); + + await expectToThrowFuelError( + () => + encoding.v1.tuple.factory( + { type: { swayType, components } } as CoderFactoryParameters, + factory + ), + new FuelError( + FuelError.CODES.CODER_NOT_FOUND, + 'The provided tuple type is missing ABI components.', + { swayType, components } + ) + ); + }); + + it('should get the coder for a valid tuple type', () => { + const components: AbiTypeComponent[] = [{}] as AbiTypeComponent[]; + const factory = vi.fn(); + + const coder = encoding.v1.tuple.factory( + { type: { components } } as CoderFactoryParameters, + factory + ); + + expect(coder).toBeDefined(); + }); + }); + + describe('encode', () => { + it('should encode a tuple [boolean, u64]', () => { + const coder = encoding.v1.tuple([encoding.v1.bool, encoding.v1.u64]); + const expected = new Uint8Array([1, 255, 255, 255, 255, 255, 255, 255, 255]); + const value = [true, U64_MAX]; + + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + + it('should throw when encoding [too few inputs]', async () => { + const coder = encoding.v1.tuple([encoding.v1.bool, encoding.v1.u64]); + const value = [true]; + + await expectToThrowFuelError( + () => coder.encode(value), + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid tuple value - unexpected length.') + ); + }); + }); + + describe('decode', () => { + it('should decode a tuple [boolean, u64]', () => { + const coder = encoding.v1.tuple([encoding.v1.bool, encoding.v1.u64]); + const expected = [true, U64_MAX]; + const data = new Uint8Array([1, 255, 255, 255, 255, 255, 255, 255, 255]); + + const [actual, actualOffset] = coder.decode(data, 0); + + expect(actual).toStrictEqual(expected); + expect(actualOffset).toEqual(9); + }); + + it('throws when decoding bytes [empty]', async () => { + const coder = encoding.v1.tuple([encoding.v1.bool, encoding.v1.u64]); + const data = new Uint8Array(0); + + await expectToThrowFuelError( + () => coder.decode(data, 0), + new FuelError(FuelError.CODES.DECODE_ERROR, 'Invalid tuple data - malformed data.') + ); + }); + }); +}); diff --git a/packages/abi/test/encoding/v1/u16.test.ts b/packages/abi/test/encoding/v1/u16.test.ts new file mode 100644 index 00000000000..3a4ef257547 --- /dev/null +++ b/packages/abi/test/encoding/v1/u16.test.ts @@ -0,0 +1,114 @@ +import { FuelError } from '@fuel-ts/errors'; +import { expectToThrowFuelError } from '@fuel-ts/errors/test-utils'; + +import { encoding } from '../../../src'; + +/** + * @group node + * @group browser + */ +describe('u16', () => { + describe('encode', () => { + it('should encode a u16 [min = 0]', () => { + const coder = encoding.v1.u16; + const expected = new Uint8Array([0, 0]); + const value = 0; + + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + + it(`should encode a u16 [max = 65535]`, () => { + const coder = encoding.v1.u16; + const expected = new Uint8Array([255, 255]); + const value = 65535; + + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + + it('should fail to encode value [min - 1 = -1]', async () => { + const coder = encoding.v1.u16; + const value = -1; + + await expectToThrowFuelError( + () => coder.encode(value), + new FuelError( + FuelError.CODES.ENCODE_ERROR, + 'Invalid u16 value - value is less than zero.', + { + value: '-1', + type: 'u16', + } + ) + ); + }); + + it(`should fail to encode value [max + 1 = 65536]`, async () => { + const coder = encoding.v1.u16; + const value = 65536; + + await expectToThrowFuelError( + () => coder.encode(value), + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid u16 value - value exceeds maximum.', { + value: '65536', + type: 'u16', + }) + ); + }); + }); + + describe('decode', () => { + it('should decode a u16 [min]', () => { + const coder = encoding.v1.u16; + const expected = 0; + const data = new Uint8Array([0, 0]); + + const [actual, offset] = coder.decode(data); + + expect(actual).toStrictEqual(expected); + expect(offset).toStrictEqual(2); + }); + + it(`should decode a u16 [max = 65535]`, () => { + const coder = encoding.v1.u16; + const expected = 65535; + const data = new Uint8Array([255, 255]); + + const [actual, offset] = coder.decode(data); + + expect(actual).toStrictEqual(expected); + expect(offset).toStrictEqual(2); + }); + + it('should throw when decoding invalid u16 data [empty]', async () => { + const coder = encoding.v1.u16; + const data = new Uint8Array(0); + + await expectToThrowFuelError( + () => coder.decode(data), + new FuelError(FuelError.CODES.DECODE_ERROR, 'Invalid u16 data - unexpected length.', { + data: new Uint8Array([]), + type: 'u16', + expectedLength: 2, + }) + ); + }); + + it('should throw when decoding invalid u16 data [empty with offset]', async () => { + const coder = encoding.v1.u16; + const data = new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7]); + + await expectToThrowFuelError( + () => coder.decode(data, 8), + new FuelError(FuelError.CODES.DECODE_ERROR, 'Invalid u16 data - unexpected length.', { + data: new Uint8Array([]), + type: 'u16', + expectedLength: 2, + }) + ); + }); + }); +}); diff --git a/packages/abi/test/encoding/v1/u256.test.ts b/packages/abi/test/encoding/v1/u256.test.ts new file mode 100644 index 00000000000..dea0d0101e3 --- /dev/null +++ b/packages/abi/test/encoding/v1/u256.test.ts @@ -0,0 +1,210 @@ +import { FuelError } from '@fuel-ts/errors'; +import { expectToThrowFuelError } from '@fuel-ts/errors/test-utils'; +import { bn } from '@fuel-ts/math'; + +import { encoding } from '../../../src'; + +/** + * @group node + * @group browser + */ +describe('u256', () => { + describe('encode', () => { + it('should encode a u256 [min = 0]', () => { + const coder = encoding.v1.u256; + const expected = new Uint8Array(32).fill(0); + const value = 0; + + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + + it(`should encode a u256 [max = 115792089237316195423570985008687907853269984665640564039457584007913129639935]`, () => { + const coder = encoding.v1.u256; + const expected = new Uint8Array(32).fill(255); + const value = + '115792089237316195423570985008687907853269984665640564039457584007913129639935'; + + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + + it('should encode a u64 [max safe integer]', () => { + const coder = encoding.v1.u256; + const value: number = Number.MAX_SAFE_INTEGER; + const expected = new Uint8Array([ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 255, 255, + 255, 255, 255, 255, + ]); + + const data = coder.encode(value); + + expect(data).toEqual(expected); + }); + + it('should throw an error when encoding [number more than max safe integer]', async () => { + const coder = encoding.v1.u256; + const value: number = Number.MAX_SAFE_INTEGER + 1; + + await expectToThrowFuelError( + () => coder.encode(value), + new FuelError( + FuelError.CODES.ENCODE_ERROR, + 'Invalid u256 type - number value is too large. Number can only safely handle up to 53 bits.' + ) + ); + }); + + it('should encode a u64 [very big number - as string]', () => { + const coder = encoding.v1.u256; + const value: string = '76472027892439376'; + const expected = new Uint8Array([ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 15, 174, 231, + 121, 200, 89, 80, + ]); + + const data = coder.encode(value); + + expect(data).toEqual(expected); + }); + + it('should throw an error when encoding [number more than max safe integer]', async () => { + const coder = encoding.v1.u256; + const value: number = 76472027892439376; + + await expectToThrowFuelError( + () => coder.encode(value), + new FuelError( + FuelError.CODES.ENCODE_ERROR, + 'Invalid u256 type - number value is too large. Number can only safely handle up to 53 bits.' + ) + ); + }); + + it('should fail to encode value [boolean]', async () => { + const coder = encoding.v1.u256; + const value = true; + + await expectToThrowFuelError( + // @ts-expect-error: a boolean value boolean + () => coder.encode(value), + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid u256 value - expected a BNInput.', { + value, + }) + ); + }); + + it('should fail to encode value [not a BNInput]', async () => { + const coder = encoding.v1.u256; + const value = 'not a BNInput'; + + await expectToThrowFuelError( + () => coder.encode(value), + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid u256 value - expected a BNInput.', { + value, + }) + ); + }); + + it('should fail to encode value [min - 1 = -1]', async () => { + const coder = encoding.v1.u256; + const value = -1; + + await expectToThrowFuelError( + () => coder.encode(value), + new FuelError( + FuelError.CODES.ENCODE_ERROR, + 'Invalid u256 value - value is less than zero.', + { + value: '-1', + type: 'u256', + } + ) + ); + }); + + it(`should fail to encode value [max + 1 = 115792089237316195423570985008687907853269984665640564039457584007913129639936]`, async () => { + const coder = encoding.v1.u256; + const value = + '115792089237316195423570985008687907853269984665640564039457584007913129639936'; + + await expectToThrowFuelError( + () => coder.encode(value), + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid u256 value - value exceeds maximum.', { + value: '115792089237316195423570985008687907853269984665640564039457584007913129639936', + type: 'u256', + }) + ); + }); + }); + + describe('decode', () => { + it('should decode a u256 [min]', () => { + const coder = encoding.v1.u256; + const expected = expect.toEqualBn(0); + const data = new Uint8Array(32).fill(0); + + const [actual, offset] = coder.decode(data); + + expect(actual).toStrictEqual(expected); + expect(offset).toStrictEqual(32); + }); + + it(`should decode a u256 [max = 115792089237316195423570985008687907853269984665640564039457584007913129639935]`, () => { + const coder = encoding.v1.u256; + const expected = expect.toEqualBn( + '115792089237316195423570985008687907853269984665640564039457584007913129639935' + ); + const data = new Uint8Array(32).fill(255); + + const [actual, offset] = coder.decode(data); + + expect(actual).toStrictEqual(expected); + expect(offset).toStrictEqual(32); + }); + + it('should decode a u64 [very big number]', () => { + const coder = encoding.v1.u256; + const data = new Uint8Array([ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 15, 174, 231, + 121, 200, 89, 80, + ]); + const expectedValue = bn('76472027892439376'); + + const [actualValue, actualLength] = coder.decode(data, 0); + + expect(actualValue).toEqualBn(expectedValue); + expect(actualLength).toEqual(32); + }); + + it('should throw when decoding invalid u256 data [empty]', async () => { + const coder = encoding.v1.u256; + const data = new Uint8Array(0); + + await expectToThrowFuelError( + () => coder.decode(data), + new FuelError(FuelError.CODES.DECODE_ERROR, 'Invalid u256 data - unexpected length.', { + data: new Uint8Array([]), + type: 'u256', + expectedLength: 32, + }) + ); + }); + + it('should throw when decoding invalid u256 data [empty with offset]', async () => { + const coder = encoding.v1.u256; + const data = new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7]); + + await expectToThrowFuelError( + () => coder.decode(data, 8), + new FuelError(FuelError.CODES.DECODE_ERROR, 'Invalid u256 data - unexpected length.', { + data: new Uint8Array([]), + type: 'u256', + expectedLength: 32, + }) + ); + }); + }); +}); diff --git a/packages/abi/test/encoding/v1/u32.test.ts b/packages/abi/test/encoding/v1/u32.test.ts new file mode 100644 index 00000000000..d81395c529f --- /dev/null +++ b/packages/abi/test/encoding/v1/u32.test.ts @@ -0,0 +1,114 @@ +import { FuelError } from '@fuel-ts/errors'; +import { expectToThrowFuelError } from '@fuel-ts/errors/test-utils'; + +import { encoding } from '../../../src'; + +/** + * @group node + * @group browser + */ +describe('u32', () => { + describe('encode', () => { + it('should encode a u32 [min = 0]', () => { + const coder = encoding.v1.u32; + const expected = new Uint8Array([0, 0, 0, 0]); + const value = 0; + + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + + it(`should encode a u32 [max = 4294967295]`, () => { + const coder = encoding.v1.u32; + const expected = new Uint8Array([255, 255, 255, 255]); + const value = 4294967295; + + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + + it('should fail to encode value [min - 1 = -1]', async () => { + const coder = encoding.v1.u32; + const value = -1; + + await expectToThrowFuelError( + () => coder.encode(value), + new FuelError( + FuelError.CODES.ENCODE_ERROR, + 'Invalid u32 value - value is less than zero.', + { + value: '-1', + type: 'u32', + } + ) + ); + }); + + it(`should fail to encode value [max + 1 = 4294967296]`, async () => { + const coder = encoding.v1.u32; + const value = 4294967296; + + await expectToThrowFuelError( + () => coder.encode(value), + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid u32 value - value exceeds maximum.', { + value: '4294967296', + type: 'u32', + }) + ); + }); + }); + + describe('decode', () => { + it('should decode a u32 [min]', () => { + const coder = encoding.v1.u32; + const expected = 0; + const data = new Uint8Array([0, 0, 0, 0]); + + const [actual, offset] = coder.decode(data); + + expect(actual).toStrictEqual(expected); + expect(offset).toStrictEqual(4); + }); + + it(`should decode a u32 [max = 4294967295]`, () => { + const coder = encoding.v1.u32; + const expected = 4294967295; + const data = new Uint8Array([255, 255, 255, 255]); + + const [actual, offset] = coder.decode(data); + + expect(actual).toStrictEqual(expected); + expect(offset).toStrictEqual(4); + }); + + it('should throw when decoding invalid u32 data [empty]', async () => { + const coder = encoding.v1.u32; + const data = new Uint8Array(0); + + await expectToThrowFuelError( + () => coder.decode(data), + new FuelError(FuelError.CODES.DECODE_ERROR, 'Invalid u32 data - unexpected length.', { + data: new Uint8Array([]), + type: 'u32', + expectedLength: 4, + }) + ); + }); + + it('should throw when decoding invalid u32 data [empty with offset]', async () => { + const coder = encoding.v1.u32; + const data = new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7]); + + await expectToThrowFuelError( + () => coder.decode(data, 8), + new FuelError(FuelError.CODES.DECODE_ERROR, 'Invalid u32 data - unexpected length.', { + data: new Uint8Array([]), + type: 'u32', + expectedLength: 4, + }) + ); + }); + }); +}); diff --git a/packages/abi/test/encoding/v1/u64.test.ts b/packages/abi/test/encoding/v1/u64.test.ts new file mode 100644 index 00000000000..80cb5b407f0 --- /dev/null +++ b/packages/abi/test/encoding/v1/u64.test.ts @@ -0,0 +1,197 @@ +import { FuelError } from '@fuel-ts/errors'; +import { expectToThrowFuelError } from '@fuel-ts/errors/test-utils'; +import { bn } from '@fuel-ts/math'; + +import { encoding } from '../../../src'; + +/** + * @group node + * @group browser + */ +describe('u64', () => { + describe('encode', () => { + it('should encode a u64 [min = 0]', () => { + const coder = encoding.v1.u64; + const expected = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0]); + const value = 0; + + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + + it(`should encode a u64 [max = 18446744073709551615]`, () => { + const coder = encoding.v1.u64; + const expected = new Uint8Array([255, 255, 255, 255, 255, 255, 255, 255]); + const value = '18446744073709551615'; + + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + + it('should encode a u64 [max safe integer]', () => { + const coder = encoding.v1.u64; + const value: number = Number.MAX_SAFE_INTEGER; + const expected = new Uint8Array([0, 31, 255, 255, 255, 255, 255, 255]); + + const data = coder.encode(value); + + expect(data).toEqual(expected); + }); + + it('should throw an error when encoding [number more than max safe integer]', async () => { + const coder = encoding.v1.u64; + const value: number = Number.MAX_SAFE_INTEGER + 1; + + await expectToThrowFuelError( + () => coder.encode(value), + new FuelError( + FuelError.CODES.ENCODE_ERROR, + 'Invalid u64 type - number value is too large. Number can only safely handle up to 53 bits.' + ) + ); + }); + + it('should encode a u64 [very big number - as string]', () => { + const coder = encoding.v1.u64; + const value: string = '76472027892439376'; + const expected = new Uint8Array([1, 15, 174, 231, 121, 200, 89, 80]); + + const data = coder.encode(value); + + expect(data).toEqual(expected); + }); + + it('should throw an error when encoding [number more than max safe integer]', async () => { + const coder = encoding.v1.u64; + const value: number = 76472027892439376; + + await expectToThrowFuelError( + () => coder.encode(value), + new FuelError( + FuelError.CODES.ENCODE_ERROR, + 'Invalid u64 type - number value is too large. Number can only safely handle up to 53 bits.' + ) + ); + }); + + it('should fail to encode value [boolean]', async () => { + const coder = encoding.v1.u64; + const value = true; + + await expectToThrowFuelError( + // @ts-expect-error: a boolean value boolean + () => coder.encode(value), + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid u64 value - expected a BNInput.', { + value, + }) + ); + }); + + it('should fail to encode value [not a BNInput]', async () => { + const coder = encoding.v1.u64; + const value = 'not a BNInput'; + + await expectToThrowFuelError( + () => coder.encode(value), + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid u64 value - expected a BNInput.', { + value, + }) + ); + }); + + it('should fail to encode value [min - 1 = -1]', async () => { + const coder = encoding.v1.u64; + const value = -1; + + await expectToThrowFuelError( + () => coder.encode(value), + new FuelError( + FuelError.CODES.ENCODE_ERROR, + 'Invalid u64 value - value is less than zero.', + { + value: '-1', + type: 'u64', + } + ) + ); + }); + + it(`should fail to encode value [max + 1 = 18446744073709551616]`, async () => { + const coder = encoding.v1.u64; + const value = '18446744073709551616'; + + await expectToThrowFuelError( + () => coder.encode(value), + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid u64 value - value exceeds maximum.', { + value: '18446744073709551616', + type: 'u64', + }) + ); + }); + }); + + describe('decode', () => { + it('should decode a u64 [min]', () => { + const coder = encoding.v1.u64; + const expected = expect.toEqualBn(0); + const data = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0]); + + const [actual, offset] = coder.decode(data); + + expect(actual).toStrictEqual(expected); + expect(offset).toStrictEqual(8); + }); + + it(`should decode a u64 [max = 18446744073709551615]`, () => { + const coder = encoding.v1.u64; + const expected = expect.toEqualBn('18446744073709551615'); + const data = new Uint8Array([255, 255, 255, 255, 255, 255, 255, 255]); + + const [actual, offset] = coder.decode(data); + + expect(actual).toStrictEqual(expected); + expect(offset).toStrictEqual(8); + }); + + it('should decode a u64 [very big number]', () => { + const coder = encoding.v1.u64; + const data = new Uint8Array([1, 15, 174, 231, 121, 200, 89, 80]); + const expectedValue = bn('76472027892439376'); + + const [actualValue, actualLength] = coder.decode(data, 0); + + expect(actualValue).toEqualBn(expectedValue); + expect(actualLength).toEqual(8); + }); + + it('should throw when decoding invalid u64 data [empty]', async () => { + const coder = encoding.v1.u64; + const data = new Uint8Array(0); + + await expectToThrowFuelError( + () => coder.decode(data), + new FuelError(FuelError.CODES.DECODE_ERROR, 'Invalid u64 data - unexpected length.', { + data: new Uint8Array([]), + type: 'u64', + expectedLength: 8, + }) + ); + }); + + it('should throw when decoding invalid u64 data [empty with offset]', async () => { + const coder = encoding.v1.u64; + const data = new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7]); + + await expectToThrowFuelError( + () => coder.decode(data, 8), + new FuelError(FuelError.CODES.DECODE_ERROR, 'Invalid u64 data - unexpected length.', { + data: new Uint8Array([]), + type: 'u64', + expectedLength: 8, + }) + ); + }); + }); +}); diff --git a/packages/abi/test/encoding/v1/u8.test.ts b/packages/abi/test/encoding/v1/u8.test.ts new file mode 100644 index 00000000000..1a54a1d8f2f --- /dev/null +++ b/packages/abi/test/encoding/v1/u8.test.ts @@ -0,0 +1,110 @@ +import { FuelError } from '@fuel-ts/errors'; +import { expectToThrowFuelError } from '@fuel-ts/errors/test-utils'; + +import { encoding } from '../../../src'; + +/** + * @group node + * @group browser + */ +describe('u8', () => { + describe('encode', () => { + it('should encode a u8 [min = 0]', () => { + const coder = encoding.v1.u8; + const expected = new Uint8Array([0]); + const value = 0; + + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + + it('should encode a u8 [max = 255]', () => { + const coder = encoding.v1.u8; + const expected = new Uint8Array([255]); + const value = 255; + + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + + it('should fail to encode value [-1]', async () => { + const coder = encoding.v1.u8; + const value = -1; + + await expectToThrowFuelError( + () => coder.encode(value), + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid u8 value - value is less than zero.', { + value: '-1', + type: 'u8', + }) + ); + }); + + it('should fail to encode value [256]', async () => { + const coder = encoding.v1.u8; + const value = 256; + + await expectToThrowFuelError( + () => coder.encode(value), + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid u8 value - value exceeds maximum.', { + value: '256', + type: 'u8', + }) + ); + }); + }); + + describe('decode', () => { + it('should decode a u8 [min]', () => { + const coder = encoding.v1.u8; + const expected = 0; + const data = new Uint8Array([0]); + + const [actual, offset] = coder.decode(data); + + expect(actual).toStrictEqual(expected); + expect(offset).toStrictEqual(1); + }); + + it('should decode a u8 [max]', () => { + const coder = encoding.v1.u8; + const expected = 255; + const data = new Uint8Array([255]); + + const [actual, offset] = coder.decode(data); + + expect(actual).toStrictEqual(expected); + expect(offset).toStrictEqual(1); + }); + + it('should throw when decoding invalid u8 data [empty]', async () => { + const coder = encoding.v1.u8; + const data = new Uint8Array(0); + + await expectToThrowFuelError( + () => coder.decode(data), + new FuelError(FuelError.CODES.DECODE_ERROR, 'Invalid u8 data - unexpected length.', { + data: new Uint8Array([]), + type: 'u8', + expectedLength: 1, + }) + ); + }); + + it('should throw when decoding invalid u8 data [empty with offset]', async () => { + const coder = encoding.v1.u8; + const data = new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7]); + + await expectToThrowFuelError( + () => coder.decode(data, 8), + new FuelError(FuelError.CODES.DECODE_ERROR, 'Invalid u8 data - unexpected length.', { + data: new Uint8Array([]), + type: 'u8', + expectedLength: 1, + }) + ); + }); + }); +}); diff --git a/packages/abi/test/encoding/v1/vector.test.ts b/packages/abi/test/encoding/v1/vector.test.ts new file mode 100644 index 00000000000..2493867eb52 --- /dev/null +++ b/packages/abi/test/encoding/v1/vector.test.ts @@ -0,0 +1,212 @@ +import { FuelError } from '@fuel-ts/errors'; +import { expectToThrowFuelError } from '@fuel-ts/errors/test-utils'; + +import type { AbiTypeComponent, CoderFactoryParameters } from '../../../src'; +import { encoding, MAX_BYTES } from '../../../src'; + +const isBrowser = typeof window !== 'undefined'; + +/** + * @group node + * @group browser + */ +describe('vector', () => { + describe('fromAbi', () => { + it('should throw when a component is not provided', async () => { + const swayType = 'struct std::vec::Vec'; + const components: AbiTypeComponent[] | undefined = undefined; + const factory = vi.fn(); + + await expectToThrowFuelError( + () => + encoding.v1.vector.factory( + { type: { swayType, components } } as CoderFactoryParameters, + factory + ), + new FuelError( + FuelError.CODES.CODER_NOT_FOUND, + 'The provided vector type is missing ABI components.', + { swayType, components } + ) + ); + }); + + // NEDIM TODO: decide on if the vector should stay as-is or be modified in ResolvableType + it.skip('should throw when a "buf" component is not provided', async () => { + const swayType = 'struct std::vec::Vec'; + const components: AbiTypeComponent[] = []; + const factory = vi.fn(); + + await expectToThrowFuelError( + () => + encoding.v1.vector.factory( + { type: { swayType, components } } as CoderFactoryParameters, + factory + ), + new FuelError( + FuelError.CODES.CODER_NOT_FOUND, + 'The provided vector type is missing ABI component "buf".', + { swayType, components } + ) + ); + }); + + it('should get the coder for a valid vector type', () => { + const swayType = 'struct std::vec::Vec'; + const components: AbiTypeComponent[] = [ + { + name: 'buf', + type: { + swayType: 'u64', + concreteTypeId: 'some_hash', + }, + }, + ]; + const factory = vi.fn(); + + const coder = encoding.v1.vector.factory( + { type: { swayType, components } } as CoderFactoryParameters, + factory + ); + + expect(coder).toBeDefined(); + }); + }); + + describe('encode', () => { + it('should encode a vector of booleans [true, false, true, false, true, true]', () => { + const coder = encoding.v1.vector(encoding.v1.bool); + const value = [true, false, true, false, true, true]; + const expected = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 6, 1, 0, 1, 0, 1, 1]); + + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + + it('should encode a vector of numbers [8, 6, 7]', () => { + const coder = encoding.v1.vector(encoding.v1.u8); + const value = Uint8Array.from([8, 6, 7]); + const expected = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 3, 8, 6, 7]); + + const actual = coder.encode(value); + + expect(actual).toStrictEqual(expected); + }); + + it('should throw when encoding non array input', async () => { + const coder = encoding.v1.vector(encoding.v1.u8); + const value = 'Nope'; + + await expectToThrowFuelError( + // @ts-expect-error - testing invalid input + () => coder.encode(value), + new FuelError( + FuelError.CODES.ENCODE_ERROR, + 'Invalid vector value - expected array value, or a Uint8Array.', + { value } + ) + ); + }); + + it('should throw when encoding a vector with a value that cannot be encoded', async () => { + const coder = encoding.v1.vector(encoding.v1.u8); + const value = [256]; + + await expectToThrowFuelError( + () => coder.encode(value), + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid u8 value - value exceeds maximum.', { + type: 'u8', + value: '256', + }) + ); + }); + }); + + describe('decode', () => { + it('should decode a vector of booleans [true, false, true, false, true, true]', () => { + const coder = encoding.v1.vector(encoding.v1.bool); + const data = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 6, 1, 0, 1, 0, 1, 1]); + const expected = [true, false, true, false, true, true]; + + const [actual, newOffset] = coder.decode(data, 0); + + expect(actual).toStrictEqual(expected); + expect(newOffset).toEqual(14); + }); + + it('should decode a vector of numbers [8, 6, 7]', () => { + const coder = encoding.v1.vector(encoding.v1.u8); + const data = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 3, 8, 6, 7]); + const expected = [8, 6, 7]; + + const [actual, newOffset] = coder.decode(data, 0); + + expect(actual).toStrictEqual(expected); + expect(newOffset).toEqual(11); + }); + + it('should decode a vector of numbers [empty]', () => { + const coder = encoding.v1.vector(encoding.v1.u8); + const data = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0]); + const expected: number[] = []; + + const [actual, newOffset] = coder.decode(data, 0); + + expect(actual).toStrictEqual(expected); + expect(newOffset).toEqual(8); + }); + + it('should throw when decoding empty vector', async () => { + const coder = encoding.v1.vector(encoding.v1.u8); + const data = new Uint8Array(0); + + await expectToThrowFuelError( + () => coder.decode(data, 0), + new FuelError(FuelError.CODES.DECODE_ERROR, 'Invalid vector data - malformed bytes.', { + data, + }) + ); + }); + + it('should throw when decoding vector with element data missing', async () => { + const coder = encoding.v1.vector(encoding.v1.u8); + const data = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 2, 1]); + + await expectToThrowFuelError( + () => coder.decode(data, 0), + new FuelError(FuelError.CODES.DECODE_ERROR, 'Invalid u8 data - unexpected length.', { + data: new Uint8Array([]), + expectedLength: 1, + type: 'u8', + }) + ); + }); + + /** + * TODO: this test is failing on browser, need to investigate why. + * + * RangeError: Array buffer allocation failed + */ + it.skipIf(isBrowser)( + 'should throw when decoding an array over the max vec size [VM constraints]', + async () => { + const coder = encoding.v1.vector(encoding.v1.u8); + const data = new Uint8Array(MAX_BYTES + 1); + + await expectToThrowFuelError( + () => coder.decode(data, 0), + new FuelError( + FuelError.CODES.DECODE_ERROR, + 'Invalid vector data - exceeds maximum bytes.', + { + data, + length: data.length, + maxLength: MAX_BYTES, + } + ) + ); + } + ); + }); +}); diff --git a/packages/abi/test/encoding/v1/void.test.ts b/packages/abi/test/encoding/v1/void.test.ts new file mode 100644 index 00000000000..8f82ef1a1ce --- /dev/null +++ b/packages/abi/test/encoding/v1/void.test.ts @@ -0,0 +1,32 @@ +import { encoding } from '../../../src'; + +/** + * @group node + * @group browser + */ +describe('void', () => { + describe('encode', () => { + it('should encode a void', () => { + const coder = encoding.v1.void; + const value = undefined; + const expected = new Uint8Array([]); + + const actual = coder.encode(value); + + expect(actual).toEqual(expected); + }); + }); + + describe('decode', () => { + it('should decode a void', () => { + const coder = encoding.v1.void; + const data = new Uint8Array([]); + const expected = undefined; + + const [actual, offset] = coder.decode(data, 0); + + expect(actual).toEqual(expected); + expect(offset).toEqual(0); + }); + }); +}); diff --git a/packages/abi/test/fixtures/v1.ts b/packages/abi/test/fixtures/v1.ts new file mode 100644 index 00000000000..5b1c6e0da21 --- /dev/null +++ b/packages/abi/test/fixtures/v1.ts @@ -0,0 +1,2836 @@ +import type { AbiSpecificationV1 } from '../../src'; + +export const v1: AbiSpecificationV1 = { + programType: 'contract', + specVersion: '1', + encodingVersion: '1', + concreteTypes: [ + { + type: '()', + concreteTypeId: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + }, + { + type: '(b256, bool)', + concreteTypeId: 'd5f6ab61fc224aae1bf15a89ab88840ed54e312a76a9735d1f60d4d0d1fae640', + metadataTypeId: 0, + }, + { + type: '(bool, u64)', + concreteTypeId: 'c998ca9a5f221fe7b5c66ae70c8a9562b86d964408b00d17f883c906bc1fe4be', + metadataTypeId: 8, + }, + { + type: '(str[5], bool)', + concreteTypeId: 'a1e229302ed2f092752a6bc4fbe66bb9305e0802b1b01ecc5e1d59356702e956', + metadataTypeId: 1, + }, + { + type: '(str[5], str[5])', + concreteTypeId: '30022fd7ad3fda4035d30e4d86b705d4870924d4b4fe054624d2561fa12bb33e', + metadataTypeId: 2, + }, + { + type: '(struct data_structures::StructDoubleGeneric<[b256; 3],u8>, [struct data_structures::StructDoubleGeneric; 4], (str[5], bool), struct data_structures::StructSimple)', + concreteTypeId: '343f07ddcd75b9385bc193e0419f2e89c75fad67cbf4ad1b36a01a136620817e', + metadataTypeId: 13, + }, + { + type: '(struct data_structures::StructSimple, struct std::vec::Vec)', + concreteTypeId: '5ebb7c8cdd38d1f676f9c7089a2da12b27114ee3771c2047f3295d4d30f8fd2c', + metadataTypeId: 3, + }, + { + type: '(struct std::asset_id::AssetId, struct std::asset_id::AssetId, bool)', + concreteTypeId: 'a95e1fcceb1451b8a76471f593f66c4a52ca04bde3c227c746ad7aaf988de5c6', + metadataTypeId: 10, + }, + { + type: '(struct std::vec::Vec, b256)', + concreteTypeId: '52e2726988c7da304606fbe4ed696efac04beb29e9a22e15778f8a0539c9cb94', + metadataTypeId: 5, + }, + { + type: '(struct std::vec::Vec, struct std::vec::Vec)', + concreteTypeId: '87a4626758542d7b6a03099839e440a052a4d5a00e3abfdf22bcc564ca19a4fd', + metadataTypeId: 6, + }, + { + type: '(u32, struct std::vec::Vec, struct std::vec::Vec)', + concreteTypeId: '18034e13b18b71de3c7e12f8f10a7bd48a23870e0dbb46eaf10faeb26d70f000', + metadataTypeId: 9, + }, + { + type: '(u64, struct data_structures::StructSimple)', + concreteTypeId: '0088c28967dbcdaa34626c7e915e44b2afe72f12415f0e31edc0b5ce70e7c6dc', + metadataTypeId: 4, + }, + { + type: '(u8, struct data_structures::StructSingleGeneric>, str[3])', + concreteTypeId: '6f875be99a39d9920569678a34ffce676a6c3e14b958910db250b9cb4957157f', + metadataTypeId: 11, + }, + { + type: '(u8, u8, u8)', + concreteTypeId: '79239b6d6f2383e2cfbaf4da7fdf7ee7fb59b7bf517acfff2d9433e9e76e8fc4', + metadataTypeId: 12, + }, + { + type: '[b256; 3]', + concreteTypeId: '81342782c917fcfd178741cb2b3a12ea1ebeaa57253fc4ee6700b4d7d6ab32d3', + metadataTypeId: 17, + }, + { + type: '[struct data_structures::StructDoubleGeneric,str[1]>; 2]', + concreteTypeId: 'b8164e36cce9d14142824b5cc55aebc1272036775b966af82c49c78aff114006', + metadataTypeId: 15, + }, + { + type: '[struct data_structures::StructDoubleGeneric; 4]', + concreteTypeId: 'b22807669faa58263e636f6e2d194df8ddbc6686bb4ea14ee28005fa30adbe85', + metadataTypeId: 22, + }, + { + type: '[struct data_structures::StructSimple; 3]', + concreteTypeId: '38f2594527b516dab2c81b31356901226242d7c32554877e36797c6b23969237', + metadataTypeId: 18, + }, + { + type: '[struct std::vec::Vec; 1]', + concreteTypeId: '593b39347cc381516d8ed1f8e5e628a8d455bd3f833bd9dfdd5165ba16f9f980', + metadataTypeId: 14, + }, + { + type: '[u8; 4]', + concreteTypeId: 'f28afa065fc5de602456160c4155d4de7d9a61e85a995d209a14eab0b34bd6b4', + metadataTypeId: 23, + }, + { + type: 'b256', + concreteTypeId: '7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b', + }, + { + type: 'bool', + concreteTypeId: 'b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903', + }, + { + type: 'enum abi-library::ExternalEnum', + concreteTypeId: '9a24373d8ce7688609717fd5a9b75360cd8a6bdb224ae095f0c05cc891cadd42', + metadataTypeId: 25, + }, + { + type: 'enum data_structures::EnumDoubleGeneric', + concreteTypeId: 'd0ed93cd57cc3dfb1c119b22bf63f5d215122402536127bf17087ca6d8186307', + metadataTypeId: 26, + typeArguments: [ + 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + '29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef', + ], + }, + { + type: 'enum data_structures::EnumWithBuiltinType', + concreteTypeId: '2136f16aedeec1ab7f1d912c57cc0566e86c36f20a2cb313e3d679cead6a0e61', + metadataTypeId: 27, + }, + { + type: 'enum data_structures::EnumWithNative', + concreteTypeId: '58ae0e9c51da476db1149dd48b1cda83a12187df4c049f8df5021f0b1696fb93', + metadataTypeId: 28, + }, + { + type: 'enum data_structures::EnumWithStructs', + concreteTypeId: '9ed6dede3ae1e66e0f951e860e863f77fb9b9499f4666a1123bf244c4a201669', + metadataTypeId: 29, + }, + { + type: 'enum data_structures::EnumWithVector', + concreteTypeId: '0272d5aecccd33822994b7be1494b72ec9ad860e4cb51f043deda7ac1e2cae26', + metadataTypeId: 30, + }, + { + type: 'enum std::identity::Identity', + concreteTypeId: 'ab7cd04e05be58e3fc15d424c2c4a57f824a2a2d97d67252440a3925ebdc1335', + metadataTypeId: 31, + }, + { + type: 'enum std::option::Option', + concreteTypeId: '25616ce23be3ca41fd26f8c546c053ec256f8fb5593036f60c9c417e86dcc92e', + metadataTypeId: 32, + typeArguments: ['ef937135956e37401e0bc90406ca8becda92d1b4e387fe938ddef8d27ee192a1'], + }, + { + type: 'enum std::option::Option', + concreteTypeId: '2da102c46c7263beeed95818cd7bee801716ba8303dddafdcd0f6c9efda4a0f1', + metadataTypeId: 32, + typeArguments: ['c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b'], + }, + { + type: 'enum std::result::Result', + concreteTypeId: '9891b1ee451eed790368ea3969e3c8f550efa87de489b5d7b933e2290800791b', + metadataTypeId: 33, + typeArguments: [ + '1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0', + '338a25cb65b9251663dcce6362b744fe10aa849758299590f4efed5dd299bf50', + ], + }, + { + type: 'enum std::result::Result', + concreteTypeId: 'b3131b4c08c16cfa55b3150d587c3afa3e4cdebe0399f3f599fa160baaa64e0c', + metadataTypeId: 33, + typeArguments: [ + '1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0', + 'd7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc', + ], + }, + { + type: 'raw untyped slice', + concreteTypeId: '1e1c7c52c1c7a9901681337f8669555f62aac58911332c9ff6b4ea8e73786570', + }, + { + type: 'str', + concreteTypeId: '8c25cb3686462e9a86d2883c5688a22fe738b0bbc85f458d2d2b5f3f667c6d5a', + }, + { + type: 'str[10]', + concreteTypeId: '338a25cb65b9251663dcce6362b744fe10aa849758299590f4efed5dd299bf50', + }, + { + type: 'str[5]', + concreteTypeId: '84877f6e98274b9e4721db68b4c0bdb9e52b8e9572c5bd7811c07a41ced882c7', + }, + { + type: 'struct abi-library::ExternalStruct', + concreteTypeId: 'c3a770db33c4e755ad3ba4586b9c10520511fb80b767feb57dd41da1a88f6978', + metadataTypeId: 45, + }, + { + type: 'struct data_structures::Configurables', + concreteTypeId: '69d4f1cc5ce793681d98a55ab013f42ab56260131d39af6c1e71a5f3531557bc', + metadataTypeId: 46, + }, + { + type: 'struct data_structures::StructA', + concreteTypeId: 'db8b04f624965fbfd7eb7dc3fc3c6a54a71d0019b37d4011a9350d1870136c9d', + metadataTypeId: 47, + }, + { + type: 'struct data_structures::StructB', + concreteTypeId: '9f074fde9cb9194b90bd208c8c95e709bfb1a5c736b063302e5639ce4daad5aa', + metadataTypeId: 48, + }, + { + type: 'struct data_structures::StructC', + concreteTypeId: 'f219acbc9e3b812457419966b5454d10d51594afecacb87fb7745c9311b90012', + metadataTypeId: 49, + }, + { + type: 'struct data_structures::StructD>>', + concreteTypeId: 'd0494e36b8daeafdf02dfbd1f65f82c66df872fb235c7fd2707fcd4147c6c292', + metadataTypeId: 50, + typeArguments: [ + 'd7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc', + 'd7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc', + '722eb56989dc44c372c470eb3a6ddb2f91e3924c1c4a0806d21e414046599d35', + ], + }, + { + type: 'struct data_structures::StructDoubleGeneric<[b256; 3],u8>', + concreteTypeId: '7bdc2c1e9c4b8576fdf5be24c5c6569cba3a8feaba3755ed2b95d646a33c73e2', + metadataTypeId: 51, + typeArguments: [ + '81342782c917fcfd178741cb2b3a12ea1ebeaa57253fc4ee6700b4d7d6ab32d3', + 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + ], + }, + { + type: 'struct data_structures::StructDoubleGeneric,u32>', + concreteTypeId: '08dbec793087c5686c1a493513b158a999bb653126ee51151dfa85fa683edce5', + metadataTypeId: 51, + typeArguments: [ + '4946973fc1adce1f6b23e80f9fad29b44e6a4ab25f2b45f3fab95114cfcd33a0', + 'd7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc', + ], + }, + { + type: 'struct data_structures::StructDoubleGeneric', + concreteTypeId: '4946973fc1adce1f6b23e80f9fad29b44e6a4ab25f2b45f3fab95114cfcd33a0', + metadataTypeId: 51, + typeArguments: [ + 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + '29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef', + ], + }, + { + type: 'struct data_structures::StructF>', + concreteTypeId: '722eb56989dc44c372c470eb3a6ddb2f91e3924c1c4a0806d21e414046599d35', + metadataTypeId: 53, + typeArguments: ['49f761c61dce644e212b8182e30557d35b6b4ad46693140be677eee0d6ef2733'], + }, + { + type: 'struct data_structures::StructG', + concreteTypeId: 'dfd8875bb49716b14dd336285ba667f953ed9aec4e918c0d7a2eb19ff644d60e', + metadataTypeId: 54, + }, + { + type: 'struct data_structures::StructGenericWithEnum', + concreteTypeId: '8986b78b19c146ced98454ffbe32d17f1e9e468128ba8dcb2a32f16aaf208db2', + metadataTypeId: 55, + typeArguments: [ + 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + '29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef', + ], + }, + { + type: 'struct data_structures::StructSimple', + concreteTypeId: 'ef937135956e37401e0bc90406ca8becda92d1b4e387fe938ddef8d27ee192a1', + metadataTypeId: 56, + }, + { + type: 'struct data_structures::StructSingleGeneric<(bool, u64)>', + concreteTypeId: 'fc0793960700fbabd2722134cff2a546743fc832b98d89aac1ec30fc669fd698', + metadataTypeId: 57, + typeArguments: ['c998ca9a5f221fe7b5c66ae70c8a9562b86d964408b00d17f883c906bc1fe4be'], + }, + { + type: 'struct data_structures::StructSingleGeneric', + concreteTypeId: '7cbc352969caf2e9caa716d89c3be65e707447e2a197c779cc4ef382d0602de6', + metadataTypeId: 57, + typeArguments: ['c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b'], + }, + { + type: 'struct data_structures::StructWithEnumArray', + concreteTypeId: 'd5266ee32061dbfec8c96f2ba8a054243875e4e6a586104d6366b11e3bc86f2e', + metadataTypeId: 58, + }, + { + type: 'struct data_structures::StructWithGenericArray', + concreteTypeId: '29843de0bbb48b2d3c601b61823f2e106cfa5833e18b482571f1fa58b507a7ad', + metadataTypeId: 59, + typeArguments: ['7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b'], + }, + { + type: 'struct data_structures::StructWithImplicitGenerics', + concreteTypeId: '549c0f0c43c9e33f7e958e0473d84e78eca4737f9f159c64614ca5dff2d91b60', + metadataTypeId: 60, + typeArguments: [ + '7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b', + 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + ], + }, + { + type: 'struct data_structures::StructWithMultiOption', + concreteTypeId: 'aa87500bb34c8bb09ffd60ab55cb1725898c366c58d3ff3aaaf8c9b532934fd1', + metadataTypeId: 61, + }, + { + type: 'struct data_structures::StructWithNestedArray', + concreteTypeId: 'e7807205e98b513a8beeb5bcf446f0b2d684d0dce6bfeff0f324fa31df1b8948', + metadataTypeId: 62, + }, + { + type: 'struct data_structures::StructWithNestedStruct', + concreteTypeId: '8651356d9584265a78cb58de01c22d405dfc7006ea2f5f74fddcbe3f047f109a', + metadataTypeId: 63, + }, + { + type: 'struct data_structures::StructWithNestedTuple', + concreteTypeId: 'd042dca573565aa653542415397934b3e95452917664e04d27c32a22091aa9a5', + metadataTypeId: 64, + }, + { + type: 'struct data_structures::StructWithSingleOption', + concreteTypeId: '089f2c4466ef415255917812d05776ebcb386be53e5f94bdad1ca8095f02845c', + metadataTypeId: 65, + }, + { + type: 'struct data_structures::StructWithVector', + concreteTypeId: 'eac45984af86a06e11e1c5ff744bc1242e004db8404308cb7e574b4c2afaf621', + metadataTypeId: 66, + }, + { + type: 'struct std::address::Address', + concreteTypeId: 'f597b637c3b0f588fb8d7086c6f4735caa3122b85f0423b82e489f9bb58e2308', + metadataTypeId: 67, + }, + { + type: 'struct std::asset_id::AssetId', + concreteTypeId: 'c0710b6731b1dd59799cf6bef33eee3b3b04a2e40e80a0724090215bbf2ca974', + metadataTypeId: 68, + }, + { + type: 'struct std::b512::B512', + concreteTypeId: '745e252e80bec590efc3999ae943f07ccea4d5b45b00bb6575499b64abdd3322', + metadataTypeId: 69, + }, + { + type: 'struct std::bytes::Bytes', + concreteTypeId: 'cdd87b7d12fe505416570c294c884bca819364863efe3bf539245fa18515fbbb', + metadataTypeId: 70, + }, + { + type: 'struct std::contract_id::ContractId', + concreteTypeId: '29c10735d33b5159f0c71ee1dbd17b36a3e69e41f00fab0d42e1bd9f428d8a54', + metadataTypeId: 72, + }, + { + type: 'struct std::string::String', + concreteTypeId: '9a7f1d3e963c10e0a4ea70a8e20a4813d1dc5682e28f74cb102ae50d32f7f98c', + metadataTypeId: 73, + }, + { + type: 'struct std::vec::Vec', + concreteTypeId: '6b97d5d738359413c9fac402aced252c23902c28382469ffe27f07381e9f6f31', + metadataTypeId: 75, + typeArguments: ['b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903'], + }, + { + type: 'struct std::vec::Vec', + concreteTypeId: '49f761c61dce644e212b8182e30557d35b6b4ad46693140be677eee0d6ef2733', + metadataTypeId: 75, + typeArguments: ['dfd8875bb49716b14dd336285ba667f953ed9aec4e918c0d7a2eb19ff644d60e'], + }, + { + type: 'struct std::vec::Vec', + concreteTypeId: '9168b00268bbefd158090041178f058b032504f76c4b9644157d5d6b5b183468', + metadataTypeId: 75, + typeArguments: ['ef937135956e37401e0bc90406ca8becda92d1b4e387fe938ddef8d27ee192a1'], + }, + { + type: 'struct std::vec::Vec', + concreteTypeId: 'c0de252b9f65a31c6d03071b4b18a935c88c5bb0b2401a447fd30d342fd5a04d', + metadataTypeId: 75, + typeArguments: ['aa87500bb34c8bb09ffd60ab55cb1725898c366c58d3ff3aaaf8c9b532934fd1'], + }, + { + type: 'struct std::vec::Vec>', + concreteTypeId: 'e06c82714c52b8afd2293d5d37d05783d09d71c956311c6050ac012cab06364e', + metadataTypeId: 75, + typeArguments: ['13c38f4111bad6468fad4f8ea82fd744546b63be49db9439fb3d94e14ae2bb3a'], + }, + { + type: 'struct std::vec::Vec', + concreteTypeId: '13c38f4111bad6468fad4f8ea82fd744546b63be49db9439fb3d94e14ae2bb3a', + metadataTypeId: 75, + typeArguments: ['d7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc'], + }, + { + type: 'struct std::vec::Vec', + concreteTypeId: 'd5bfe1d4e1ace20166c9b50cadd47e862020561bde24f5189cfc2723f5ed76f4', + metadataTypeId: 75, + typeArguments: ['1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0'], + }, + { + type: 'struct std::vec::Vec', + concreteTypeId: '27a0fb3d3a821e04e7a3f17ab6a617f0eb10f11e6eeb0f2c0ff9e6237207319e', + metadataTypeId: 75, + typeArguments: ['c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b'], + }, + { + type: 'struct std::vm::evm::evm_address::EvmAddress', + concreteTypeId: '05a44d8c3e00faf7ed545823b7a2b32723545d8715d87a0ab3cf65904948e8d2', + metadataTypeId: 76, + }, + { + type: 'u16', + concreteTypeId: '29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef', + }, + { + type: 'u256', + concreteTypeId: '1b5759d94094368cfd443019e7ca5ec4074300e544e5ea993a979f5da627261e', + }, + { + type: 'u32', + concreteTypeId: 'd7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc', + }, + { + type: 'u64', + concreteTypeId: '1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0', + }, + { + type: 'u8', + concreteTypeId: 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + }, + ], + metadataTypes: [ + { + type: '(_, _)', + metadataTypeId: 0, + components: [ + { + name: '__tuple_element', + typeId: '7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b', + }, + { + name: '__tuple_element', + typeId: 'b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903', + }, + ], + }, + { + type: '(_, _)', + metadataTypeId: 1, + components: [ + { + name: '__tuple_element', + typeId: '84877f6e98274b9e4721db68b4c0bdb9e52b8e9572c5bd7811c07a41ced882c7', + }, + { + name: '__tuple_element', + typeId: 'b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903', + }, + ], + }, + { + type: '(_, _)', + metadataTypeId: 2, + components: [ + { + name: '__tuple_element', + typeId: '84877f6e98274b9e4721db68b4c0bdb9e52b8e9572c5bd7811c07a41ced882c7', + }, + { + name: '__tuple_element', + typeId: '84877f6e98274b9e4721db68b4c0bdb9e52b8e9572c5bd7811c07a41ced882c7', + }, + ], + }, + { + type: '(_, _)', + metadataTypeId: 3, + components: [ + { + name: '__tuple_element', + typeId: 56, + }, + { + name: '__tuple_element', + typeId: 75, + typeArguments: [ + { + name: '', + typeId: 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + }, + ], + }, + ], + }, + { + type: '(_, _)', + metadataTypeId: 4, + components: [ + { + name: '__tuple_element', + typeId: '1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0', + }, + { + name: '__tuple_element', + typeId: 56, + }, + ], + }, + { + type: '(_, _)', + metadataTypeId: 5, + components: [ + { + name: '__tuple_element', + typeId: 75, + typeArguments: [ + { + name: '', + typeId: 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + }, + ], + }, + { + name: '__tuple_element', + typeId: '7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b', + }, + ], + }, + { + type: '(_, _)', + metadataTypeId: 6, + components: [ + { + name: '__tuple_element', + typeId: 75, + typeArguments: [ + { + name: '', + typeId: 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + }, + ], + }, + { + name: '__tuple_element', + typeId: 75, + typeArguments: [ + { + name: '', + typeId: 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + }, + ], + }, + ], + }, + { + type: '(_, _)', + metadataTypeId: 7, + components: [ + { + name: '__tuple_element', + typeId: 34, + }, + { + name: '__tuple_element', + typeId: 35, + }, + ], + }, + { + type: '(_, _)', + metadataTypeId: 8, + components: [ + { + name: '__tuple_element', + typeId: 'b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903', + }, + { + name: '__tuple_element', + typeId: '1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0', + }, + ], + }, + { + type: '(_, _, _)', + metadataTypeId: 9, + components: [ + { + name: '__tuple_element', + typeId: 'd7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc', + }, + { + name: '__tuple_element', + typeId: 75, + typeArguments: [ + { + name: '', + typeId: '1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0', + }, + ], + }, + { + name: '__tuple_element', + typeId: 75, + typeArguments: [ + { + name: '', + typeId: '1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0', + }, + ], + }, + ], + }, + { + type: '(_, _, _)', + metadataTypeId: 10, + components: [ + { + name: '__tuple_element', + typeId: 68, + }, + { + name: '__tuple_element', + typeId: 68, + }, + { + name: '__tuple_element', + typeId: 'b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903', + }, + ], + }, + { + type: '(_, _, _)', + metadataTypeId: 11, + components: [ + { + name: '__tuple_element', + typeId: 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + }, + { + name: '__tuple_element', + typeId: 57, + typeArguments: [ + { + name: '', + typeId: 57, + typeArguments: [ + { + name: '', + typeId: '1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0', + }, + ], + }, + ], + }, + { + name: '__tuple_element', + typeId: 44, + }, + ], + }, + { + type: '(_, _, _)', + metadataTypeId: 12, + components: [ + { + name: '__tuple_element', + typeId: 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + }, + { + name: '__tuple_element', + typeId: 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + }, + { + name: '__tuple_element', + typeId: 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + }, + ], + }, + { + type: '(_, _, _, _)', + metadataTypeId: 13, + components: [ + { + name: '__tuple_element', + typeId: 51, + typeArguments: [ + { + name: '', + typeId: 17, + }, + { + name: '', + typeId: 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + }, + ], + }, + { + name: '__tuple_element', + typeId: 22, + }, + { + name: '__tuple_element', + typeId: 1, + }, + { + name: '__tuple_element', + typeId: 56, + }, + ], + }, + { + type: '[_; 1]', + metadataTypeId: 14, + components: [ + { + name: '__array_element', + typeId: 75, + typeArguments: [ + { + name: '', + typeId: 'd7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc', + }, + ], + }, + ], + }, + { + type: '[_; 2]', + metadataTypeId: 15, + components: [ + { + name: '__array_element', + typeId: 51, + typeArguments: [ + { + name: '', + typeId: 57, + typeArguments: [ + { + name: '', + typeId: '1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0', + }, + ], + }, + { + name: '', + typeId: 43, + }, + ], + }, + ], + }, + { + type: '[_; 2]', + metadataTypeId: 16, + components: [ + { + name: '__array_element', + typeId: '7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b', + }, + ], + }, + { + type: '[_; 3]', + metadataTypeId: 17, + components: [ + { + name: '__array_element', + typeId: '7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b', + }, + ], + }, + { + type: '[_; 3]', + metadataTypeId: 18, + components: [ + { + name: '__array_element', + typeId: 56, + }, + ], + }, + { + type: '[_; 3]', + metadataTypeId: 19, + components: [ + { + name: '__array_element', + typeId: 51, + typeArguments: [ + { + name: '', + typeId: 36, + }, + { + name: '', + typeId: 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + }, + ], + }, + ], + }, + { + type: '[_; 3]', + metadataTypeId: 20, + components: [ + { + name: '__array_element', + typeId: 28, + }, + ], + }, + { + type: '[_; 3]', + metadataTypeId: 21, + components: [ + { + name: '__array_element', + typeId: 34, + }, + ], + }, + { + type: '[_; 4]', + metadataTypeId: 22, + components: [ + { + name: '__array_element', + typeId: 51, + typeArguments: [ + { + name: '', + typeId: '1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0', + }, + { + name: '', + typeId: 'b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903', + }, + ], + }, + ], + }, + { + type: '[_; 4]', + metadataTypeId: 23, + components: [ + { + name: '__array_element', + typeId: 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + }, + ], + }, + { + type: '[_; 5]', + metadataTypeId: 24, + components: [ + { + name: '__array_element', + typeId: 32, + typeArguments: [ + { + name: '', + typeId: 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + }, + ], + }, + ], + }, + { + type: 'enum abi-library::ExternalEnum', + metadataTypeId: 25, + components: [ + { + name: 'A', + typeId: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + }, + { + name: 'B', + typeId: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + }, + ], + }, + { + type: 'enum data_structures::EnumDoubleGeneric', + metadataTypeId: 26, + components: [ + { + name: 'a', + typeId: 38, + }, + { + name: 'b', + typeId: 39, + }, + ], + typeParameters: [38, 39], + }, + { + type: 'enum data_structures::EnumWithBuiltinType', + metadataTypeId: 27, + components: [ + { + name: 'a', + typeId: 'b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903', + }, + { + name: 'b', + typeId: '1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0', + }, + ], + }, + { + type: 'enum data_structures::EnumWithNative', + metadataTypeId: 28, + components: [ + { + name: 'Checked', + typeId: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + }, + { + name: 'Pending', + typeId: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + }, + ], + }, + { + type: 'enum data_structures::EnumWithStructs', + metadataTypeId: 29, + components: [ + { + name: 'a', + typeId: 28, + }, + { + name: 'b', + typeId: 56, + }, + { + name: 'c', + typeId: 51, + typeArguments: [ + { + name: '', + typeId: '1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0', + }, + { + name: '', + typeId: 56, + }, + ], + }, + ], + }, + { + type: 'enum data_structures::EnumWithVector', + metadataTypeId: 30, + components: [ + { + name: 'a', + typeId: 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + }, + { + name: 'b', + typeId: 75, + typeArguments: [ + { + name: '', + typeId: 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + }, + ], + }, + ], + }, + { + type: 'enum std::identity::Identity', + metadataTypeId: 31, + components: [ + { + name: 'Address', + typeId: 67, + }, + { + name: 'ContractId', + typeId: 72, + }, + ], + }, + { + type: 'enum std::option::Option', + metadataTypeId: 32, + components: [ + { + name: 'None', + typeId: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + }, + { + name: 'Some', + typeId: 37, + }, + ], + typeParameters: [37], + }, + { + type: 'enum std::result::Result', + metadataTypeId: 33, + components: [ + { + name: 'Ok', + typeId: 37, + }, + { + name: 'Err', + typeId: 34, + }, + ], + typeParameters: [37, 34], + }, + { + type: 'generic E', + metadataTypeId: 34, + }, + { + type: 'generic F', + metadataTypeId: 35, + }, + { + type: 'generic K', + metadataTypeId: 36, + }, + { + type: 'generic T', + metadataTypeId: 37, + }, + { + type: 'generic T1', + metadataTypeId: 38, + }, + { + type: 'generic T2', + metadataTypeId: 39, + }, + { + type: 'generic U', + metadataTypeId: 40, + }, + { + type: 'generic V', + metadataTypeId: 41, + }, + { + type: 'raw untyped ptr', + metadataTypeId: 42, + }, + { + type: 'str[1]', + metadataTypeId: 43, + }, + { + type: 'str[3]', + metadataTypeId: 44, + }, + { + type: 'struct abi-library::ExternalStruct', + metadataTypeId: 45, + components: [ + { + name: 'value', + typeId: '1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0', + }, + ], + }, + { + type: 'struct data_structures::Configurables', + metadataTypeId: 46, + components: [ + { + name: 'U8_VALUE', + typeId: 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + }, + { + name: 'BOOL_VALUE', + typeId: 'b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903', + }, + { + name: 'B256_VALUE', + typeId: '7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b', + }, + { + name: 'OPTION_U8_VALUE', + typeId: 32, + typeArguments: [ + { + name: '', + typeId: 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + }, + ], + }, + { + name: 'GENERIC_STRUCT_VALUE', + typeId: 51, + typeArguments: [ + { + name: '', + typeId: 51, + typeArguments: [ + { + name: '', + typeId: 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + }, + { + name: '', + typeId: '29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef', + }, + ], + }, + { + name: '', + typeId: 'd7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc', + }, + ], + }, + ], + }, + { + type: 'struct data_structures::StructA', + metadataTypeId: 47, + components: [ + { + name: 'propA1', + typeId: 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + }, + ], + }, + { + type: 'struct data_structures::StructB', + metadataTypeId: 48, + components: [ + { + name: 'propB1', + typeId: 47, + }, + { + name: 'propB2', + typeId: '29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef', + }, + ], + }, + { + type: 'struct data_structures::StructC', + metadataTypeId: 49, + components: [ + { + name: 'propC1', + typeId: 47, + }, + { + name: 'propC2', + typeId: 75, + typeArguments: [ + { + name: '', + typeId: 48, + }, + ], + }, + { + name: 'propC3', + typeId: 50, + typeArguments: [ + { + name: '', + typeId: 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + }, + { + name: '', + typeId: 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + }, + { + name: '', + typeId: 53, + typeArguments: [ + { + name: '', + typeId: 43, + }, + ], + }, + ], + }, + ], + }, + { + type: 'struct data_structures::StructD', + metadataTypeId: 50, + components: [ + { + name: 'propD1', + typeId: 75, + typeArguments: [ + { + name: '', + typeId: 52, + typeArguments: [ + { + name: '', + typeId: 37, + }, + ], + }, + ], + }, + { + name: 'propD2', + typeId: 40, + }, + { + name: 'propD3', + typeId: 41, + }, + ], + typeParameters: [37, 40, 41], + }, + { + type: 'struct data_structures::StructDoubleGeneric', + metadataTypeId: 51, + components: [ + { + name: 'a', + typeId: 38, + }, + { + name: 'b', + typeId: 39, + }, + ], + typeParameters: [38, 39], + }, + { + type: 'struct data_structures::StructE', + metadataTypeId: 52, + components: [ + { + name: 'propE1', + typeId: 47, + }, + { + name: 'propE2', + typeId: 48, + }, + { + name: 'propE3', + typeId: 37, + }, + ], + typeParameters: [37], + }, + { + type: 'struct data_structures::StructF', + metadataTypeId: 53, + components: [ + { + name: 'propF1', + typeId: '1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0', + }, + { + name: 'propF2', + typeId: 37, + }, + ], + typeParameters: [37], + }, + { + type: 'struct data_structures::StructG', + metadataTypeId: 54, + components: [ + { + name: 'propG1', + typeId: 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + }, + ], + }, + { + type: 'struct data_structures::StructGenericWithEnum', + metadataTypeId: 55, + components: [ + { + name: 'a', + typeId: 38, + }, + { + name: 'b', + typeId: 26, + typeArguments: [ + { + name: '', + typeId: 38, + }, + { + name: '', + typeId: 39, + }, + ], + }, + ], + typeParameters: [38, 39], + }, + { + type: 'struct data_structures::StructSimple', + metadataTypeId: 56, + components: [ + { + name: 'a', + typeId: 'b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903', + }, + { + name: 'b', + typeId: 'd7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc', + }, + ], + }, + { + type: 'struct data_structures::StructSingleGeneric', + metadataTypeId: 57, + components: [ + { + name: 'a', + typeId: 37, + }, + ], + typeParameters: [37], + }, + { + type: 'struct data_structures::StructWithEnumArray', + metadataTypeId: 58, + components: [ + { + name: 'a', + typeId: 20, + }, + ], + }, + { + type: 'struct data_structures::StructWithGenericArray', + metadataTypeId: 59, + components: [ + { + name: 'a', + typeId: 19, + }, + ], + typeParameters: [36], + }, + { + type: 'struct data_structures::StructWithImplicitGenerics', + metadataTypeId: 60, + components: [ + { + name: 'a', + typeId: 21, + }, + { + name: 'b', + typeId: 7, + }, + ], + typeParameters: [34, 35], + }, + { + type: 'struct data_structures::StructWithMultiOption', + metadataTypeId: 61, + components: [ + { + name: 'a', + typeId: 24, + }, + ], + }, + { + type: 'struct data_structures::StructWithNestedArray', + metadataTypeId: 62, + components: [ + { + name: 'a', + typeId: 15, + }, + ], + }, + { + type: 'struct data_structures::StructWithNestedStruct', + metadataTypeId: 63, + components: [ + { + name: 'a', + typeId: 51, + typeArguments: [ + { + name: '', + typeId: 57, + typeArguments: [ + { + name: '', + typeId: 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + }, + ], + }, + { + name: '', + typeId: '29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef', + }, + ], + }, + ], + }, + { + type: 'struct data_structures::StructWithNestedTuple', + metadataTypeId: 64, + components: [ + { + name: 'a', + typeId: 11, + }, + ], + }, + { + type: 'struct data_structures::StructWithSingleOption', + metadataTypeId: 65, + components: [ + { + name: 'a', + typeId: 32, + typeArguments: [ + { + name: '', + typeId: 61, + }, + ], + }, + ], + }, + { + type: 'struct data_structures::StructWithVector', + metadataTypeId: 66, + components: [ + { + name: 'a', + typeId: 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + }, + { + name: 'b', + typeId: 75, + typeArguments: [ + { + name: '', + typeId: 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + }, + ], + }, + ], + }, + { + type: 'struct std::address::Address', + metadataTypeId: 67, + components: [ + { + name: 'bits', + typeId: '7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b', + }, + ], + }, + { + type: 'struct std::asset_id::AssetId', + metadataTypeId: 68, + components: [ + { + name: 'bits', + typeId: '7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b', + }, + ], + }, + { + type: 'struct std::b512::B512', + metadataTypeId: 69, + components: [ + { + name: 'bits', + typeId: 16, + }, + ], + }, + { + type: 'struct std::bytes::Bytes', + metadataTypeId: 70, + components: [ + { + name: 'buf', + typeId: 71, + }, + { + name: 'len', + typeId: '1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0', + }, + ], + }, + { + type: 'struct std::bytes::RawBytes', + metadataTypeId: 71, + components: [ + { + name: 'ptr', + typeId: 42, + }, + { + name: 'cap', + typeId: '1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0', + }, + ], + }, + { + type: 'struct std::contract_id::ContractId', + metadataTypeId: 72, + components: [ + { + name: 'bits', + typeId: '7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b', + }, + ], + }, + { + type: 'struct std::string::String', + metadataTypeId: 73, + components: [ + { + name: 'bytes', + typeId: 70, + }, + ], + }, + { + type: 'struct std::vec::RawVec', + metadataTypeId: 74, + components: [ + { + name: 'ptr', + typeId: 42, + }, + { + name: 'cap', + typeId: '1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0', + }, + ], + typeParameters: [37], + }, + { + type: 'struct std::vec::Vec', + metadataTypeId: 75, + components: [ + { + name: 'buf', + typeId: 74, + typeArguments: [ + { + name: '', + typeId: 37, + }, + ], + }, + { + name: 'len', + typeId: '1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0', + }, + ], + typeParameters: [37], + }, + { + type: 'struct std::vm::evm::evm_address::EvmAddress', + metadataTypeId: 76, + components: [ + { + name: 'bits', + typeId: '7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b', + }, + ], + }, + ], + functions: [ + { + inputs: [], + name: 'attributes_doc_comment', + output: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + attributes: [ + { + name: 'doc-comment', + arguments: [' This is a doc'], + }, + { + name: 'doc-comment', + arguments: [' This is another doc comment'], + }, + ], + }, + { + inputs: [], + name: 'attributes_inline_always', + output: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + attributes: [ + { + name: 'inline', + arguments: ['always'], + }, + ], + }, + { + inputs: [], + name: 'attributes_inline_never', + output: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + attributes: [ + { + name: 'inline', + arguments: ['never'], + }, + ], + }, + { + inputs: [], + name: 'attributes_none', + output: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + attributes: null, + }, + { + inputs: [], + name: 'attributes_payable', + output: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + attributes: [ + { + name: 'payable', + arguments: [], + }, + ], + }, + { + inputs: [], + name: 'attributes_storage_read', + output: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + attributes: [ + { + name: 'storage', + arguments: ['read'], + }, + ], + }, + { + inputs: [], + name: 'attributes_storage_read_write', + output: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + attributes: [ + { + name: 'storage', + arguments: ['read', 'write'], + }, + ], + }, + { + inputs: [], + name: 'attributes_storage_write', + output: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + attributes: [ + { + name: 'storage', + arguments: ['write'], + }, + ], + }, + { + inputs: [], + name: 'attributes_test', + output: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + attributes: [ + { + name: 'test', + arguments: [], + }, + ], + }, + { + inputs: [], + name: 'configurables', + output: '69d4f1cc5ce793681d98a55ab013f42ab56260131d39af6c1e71a5f3531557bc', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b', + }, + { + name: 'y', + concreteTypeId: 'b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903', + }, + ], + name: 'multi_arg_b256_bool', + output: 'd5f6ab61fc224aae1bf15a89ab88840ed54e312a76a9735d1f60d4d0d1fae640', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '7bdc2c1e9c4b8576fdf5be24c5c6569cba3a8feaba3755ed2b95d646a33c73e2', + }, + { + name: 'y', + concreteTypeId: 'b22807669faa58263e636f6e2d194df8ddbc6686bb4ea14ee28005fa30adbe85', + }, + { + name: 'z', + concreteTypeId: 'a1e229302ed2f092752a6bc4fbe66bb9305e0802b1b01ecc5e1d59356702e956', + }, + { + name: 'a', + concreteTypeId: 'ef937135956e37401e0bc90406ca8becda92d1b4e387fe938ddef8d27ee192a1', + }, + ], + name: 'multi_arg_complex', + output: '343f07ddcd75b9385bc193e0419f2e89c75fad67cbf4ad1b36a01a136620817e', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '84877f6e98274b9e4721db68b4c0bdb9e52b8e9572c5bd7811c07a41ced882c7', + }, + { + name: 'y', + concreteTypeId: '84877f6e98274b9e4721db68b4c0bdb9e52b8e9572c5bd7811c07a41ced882c7', + }, + ], + name: 'multi_arg_str_str', + output: '30022fd7ad3fda4035d30e4d86b705d4870924d4b4fe054624d2561fa12bb33e', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: 'ef937135956e37401e0bc90406ca8becda92d1b4e387fe938ddef8d27ee192a1', + }, + { + name: 'y', + concreteTypeId: '27a0fb3d3a821e04e7a3f17ab6a617f0eb10f11e6eeb0f2c0ff9e6237207319e', + }, + ], + name: 'multi_arg_struct_vector', + output: '5ebb7c8cdd38d1f676f9c7089a2da12b27114ee3771c2047f3295d4d30f8fd2c', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: 'd7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc', + }, + { + name: 'y', + concreteTypeId: 'd5bfe1d4e1ace20166c9b50cadd47e862020561bde24f5189cfc2723f5ed76f4', + }, + { + name: 'z', + concreteTypeId: 'd5bfe1d4e1ace20166c9b50cadd47e862020561bde24f5189cfc2723f5ed76f4', + }, + ], + name: 'multi_arg_u32_vector_vector', + output: '18034e13b18b71de3c7e12f8f10a7bd48a23870e0dbb46eaf10faeb26d70f000', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0', + }, + { + name: 'y', + concreteTypeId: 'ef937135956e37401e0bc90406ca8becda92d1b4e387fe938ddef8d27ee192a1', + }, + ], + name: 'multi_arg_u64_struct', + output: '0088c28967dbcdaa34626c7e915e44b2afe72f12415f0e31edc0b5ce70e7c6dc', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0', + }, + { + name: 'y', + concreteTypeId: '1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0', + }, + ], + name: 'multi_arg_u64_u64', + output: '1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '27a0fb3d3a821e04e7a3f17ab6a617f0eb10f11e6eeb0f2c0ff9e6237207319e', + }, + { + name: 'y', + concreteTypeId: '7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b', + }, + ], + name: 'multi_arg_vector_b256', + output: '52e2726988c7da304606fbe4ed696efac04beb29e9a22e15778f8a0539c9cb94', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '27a0fb3d3a821e04e7a3f17ab6a617f0eb10f11e6eeb0f2c0ff9e6237207319e', + }, + { + name: 'y', + concreteTypeId: '27a0fb3d3a821e04e7a3f17ab6a617f0eb10f11e6eeb0f2c0ff9e6237207319e', + }, + ], + name: 'multi_arg_vector_vector', + output: '87a4626758542d7b6a03099839e440a052a4d5a00e3abfdf22bcc564ca19a4fd', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: 'f597b637c3b0f588fb8d7086c6f4735caa3122b85f0423b82e489f9bb58e2308', + }, + ], + name: 'types_address', + output: 'f597b637c3b0f588fb8d7086c6f4735caa3122b85f0423b82e489f9bb58e2308', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: 'a95e1fcceb1451b8a76471f593f66c4a52ca04bde3c227c746ad7aaf988de5c6', + }, + ], + name: 'types_alias_tuple_with_native_types', + output: 'a95e1fcceb1451b8a76471f593f66c4a52ca04bde3c227c746ad7aaf988de5c6', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: 'f28afa065fc5de602456160c4155d4de7d9a61e85a995d209a14eab0b34bd6b4', + }, + ], + name: 'types_array', + output: 'f28afa065fc5de602456160c4155d4de7d9a61e85a995d209a14eab0b34bd6b4', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '38f2594527b516dab2c81b31356901226242d7c32554877e36797c6b23969237', + }, + ], + name: 'types_array_struct', + output: '38f2594527b516dab2c81b31356901226242d7c32554877e36797c6b23969237', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: 'b8164e36cce9d14142824b5cc55aebc1272036775b966af82c49c78aff114006', + }, + ], + name: 'types_array_with_generic_struct', + output: 'b8164e36cce9d14142824b5cc55aebc1272036775b966af82c49c78aff114006', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '593b39347cc381516d8ed1f8e5e628a8d455bd3f833bd9dfdd5165ba16f9f980', + }, + ], + name: 'types_array_with_vector', + output: '593b39347cc381516d8ed1f8e5e628a8d455bd3f833bd9dfdd5165ba16f9f980', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: 'c0710b6731b1dd59799cf6bef33eee3b3b04a2e40e80a0724090215bbf2ca974', + }, + ], + name: 'types_asset_id', + output: 'c0710b6731b1dd59799cf6bef33eee3b3b04a2e40e80a0724090215bbf2ca974', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b', + }, + ], + name: 'types_b256', + output: '7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '745e252e80bec590efc3999ae943f07ccea4d5b45b00bb6575499b64abdd3322', + }, + ], + name: 'types_b512', + output: '745e252e80bec590efc3999ae943f07ccea4d5b45b00bb6575499b64abdd3322', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: 'b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903', + }, + ], + name: 'types_bool', + output: 'b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: 'cdd87b7d12fe505416570c294c884bca819364863efe3bf539245fa18515fbbb', + }, + ], + name: 'types_bytes', + output: 'cdd87b7d12fe505416570c294c884bca819364863efe3bf539245fa18515fbbb', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '29c10735d33b5159f0c71ee1dbd17b36a3e69e41f00fab0d42e1bd9f428d8a54', + }, + ], + name: 'types_contract_id', + output: '29c10735d33b5159f0c71ee1dbd17b36a3e69e41f00fab0d42e1bd9f428d8a54', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '58ae0e9c51da476db1149dd48b1cda83a12187df4c049f8df5021f0b1696fb93', + }, + ], + name: 'types_enum', + output: '58ae0e9c51da476db1149dd48b1cda83a12187df4c049f8df5021f0b1696fb93', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '9a24373d8ce7688609717fd5a9b75360cd8a6bdb224ae095f0c05cc891cadd42', + }, + ], + name: 'types_enum_external', + output: '9a24373d8ce7688609717fd5a9b75360cd8a6bdb224ae095f0c05cc891cadd42', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '2136f16aedeec1ab7f1d912c57cc0566e86c36f20a2cb313e3d679cead6a0e61', + }, + ], + name: 'types_enum_with_builtin_type', + output: '2136f16aedeec1ab7f1d912c57cc0566e86c36f20a2cb313e3d679cead6a0e61', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '9ed6dede3ae1e66e0f951e860e863f77fb9b9499f4666a1123bf244c4a201669', + }, + ], + name: 'types_enum_with_structs', + output: '9ed6dede3ae1e66e0f951e860e863f77fb9b9499f4666a1123bf244c4a201669', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '0272d5aecccd33822994b7be1494b72ec9ad860e4cb51f043deda7ac1e2cae26', + }, + ], + name: 'types_enum_with_vector', + output: '0272d5aecccd33822994b7be1494b72ec9ad860e4cb51f043deda7ac1e2cae26', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '05a44d8c3e00faf7ed545823b7a2b32723545d8715d87a0ab3cf65904948e8d2', + }, + ], + name: 'types_evm_address', + output: '05a44d8c3e00faf7ed545823b7a2b32723545d8715d87a0ab3cf65904948e8d2', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: 'd0ed93cd57cc3dfb1c119b22bf63f5d215122402536127bf17087ca6d8186307', + }, + ], + name: 'types_generic_enum', + output: 'd0ed93cd57cc3dfb1c119b22bf63f5d215122402536127bf17087ca6d8186307', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: 'ab7cd04e05be58e3fc15d424c2c4a57f824a2a2d97d67252440a3925ebdc1335', + }, + ], + name: 'types_identity_address', + output: 'ab7cd04e05be58e3fc15d424c2c4a57f824a2a2d97d67252440a3925ebdc1335', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: 'ab7cd04e05be58e3fc15d424c2c4a57f824a2a2d97d67252440a3925ebdc1335', + }, + ], + name: 'types_identity_contract_id', + output: 'ab7cd04e05be58e3fc15d424c2c4a57f824a2a2d97d67252440a3925ebdc1335', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '2da102c46c7263beeed95818cd7bee801716ba8303dddafdcd0f6c9efda4a0f1', + }, + ], + name: 'types_option', + output: '2da102c46c7263beeed95818cd7bee801716ba8303dddafdcd0f6c9efda4a0f1', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '25616ce23be3ca41fd26f8c546c053ec256f8fb5593036f60c9c417e86dcc92e', + }, + ], + name: 'types_option_struct', + output: '25616ce23be3ca41fd26f8c546c053ec256f8fb5593036f60c9c417e86dcc92e', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '1e1c7c52c1c7a9901681337f8669555f62aac58911332c9ff6b4ea8e73786570', + }, + ], + name: 'types_raw_slice', + output: '1e1c7c52c1c7a9901681337f8669555f62aac58911332c9ff6b4ea8e73786570', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: 'b3131b4c08c16cfa55b3150d587c3afa3e4cdebe0399f3f599fa160baaa64e0c', + }, + ], + name: 'types_result', + output: '9891b1ee451eed790368ea3969e3c8f550efa87de489b5d7b933e2290800791b', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '9a7f1d3e963c10e0a4ea70a8e20a4813d1dc5682e28f74cb102ae50d32f7f98c', + }, + ], + name: 'types_std_string', + output: '9a7f1d3e963c10e0a4ea70a8e20a4813d1dc5682e28f74cb102ae50d32f7f98c', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '84877f6e98274b9e4721db68b4c0bdb9e52b8e9572c5bd7811c07a41ced882c7', + }, + ], + name: 'types_str', + output: '84877f6e98274b9e4721db68b4c0bdb9e52b8e9572c5bd7811c07a41ced882c7', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '8c25cb3686462e9a86d2883c5688a22fe738b0bbc85f458d2d2b5f3f667c6d5a', + }, + ], + name: 'types_str_slice', + output: '8c25cb3686462e9a86d2883c5688a22fe738b0bbc85f458d2d2b5f3f667c6d5a', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '8986b78b19c146ced98454ffbe32d17f1e9e468128ba8dcb2a32f16aaf208db2', + }, + ], + name: 'types_struct_double_generic', + output: '8986b78b19c146ced98454ffbe32d17f1e9e468128ba8dcb2a32f16aaf208db2', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: 'c3a770db33c4e755ad3ba4586b9c10520511fb80b767feb57dd41da1a88f6978', + }, + ], + name: 'types_struct_external', + output: 'c3a770db33c4e755ad3ba4586b9c10520511fb80b767feb57dd41da1a88f6978', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '7cbc352969caf2e9caa716d89c3be65e707447e2a197c779cc4ef382d0602de6', + }, + ], + name: 'types_struct_generic', + output: '7cbc352969caf2e9caa716d89c3be65e707447e2a197c779cc4ef382d0602de6', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: 'ef937135956e37401e0bc90406ca8becda92d1b4e387fe938ddef8d27ee192a1', + }, + ], + name: 'types_struct_simple', + output: 'ef937135956e37401e0bc90406ca8becda92d1b4e387fe938ddef8d27ee192a1', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '29843de0bbb48b2d3c601b61823f2e106cfa5833e18b482571f1fa58b507a7ad', + }, + ], + name: 'types_struct_with_array', + output: '29843de0bbb48b2d3c601b61823f2e106cfa5833e18b482571f1fa58b507a7ad', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: 'd5266ee32061dbfec8c96f2ba8a054243875e4e6a586104d6366b11e3bc86f2e', + }, + ], + name: 'types_struct_with_array_of_enums', + output: 'd5266ee32061dbfec8c96f2ba8a054243875e4e6a586104d6366b11e3bc86f2e', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: 'd0494e36b8daeafdf02dfbd1f65f82c66df872fb235c7fd2707fcd4147c6c292', + }, + ], + name: 'types_struct_with_complex_nested_struct', + output: 'b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '549c0f0c43c9e33f7e958e0473d84e78eca4737f9f159c64614ca5dff2d91b60', + }, + ], + name: 'types_struct_with_implicit_generics', + output: '549c0f0c43c9e33f7e958e0473d84e78eca4737f9f159c64614ca5dff2d91b60', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: 'db8b04f624965fbfd7eb7dc3fc3c6a54a71d0019b37d4011a9350d1870136c9d', + }, + { + name: 'y', + concreteTypeId: '9f074fde9cb9194b90bd208c8c95e709bfb1a5c736b063302e5639ce4daad5aa', + }, + { + name: 'z', + concreteTypeId: 'f219acbc9e3b812457419966b5454d10d51594afecacb87fb7745c9311b90012', + }, + ], + name: 'types_struct_with_multiple_struct_params', + output: 'b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: 'e7807205e98b513a8beeb5bcf446f0b2d684d0dce6bfeff0f324fa31df1b8948', + }, + ], + name: 'types_struct_with_nested_array', + output: 'e7807205e98b513a8beeb5bcf446f0b2d684d0dce6bfeff0f324fa31df1b8948', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '8651356d9584265a78cb58de01c22d405dfc7006ea2f5f74fddcbe3f047f109a', + }, + ], + name: 'types_struct_with_nested_struct', + output: '8651356d9584265a78cb58de01c22d405dfc7006ea2f5f74fddcbe3f047f109a', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: 'd042dca573565aa653542415397934b3e95452917664e04d27c32a22091aa9a5', + }, + ], + name: 'types_struct_with_nested_tuple', + output: 'd042dca573565aa653542415397934b3e95452917664e04d27c32a22091aa9a5', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '089f2c4466ef415255917812d05776ebcb386be53e5f94bdad1ca8095f02845c', + }, + ], + name: 'types_struct_with_single_option', + output: '089f2c4466ef415255917812d05776ebcb386be53e5f94bdad1ca8095f02845c', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: 'fc0793960700fbabd2722134cff2a546743fc832b98d89aac1ec30fc669fd698', + }, + ], + name: 'types_struct_with_tuple', + output: 'fc0793960700fbabd2722134cff2a546743fc832b98d89aac1ec30fc669fd698', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: 'eac45984af86a06e11e1c5ff744bc1242e004db8404308cb7e574b4c2afaf621', + }, + ], + name: 'types_struct_with_vector', + output: 'eac45984af86a06e11e1c5ff744bc1242e004db8404308cb7e574b4c2afaf621', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '79239b6d6f2383e2cfbaf4da7fdf7ee7fb59b7bf517acfff2d9433e9e76e8fc4', + }, + ], + name: 'types_tuple', + output: '79239b6d6f2383e2cfbaf4da7fdf7ee7fb59b7bf517acfff2d9433e9e76e8fc4', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '6f875be99a39d9920569678a34ffce676a6c3e14b958910db250b9cb4957157f', + }, + ], + name: 'types_tuple_complex', + output: '6f875be99a39d9920569678a34ffce676a6c3e14b958910db250b9cb4957157f', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: 'a95e1fcceb1451b8a76471f593f66c4a52ca04bde3c227c746ad7aaf988de5c6', + }, + ], + name: 'types_tuple_with_native_types', + output: 'a95e1fcceb1451b8a76471f593f66c4a52ca04bde3c227c746ad7aaf988de5c6', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef', + }, + ], + name: 'types_u16', + output: '29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '1b5759d94094368cfd443019e7ca5ec4074300e544e5ea993a979f5da627261e', + }, + ], + name: 'types_u256', + output: '1b5759d94094368cfd443019e7ca5ec4074300e544e5ea993a979f5da627261e', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: 'd7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc', + }, + ], + name: 'types_u32', + output: 'd7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0', + }, + ], + name: 'types_u64', + output: '1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + }, + ], + name: 'types_u8', + output: 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + }, + { + name: 'y', + concreteTypeId: 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + }, + { + name: 'z', + concreteTypeId: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + }, + { + name: 'a', + concreteTypeId: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + }, + ], + name: 'types_value_then_value_then_void_then_void', + output: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + }, + { + name: 'y', + concreteTypeId: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + }, + ], + name: 'types_value_then_void', + output: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + }, + { + name: 'y', + concreteTypeId: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + }, + { + name: 'z', + concreteTypeId: 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + }, + ], + name: 'types_value_then_void_then_value', + output: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '6b97d5d738359413c9fac402aced252c23902c28382469ffe27f07381e9f6f31', + }, + ], + name: 'types_vector_boolean', + output: '6b97d5d738359413c9fac402aced252c23902c28382469ffe27f07381e9f6f31', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: 'e06c82714c52b8afd2293d5d37d05783d09d71c956311c6050ac012cab06364e', + }, + ], + name: 'types_vector_inside_vector', + output: 'e06c82714c52b8afd2293d5d37d05783d09d71c956311c6050ac012cab06364e', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: 'c0de252b9f65a31c6d03071b4b18a935c88c5bb0b2401a447fd30d342fd5a04d', + }, + ], + name: 'types_vector_option', + output: 'c0de252b9f65a31c6d03071b4b18a935c88c5bb0b2401a447fd30d342fd5a04d', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '27a0fb3d3a821e04e7a3f17ab6a617f0eb10f11e6eeb0f2c0ff9e6237207319e', + }, + ], + name: 'types_vector_u8', + output: '27a0fb3d3a821e04e7a3f17ab6a617f0eb10f11e6eeb0f2c0ff9e6237207319e', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '9168b00268bbefd158090041178f058b032504f76c4b9644157d5d6b5b183468', + }, + ], + name: 'types_vector_with_struct', + output: '9168b00268bbefd158090041178f058b032504f76c4b9644157d5d6b5b183468', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + }, + ], + name: 'types_void', + output: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + attributes: null, + }, + { + inputs: [ + { + name: 'x', + concreteTypeId: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + }, + { + name: 'y', + concreteTypeId: 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + }, + ], + name: 'types_void_then_value', + output: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + attributes: null, + }, + ], + loggedTypes: [ + { + logId: '8961848586872524460', + concreteTypeId: '7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b', + }, + { + logId: '13213829929622723620', + concreteTypeId: 'b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903', + }, + { + logId: '15417698811679754926', + concreteTypeId: 'd5f6ab61fc224aae1bf15a89ab88840ed54e312a76a9735d1f60d4d0d1fae640', + }, + { + logId: '3764736462721235256', + concreteTypeId: '343f07ddcd75b9385bc193e0419f2e89c75fad67cbf4ad1b36a01a136620817e', + }, + { + logId: '10098701174489624218', + concreteTypeId: '8c25cb3686462e9a86d2883c5688a22fe738b0bbc85f458d2d2b5f3f667c6d5a', + }, + { + logId: '3459380067145079360', + concreteTypeId: '30022fd7ad3fda4035d30e4d86b705d4870924d4b4fe054624d2561fa12bb33e', + }, + { + logId: '6826186604658872822', + concreteTypeId: '5ebb7c8cdd38d1f676f9c7089a2da12b27114ee3771c2047f3295d4d30f8fd2c', + }, + { + logId: '1730312528330453470', + concreteTypeId: '18034e13b18b71de3c7e12f8f10a7bd48a23870e0dbb46eaf10faeb26d70f000', + }, + { + logId: '38494492241415594', + concreteTypeId: '0088c28967dbcdaa34626c7e915e44b2afe72f12415f0e31edc0b5ce70e7c6dc', + }, + { + logId: '1515152261580153489', + concreteTypeId: '1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0', + }, + { + logId: '5972461853438630448', + concreteTypeId: '52e2726988c7da304606fbe4ed696efac04beb29e9a22e15778f8a0539c9cb94', + }, + { + logId: '9774045287303884155', + concreteTypeId: '87a4626758542d7b6a03099839e440a052a4d5a00e3abfdf22bcc564ca19a4fd', + }, + { + logId: '17696813611398264200', + concreteTypeId: 'f597b637c3b0f588fb8d7086c6f4735caa3122b85f0423b82e489f9bb58e2308', + }, + { + logId: '12204227005198389688', + concreteTypeId: 'a95e1fcceb1451b8a76471f593f66c4a52ca04bde3c227c746ad7aaf988de5c6', + }, + { + logId: '17477056209248181856', + concreteTypeId: 'f28afa065fc5de602456160c4155d4de7d9a61e85a995d209a14eab0b34bd6b4', + }, + { + logId: '4103440364041737946', + concreteTypeId: '38f2594527b516dab2c81b31356901226242d7c32554877e36797c6b23969237', + }, + { + logId: '13264875749739450689', + concreteTypeId: 'b8164e36cce9d14142824b5cc55aebc1272036775b966af82c49c78aff114006', + }, + { + logId: '6429795790595785041', + concreteTypeId: '593b39347cc381516d8ed1f8e5e628a8d455bd3f833bd9dfdd5165ba16f9f980', + }, + { + logId: '13866877265493744985', + concreteTypeId: 'c0710b6731b1dd59799cf6bef33eee3b3b04a2e40e80a0724090215bbf2ca974', + }, + { + logId: '8385180437869151632', + concreteTypeId: '745e252e80bec590efc3999ae943f07ccea4d5b45b00bb6575499b64abdd3322', + }, + { + logId: '14832741149864513620', + concreteTypeId: 'cdd87b7d12fe505416570c294c884bca819364863efe3bf539245fa18515fbbb', + }, + { + logId: '3008693953818743129', + concreteTypeId: '29c10735d33b5159f0c71ee1dbd17b36a3e69e41f00fab0d42e1bd9f428d8a54', + }, + { + logId: '6390060985836259181', + concreteTypeId: '58ae0e9c51da476db1149dd48b1cda83a12187df4c049f8df5021f0b1696fb93', + }, + { + logId: '11107063318498994310', + concreteTypeId: '9a24373d8ce7688609717fd5a9b75360cd8a6bdb224ae095f0c05cc891cadd42', + }, + { + logId: '2393365693554672043', + concreteTypeId: '2136f16aedeec1ab7f1d912c57cc0566e86c36f20a2cb313e3d679cead6a0e61', + }, + { + logId: '11445580549060683374', + concreteTypeId: '9ed6dede3ae1e66e0f951e860e863f77fb9b9499f4666a1123bf244c4a201669', + }, + { + logId: '176438282157896578', + concreteTypeId: '0272d5aecccd33822994b7be1494b72ec9ad860e4cb51f043deda7ac1e2cae26', + }, + { + logId: '406535131101199095', + concreteTypeId: '05a44d8c3e00faf7ed545823b7a2b32723545d8715d87a0ab3cf65904948e8d2', + }, + { + logId: '15054851639520017915', + concreteTypeId: 'd0ed93cd57cc3dfb1c119b22bf63f5d215122402536127bf17087ca6d8186307', + }, + { + logId: '12356980511120185571', + concreteTypeId: 'ab7cd04e05be58e3fc15d424c2c4a57f824a2a2d97d67252440a3925ebdc1335', + }, + { + logId: '3287912245613454270', + concreteTypeId: '2da102c46c7263beeed95818cd7bee801716ba8303dddafdcd0f6c9efda4a0f1', + }, + { + logId: '2693553771067460161', + concreteTypeId: '25616ce23be3ca41fd26f8c546c053ec256f8fb5593036f60c9c417e86dcc92e', + }, + { + logId: '2169745815365986704', + concreteTypeId: '1e1c7c52c1c7a9901681337f8669555f62aac58911332c9ff6b4ea8e73786570', + }, + { + logId: '11132648958528852192', + concreteTypeId: '9a7f1d3e963c10e0a4ea70a8e20a4813d1dc5682e28f74cb102ae50d32f7f98c', + }, + { + logId: '9549741647838268318', + concreteTypeId: '84877f6e98274b9e4721db68b4c0bdb9e52b8e9572c5bd7811c07a41ced882c7', + }, + { + logId: '9909809838135789262', + concreteTypeId: '8986b78b19c146ced98454ffbe32d17f1e9e468128ba8dcb2a32f16aaf208db2', + }, + { + logId: '14098361245275318101', + concreteTypeId: 'c3a770db33c4e755ad3ba4586b9c10520511fb80b767feb57dd41da1a88f6978', + }, + { + logId: '8988117408309506793', + concreteTypeId: '7cbc352969caf2e9caa716d89c3be65e707447e2a197c779cc4ef382d0602de6', + }, + { + logId: '17263266271595476800', + concreteTypeId: 'ef937135956e37401e0bc90406ca8becda92d1b4e387fe938ddef8d27ee192a1', + }, + { + logId: '2991584087911992109', + concreteTypeId: '29843de0bbb48b2d3c601b61823f2e106cfa5833e18b482571f1fa58b507a7ad', + }, + { + logId: '15359085500973571070', + concreteTypeId: 'd5266ee32061dbfec8c96f2ba8a054243875e4e6a586104d6366b11e3bc86f2e', + }, + { + logId: '6096764540904137535', + concreteTypeId: '549c0f0c43c9e33f7e958e0473d84e78eca4737f9f159c64614ca5dff2d91b60', + }, + { + logId: '16681458389498941754', + concreteTypeId: 'e7807205e98b513a8beeb5bcf446f0b2d684d0dce6bfeff0f324fa31df1b8948', + }, + { + logId: '9678575818972079706', + concreteTypeId: '8651356d9584265a78cb58de01c22d405dfc7006ea2f5f74fddcbe3f047f109a', + }, + { + logId: '15006799511514667686', + concreteTypeId: 'd042dca573565aa653542415397934b3e95452917664e04d27c32a22091aa9a5', + }, + { + logId: '621263945896771922', + concreteTypeId: '089f2c4466ef415255917812d05776ebcb386be53e5f94bdad1ca8095f02845c', + }, + { + logId: '18160646294966696875', + concreteTypeId: 'fc0793960700fbabd2722134cff2a546743fc832b98d89aac1ec30fc669fd698', + }, + { + logId: '16916744526725816430', + concreteTypeId: 'eac45984af86a06e11e1c5ff744bc1242e004db8404308cb7e574b4c2afaf621', + }, + { + logId: '8728991397092492258', + concreteTypeId: '79239b6d6f2383e2cfbaf4da7fdf7ee7fb59b7bf517acfff2d9433e9e76e8fc4', + }, + { + logId: '8036493118938929554', + concreteTypeId: '6f875be99a39d9920569678a34ffce676a6c3e14b958910db250b9cb4957157f', + }, + { + logId: '2992671284987479467', + concreteTypeId: '29881aad8730c5ab11d275376323d8e4ff4179aae8ccb6c13fe4902137e162ef', + }, + { + logId: '1970142151624111756', + concreteTypeId: '1b5759d94094368cfd443019e7ca5ec4074300e544e5ea993a979f5da627261e', + }, + { + logId: '15520703124961489725', + concreteTypeId: 'd7649d428b9ff33d188ecbf38a7e4d8fd167fa01b2e10fe9a8f9308e52f1d7cc', + }, + { + logId: '14454674236531057292', + concreteTypeId: 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + }, + { + logId: '7752900403879318547', + concreteTypeId: '6b97d5d738359413c9fac402aced252c23902c28382469ffe27f07381e9f6f31', + }, + { + logId: '16171443785104013487', + concreteTypeId: 'e06c82714c52b8afd2293d5d37d05783d09d71c956311c6050ac012cab06364e', + }, + { + logId: '13897586369399989020', + concreteTypeId: 'c0de252b9f65a31c6d03071b4b18a935c88c5bb0b2401a447fd30d342fd5a04d', + }, + { + logId: '2855558404146077188', + concreteTypeId: '27a0fb3d3a821e04e7a3f17ab6a617f0eb10f11e6eeb0f2c0ff9e6237207319e', + }, + { + logId: '10477818057471029201', + concreteTypeId: '9168b00268bbefd158090041178f058b032504f76c4b9644157d5d6b5b183468', + }, + { + logId: '3330666440490685604', + concreteTypeId: '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + }, + ], + messagesTypes: [], + configurables: [ + { + name: 'U8_VALUE', + concreteTypeId: 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + offset: 113392, + }, + { + name: 'BOOL_VALUE', + concreteTypeId: 'b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903', + offset: 113360, + }, + { + name: 'B256_VALUE', + concreteTypeId: '7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b', + offset: 113328, + }, + { + name: 'OPTION_U8_VALUE', + concreteTypeId: '2da102c46c7263beeed95818cd7bee801716ba8303dddafdcd0f6c9efda4a0f1', + offset: 113376, + }, + { + name: 'GENERIC_STRUCT_VALUE', + concreteTypeId: '08dbec793087c5686c1a493513b158a999bb653126ee51151dfa85fa683edce5', + offset: 113368, + }, + ], +}; diff --git a/packages/abi/test/utils/constants.ts b/packages/abi/test/utils/constants.ts new file mode 100644 index 00000000000..986af402c33 --- /dev/null +++ b/packages/abi/test/utils/constants.ts @@ -0,0 +1,58 @@ +import { bn } from '@fuel-ts/math'; + +export const U8_MAX = 2 ** 8 - 1; +export const U8_MAX_ENCODED = new Uint8Array([255]); +export const U8_MIN_ENCODED = new Uint8Array([0]); +export const U16_MAX = 2 ** 16 - 1; +export const U16_MAX_ENCODED = new Uint8Array([255, 255]); +export const U16_MIN_ENCODED = new Uint8Array([0, 0]); +export const U32_MAX = 2 ** 32 - 1; +export const U32_MAX_ENCODED = new Uint8Array([255, 255, 255, 255]); +export const U32_MIN_ENCODED = new Uint8Array([0, 0, 0, 0]); +export const U64_MAX = bn(2).pow(64).sub(1); +export const U64_MAX_ENCODED = new Uint8Array([255, 255, 255, 255, 255, 255, 255, 255]); +export const U64_MIN_ENCODED = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0]); +export const U256_MAX = bn(2).pow(256).sub(1); +export const U256_MAX_ENCODED = new Uint8Array(32).fill(255); +export const U256_MIN_ENCODED = new Uint8Array(32).fill(0); + +export const EMPTY_8_BYTE_ARRAY = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0]); +export const ENUM_FIRST_INDEX = EMPTY_8_BYTE_ARRAY; +export const ENUM_SECOND_INDEX = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 1]); +export const ENUM_THIRD_INDEX = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 2]); + +export const STRING_MIN_DECODED = ''; +export const STRING_MIN_ENCODED = new Uint8Array(); +export const STRING_MAX_DECODED = 'a'.repeat(U8_MAX); +export const STRING_MAX_ENCODED = new Uint8Array([ + ...Array.from(Array(U8_MAX + 1).fill(97, 0, U8_MAX)), +]); + +export const B256_DECODED = '0xd5579c46dfcc7f18207013e65b44e4cb4e2c2298f4ac457ba8f82743f31e930b'; +export const B256_ENCODED = new Uint8Array([ + 213, 87, 156, 70, 223, 204, 127, 24, 32, 112, 19, 230, 91, 68, 228, 203, 78, 44, 34, 152, 244, + 172, 69, 123, 168, 248, 39, 67, 243, 30, 147, 11, +]); +export const B256_ZERO_DECODED = + '0x0000000000000000000000000000000000000000000000000000000000000000'; +export const B256_ZERO_ENCODED = new Uint8Array(32); + +export const BYTE_MIN_DECODED = 0; +export const BYTE_MIN_ENCODED = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0]); +export const BYTE_MAX_DECODED = U8_MAX; +export const BYTE_MAX_ENCODED = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 255]); + +export const BOOL_TRUE_ENCODED = new Uint8Array([1]); +export const BOOL_FALSE_ENCODED = new Uint8Array([0]); + +export const B512_DECODED = + '0x8e9dda6f7793745ac5aacf9e907cae30b2a01fdf0d23b7750a85c6a44fca0c29f0906f9d1f1e92e6a1fb3c3dcef3cc3b3cdbaae27e47b9d9a4c6a4fce4cf16b2'; +export const B512_ENCODED = new Uint8Array([ + 142, 157, 218, 111, 119, 147, 116, 90, 197, 170, 207, 158, 144, 124, 174, 48, 178, 160, 31, 223, + 13, 35, 183, 117, 10, 133, 198, 164, 79, 202, 12, 41, 240, 144, 111, 157, 31, 30, 146, 230, 161, + 251, 60, 61, 206, 243, 204, 59, 60, 219, 170, 226, 126, 71, 185, 217, 164, 198, 164, 252, 228, + 207, 22, 178, +]); +export const B512_ZERO_DECODED = + '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'; +export const B512_ZERO_ENCODED = new Uint8Array(64); diff --git a/packages/account/package.json b/packages/account/package.json index ded879a66fa..81b207a25be 100644 --- a/packages/account/package.json +++ b/packages/account/package.json @@ -48,7 +48,7 @@ }, "license": "Apache-2.0", "dependencies": { - "@fuel-ts/abi-coder": "workspace:*", + "@fuel-ts/abi": "workspace:*", "@fuel-ts/address": "workspace:*", "@fuel-ts/crypto": "workspace:*", "@fuel-ts/errors": "workspace:*", diff --git a/packages/account/src/account.ts b/packages/account/src/account.ts index 8ab6ecf20e6..51cbfcb763f 100644 --- a/packages/account/src/account.ts +++ b/packages/account/src/account.ts @@ -1,4 +1,4 @@ -import { UTXO_ID_LEN } from '@fuel-ts/abi-coder'; +import { UTXO_ID_LEN } from '@fuel-ts/abi'; import type { WithAddress } from '@fuel-ts/address'; import { Address } from '@fuel-ts/address'; import { randomBytes } from '@fuel-ts/crypto'; diff --git a/packages/account/src/connectors/types/data-type.ts b/packages/account/src/connectors/types/data-type.ts index f4a6f85fa6c..4ca8fdbd7ed 100644 --- a/packages/account/src/connectors/types/data-type.ts +++ b/packages/account/src/connectors/types/data-type.ts @@ -1,4 +1,4 @@ -import type { JsonAbi } from '@fuel-ts/abi-coder'; +import type { AbiSpecification } from '@fuel-ts/abi'; import type { RequireAtLeastOne } from 'type-fest'; import type { TransactionRequest } from '../../providers'; @@ -43,7 +43,7 @@ export type SelectNetworkArguments = RequireAtLeastOne = { bytecode: BytesLike; provider: Provider; - abi: JsonAbi; + abi: AbiSpecification; data?: TData; configurableConstants?: TConfigurables; }; @@ -47,7 +47,7 @@ export class Predicate< > extends Account { bytes: Uint8Array; predicateData: TData = [] as unknown as TData; - interface: Interface; + interface: AbiCoder; initialBytecode: Uint8Array; configurableConstants: TConfigurables | undefined; /** @@ -160,7 +160,7 @@ export class Predicate< ) { return new Predicate({ bytecode: this.initialBytecode, - abi: this.interface.jsonAbi, + abi: this.interface.specification, provider: this.provider, data: overrides.data ?? this.predicateData, configurableConstants: overrides.configurableConstants ?? this.configurableConstants, @@ -177,13 +177,13 @@ export class Predicate< */ private static processPredicateData( bytes: BytesLike, - jsonAbi: JsonAbi, + jsonAbi: AbiSpecification, configurableConstants?: { [name: string]: unknown } ) { let predicateBytes = arrayify(bytes); - const abiInterface: Interface = new Interface(jsonAbi); + const abiCoder: AbiCoder = AbiCoder.fromAbi(jsonAbi); - if (abiInterface.functions.main === undefined) { + if (abiCoder.functions.main === undefined) { throw new FuelError( ErrorCode.ABI_MAIN_METHOD_MISSING, 'Cannot use ABI without "main" function.' @@ -194,13 +194,13 @@ export class Predicate< predicateBytes = Predicate.setConfigurableConstants( predicateBytes, configurableConstants, - abiInterface + abiCoder ); } return { predicateBytes, - predicateInterface: abiInterface, + predicateInterface: abiCoder, }; } @@ -246,18 +246,18 @@ export class Predicate< * * @param bytes - The bytes of the predicate. * @param configurableConstants - Configurable constants to be set. - * @param abiInterface - The ABI interface of the predicate. + * @param abiCoder - The ABI interface of the predicate. * @returns The mutated bytes with the configurable constants set. */ private static setConfigurableConstants( bytes: Uint8Array, configurableConstants: { [name: string]: unknown }, - abiInterface: Interface + abiCoder: AbiCoder ) { const mutatedBytes = bytes; try { - if (Object.keys(abiInterface.configurables).length === 0) { + if (Object.keys(abiCoder.configurables).length === 0) { throw new FuelError( ErrorCode.INVALID_CONFIGURABLE_CONSTANTS, 'Predicate has no configurable constants to be set' @@ -265,16 +265,16 @@ export class Predicate< } Object.entries(configurableConstants).forEach(([key, value]) => { - if (!abiInterface?.configurables[key]) { + if (!abiCoder?.configurables[key]) { throw new FuelError( ErrorCode.CONFIGURABLE_NOT_FOUND, `No configurable constant named '${key}' found in the Predicate` ); } - const { offset } = abiInterface.configurables[key]; + const { offset } = abiCoder.configurables[key]; - const encoded = abiInterface.encodeConfigurable(key, value as InputValue); + const encoded = abiCoder.getConfigurable(key).encode(value as InputValue); mutatedBytes.set(encoded, offset); }); @@ -339,7 +339,7 @@ export class Predicate< async deploy(account: Account) { return deployScriptOrPredicate({ deployer: account, - abi: this.interface.jsonAbi, + abi: this.interface.specification, bytecode: this.bytes, loaderInstanceCallback: (loaderBytecode, newAbi) => new Predicate({ diff --git a/packages/account/src/providers/transaction-request/input.ts b/packages/account/src/providers/transaction-request/input.ts index 15100c2e5c6..3446b24f0b7 100644 --- a/packages/account/src/providers/transaction-request/input.ts +++ b/packages/account/src/providers/transaction-request/input.ts @@ -1,4 +1,4 @@ -import { BYTES_32, UTXO_ID_LEN } from '@fuel-ts/abi-coder'; +import { BYTES_32, UTXO_ID_LEN } from '@fuel-ts/abi'; import { ZeroBytes32 } from '@fuel-ts/address/configs'; import { ErrorCode, FuelError } from '@fuel-ts/errors'; import type { BigNumberish } from '@fuel-ts/math'; diff --git a/packages/account/src/providers/transaction-request/script-transaction-request.ts b/packages/account/src/providers/transaction-request/script-transaction-request.ts index e00a1b942e8..9d9d544ea41 100644 --- a/packages/account/src/providers/transaction-request/script-transaction-request.ts +++ b/packages/account/src/providers/transaction-request/script-transaction-request.ts @@ -1,5 +1,5 @@ -import type { InputValue, JsonAbi } from '@fuel-ts/abi-coder'; -import { Interface } from '@fuel-ts/abi-coder'; +import type { InputValue, AbiSpecification } from '@fuel-ts/abi'; +import { AbiCoder } from '@fuel-ts/abi'; import { addressify } from '@fuel-ts/address'; import type { ContractIdLike } from '@fuel-ts/address'; import { ZeroBytes32 } from '@fuel-ts/address/configs'; @@ -248,8 +248,8 @@ export class ScriptTransactionRequest extends BaseTransactionRequest { * @param args - The input arguments. * @returns The current instance of the `ScriptTransactionRequest`. */ - setData(abi: JsonAbi, args: InputValue[]): ScriptTransactionRequest { - const abiInterface = new Interface(abi); + setData(abi: AbiSpecification, args: InputValue[]): ScriptTransactionRequest { + const abiInterface = AbiCoder.fromAbi(abi); this.scriptData = abiInterface.functions.main.encodeArguments(args); return this; } diff --git a/packages/account/src/providers/transaction-request/transaction-request.ts b/packages/account/src/providers/transaction-request/transaction-request.ts index d38eaed6a94..23f6f4edf6b 100644 --- a/packages/account/src/providers/transaction-request/transaction-request.ts +++ b/packages/account/src/providers/transaction-request/transaction-request.ts @@ -1,4 +1,4 @@ -import { UTXO_ID_LEN } from '@fuel-ts/abi-coder'; +import { UTXO_ID_LEN } from '@fuel-ts/abi'; import { Address, addressify } from '@fuel-ts/address'; import type { AddressLike } from '@fuel-ts/address'; import { ZeroBytes32 } from '@fuel-ts/address/configs'; diff --git a/packages/account/src/providers/transaction-request/types.ts b/packages/account/src/providers/transaction-request/types.ts index a1719c0d423..e8ce1b3c4cd 100644 --- a/packages/account/src/providers/transaction-request/types.ts +++ b/packages/account/src/providers/transaction-request/types.ts @@ -1,4 +1,4 @@ -import type { JsonAbi } from '@fuel-ts/abi-coder'; +import type { AbiSpecification } from '@fuel-ts/abi'; import type { TransactionType } from '@fuel-ts/transactions'; import type { @@ -36,8 +36,8 @@ export type TransactionRequestLike = | ({ type: TransactionType.Upload } & UploadTransactionRequestLike); export type JsonAbisFromAllCalls = { - main: JsonAbi; - otherContractsAbis: Record; + main: AbiSpecification; + otherContractsAbis: Record; }; /** diff --git a/packages/account/src/providers/transaction-response/getDecodedLogs.ts b/packages/account/src/providers/transaction-response/getDecodedLogs.ts index 91bafef69c5..af36dc9cc92 100644 --- a/packages/account/src/providers/transaction-response/getDecodedLogs.ts +++ b/packages/account/src/providers/transaction-response/getDecodedLogs.ts @@ -1,5 +1,5 @@ -import type { JsonAbi } from '@fuel-ts/abi-coder'; -import { Interface, BigNumberCoder } from '@fuel-ts/abi-coder'; +import type { AbiSpecification } from '@fuel-ts/abi'; +import { AbiCoder, encoding } from '@fuel-ts/abi'; import { ReceiptType } from '@fuel-ts/transactions'; import type { TransactionResultReceipt } from './transaction-response'; @@ -7,8 +7,8 @@ import type { TransactionResultReceipt } from './transaction-response'; /** @hidden */ export function getDecodedLogs( receipts: Array, - mainAbi: JsonAbi, - externalAbis: Record = {} + mainAbi: AbiSpecification, + externalAbis: Record = {} ): T[] { /** * This helper decodes logs from transaction receipts. @@ -28,14 +28,13 @@ export function getDecodedLogs( */ return receipts.reduce((logs: T[], receipt) => { if (receipt.type === ReceiptType.LogData || receipt.type === ReceiptType.Log) { - const interfaceToUse = new Interface(externalAbis[receipt.id] || mainAbi); + const abiCoderToUse = AbiCoder.fromAbi(externalAbis[receipt.id] || mainAbi); const data = - receipt.type === ReceiptType.Log - ? new BigNumberCoder('u64').encode(receipt.ra) - : receipt.data; + receipt.type === ReceiptType.Log ? encoding.v1.u64.encode(receipt.ra) : receipt.data; - const [decodedLog] = interfaceToUse.decodeLog(data, receipt.rb.toString()); + const log = abiCoderToUse.getLog(receipt.rb.toString()); + const decodedLog = log.decode(data) as T; logs.push(decodedLog); } diff --git a/packages/account/src/providers/transaction-summary/call.ts b/packages/account/src/providers/transaction-summary/call.ts index e4b56da2320..6d121a228b4 100644 --- a/packages/account/src/providers/transaction-summary/call.ts +++ b/packages/account/src/providers/transaction-summary/call.ts @@ -1,9 +1,10 @@ -import { Interface, type JsonAbi } from '@fuel-ts/abi-coder'; +import { AbiCoder } from '@fuel-ts/abi'; +import type { AbiSpecification } from '@fuel-ts/abi'; import type { BN } from '@fuel-ts/math'; import type { ReceiptCall } from '@fuel-ts/transactions'; type GetFunctionCallProps = { - abi: JsonAbi; + abi: AbiSpecification; receipt: ReceiptCall; rawPayload?: string; maxInputs: BN; @@ -18,10 +19,10 @@ export interface FunctionCall { } export const getFunctionCall = ({ abi, receipt }: GetFunctionCallProps): FunctionCall => { - const abiInterface = new Interface(abi); + const abiCoder = AbiCoder.fromAbi(abi); const callFunctionSelector = receipt.param1.toHex(8); - const functionFragment = abiInterface.getFunction(callFunctionSelector); - const inputs = functionFragment.jsonFn.inputs; + const functionFragment = abiCoder.getFunction(callFunctionSelector); + const inputs = functionFragment.inputs; const encodedArgs = receipt.param2.toHex(); let argumentsProvided; diff --git a/packages/account/src/providers/transaction-summary/types.ts b/packages/account/src/providers/transaction-summary/types.ts index b3372035ba8..64fb73d1a19 100644 --- a/packages/account/src/providers/transaction-summary/types.ts +++ b/packages/account/src/providers/transaction-summary/types.ts @@ -1,4 +1,4 @@ -import type { JsonAbi } from '@fuel-ts/abi-coder'; +import type { AbiSpecification } from '@fuel-ts/abi'; import type { B256Address } from '@fuel-ts/address'; import type { BN, BNInput } from '@fuel-ts/math'; import type { Input, Output, Transaction, TransactionType } from '@fuel-ts/transactions'; @@ -154,7 +154,7 @@ export type ReceiptParam = { receipts: TransactionResultReceipt[]; }; -export type AbiMap = Record; +export type AbiMap = Record; export type RawPayloadParam = { rawPayload?: string; diff --git a/packages/account/src/providers/utils/receipts.test.ts b/packages/account/src/providers/utils/receipts.test.ts index b6f31bc00c0..f19a18a0afb 100644 --- a/packages/account/src/providers/utils/receipts.test.ts +++ b/packages/account/src/providers/utils/receipts.test.ts @@ -1,11 +1,8 @@ -import { BN, bn } from '@fuel-ts/math'; +import { BN } from '@fuel-ts/math'; import type { - ReceiptBurn, ReceiptCall, ReceiptLog, ReceiptLogData, - ReceiptMessageOut, - ReceiptMint, ReceiptPanic, ReceiptReturn, ReceiptReturnData, @@ -14,8 +11,7 @@ import type { ReceiptTransfer, ReceiptTransferOut, } from '@fuel-ts/transactions'; -import { getMintedAssetId, getMessageId, ReceiptType } from '@fuel-ts/transactions'; -import { arrayify } from '@fuel-ts/utils'; +import { ReceiptType } from '@fuel-ts/transactions'; import { MOCK_GQL_RECEIPT_FRAGMENT, @@ -207,75 +203,4 @@ describe('assembleReceiptByType', () => { expect(receipt.result).toStrictEqual(new BN(MOCK_GQL_RECEIPT_FRAGMENT.result)); expect(receipt.gasUsed).toStrictEqual(new BN(MOCK_GQL_RECEIPT_FRAGMENT.gasUsed)); }); - - it('should return a ReceiptMessageOut when GqlReceiptType.MessageOut is provided', () => { - const receipt = assembleReceiptByType({ - ...MOCK_GQL_RECEIPT_FRAGMENT, - receiptType: GqlReceiptType.MessageOut, - }) as ReceiptMessageOut; - - const sender = MOCK_GQL_RECEIPT_FRAGMENT.sender || ''; - const recipient = MOCK_GQL_RECEIPT_FRAGMENT.recipient || ''; - const nonce = MOCK_GQL_RECEIPT_FRAGMENT.nonce || ''; - const amount = bn(MOCK_GQL_RECEIPT_FRAGMENT.amount); - const data = arrayify(MOCK_GQL_RECEIPT_FRAGMENT.data || ''); - const digest = MOCK_GQL_RECEIPT_FRAGMENT.digest; - const len = Number(MOCK_GQL_RECEIPT_FRAGMENT.len); - - const messageId = getMessageId({ - sender, - recipient, - nonce, - amount, - data, - }); - - expect(receipt.type).toBe(ReceiptType.MessageOut); - expect(receipt.amount).toStrictEqual(amount); - expect(receipt.digest).toStrictEqual(digest); - expect(receipt.messageId).toStrictEqual(messageId); - expect(receipt.nonce).toStrictEqual(nonce); - expect(receipt.recipient).toStrictEqual(recipient); - expect(receipt.sender).toStrictEqual(sender); - expect(receipt.len).toStrictEqual(len); - expect(receipt.data).toStrictEqual(data); - }); - - it('should return a ReceiptMint when GqlReceiptType.Mint is provided', () => { - const contractId = MOCK_GQL_RECEIPT_FRAGMENT.id || ''; - const subId = MOCK_GQL_RECEIPT_FRAGMENT.subId || ''; - const assetId = getMintedAssetId(contractId, subId); - - const receipt = assembleReceiptByType({ - ...MOCK_GQL_RECEIPT_FRAGMENT, - receiptType: GqlReceiptType.Mint, - }) as ReceiptMint; - - expect(receipt.type).toBe(ReceiptType.Mint); - expect(receipt.contractId).toStrictEqual(contractId); - expect(receipt.subId).toStrictEqual(subId); - expect(receipt.assetId).toStrictEqual(assetId); - expect(receipt.is).toStrictEqual(new BN(MOCK_GQL_RECEIPT_FRAGMENT.is)); - expect(receipt.pc).toStrictEqual(new BN(MOCK_GQL_RECEIPT_FRAGMENT.pc)); - expect(receipt.val).toStrictEqual(new BN(MOCK_GQL_RECEIPT_FRAGMENT.val)); - }); - - it('should return a ReceiptBurn when GqlReceiptType.Burn is provided', () => { - const contractId = MOCK_GQL_RECEIPT_FRAGMENT.id || ''; - const subId = MOCK_GQL_RECEIPT_FRAGMENT.subId || ''; - const assetId = getMintedAssetId(contractId, subId); - - const receipt = assembleReceiptByType({ - ...MOCK_GQL_RECEIPT_FRAGMENT, - receiptType: GqlReceiptType.Burn, - }) as ReceiptBurn; - - expect(receipt.type).toBe(ReceiptType.Burn); - expect(receipt.contractId).toStrictEqual(contractId); - expect(receipt.subId).toStrictEqual(subId); - expect(receipt.assetId).toStrictEqual(assetId); - expect(receipt.is).toStrictEqual(new BN(MOCK_GQL_RECEIPT_FRAGMENT.is)); - expect(receipt.pc).toStrictEqual(new BN(MOCK_GQL_RECEIPT_FRAGMENT.pc)); - expect(receipt.val).toStrictEqual(new BN(MOCK_GQL_RECEIPT_FRAGMENT.val)); - }); }); diff --git a/packages/account/src/test-utils/launchNode.ts b/packages/account/src/test-utils/launchNode.ts index c68e7b13ca8..dbbd1b68d17 100644 --- a/packages/account/src/test-utils/launchNode.ts +++ b/packages/account/src/test-utils/launchNode.ts @@ -1,4 +1,4 @@ -import { BYTES_32 } from '@fuel-ts/abi-coder'; +import { BYTES_32 } from '@fuel-ts/abi'; import { randomBytes, randomUUID } from '@fuel-ts/crypto'; import { FuelError } from '@fuel-ts/errors'; import type { SnapshotConfigs } from '@fuel-ts/utils'; diff --git a/packages/account/src/test-utils/resources.ts b/packages/account/src/test-utils/resources.ts index 688d985d698..a7fde002509 100644 --- a/packages/account/src/test-utils/resources.ts +++ b/packages/account/src/test-utils/resources.ts @@ -1,4 +1,4 @@ -import { BYTES_32, UTXO_ID_LEN } from '@fuel-ts/abi-coder'; +import { BYTES_32, UTXO_ID_LEN } from '@fuel-ts/abi'; import { Address } from '@fuel-ts/address'; import { ZeroBytes32 } from '@fuel-ts/address/configs'; import { randomBytes } from '@fuel-ts/crypto'; diff --git a/packages/account/src/test-utils/transactionRequest.ts b/packages/account/src/test-utils/transactionRequest.ts index a0aa0d66019..e224b326e77 100644 --- a/packages/account/src/test-utils/transactionRequest.ts +++ b/packages/account/src/test-utils/transactionRequest.ts @@ -1,4 +1,4 @@ -import { UTXO_ID_LEN } from '@fuel-ts/abi-coder'; +import { UTXO_ID_LEN } from '@fuel-ts/abi'; import { getRandomB256 } from '@fuel-ts/address'; import { ZeroBytes32 } from '@fuel-ts/address/configs'; import { randomBytes } from '@fuel-ts/crypto'; diff --git a/packages/account/src/utils/deployScriptOrPredicate.ts b/packages/account/src/utils/deployScriptOrPredicate.ts index fea92dabee6..95d7e36b3b3 100644 --- a/packages/account/src/utils/deployScriptOrPredicate.ts +++ b/packages/account/src/utils/deployScriptOrPredicate.ts @@ -1,4 +1,4 @@ -import type { JsonAbi } from '@fuel-ts/abi-coder'; +import type { AbiSpecification } from '@fuel-ts/abi'; import { FuelError, ErrorCode } from '@fuel-ts/errors'; import { hash } from '@fuel-ts/hasher'; import { bn } from '@fuel-ts/math'; @@ -40,21 +40,21 @@ async function fundBlobTx(deployer: Account, blobTxRequest: BlobTransactionReque return deployer.fund(blobTxRequest, txCost); } -function adjustConfigurableOffsets(jsonAbi: JsonAbi, configurableOffsetDiff: number) { +function adjustConfigurableOffsets(jsonAbi: AbiSpecification, configurableOffsetDiff: number) { const { configurables: readOnlyConfigurables } = jsonAbi; - const configurables: JsonAbi['configurables'] = []; + const configurables: AbiSpecification['configurables'] = []; readOnlyConfigurables.forEach((config) => { // @ts-expect-error shut up the read-only thing configurables.push({ ...config, offset: config.offset - configurableOffsetDiff }); }); - return { ...jsonAbi, configurables } as JsonAbi; + return { ...jsonAbi, configurables } as AbiSpecification; } interface Deployer { deployer: Account; bytecode: Uint8Array; - abi: JsonAbi; - loaderInstanceCallback: (loaderBytecode: Uint8Array, newAbi: JsonAbi) => T; + abi: AbiSpecification; + loaderInstanceCallback: (loaderBytecode: Uint8Array, newAbi: AbiSpecification) => T; } export async function deployScriptOrPredicate({ diff --git a/packages/account/src/utils/formatTransferToContractScriptData.test.ts b/packages/account/src/utils/formatTransferToContractScriptData.test.ts index d00fe30eb48..21f401fd331 100644 --- a/packages/account/src/utils/formatTransferToContractScriptData.test.ts +++ b/packages/account/src/utils/formatTransferToContractScriptData.test.ts @@ -1,4 +1,4 @@ -import { BigNumberCoder } from '@fuel-ts/abi-coder'; +import { encoding } from '@fuel-ts/abi'; import { getRandomB256 } from '@fuel-ts/address'; import { bn, type BigNumberish } from '@fuel-ts/math'; import * as arrayifyMod from '@fuel-ts/utils'; @@ -49,9 +49,7 @@ describe('util', () => { it('should ensure "formatScriptDataForTransferringToContract" returns script data just fine', () => { const byte: number[] = [0, 0, 0, 0, 0, 0, 0, 1]; - const encode = vi - .spyOn(BigNumberCoder.prototype, 'encode') - .mockReturnValue(Uint8Array.from(byte)); + const encode = vi.spyOn(encoding.v1.u64, 'encode').mockReturnValue(Uint8Array.from(byte)); const arrayify = vi.spyOn(arrayifyMod, 'arrayify').mockReturnValue(Uint8Array.from(byte)); diff --git a/packages/account/src/utils/formatTransferToContractScriptData.ts b/packages/account/src/utils/formatTransferToContractScriptData.ts index 2155a3ad46a..a119f1551f8 100644 --- a/packages/account/src/utils/formatTransferToContractScriptData.ts +++ b/packages/account/src/utils/formatTransferToContractScriptData.ts @@ -1,4 +1,4 @@ -import { ASSET_ID_LEN, BigNumberCoder, CONTRACT_ID_LEN, WORD_SIZE } from '@fuel-ts/abi-coder'; +import { encoding, ASSET_ID_LEN, CONTRACT_ID_LEN, WORD_SIZE } from '@fuel-ts/abi'; import { Address } from '@fuel-ts/address'; import type { BN } from '@fuel-ts/math'; import { arrayify, concat } from '@fuel-ts/utils'; @@ -14,7 +14,7 @@ interface AssembleTransferToContractParams { export const formatTransferToContractScriptData = ( transferParams: Array ) => { - const numberCoder = new BigNumberCoder('u64'); + const numberCoder = encoding.v1.u64; return transferParams.reduce((acc, transferParam) => { const { assetId, amount, contractId } = transferParam; const encoded = numberCoder.encode(amount); diff --git a/packages/account/test/fixtures/predicate-abi.ts b/packages/account/test/fixtures/predicate-abi.ts index 91bf0b52c06..aecbd61fb21 100644 --- a/packages/account/test/fixtures/predicate-abi.ts +++ b/packages/account/test/fixtures/predicate-abi.ts @@ -1,6 +1,6 @@ -import type { JsonAbi } from '@fuel-ts/abi-coder'; +import type { AbiSpecification } from '@fuel-ts/abi'; -export const predicateAbi: JsonAbi = { +export const predicateAbi: AbiSpecification = { programType: 'predicate', specVersion: '1', encodingVersion: '1', diff --git a/packages/account/test/fixtures/transaction-summary.ts b/packages/account/test/fixtures/transaction-summary.ts index 9b3b79cbc02..c75107cb78b 100644 --- a/packages/account/test/fixtures/transaction-summary.ts +++ b/packages/account/test/fixtures/transaction-summary.ts @@ -1,4 +1,4 @@ -import type { JsonAbi } from '@fuel-ts/abi-coder'; +import type { AbiSpecification } from '@fuel-ts/abi'; import { bn } from '@fuel-ts/math'; import type { InputCoin, @@ -260,7 +260,7 @@ export const MOCK_ABI_MAP: AbiMap = { loggedTypes: [], messagesTypes: [], configurables: [], - } as unknown as JsonAbi, // used in skipped test + } as unknown as AbiSpecification, // used in skipped test // packages/account/src/providers/transaction-summary/operations.test.ts // "should ensure getContractCallOperations return contract call operations with calls details" // when the test is unskipped, it'll fail and this mock can be adjusted or deleted diff --git a/packages/contract/package.json b/packages/contract/package.json index 950ab5d0471..687e98c0b69 100644 --- a/packages/contract/package.json +++ b/packages/contract/package.json @@ -39,7 +39,7 @@ }, "license": "Apache-2.0", "dependencies": { - "@fuel-ts/abi-coder": "workspace:*", + "@fuel-ts/abi": "workspace:*", "@fuel-ts/account": "workspace:*", "@fuel-ts/crypto": "workspace:*", "@fuel-ts/errors": "workspace:*", diff --git a/packages/contract/src/contract-factory.ts b/packages/contract/src/contract-factory.ts index 0ad2c00e955..2b36dfcd226 100644 --- a/packages/contract/src/contract-factory.ts +++ b/packages/contract/src/contract-factory.ts @@ -1,5 +1,5 @@ -import { Interface, WORD_SIZE } from '@fuel-ts/abi-coder'; -import type { JsonAbi, InputValue } from '@fuel-ts/abi-coder'; +import { AbiCoder, WORD_SIZE } from '@fuel-ts/abi'; +import type { AbiSpecification, InputValue } from '@fuel-ts/abi'; import type { Account, CreateTransactionRequestLike, @@ -54,7 +54,7 @@ export type DeployContractResult = { */ export default class ContractFactory { bytecode: BytesLike; - interface: Interface; + interface: AbiCoder; provider!: Provider | null; account!: Account | null; storageSlots: StorageSlot[]; @@ -68,17 +68,17 @@ export default class ContractFactory { */ constructor( bytecode: BytesLike, - abi: JsonAbi | Interface, + abi: AbiSpecification | AbiCoder, accountOrProvider: Account | Provider | null = null, storageSlots: StorageSlot[] = [] ) { // Force the bytecode to be a byte array this.bytecode = arrayify(bytecode); - if (abi instanceof Interface) { + if (abi instanceof AbiCoder) { this.interface = abi; } else { - this.interface = new Interface(abi); + this.interface = AbiCoder.fromAbi(abi); } /** @@ -404,7 +404,7 @@ export default class ContractFactory { const { offset } = this.interface.configurables[key]; - const encoded = this.interface.encodeConfigurable(key, value as InputValue); + const encoded = this.interface.getConfigurable(key).encode(value as InputValue); const bytes = arrayify(this.bytecode); diff --git a/packages/contract/src/loader/loader-script.test.ts b/packages/contract/src/loader/loader-script.test.ts index 31511569f21..edec0b7de26 100644 --- a/packages/contract/src/loader/loader-script.test.ts +++ b/packages/contract/src/loader/loader-script.test.ts @@ -1,4 +1,4 @@ -import { WORD_SIZE } from '@fuel-ts/abi-coder'; +import { WORD_SIZE } from '@fuel-ts/abi'; import { arrayify } from '@fuel-ts/utils'; import { getLoaderInstructions } from './loader-script'; diff --git a/packages/contract/src/loader/loader-script.ts b/packages/contract/src/loader/loader-script.ts index 6d9c64e1254..d733286fd87 100644 --- a/packages/contract/src/loader/loader-script.ts +++ b/packages/contract/src/loader/loader-script.ts @@ -1,4 +1,4 @@ -import { BYTES_32 } from '@fuel-ts/abi-coder'; +import { BYTES_32 } from '@fuel-ts/abi'; import { InstructionSet } from '@fuel-ts/program'; import { arrayify, concat } from '@fuel-ts/utils'; import * as asm from '@fuels/vm-asm'; diff --git a/packages/contract/src/loader/utils.test.ts b/packages/contract/src/loader/utils.test.ts index 6e306271160..32cb2843f76 100644 --- a/packages/contract/src/loader/utils.test.ts +++ b/packages/contract/src/loader/utils.test.ts @@ -1,4 +1,4 @@ -import { WORD_SIZE } from '@fuel-ts/abi-coder'; +import { WORD_SIZE } from '@fuel-ts/abi'; import { getContractChunks } from './utils'; diff --git a/packages/contract/src/loader/utils.ts b/packages/contract/src/loader/utils.ts index 75528aab5b4..ae85e5038e2 100644 --- a/packages/contract/src/loader/utils.ts +++ b/packages/contract/src/loader/utils.ts @@ -1,4 +1,4 @@ -import { WORD_SIZE } from '@fuel-ts/abi-coder'; +import { WORD_SIZE } from '@fuel-ts/abi'; import { concat } from '@fuel-ts/utils'; export const getContractChunks = (bytecode: Uint8Array, chunkSize: number) => { diff --git a/packages/contract/src/test-utils/launch-test-node.test.ts b/packages/contract/src/test-utils/launch-test-node.test.ts index f6667d7a0e7..77a8fdab54c 100644 --- a/packages/contract/src/test-utils/launch-test-node.test.ts +++ b/packages/contract/src/test-utils/launch-test-node.test.ts @@ -1,4 +1,4 @@ -import type { JsonAbi } from '@fuel-ts/abi-coder'; +import type { AbiSpecification } from '@fuel-ts/abi'; import { Provider } from '@fuel-ts/account'; import * as setupTestProviderAndWalletsMod from '@fuel-ts/account/test-utils'; import { randomBytes, randomUUID } from '@fuel-ts/crypto'; @@ -15,7 +15,7 @@ import ContractFactory from '../contract-factory'; import { launchTestNode } from './launch-test-node'; -const { binHexlified, abiContents } = getForcProject({ +const { binHexlified, abiContents } = getForcProject({ projectDir: join(__dirname, '../../test/fixtures/forc-projects/simple-contract'), projectName: 'simple-contract', build: 'release', diff --git a/packages/crypto/src/browser/bufferFromString.ts b/packages/crypto/src/browser/bufferFromString.ts index 84e731fd42e..8e24a7140de 100644 --- a/packages/crypto/src/browser/bufferFromString.ts +++ b/packages/crypto/src/browser/bufferFromString.ts @@ -1,8 +1,8 @@ -import type { CryptoApi, Encoding } from '../types'; +import type { CryptoApi, BufferEncoding } from '../types'; export const bufferFromString: CryptoApi['bufferFromString'] = ( string: string, - encoding: Encoding = 'base64' + encoding: BufferEncoding = 'base64' ): Uint8Array => { switch (encoding) { case 'utf-8': { diff --git a/packages/crypto/src/browser/stringFromBuffer.ts b/packages/crypto/src/browser/stringFromBuffer.ts index 948c05bd4be..f61ed9f01ae 100644 --- a/packages/crypto/src/browser/stringFromBuffer.ts +++ b/packages/crypto/src/browser/stringFromBuffer.ts @@ -1,10 +1,10 @@ -import type { CryptoApi, Encoding } from '../types'; +import type { CryptoApi, BufferEncoding } from '../types'; import { btoa } from './crypto'; export const stringFromBuffer: CryptoApi['stringFromBuffer'] = ( buffer: Uint8Array, - encoding: Encoding = 'base64' + encoding: BufferEncoding = 'base64' ): string => { switch (encoding) { case 'utf-8': { diff --git a/packages/crypto/src/node/bufferFromString.ts b/packages/crypto/src/node/bufferFromString.ts index ae22ab28603..a9ccd50fff1 100644 --- a/packages/crypto/src/node/bufferFromString.ts +++ b/packages/crypto/src/node/bufferFromString.ts @@ -1,6 +1,6 @@ -import type { CryptoApi, Encoding } from '../types'; +import type { CryptoApi, BufferEncoding } from '../types'; export const bufferFromString: CryptoApi['bufferFromString'] = ( string: string, - encoding: Encoding = 'base64' + encoding: BufferEncoding = 'base64' ): Uint8Array => Uint8Array.from(Buffer.from(string, encoding)); diff --git a/packages/crypto/src/node/stringFromBuffer.ts b/packages/crypto/src/node/stringFromBuffer.ts index ab296f582aa..63fc4be579c 100644 --- a/packages/crypto/src/node/stringFromBuffer.ts +++ b/packages/crypto/src/node/stringFromBuffer.ts @@ -1,6 +1,6 @@ -import type { CryptoApi, Encoding } from '../types'; +import type { CryptoApi, BufferEncoding } from '../types'; export const stringFromBuffer: CryptoApi['stringFromBuffer'] = ( buffer: Uint8Array, - encoding: Encoding = 'base64' + encoding: BufferEncoding = 'base64' ): string => Buffer.from(buffer).toString(encoding); diff --git a/packages/crypto/src/types.ts b/packages/crypto/src/types.ts index 78949b56af0..79dd050e2f5 100644 --- a/packages/crypto/src/types.ts +++ b/packages/crypto/src/types.ts @@ -15,14 +15,14 @@ export interface IScryptParams { dklen: number; } -export type Encoding = 'utf-8' | 'base64' | 'hex'; +export type BufferEncoding = 'utf-8' | 'base64' | 'hex'; export interface CryptoApi { - bufferFromString(string: string, encoding?: Encoding): Uint8Array; + bufferFromString(string: string, encoding?: BufferEncoding): Uint8Array; decrypt(password: string, keystore: Keystore): Promise; encrypt(password: string, data: T): Promise; keyFromPassword(password: string, saltBuffer: Uint8Array): Uint8Array; - stringFromBuffer(buffer: Uint8Array, encoding?: Encoding): string; + stringFromBuffer(buffer: Uint8Array, encoding?: BufferEncoding): string; randomBytes(length: number): Uint8Array; scrypt(params: IScryptParams): Uint8Array; keccak256(data: Uint8Array): Uint8Array; diff --git a/packages/fuel-gauge/package.json b/packages/fuel-gauge/package.json index b5932b0cec2..1a86e34407f 100644 --- a/packages/fuel-gauge/package.json +++ b/packages/fuel-gauge/package.json @@ -7,7 +7,9 @@ "scripts": { "pretest": "pnpm build:forc", "build:forc": "pnpm fuels build --deploy", - "type:check": "tsc --noEmit" + "type:check": "tsc --noEmit", + "test": "cd ../.. && pnpm run test:filter packages/fuel-gauge", + "test:update-fixtures": "UPDATE_FIXTURES=true pnpm run test" }, "license": "Apache-2.0", "dependencies": { diff --git a/packages/fuel-gauge/src/abi/abi-coder.test.ts b/packages/fuel-gauge/src/abi/abi-coder.test.ts index 08f6456d859..f299712f481 100644 --- a/packages/fuel-gauge/src/abi/abi-coder.test.ts +++ b/packages/fuel-gauge/src/abi/abi-coder.test.ts @@ -1,4 +1,4 @@ -import { bn, FuelError, getRandomB256 } from 'fuels'; +import { bn, ContractFactory, FuelError, getRandomB256 } from 'fuels'; import type { AssetId, BigNumberish, EvmAddress, RawSlice, WalletUnlocked } from 'fuels'; import { expectToThrowFuelError, launchTestNode } from 'fuels/test-utils'; @@ -61,7 +61,8 @@ describe('AbiCoder', () => { const { contracts, wallets } = launched; wallet = wallets[0]; - contract = contracts[0] as AbiContract; + contract = contracts[0]; + cleanup = launched.cleanup; }); @@ -100,7 +101,8 @@ describe('AbiCoder', () => { }, }; - const { waitForResult: waitForDeploy } = await AbiContractFactory.deploy(wallet, { + const factory = new ContractFactory(AbiContractFactory.bytecode, contract.interface, wallet); + const { waitForResult: waitForDeploy } = await factory.deploy({ configurableConstants: NEW_CONFIGURABLES, }); @@ -125,6 +127,68 @@ describe('AbiCoder', () => { }); }); + describe('attributes', () => { + it('should have storage read attribute', () => { + const fn = contract.interface.getFunction('attributes_storage_read'); + expect(fn.attributes).toEqual([{ name: 'storage', arguments: ['read'] }]); + }); + + it('should have storage write attribute', () => { + const fn = contract.interface.getFunction('attributes_storage_write'); + expect(fn.attributes).toEqual([{ name: 'storage', arguments: ['write'] }]); + }); + + it('should have storage read and write attribute', () => { + const fn = contract.interface.getFunction('attributes_storage_read_write'); + expect(fn.attributes).toEqual([{ name: 'storage', arguments: ['read', 'write'] }]); + }); + + it('should have payable attribute', () => { + const fn = contract.interface.getFunction('attributes_payable'); + expect(fn.attributes).toEqual([{ name: 'payable' }]); + }); + + it('should have test attribute', () => { + const fn = contract.interface.getFunction('attributes_test'); + expect(fn.attributes).toEqual([{ name: 'test' }]); + }); + + it('should have inline never attribute', () => { + const fn = contract.interface.getFunction('attributes_inline_never'); + expect(fn.attributes).toEqual([{ name: 'inline', arguments: 'never' }]); + }); + + it('should have inline always attribute', () => { + const fn = contract.interface.getFunction('attributes_inline_always'); + expect(fn.attributes).toEqual([{ name: 'inline', arguments: 'always' }]); + }); + + it('should have doc attribute', () => { + const fn = contract.interface.getFunction('attributes_doc_comment'); + expect(fn.attributes).toEqual([ + { name: 'doc-comment', arguments: [' This is a doc'] }, + { name: 'doc-comment', arguments: [' This is another doc comment'] }, + ]); + }); + }); + + describe('isReadOnly', () => { + it('should return true for a storage read function', () => { + const fn = contract.interface.getFunction('attributes_storage_read'); + expect(fn.isReadOnly()).toBe(true); + }); + + it('should return true for a function that does not use storage', () => { + const fn = contract.interface.getFunction('attributes_none'); + expect(fn.isReadOnly()).toBe(true); + }); + + it('should return false for a storage write function', () => { + const fn = contract.interface.getFunction('attributes_storage_write'); + expect(fn.isReadOnly()).toBe(false); + }); + }); + describe('types_u8', () => { it('should encode/decode just fine', async () => { const input = 8; @@ -156,7 +220,10 @@ describe('AbiCoder', () => { await expectToThrowFuelError( () => contract.functions.types_u8(input).call(), - new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid u8.') + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid u8 value - value is less than zero.', { + type: 'u8', + value: input.toString(), + }) ); }); @@ -165,7 +232,10 @@ describe('AbiCoder', () => { await expectToThrowFuelError( () => contract.functions.types_u8(input).call(), - new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid u8, too many bytes.') + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid u8 value - value exceeds maximum.', { + type: 'u8', + value: input.toString(), + }) ); }); }); @@ -199,7 +269,14 @@ describe('AbiCoder', () => { await expectToThrowFuelError( () => contract.functions.types_u16(input).call(), - new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid u16.') + new FuelError( + FuelError.CODES.ENCODE_ERROR, + 'Invalid u16 value - value is less than zero.', + { + type: 'u16', + value: input.toString(), + } + ) ); }); @@ -208,7 +285,10 @@ describe('AbiCoder', () => { await expectToThrowFuelError( () => contract.functions.types_u16(input).call(), - new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid u16, too many bytes.') + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid u16 value - value exceeds maximum.', { + type: 'u16', + value: input.toString(), + }) ); }); }); @@ -242,7 +322,14 @@ describe('AbiCoder', () => { await expectToThrowFuelError( () => contract.functions.types_u32(input).call(), - new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid u32.') + new FuelError( + FuelError.CODES.ENCODE_ERROR, + 'Invalid u32 value - value is less than zero.', + { + type: 'u32', + value: input.toString(), + } + ) ); }); @@ -251,7 +338,10 @@ describe('AbiCoder', () => { await expectToThrowFuelError( () => contract.functions.types_u32(input).call(), - new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid u32, too many bytes.') + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid u32 value - value exceeds maximum.', { + type: 'u32', + value: input.toString(), + }) ); }); }); @@ -288,7 +378,14 @@ describe('AbiCoder', () => { await expectToThrowFuelError( () => contract.functions.types_u64(input).call(), - new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid u64.') + new FuelError( + FuelError.CODES.ENCODE_ERROR, + 'Invalid u64 value - value is less than zero.', + { + type: 'u64', + value: input.toString(), + } + ) ); }); @@ -297,7 +394,10 @@ describe('AbiCoder', () => { await expectToThrowFuelError( () => contract.functions.types_u64(input).call(), - new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid u64.') + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid u64 value - value exceeds maximum.', { + type: 'u64', + value: input.toString(), + }) ); }); }); @@ -334,7 +434,14 @@ describe('AbiCoder', () => { await expectToThrowFuelError( () => contract.functions.types_u256(input).call(), - new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid u256.') + new FuelError( + FuelError.CODES.ENCODE_ERROR, + 'Invalid u256 value - value is less than zero.', + { + type: 'u256', + value: input.toString(), + } + ) ); }); @@ -343,7 +450,10 @@ describe('AbiCoder', () => { await expectToThrowFuelError( () => contract.functions.types_u256(input).call(), - new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid u256.') + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid u256 value - value exceeds maximum.', { + type: 'u256', + value: input.toString(), + }) ); }); }); @@ -420,7 +530,9 @@ describe('AbiCoder', () => { await expectToThrowFuelError( () => contract.functions.types_b256(input).call(), - new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid b256.') + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid b256 value - malformed hex value.', { + value: input, + }) ); }); @@ -429,7 +541,9 @@ describe('AbiCoder', () => { await expectToThrowFuelError( () => contract.functions.types_b256(input).call(), - new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid b256.') + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid b256 value - malformed hex value.', { + value: input, + }) ); }); @@ -438,7 +552,9 @@ describe('AbiCoder', () => { await expectToThrowFuelError( () => contract.functions.types_b256(input).call(), - new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid b256.') + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid b256 value - malformed hex value.', { + value: input, + }) ); }); }); @@ -472,7 +588,9 @@ describe('AbiCoder', () => { await expectToThrowFuelError( () => contract.functions.types_b512(input).call(), - new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid struct B512.') + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid b512 value - malformed hex value.', { + value: input, + }) ); }); @@ -481,7 +599,9 @@ describe('AbiCoder', () => { await expectToThrowFuelError( () => contract.functions.types_b512(input).call(), - new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid struct B512.') + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid b512 value - malformed hex value.', { + value: input, + }) ); }); @@ -490,7 +610,9 @@ describe('AbiCoder', () => { await expectToThrowFuelError( () => contract.functions.types_b512(input).call(), - new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid struct B512.') + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid b512 value - malformed hex value.', { + value: input, + }) ); }); }); @@ -566,7 +688,9 @@ describe('AbiCoder', () => { await expectToThrowFuelError( () => contract.functions.types_str(input).call(), - new FuelError(FuelError.CODES.ENCODE_ERROR, 'Value length mismatch during encode.') + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid string value - unexpected length.', { + value: input, + }) ); }); @@ -575,7 +699,9 @@ describe('AbiCoder', () => { await expectToThrowFuelError( () => contract.functions.types_str(input).call(), - new FuelError(FuelError.CODES.ENCODE_ERROR, 'Value length mismatch during encode.') + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid string value - unexpected length.', { + value: input, + }) ); }); }); @@ -698,7 +824,9 @@ describe('AbiCoder', () => { await expectToThrowFuelError( () => contract.functions.types_array(input).call(), - new FuelError(FuelError.CODES.ENCODE_ERROR, 'Types/values length mismatch.') + new FuelError(FuelError.CODES.ENCODE_ERROR, 'Invalid array value - unexpected length.', { + value: input, + }) ); }); }); @@ -987,9 +1115,9 @@ describe('AbiCoder', () => { expect(fn.name).toBe('types_struct_with_implicit_generics'); expect(fn.signature).toEqual( - 'types_struct_with_implicit_generics(s(a[b256;3],(b256,u8)))' + 'types_struct_with_implicit_generics(s(a[b256;3],(b256,u8)))' ); - expect(fn.selector).toEqual('0x0000000099d41855'); + expect(fn.selector).toEqual('0x0000000098941324'); expect(fn.selectorBytes).toEqual( new Uint8Array([ 0, 0, 0, 0, 0, 0, 0, 35, 116, 121, 112, 101, 115, 95, 115, 116, 114, 117, 99, 116, 95, @@ -1002,10 +1130,7 @@ describe('AbiCoder', () => { }); describe('types_struct_with_array', () => { - /** - * TODO: This is causing a generic to be left into the parsed format. - */ - it.skip('should encode/decode just fine', async () => { + it('should encode/decode just fine', async () => { // Inputs const inputB256: string = '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'; @@ -1238,9 +1363,6 @@ describe('AbiCoder', () => { .call(); await waitForResult(); - // const { value, logs } = await waitForResult(); - // expect(value).toStrictEqual(expected); - // expect(logs).toStrictEqual([expected]); }); it('should have function properties', () => { diff --git a/packages/fuel-gauge/src/abi/abi-gen.test.ts b/packages/fuel-gauge/src/abi/abi-gen.test.ts index e71c595953d..12750557b77 100644 --- a/packages/fuel-gauge/src/abi/abi-gen.test.ts +++ b/packages/fuel-gauge/src/abi/abi-gen.test.ts @@ -6,7 +6,7 @@ import { expectToThrowFuelError } from 'fuels/test-utils'; import { tmpdir } from 'os'; import { join } from 'path'; -import { AbiProjectsEnum, getAbiForcProject } from './utils'; +import { AbiProjectsEnum, autoUpdateFixture, getAbiForcProject } from './utils'; function generateTmpDir(fromDir?: string) { const dir = join(tmpdir(), 'fuels', randomUUID()); @@ -24,6 +24,8 @@ function generateTmpDir(fromDir?: string) { * @group node */ describe('AbiGen', () => { + beforeAll(() => {}); + test('Generates all files correctly', () => { const fixtureResultMap = new Map([ ['index', 'index.ts'], @@ -67,7 +69,9 @@ describe('AbiGen', () => { const expected = readFileSync(fixtureFile).toString(); const generated = readFileSync(join(output.path, filename)).toString(); - expect(generated).toEqual(expected); + autoUpdateFixture(fixtureFile, generated); + + expect(generated, `Generated file ${filename} does not match expected`).toEqual(expected); }); }); diff --git a/packages/fuel-gauge/src/abi/fixtures/common.txt b/packages/fuel-gauge/src/abi/fixtures/common.txt index 43cb6e6689e..d2f0bd72ea0 100644 --- a/packages/fuel-gauge/src/abi/fixtures/common.txt +++ b/packages/fuel-gauge/src/abi/fixtures/common.txt @@ -9,7 +9,7 @@ */ -import type { FunctionFragment, InvokeFunction } from 'fuels'; +import type { AbiCoderFunction, InvokeFunction } from 'fuels'; /** * Mimics Sway Enum. @@ -49,5 +49,5 @@ export type ProgramFunctionMapper = { }; export type InterfaceFunctionMapper = { - [K in keyof T]: FunctionFragment; + [K in keyof T]: AbiCoderFunction; }; \ No newline at end of file diff --git a/packages/fuel-gauge/src/abi/fixtures/contracts/contract-abi.txt b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-abi.txt index 8aae39e58b9..e721288abc0 100644 --- a/packages/fuel-gauge/src/abi/fixtures/contracts/contract-abi.txt +++ b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-abi.txt @@ -9,7 +9,9 @@ */ -export const abi = { +import { AbiSpecification } from 'fuels'; + +export const abi: AbiSpecification = { "programType": "contract", "specVersion": "1", "encodingVersion": "1", @@ -1674,6 +1676,119 @@ export const abi = { } ], "functions": [ + { + "inputs": [], + "name": "attributes_doc_comment", + "output": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d", + "attributes": [ + { + "name": "doc-comment", + "arguments": [ + " This is a doc" + ] + }, + { + "name": "doc-comment", + "arguments": [ + " This is another doc comment" + ] + } + ] + }, + { + "inputs": [], + "name": "attributes_inline_always", + "output": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d", + "attributes": [ + { + "name": "inline", + "arguments": [ + "always" + ] + } + ] + }, + { + "inputs": [], + "name": "attributes_inline_never", + "output": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d", + "attributes": [ + { + "name": "inline", + "arguments": [ + "never" + ] + } + ] + }, + { + "inputs": [], + "name": "attributes_none", + "output": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d", + "attributes": null + }, + { + "inputs": [], + "name": "attributes_payable", + "output": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d", + "attributes": [ + { + "name": "payable", + "arguments": [] + } + ] + }, + { + "inputs": [], + "name": "attributes_storage_read", + "output": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d", + "attributes": [ + { + "name": "storage", + "arguments": [ + "read" + ] + } + ] + }, + { + "inputs": [], + "name": "attributes_storage_read_write", + "output": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d", + "attributes": [ + { + "name": "storage", + "arguments": [ + "read", + "write" + ] + } + ] + }, + { + "inputs": [], + "name": "attributes_storage_write", + "output": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d", + "attributes": [ + { + "name": "storage", + "arguments": [ + "write" + ] + } + ] + }, + { + "inputs": [], + "name": "attributes_test", + "output": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d", + "attributes": [ + { + "name": "test", + "arguments": [] + } + ] + }, { "inputs": [], "name": "configurables", @@ -2782,27 +2897,27 @@ export const abi = { { "name": "U8_VALUE", "concreteTypeId": "c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b", - "offset": 119320 + "offset": 120208 }, { "name": "BOOL_VALUE", "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903", - "offset": 119288 + "offset": 120176 }, { "name": "B256_VALUE", "concreteTypeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b", - "offset": 119256 + "offset": 120144 }, { "name": "OPTION_U8_VALUE", "concreteTypeId": "2da102c46c7263beeed95818cd7bee801716ba8303dddafdcd0f6c9efda4a0f1", - "offset": 119304 + "offset": 120192 }, { "name": "GENERIC_STRUCT_VALUE", "concreteTypeId": "08dbec793087c5686c1a493513b158a999bb653126ee51151dfa85fa683edce5", - "offset": 119296 + "offset": 120184 } ] -}; \ No newline at end of file +}; diff --git a/packages/fuel-gauge/src/abi/fixtures/contracts/contract-bytecode.txt b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-bytecode.txt index 3739f9803fe..633e20d079f 100644 --- a/packages/fuel-gauge/src/abi/fixtures/contracts/contract-bytecode.txt +++ b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-bytecode.txt @@ -11,4 +11,4 @@ import { decompressBytecode } from "fuels"; -export const bytecode = decompressBytecode("H4sIAAAAAAAAA9x9eXxV1b3vCUlIQJQDSSCG6TAaEDFKgDCoJ7JjTiAxJ5BAFEJCAYkMikdQrANxQKlDxRmtA1oHqrZGBQVrW3qHV9u+9trevtbeDpfOtpJeK7XX3vZe33f9hn32Xmeffc59995/Hp8Pn5y199rrt4bf+q3fvKrer4lsj0SKIuZfwesH+O933un6+GhB9OOPI/dEIktS71bVRN976Wjyl5FY8lg8EvtodqTzL8cGJf9yrGh7ZP6v8T4p7wvwPuZ/v+AMvO+U9yV4P9F6fzne98j7IXg/33r/K7zf5mm/yf9+4WL0P1J1PIm+vlHZtfiD+6L1kaNVTk8klRiUjDaU91X9Nmr1eeHFVY1v4/3kY9GlB/u6B8qvSzmPHI02HoynmiOl1Q1T9PtElu+X8Pczevn7ipaU88pH3u/dcmJtp6lj2qj6VcxuZ7FpJ7n0jRi+i1Y3leO7R96SdqLcjpQTk99mWEWfTMUjJ+Pvtan4nKPRxQcjVLcedRMPUn/SbT24M91W0dGq38bQh4yx9FUtfjvSdeKD9VctPhrB/N1v5i8N95x3GG7JFwG3DH/fTMXPe9uCu8eCuy8PuJ8QuBsE7gN+uPVxh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2S+tKta2lkq9Z0nz5+n1ltkjuwTs6W+s6UdVfKcKqlXpZQzU+o3U83PyMwxy27fsuXQQ5/r7/tOw3+vufSjh/aVl259c+jCT+9uXZK4/o/fvV3v02Ny8OolNd3MP63v/H+JfBLfINIBAA=="); \ No newline at end of file +export const bytecode = decompressBytecode("H4sIAAAAAAAAA9y9CXyV1Zk/foEkBBS5EJaQsAQIEBA17LjVG3ljbkxibgQkCCFhFRQFr4igUqOg4o4sFpcqtlbRzhIrKm4ts7Q/pzNtnZl2amemM3TaztipdFymM/bfzs//9zzLve/73Pe+93Y68/l/Pn8+Hz65513Oc95znv15znOqPqiPbYvFSmLuX7/X3+G/30t1fXqiX/zTT2MPx2KXpt+r6o3//A9PpH4Sq0mdTMRqPpkT6/z1yf6pX58s2RZb8GXcPyL3++F+jbn/Ee4flfsDcX9i8P7CubjfJ/cH4f655v4LuH/C139z8P655Rh/rOr9FMb6wntdiz76XLwhdqLK64mlk/1T8cYRvVU/i5sxnzuhqukd3J90NN5yrLf71Iilae/Bd+NNxxLp1lh5XWOtvp/M8/5Qfn96nN8fOSntPZvwv59pJ5cTDNdH1U9rbD/lrp9Uy/E+vBevax6B9x48Kf3EuR9pJycdZlgli9OJ2Cj8XZJOzInFFx2L0bMNeDZ5X717JtvXfTom9FVyoupnNRhDzrc0Vi16J9b18Ufd2xediGH+Drv5y8I9V75x4CTArcTfyenE+RZuysDtKQLuNIHbI3AfDcK9oE7g3gm4o/H3rnTigg8M3K0G7r4i4A4SuKsF7mNBuBceF7ivAu5Q/D2eTnxmo4F7xMDtKwx34c8F7hqB+3gQ7kWVAvfHgDscf3+STlz0toF7wsB9pwi43xK4awXuE0G4c2R9y9bwPJetBV6dMHBPGrgfFAH3DwXuOoH7+SDcubR2gPcg4I7D34fSiXk1Qbj3x4Jw748XAfdhgbte4D4ZhDvvHYH7OuNz2RvpxPxeA7fGwC2CjhbeIHA3CNyngnAXEG0C3j8zXpX9Szqx4BMD19DR/UXQ0cKlAvcqgXskC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fFzetT6PKHXP6HXP6HXP6H1eEKvexyeOz7eqUdtr8f0fR+T8ZfzmL7Xo/pej2r7PKL3P6L3P6LlP6rlHHhPj3rfARnXOQe0/gcq5PgAmOT4eLce9X3vR3YvPt6mRxmXOZ/X+n1+nx61Pp97SY/63p+Ly/E+7ff74NHio/b/vf161Prcy4dYzj0y33LuQcZwOt6t9bhb369b3/9qLX+LvteWWsfapUdt/yt0HDTpe2zS+iCBIB8v0fHSqO3WiMyT/LuM+5xNWu4mMNrTcZWO1wat/4plel7rcV6XHM/VflzyghzP1nZeou17to7HRQ/LcanWd5HIp5wlev9i7aeFIp9yTtX3PxNINjrO0/eZDe8CHWdq+dO1HtV6X1zkUU659lORvu8YPRbo8wrkvth7Mr5i78v7x46rVeg3Kvd+rXL0demX2L/L82P9el+/ytt+NQsuVvl59qtyvKhPv8shdoHKywv09wu0vAuln2PajrEl0l6xJdIfsdP0+tNUfp8m/R5bLO0QWyTjJ7bogBwXvi3HBSrnF8h4jM3X950v/Rk7U6+T7sdR+iFWqydO1faYr+9ZLfIgNkvf7xSRC7FTtD1rtDzKjMBH6b/YHBkXsbkq9+doOXP0feccluM0bddpR/SoVp5p2r5TZZ7Hpmr5lTKeYmUyPmJlWv6Uo8vu2rLlrUP37Ol9ZuV/r/nIh98aqizf+rv+yz61t2Vx6uZfff0uR7HIz8GnV7Q6xp+j//wPwfAMnJjVAQA="); \ No newline at end of file diff --git a/packages/fuel-gauge/src/abi/fixtures/contracts/contract-types.txt b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-types.txt index e59afc5265d..8f05fe291b2 100644 --- a/packages/fuel-gauge/src/abi/fixtures/contracts/contract-types.txt +++ b/packages/fuel-gauge/src/abi/fixtures/contracts/contract-types.txt @@ -78,6 +78,42 @@ export type StructWithVectorOutput = { a: number, b: number[] }; export interface AbiContractTypes { functions: { + attributes_doc_comment: { + inputs: []; + output: void; + }; + attributes_inline_always: { + inputs: []; + output: void; + }; + attributes_inline_never: { + inputs: []; + output: void; + }; + attributes_none: { + inputs: []; + output: void; + }; + attributes_payable: { + inputs: []; + output: void; + }; + attributes_storage_read: { + inputs: []; + output: void; + }; + attributes_storage_read_write: { + inputs: []; + output: void; + }; + attributes_storage_write: { + inputs: []; + output: void; + }; + attributes_test: { + inputs: []; + output: void; + }; configurables: { inputs: []; output: ConfigurablesOutput; diff --git a/packages/fuel-gauge/src/abi/fixtures/contracts/contract.txt b/packages/fuel-gauge/src/abi/fixtures/contracts/contract.txt index d3736139668..5c2883ea841 100644 --- a/packages/fuel-gauge/src/abi/fixtures/contracts/contract.txt +++ b/packages/fuel-gauge/src/abi/fixtures/contracts/contract.txt @@ -9,7 +9,7 @@ */ -import { Contract, Interface } from "fuels"; +import { Contract, AbiCoder } from "fuels"; import type { Address, Account, Provider } from 'fuels'; import type { AbiContractTypes as Types } from './AbiContractTypes'; import type { InterfaceFunctionMapper, ProgramFunctionMapper } from '../common'; @@ -19,7 +19,7 @@ export * from './AbiContractTypes'; export type AbiContractConfigurables = Types['configurables']; -export class AbiContractInterface extends Interface { +export class AbiContractAbiCoder extends AbiCoder { declare functions: InterfaceFunctionMapper; constructor() { @@ -28,7 +28,7 @@ export class AbiContractInterface extends Interface { } export class AbiContract extends Contract { - declare interface: AbiContractInterface; + declare interface: AbiContractAbiCoder; declare functions: ProgramFunctionMapper; public static readonly abi = abi; diff --git a/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-abi.txt b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-abi.txt index c9ecda3ce96..ee9735b7bd6 100644 --- a/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-abi.txt +++ b/packages/fuel-gauge/src/abi/fixtures/predicates/predicate-abi.txt @@ -9,7 +9,9 @@ */ -export const abi = { +import { AbiSpecification } from 'fuels'; + +export const abi: AbiSpecification = { "programType": "predicate", "specVersion": "1", "encodingVersion": "1", @@ -280,4 +282,4 @@ export const abi = { "offset": 1904 } ] -}; \ No newline at end of file +}; diff --git a/packages/fuel-gauge/src/abi/fixtures/scripts/script-abi.txt b/packages/fuel-gauge/src/abi/fixtures/scripts/script-abi.txt index 713d91f674f..d943129fd58 100644 --- a/packages/fuel-gauge/src/abi/fixtures/scripts/script-abi.txt +++ b/packages/fuel-gauge/src/abi/fixtures/scripts/script-abi.txt @@ -9,7 +9,9 @@ */ -export const abi = { +import { AbiSpecification } from 'fuels'; + +export const abi: AbiSpecification = { "programType": "script", "specVersion": "1", "encodingVersion": "1", @@ -280,4 +282,4 @@ export const abi = { "offset": 2328 } ] -}; \ No newline at end of file +}; diff --git a/packages/fuel-gauge/src/abi/utils.ts b/packages/fuel-gauge/src/abi/utils.ts index cc08b4ff954..00e44dbf3ef 100644 --- a/packages/fuel-gauge/src/abi/utils.ts +++ b/packages/fuel-gauge/src/abi/utils.ts @@ -1,4 +1,5 @@ import { getForcProject } from '@fuel-ts/utils/test-utils'; +import { writeFileSync } from 'fs'; import { join } from 'path'; export enum AbiProjectsEnum { @@ -17,3 +18,15 @@ export const getAbiForcProject = (project: AbiProjectsEnum) => { }); return result; }; + +export function autoUpdateFixture(path: string, contents: string) { + if (process.env.UPDATE_FIXTURES === 'true') { + if (!/fixtures/.test(path)) { + throw new Error(`This path may no be a fixture: ${path}`); + } + const { log } = console; + log('Updated fixture', path); + writeFileSync(path, contents); + } + return contents; +} diff --git a/packages/fuel-gauge/src/blob-deploy.test.ts b/packages/fuel-gauge/src/blob-deploy.test.ts index 83ce551c2a3..1cdf50d6722 100644 --- a/packages/fuel-gauge/src/blob-deploy.test.ts +++ b/packages/fuel-gauge/src/blob-deploy.test.ts @@ -22,9 +22,10 @@ describe('deploying blobs', () => { ): Record { const configurables: Record = {}; - Object.entries(program.interface.configurables).forEach(([key, { offset, concreteTypeId }]) => { + Object.entries(program.interface.configurables).forEach(([key, { offset }]) => { const data = program.bytes.slice(offset); - configurables[key] = program.interface.decodeType(concreteTypeId, data)[0]; + const coder = program.interface.getConfigurable(key); + configurables[key] = coder.decode(data); }); return configurables; @@ -236,7 +237,7 @@ describe('deploying blobs', () => { const predicate = new Predicate({ data: [configurable.FEE, configurable.ADDRESS], bytecode: loaderPredicate.bytes, - abi: loaderPredicate.interface.jsonAbi, + abi: loaderPredicate.interface.specification, provider, configurableConstants: configurable, }); diff --git a/packages/fuel-gauge/src/contract-factory.test.ts b/packages/fuel-gauge/src/contract-factory.test.ts index b42612b9115..2f590b2f8b0 100644 --- a/packages/fuel-gauge/src/contract-factory.test.ts +++ b/packages/fuel-gauge/src/contract-factory.test.ts @@ -1,7 +1,7 @@ import type { Account, TransactionResult } from '@fuel-ts/account'; import { FuelError, ErrorCode } from '@fuel-ts/errors'; import { expectToThrowFuelError } from '@fuel-ts/errors/test-utils'; -import { BN, bn, toHex, Interface, ContractFactory, arrayify, concat } from 'fuels'; +import { BN, bn, toHex, AbiCoder, ContractFactory, arrayify, concat } from 'fuels'; import { launchTestNode } from 'fuels/test-utils'; import { @@ -25,7 +25,7 @@ describe('Contract Factory', () => { using contract = await launchTestContract({ factory: StorageTestContractFactory, }); - expect(contract.interface).toBeInstanceOf(Interface); + expect(contract.interface).toBeInstanceOf(AbiCoder); const { waitForResult } = await contract.functions.initialize_counter(41).call(); const { value: valueInitial } = await waitForResult(); @@ -46,7 +46,7 @@ describe('Contract Factory', () => { factory: StorageTestContractFactory, }); - expect(contract.interface).toBeInstanceOf(Interface); + expect(contract.interface).toBeInstanceOf(AbiCoder); const call1 = await contract.functions.initialize_counter(100).call(); await call1.waitForResult(); diff --git a/packages/fuel-gauge/src/mapped-error-messages.test.ts b/packages/fuel-gauge/src/mapped-error-messages.test.ts index 82c88a49e51..498593c6b50 100644 --- a/packages/fuel-gauge/src/mapped-error-messages.test.ts +++ b/packages/fuel-gauge/src/mapped-error-messages.test.ts @@ -15,7 +15,11 @@ describe('mapped error messages', () => { const emptyWallet = Wallet.generate({ provider: contract.provider }); - const emptyWalletContract = new Contract(contract.id, contract.interface.jsonAbi, emptyWallet); + const emptyWalletContract = new Contract( + contract.id, + contract.interface.specification, + emptyWallet + ); await expectToThrowFuelError(() => emptyWalletContract.functions.return_void().call(), { code: ErrorCode.NOT_ENOUGH_FUNDS, diff --git a/packages/fuel-gauge/src/min-gas.test.ts b/packages/fuel-gauge/src/min-gas.test.ts index 19d08ccec08..b5678a9cf92 100644 --- a/packages/fuel-gauge/src/min-gas.test.ts +++ b/packages/fuel-gauge/src/min-gas.test.ts @@ -5,9 +5,9 @@ import { Address, hexlify, getGasUsedFromReceipts, - BigNumberCoder, ContractFactory, GAS_USED_MODIFIER, + encoding, } from 'fuels'; import { launchTestNode } from 'fuels/test-utils'; @@ -83,7 +83,7 @@ describe('Minimum gas tests', () => { const request = new ScriptTransactionRequest({ script: ComplexScript.bytecode, - scriptData: hexlify(new BigNumberCoder('u64').encode(bn(2000))), + scriptData: hexlify(encoding.v1.u64.encode(bn(2000))), }); request.addCoinOutput(Address.fromRandom(), bn(100), await provider.getBaseAssetId()); @@ -187,7 +187,7 @@ describe('Minimum gas tests', () => { */ const request = new ScriptTransactionRequest({ script: ComplexScript.bytecode, - scriptData: hexlify(new BigNumberCoder('u64').encode(bn(2000))), + scriptData: hexlify(encoding.v1.u64.encode(bn(2000))), }); // add predicate transfer diff --git a/packages/fuel-gauge/src/predicate/predicate-duplication.test.ts b/packages/fuel-gauge/src/predicate/predicate-duplication.test.ts index 07cd15a05d5..f51f30f01fd 100644 --- a/packages/fuel-gauge/src/predicate/predicate-duplication.test.ts +++ b/packages/fuel-gauge/src/predicate/predicate-duplication.test.ts @@ -34,7 +34,7 @@ describe('Predicate.fromInstance', () => { const newPredicate: PredicateWithConfigurable = basePredicate.toNewInstance(); expect(newPredicate.predicateData).toEqual(basePredicate.predicateData); - expect(newPredicate.interface).toEqual(basePredicate.interface); + expect(newPredicate.interface.specification).toEqual(basePredicate.interface.specification); expect(newPredicate.provider).toEqual(basePredicate.provider); expect(newPredicate.bytes).toEqual(basePredicate.bytes); }); @@ -56,7 +56,7 @@ describe('Predicate.fromInstance', () => { const newPredicate: PredicateWithConfigurable = basePredicate.toNewInstance({ data }); expect(newPredicate.predicateData).toEqual(data); - expect(newPredicate.interface).toEqual(basePredicate.interface); + expect(newPredicate.interface.specification).toEqual(basePredicate.interface.specification); expect(newPredicate.provider).toEqual(basePredicate.provider); expect(newPredicate.bytes).toEqual(basePredicate.bytes); expect(newPredicate.predicateData).not.toEqual(basePredicate.predicateData); @@ -81,7 +81,7 @@ describe('Predicate.fromInstance', () => { }); expect(newPredicate.predicateData).toEqual(basePredicate.predicateData); - expect(newPredicate.interface).toEqual(basePredicate.interface); + expect(newPredicate.interface.specification).toEqual(basePredicate.interface.specification); expect(newPredicate.provider).toEqual(basePredicate.provider); expect(newPredicate.bytes).toEqual( new PredicateWithConfigurable({ @@ -116,7 +116,7 @@ describe('Predicate.fromInstance', () => { }); expect(newPredicate.predicateData).toEqual(data); - expect(newPredicate.interface).toEqual(basePredicate.interface); + expect(newPredicate.interface.specification).toEqual(basePredicate.interface.specification); expect(newPredicate.provider).toEqual(basePredicate.provider); expect(newPredicate.bytes).toEqual( new PredicateWithConfigurable({ diff --git a/packages/fuel-gauge/src/token-test-contract.test.ts b/packages/fuel-gauge/src/token-test-contract.test.ts index 4baef1dd0ef..ca68879aad8 100644 --- a/packages/fuel-gauge/src/token-test-contract.test.ts +++ b/packages/fuel-gauge/src/token-test-contract.test.ts @@ -199,7 +199,9 @@ describe('TokenTestContract', () => { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore () => token.functions.transfer_to_address(addressParameter, assetId, 50).call(), - new FuelError(ErrorCode.ENCODE_ERROR, 'Invalid b256.') + new FuelError(ErrorCode.ENCODE_ERROR, 'Invalid b256 value - malformed hex value.', { + value: userWallet.address, + }) ); }); }); diff --git a/packages/fuel-gauge/test/fixtures/forc-projects/abi-contract/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/abi-contract/src/main.sw index dcce801f68d..1b1679a2562 100644 --- a/packages/fuel-gauge/test/fixtures/forc-projects/abi-contract/src/main.sw +++ b/packages/fuel-gauge/test/fixtures/forc-projects/abi-contract/src/main.sw @@ -26,6 +26,23 @@ fn divide(numerator: u64, denominator: u64) -> Result { abi AbiContract { fn configurables() -> Configurables; + fn attributes_none() -> (); + #[storage(read)] + fn attributes_storage_read() -> (); + #[storage(write)] + fn attributes_storage_write() -> (); + #[storage(read, write)] + fn attributes_storage_read_write() -> (); + #[payable] + fn attributes_payable() -> (); + #[test] + fn attributes_test() -> (); + #[inline(never)] + fn attributes_inline_never() -> (); + #[inline(always)] + fn attributes_inline_always() -> (); + fn attributes_doc_comment() -> (); + fn types_u8(x: u8) -> u8; fn types_u16(x: u16) -> u16; fn types_u32(x: u32) -> u32; @@ -145,6 +162,51 @@ impl AbiContract for Contract { } } + fn attributes_none() -> () { + () + } + + #[storage(read)] + fn attributes_storage_read() -> () { + () + } + + #[storage(write)] + fn attributes_storage_write() -> () { + () + } + + #[storage(read, write)] + fn attributes_storage_read_write() -> () { + () + } + + #[payable] + fn attributes_payable() -> () { + () + } + + #[test] + fn attributes_test() -> () { + () + } + + #[inline(never)] + fn attributes_inline_never() -> () { + () + } + + #[inline(always)] + fn attributes_inline_always() -> () { + () + } + + /// This is a doc + /// This is another doc comment + fn attributes_doc_comment() -> () { + () + } + fn types_u8(x: u8) -> u8 { assert_eq(x, 8); diff --git a/packages/fuels/package.json b/packages/fuels/package.json index 43104abf4ee..53401ed192e 100644 --- a/packages/fuels/package.json +++ b/packages/fuels/package.json @@ -63,7 +63,6 @@ "license": "Apache-2.0", "dependencies": { "@fuel-ts/abi": "workspace:*", - "@fuel-ts/abi-coder": "workspace:*", "@fuel-ts/account": "workspace:*", "@fuel-ts/address": "workspace:*", "@fuel-ts/contract": "workspace:*", diff --git a/packages/fuels/src/cli/commands/deploy/deployPredicates.ts b/packages/fuels/src/cli/commands/deploy/deployPredicates.ts index b3375d85e42..8678b3269cd 100644 --- a/packages/fuels/src/cli/commands/deploy/deployPredicates.ts +++ b/packages/fuels/src/cli/commands/deploy/deployPredicates.ts @@ -30,7 +30,7 @@ export async function deployPredicates(config: FuelsConfig) { const predicate = new Predicate({ abi, bytecode, provider: wallet.provider }); const { bytes: loaderBytecode, - interface: { jsonAbi }, + interface: { specification }, } = await (await predicate.deploy(wallet)).waitForResult(); const predicateRoot = getPredicateRoot(loaderBytecode); @@ -41,7 +41,7 @@ export async function deployPredicates(config: FuelsConfig) { path: predicatePath, predicateRoot, loaderBytecode, - abi: jsonAbi, + abi: specification, }); } diff --git a/packages/fuels/src/cli/commands/deploy/deployScripts.ts b/packages/fuels/src/cli/commands/deploy/deployScripts.ts index 557536d5987..94e1571e57e 100644 --- a/packages/fuels/src/cli/commands/deploy/deployScripts.ts +++ b/packages/fuels/src/cli/commands/deploy/deployScripts.ts @@ -31,7 +31,7 @@ export async function deployScripts(config: FuelsConfig) { const script = new Script(bytecode, abi, wallet); const { bytes: loaderBytecode, - interface: { jsonAbi }, + interface: { specification }, } = await (await script.deploy(wallet)).waitForResult(); debug(`Script deployed: ${projectName}`); @@ -39,7 +39,7 @@ export async function deployScripts(config: FuelsConfig) { scripts.push({ path: scriptPath, loaderBytecode, - abi: jsonAbi, + abi: specification, }); } diff --git a/packages/fuels/src/cli/types.ts b/packages/fuels/src/cli/types.ts index e9d641ba83e..8b005e8ac0b 100644 --- a/packages/fuels/src/cli/types.ts +++ b/packages/fuels/src/cli/types.ts @@ -1,4 +1,4 @@ -import type { JsonAbi } from '@fuel-ts/abi-coder'; +import type { AbiSpecification } from '@fuel-ts/abi'; import type { DeployContractOptions } from '@fuel-ts/contract'; export enum Commands { @@ -49,7 +49,7 @@ export type DeployedContract = { export type DeployedScript = { path: string; loaderBytecode: Uint8Array; - abi: JsonAbi; + abi: AbiSpecification; }; export type DeployedPredicate = DeployedScript & { diff --git a/packages/fuels/src/index.test.ts b/packages/fuels/src/index.test.ts index 5528e63af3c..a66158a9657 100644 --- a/packages/fuels/src/index.test.ts +++ b/packages/fuels/src/index.test.ts @@ -8,7 +8,8 @@ describe('index.js', () => { expect(fuels.hexlify).toBeTruthy(); expect(fuels.arrayify).toBeTruthy(); expect(fuels.concat).toBeTruthy(); - expect(fuels.Interface).toBeTruthy(); + + expect(fuels.AbiCoder).toBeTruthy(); expect(fuels.Address).toBeTruthy(); expect(fuels.FuelError).toBeTruthy(); expect(fuels.Contract).toBeTruthy(); @@ -19,6 +20,5 @@ describe('index.js', () => { expect(fuels.TransactionType).toBeTruthy(); expect(fuels.Script).toBeTruthy(); expect(fuels.FunctionInvocationScope).toBeTruthy(); - expect(fuels.Src14OwnedProxy).toBeTruthy(); }); }); diff --git a/packages/fuels/src/index.ts b/packages/fuels/src/index.ts index 6cf58959170..5a8a31fd1ab 100644 --- a/packages/fuels/src/index.ts +++ b/packages/fuels/src/index.ts @@ -1,6 +1,6 @@ export { Script } from '@fuel-ts/script'; export * from './cli/index'; -export * from '@fuel-ts/abi-coder'; +export * from '@fuel-ts/abi'; export * from '@fuel-ts/address'; export * from '@fuel-ts/address/configs'; export * from '@fuel-ts/contract'; diff --git a/packages/fuels/test/features/deploy.test.ts b/packages/fuels/test/features/deploy.test.ts index c40dec080a1..1f9caa1ea20 100644 --- a/packages/fuels/test/features/deploy.test.ts +++ b/packages/fuels/test/features/deploy.test.ts @@ -1,4 +1,4 @@ -import type { JsonAbi } from '@fuel-ts/abi-coder'; +import type { AbiSpecification } from '@fuel-ts/abi'; import type { Account } from '@fuel-ts/account'; import { Contract } from '@fuel-ts/program'; import { exec } from 'child_process'; @@ -82,7 +82,7 @@ describe('deploy', { timeout: 180000 }, () => { /** * Executes the target contract and returns the values of the functions for proxy deploys. */ - async function executeTargetContract(contractId: string, abi: JsonAbi, wallet: Account) { + async function executeTargetContract(contractId: string, abi: AbiSpecification, wallet: Account) { const targetContract = new Contract(contractId, abi, wallet); const { value: getCountValue } = await targetContract.functions.get_value().get(); diff --git a/packages/program/package.json b/packages/program/package.json index bac64bd1b55..573d029bc99 100644 --- a/packages/program/package.json +++ b/packages/program/package.json @@ -26,7 +26,7 @@ "license": "Apache-2.0", "dependencies": { "ramda": "0.30.1", - "@fuel-ts/abi-coder": "workspace:*", + "@fuel-ts/abi": "workspace:*", "@fuel-ts/account": "workspace:*", "@fuel-ts/address": "workspace:*", "@fuel-ts/errors": "workspace:*", diff --git a/packages/program/src/contract-call-script.ts b/packages/program/src/contract-call-script.ts index f43811fc8f7..0b22bcfcf9d 100644 --- a/packages/program/src/contract-call-script.ts +++ b/packages/program/src/contract-call-script.ts @@ -1,11 +1,5 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { - WORD_SIZE, - B256Coder, - ASSET_ID_LEN, - BigNumberCoder, - CONTRACT_ID_LEN, -} from '@fuel-ts/abi-coder'; +import { WORD_SIZE, ASSET_ID_LEN, CONTRACT_ID_LEN, encoding } from '@fuel-ts/abi'; import type { CallResult, TransactionResultCallReceipt, @@ -126,7 +120,7 @@ const scriptResultDecoder = (contractId: Address) => (result: ScriptResult) => { return []; } if (receipt.type === ReceiptType.Return) { - return [new BigNumberCoder('u64').encode((receipt as TransactionResultReturnReceipt).val)]; + return [encoding.v1.u64.encode((receipt as TransactionResultReturnReceipt).val)]; } if (receipt.type === ReceiptType.ReturnData) { const encodedScriptReturn = arrayify(receipt.data); @@ -200,15 +194,15 @@ export const getContractCallScript = ( let gasForwardedOffset = 0; // 1. Amount - scriptData.push(new BigNumberCoder('u64').encode(call.amount || 0)); + scriptData.push(encoding.v1.u64.encode(call.amount || 0)); // 2. Asset ID - scriptData.push(new B256Coder().encode(call.assetId?.toString() || ZeroBytes32)); + scriptData.push(encoding.v1.b256.encode(call.assetId?.toString() || ZeroBytes32)); // 3. Contract ID scriptData.push(call.contractId.toBytes()); // 4. Function selector offset - scriptData.push(new BigNumberCoder('u64').encode(encodedSelectorOffset)); + scriptData.push(encoding.v1.u64.encode(encodedSelectorOffset)); // 5. Encoded argument offset - scriptData.push(new BigNumberCoder('u64').encode(encodedArgsOffset)); + scriptData.push(encoding.v1.u64.encode(encodedArgsOffset)); // 6. Encoded function selector scriptData.push(call.fnSelectorBytes); // 7. Encoded arguments @@ -216,7 +210,7 @@ export const getContractCallScript = ( // 8. Gas to be forwarded if (call.gas) { - scriptData.push(new BigNumberCoder('u64').encode(call.gas)); + scriptData.push(encoding.v1.u64.encode(call.gas)); gasForwardedOffset = encodedArgsOffset + encodedArgs.byteLength; } diff --git a/packages/program/src/contract.test.ts b/packages/program/src/contract.test.ts index a99ab1dc60a..8852ff272ed 100644 --- a/packages/program/src/contract.test.ts +++ b/packages/program/src/contract.test.ts @@ -1,11 +1,11 @@ -import type { JsonAbi } from '@fuel-ts/abi-coder'; +import type { AbiSpecification } from '@fuel-ts/abi'; import { Account } from '@fuel-ts/account'; import { setupTestProviderAndWallets } from '@fuel-ts/account/test-utils'; import Contract from './contract'; const CONTRACT_ID = '0x0101010101010101010101010101010101010101010101010101010101010101'; -const ABI: JsonAbi = { +const ABI: AbiSpecification = { concreteTypes: [ { concreteTypeId: 'asdf', diff --git a/packages/program/src/contract.ts b/packages/program/src/contract.ts index 3193944fc04..267fa849af8 100644 --- a/packages/program/src/contract.ts +++ b/packages/program/src/contract.ts @@ -1,5 +1,5 @@ -import type { FunctionFragment, JsonAbi } from '@fuel-ts/abi-coder'; -import { Interface } from '@fuel-ts/abi-coder'; +import type { AbiSpecification, AbiCoderFunction } from '@fuel-ts/abi'; +import { AbiCoder } from '@fuel-ts/abi'; import type { Account, Provider } from '@fuel-ts/account'; import { Address } from '@fuel-ts/address'; import type { BytesLike } from '@fuel-ts/utils'; @@ -25,7 +25,7 @@ export default class Contract implements AbstractContract { /** * The contract's ABI interface. */ - interface!: Interface; + interface!: AbiCoder; /** * The account associated with the contract, if available. @@ -46,10 +46,10 @@ export default class Contract implements AbstractContract { */ constructor( id: string | Address, - abi: JsonAbi | Interface, + abi: AbiSpecification | AbiCoder, accountOrProvider: Account | Provider ) { - this.interface = abi instanceof Interface ? abi : new Interface(abi); + this.interface = abi instanceof AbiCoder ? abi : AbiCoder.fromAbi(abi); this.id = Address.fromAddressOrString(id); /** @@ -88,7 +88,7 @@ export default class Contract implements AbstractContract { * @param func - The function fragment to build a scope for. * @returns A function that creates a FunctionInvocationScope. */ - buildFunction(func: FunctionFragment) { + buildFunction(func: AbiCoderFunction) { return (() => { const funcInvocationScopeCreator = (...args: Array) => new FunctionInvocationScope(this, func, args); diff --git a/packages/program/src/functions/base-invocation-scope.ts b/packages/program/src/functions/base-invocation-scope.ts index 118ad9944b2..93ed0ccc6d4 100644 --- a/packages/program/src/functions/base-invocation-scope.ts +++ b/packages/program/src/functions/base-invocation-scope.ts @@ -1,6 +1,6 @@ /* eslint-disable no-param-reassign */ /* eslint-disable @typescript-eslint/no-explicit-any */ -import type { InputValue, JsonAbi } from '@fuel-ts/abi-coder'; +import type { AbiSpecification, InputValue } from '@fuel-ts/abi'; import type { Provider, CoinQuantity, @@ -66,7 +66,7 @@ export class BaseInvocationScope { protected requiredCoins: CoinQuantity[] = []; protected isMultiCall: boolean = false; protected hasCallParamsGasLimit: boolean = false; // flag to check if any of the callParams has gasLimit set - protected externalAbis: Record = {}; + protected externalAbis: Record = {}; private addSignersCallback?: ( txRequest: ScriptTransactionRequest ) => Promise; @@ -298,7 +298,7 @@ export class BaseInvocationScope { addContracts(contracts: Array) { contracts.forEach((contract) => { this.transactionRequest.addContractInputAndOutput(contract.id); - this.externalAbis[contract.id.toB256()] = contract.interface.jsonAbi; + this.externalAbis[contract.id.toB256()] = contract.interface.specification; }); return this; } diff --git a/packages/program/src/functions/invocation-scope.ts b/packages/program/src/functions/invocation-scope.ts index 49556956052..4f7488eba14 100644 --- a/packages/program/src/functions/invocation-scope.ts +++ b/packages/program/src/functions/invocation-scope.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import type { FunctionFragment } from '@fuel-ts/abi-coder'; +import type { AbiCoderFunction } from '@fuel-ts/abi'; import type { CoinQuantity } from '@fuel-ts/account'; import { coinQuantityfy } from '@fuel-ts/account'; import { ErrorCode, FuelError } from '@fuel-ts/errors'; @@ -18,7 +18,7 @@ export class FunctionInvocationScope< TArgs extends Array = Array, TReturn = any, > extends BaseInvocationScope { - protected func: FunctionFragment; + protected func: AbiCoderFunction; private callParameters?: CallParams; private forward?: CoinQuantity; protected args: TArgs; @@ -30,7 +30,7 @@ export class FunctionInvocationScope< * @param func - The function fragment. * @param args - The arguments. */ - constructor(program: AbstractProgram, func: FunctionFragment, args: TArgs) { + constructor(program: AbstractProgram, func: AbiCoderFunction, args: TArgs) { super(program, false); this.func = func; this.args = args || []; @@ -80,7 +80,7 @@ export class FunctionInvocationScope< this.callParameters = callParams; if (callParams?.forward) { - if (!this.func.attributes.find((attr) => attr.name === 'payable')) { + if (!this.func.attributes?.find((attr) => attr.name === 'payable')) { throw new FuelError( ErrorCode.TRANSACTION_ERROR, `The target function ${this.func.name} cannot accept forwarded funds as it's not marked as 'payable'.` diff --git a/packages/program/src/response.ts b/packages/program/src/response.ts index 54159eccb3e..5c98595ff07 100644 --- a/packages/program/src/response.ts +++ b/packages/program/src/response.ts @@ -39,7 +39,7 @@ export const extractInvocationResult = ( const decodedResults = encodedResults.map((encodedResult, i) => { const { func } = functionScopes[i].getCallConfig(); - return func.decodeOutput(encodedResult)?.[0]; + return func.decodeOutput(encodedResult); }); return (isMultiCall ? decodedResults : decodedResults?.[0]) as T; diff --git a/packages/program/src/script-request.ts b/packages/program/src/script-request.ts index 79d749c033c..05b7ed72da4 100644 --- a/packages/program/src/script-request.ts +++ b/packages/program/src/script-request.ts @@ -5,7 +5,7 @@ import { SCRIPT_FIXED_SIZE, WORD_SIZE, calculateVmTxMemory, -} from '@fuel-ts/abi-coder'; +} from '@fuel-ts/abi'; import type { TransactionResultReturnDataReceipt, TransactionResultRevertReceipt, @@ -161,8 +161,7 @@ export function callResultToInvocationResult( value = scriptResult.returnReceipt.val; } if (scriptResult.returnReceipt.type === ReceiptType.ReturnData) { - const decoded = call.func.decodeOutput(scriptResult.returnReceipt.data); - value = decoded[0]; + value = call.func.decodeOutput(scriptResult.returnReceipt.data); } return value as TReturn; diff --git a/packages/program/src/types.ts b/packages/program/src/types.ts index fc373f52f30..17eb46bbc03 100644 --- a/packages/program/src/types.ts +++ b/packages/program/src/types.ts @@ -1,5 +1,5 @@ /* eslint-disable max-classes-per-file */ -import type { FunctionFragment, JsonAbi, Interface } from '@fuel-ts/abi-coder'; +import type { AbiCoderFunction, AbiSpecification, AbiCoder } from '@fuel-ts/abi'; import type { CallResult, CoinQuantity, @@ -21,7 +21,7 @@ import type { FunctionInvocationScope } from './functions/invocation-scope'; */ export abstract class AbstractProgram { abstract account: AbstractAccount | null; - abstract interface: Pick; + abstract interface: Pick; abstract provider: Pick | null; } @@ -39,7 +39,7 @@ export type ContractCall = { amount?: BigNumberish; assetId?: BytesLike; gas?: BigNumberish; - externalContractsAbis?: Record; + externalContractsAbis?: Record; }; /** @@ -68,12 +68,12 @@ export type TxParams = Partial<{ * @template T - Type of the function's arguments. */ export type CallConfig = { - func: FunctionFragment; + func: AbiCoderFunction; program: AbstractProgram; callParameters?: CallParams; txParameters?: TxParams; forward?: CoinQuantity; - externalAbis: Record; + externalAbis: Record; args: T; }; diff --git a/packages/program/src/utils.ts b/packages/program/src/utils.ts index dac9f8e6cb0..5bbe9ebc15d 100644 --- a/packages/program/src/utils.ts +++ b/packages/program/src/utils.ts @@ -27,10 +27,11 @@ export function getAbisFromAllCalls( const { program, externalAbis } = funcScope.getCallConfig(); if (i === 0) { - acc.main = program.interface.jsonAbi; + acc.main = program.interface.specification; acc.otherContractsAbis = {}; } else { - acc.otherContractsAbis[(program).id.toB256()] = program.interface.jsonAbi; + acc.otherContractsAbis[(program).id.toB256()] = + program.interface.specification; } acc.otherContractsAbis = { ...acc.otherContractsAbis, ...externalAbis }; diff --git a/packages/recipes/package.json b/packages/recipes/package.json index 76ca83985a3..a25a257fb03 100644 --- a/packages/recipes/package.json +++ b/packages/recipes/package.json @@ -30,11 +30,10 @@ "dependencies": { "@fuel-ts/abi": "workspace:*", "@fuel-ts/address": "workspace:*", - "@fuel-ts/abi-coder": "workspace:*", "@fuel-ts/account": "workspace:*", + "@fuel-ts/contract": "workspace:*", "@fuel-ts/program": "workspace:*", "@fuel-ts/transactions": "workspace:*", - "@fuel-ts/utils": "workspace:*", - "@fuel-ts/contract": "workspace:*" + "@fuel-ts/utils": "workspace:*" } } diff --git a/packages/recipes/scripts/build-recipes.ts b/packages/recipes/scripts/build-recipes.ts index bf5c190f7b3..0dbe3098210 100644 --- a/packages/recipes/scripts/build-recipes.ts +++ b/packages/recipes/scripts/build-recipes.ts @@ -6,23 +6,24 @@ execSync(`fuels-typegen -i src/contracts/src14 -o src/types`); const typesPath = join(__dirname, '..', 'src', 'types'); const supportedRecipes = ['Src14OwnedProxy'] - .map((s) => [s, `${s}Factory`, `${s}Types`, `${s}-bytecode`, `${s}-storage-slots`]) + .map((s) => [s, `${s}Factory`, `${s}Types`, `${s}-bytecode`, `${s}-storage-slots`, `${s}-abi`]) .flat() .map((s) => join(typesPath, 'contracts', `${s}.ts`)) .concat([join(typesPath, 'common.ts')]); const importReplacementMap = { + AbiCoder: '@fuel-ts/abi', + AbiCoderFunction: '@fuel-ts/abi', + AbiSpecification: '@fuel-ts/abi', + StrSlice: '@fuel-ts/abi', Contract: '@fuel-ts/program', ContractFactory: '@fuel-ts/contract', DeployContractOptions: '@fuel-ts/contract', - Interface: '@fuel-ts/abi-coder', Provider: '@fuel-ts/account', Account: '@fuel-ts/account', StorageSlot: '@fuel-ts/transactions', Address: '@fuel-ts/address', - FunctionFragment: '@fuel-ts/abi-coder', InvokeFunction: '@fuel-ts/program', - StrSlice: '@fuel-ts/abi-coder', decompressBytecode: '@fuel-ts/utils', }; diff --git a/packages/recipes/src/types/common.ts b/packages/recipes/src/types/common.ts index 7d2f1f7d0ee..68bf29ab981 100644 --- a/packages/recipes/src/types/common.ts +++ b/packages/recipes/src/types/common.ts @@ -8,7 +8,7 @@ Forc version: 0.66.5 */ -import { type FunctionFragment } from '@fuel-ts/abi-coder'; +import { type AbiCoderFunction } from '@fuel-ts/abi'; import { type InvokeFunction } from '@fuel-ts/program'; /** @@ -49,5 +49,5 @@ export type ProgramFunctionMapper = { }; export type InterfaceFunctionMapper = { - [K in keyof T]: FunctionFragment; + [K in keyof T]: AbiCoderFunction; }; diff --git a/packages/recipes/src/types/contracts/Src14OwnedProxy-abi.ts b/packages/recipes/src/types/contracts/Src14OwnedProxy-abi.ts index 8c5bcd0e3e3..0637eec1537 100644 --- a/packages/recipes/src/types/contracts/Src14OwnedProxy-abi.ts +++ b/packages/recipes/src/types/contracts/Src14OwnedProxy-abi.ts @@ -8,7 +8,9 @@ Forc version: 0.66.5 */ -export const abi = { +import { AbiSpecification } from '@fuel-ts/abi'; + +export const abi: AbiSpecification = { programType: 'contract', specVersion: '1', encodingVersion: '1', diff --git a/packages/recipes/src/types/contracts/Src14OwnedProxy.ts b/packages/recipes/src/types/contracts/Src14OwnedProxy.ts index 66e88b77019..21d04bd6b1d 100644 --- a/packages/recipes/src/types/contracts/Src14OwnedProxy.ts +++ b/packages/recipes/src/types/contracts/Src14OwnedProxy.ts @@ -12,7 +12,7 @@ import type { Src14OwnedProxyTypes as Types } from './Src14OwnedProxyTypes'; import type { InterfaceFunctionMapper, ProgramFunctionMapper } from '../common'; import { Contract } from '@fuel-ts/program'; -import { Interface } from '@fuel-ts/abi-coder'; +import { AbiCoder } from '@fuel-ts/abi'; import { type Address } from '@fuel-ts/address'; import { type Account, type Provider } from '@fuel-ts/account'; import { abi } from './Src14OwnedProxy-abi'; @@ -21,7 +21,7 @@ export * from './Src14OwnedProxyTypes'; export type Src14OwnedProxyConfigurables = Types['configurables']; -export class Src14OwnedProxyInterface extends Interface { +export class Src14OwnedProxyAbiCoder extends AbiCoder { declare functions: InterfaceFunctionMapper; constructor() { @@ -30,7 +30,7 @@ export class Src14OwnedProxyInterface extends Interface { } export class Src14OwnedProxy extends Contract { - declare interface: Src14OwnedProxyInterface; + declare interface: Src14OwnedProxyAbiCoder; declare functions: ProgramFunctionMapper; public static readonly abi = abi; diff --git a/packages/recipes/src/types/contracts/Src14OwnedProxyTypes.ts b/packages/recipes/src/types/contracts/Src14OwnedProxyTypes.ts index 7da08d737ae..9b9cd8bb894 100644 --- a/packages/recipes/src/types/contracts/Src14OwnedProxyTypes.ts +++ b/packages/recipes/src/types/contracts/Src14OwnedProxyTypes.ts @@ -8,7 +8,7 @@ Forc version: 0.66.5 */ -import { type StrSlice } from '@fuel-ts/abi-coder'; +import { type StrSlice } from '@fuel-ts/abi'; import type { Enum, Option } from '../common'; export enum AccessError { diff --git a/packages/script/package.json b/packages/script/package.json index 5f394a66908..3d584e604ab 100644 --- a/packages/script/package.json +++ b/packages/script/package.json @@ -27,7 +27,7 @@ }, "license": "Apache-2.0", "dependencies": { - "@fuel-ts/abi-coder": "workspace:*", + "@fuel-ts/abi": "workspace:*", "@fuel-ts/account": "workspace:*", "@fuel-ts/errors": "workspace:*", "@fuel-ts/math": "workspace:*", diff --git a/packages/script/src/script.test.ts b/packages/script/src/script.test.ts index b00ebe04f37..f9b4dc2328f 100644 --- a/packages/script/src/script.test.ts +++ b/packages/script/src/script.test.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import type { JsonAbi } from '@fuel-ts/abi-coder'; -import { Interface } from '@fuel-ts/abi-coder'; +import type { AbiSpecification } from '@fuel-ts/abi'; +import { AbiCoder } from '@fuel-ts/abi'; import type { Account, TransactionResponse, TransactionResult } from '@fuel-ts/account'; import { ScriptTransactionRequest } from '@fuel-ts/account'; import { setupTestProviderAndWallets } from '@fuel-ts/account/test-utils'; @@ -55,7 +55,7 @@ type MyStruct = { describe('Script', () => { let scriptRequest: ScriptRequest; beforeAll(() => { - const abiInterface = new Interface(scriptJsonAbi); + const abiInterface = AbiCoder.fromAbi(scriptJsonAbi); scriptRequest = new ScriptRequest( scriptBin, (myStruct: MyStruct) => { @@ -71,8 +71,7 @@ describe('Script', () => { throw new Error('fail'); } - const decoded = abiInterface.functions.main.decodeOutput(scriptResult.returnReceipt.data); - return (decoded as any)[0]; + return abiInterface.functions.main.decodeOutput(scriptResult.returnReceipt.data) as any; } ); }); @@ -139,7 +138,7 @@ describe('Script', () => { wallets: [wallet], } = launched; - const jsonAbiWithConfigurablesMock: JsonAbi = { + const jsonAbiWithConfigurablesMock: AbiSpecification = { ...jsonAbiMock, configurables: [ { diff --git a/packages/script/src/script.ts b/packages/script/src/script.ts index fd86461b8c9..25cf02bdc4f 100644 --- a/packages/script/src/script.ts +++ b/packages/script/src/script.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { Interface } from '@fuel-ts/abi-coder'; -import type { InputValue, JsonAbi } from '@fuel-ts/abi-coder'; +import { AbiCoder } from '@fuel-ts/abi'; +import type { InputValue, AbiSpecification } from '@fuel-ts/abi'; import { deployScriptOrPredicate, type Account, type Provider } from '@fuel-ts/account'; import { FuelError } from '@fuel-ts/errors'; import type { BN } from '@fuel-ts/math'; @@ -38,7 +38,7 @@ export class Script, TOutput> extends AbstractScript { /** * The ABI interface for the script. */ - interface: Interface; + interface: AbiCoder; /** * The account associated with the script. @@ -67,10 +67,10 @@ export class Script, TOutput> extends AbstractScript { * @param abi - The ABI interface for the script. * @param account - The account associated with the script. */ - constructor(bytecode: BytesLike, abi: JsonAbi, account: Account) { + constructor(bytecode: BytesLike, abi: AbiSpecification, account: Account) { super(); this.bytes = arrayify(bytecode); - this.interface = new Interface(abi); + this.interface = AbiCoder.fromAbi(abi); this.provider = account.provider; this.account = account; @@ -107,7 +107,7 @@ export class Script, TOutput> extends AbstractScript { const { offset } = this.interface.configurables[key]; - const encoded = this.interface.encodeConfigurable(key, value as InputValue); + const encoded = this.interface.getConfigurable(key).encode(value as InputValue); this.bytes.set(encoded, offset); }); @@ -133,7 +133,7 @@ export class Script, TOutput> extends AbstractScript { deploy(account: Account) { return deployScriptOrPredicate({ deployer: account, - abi: this.interface.jsonAbi, + abi: this.interface.specification, bytecode: this.bytes, loaderInstanceCallback: (loaderBytecode, newAbi) => new Script(loaderBytecode, newAbi, this.account) as T, diff --git a/packages/script/test/fixtures/index.ts b/packages/script/test/fixtures/index.ts index ed64d80e4ac..16eb2bf5433 100644 --- a/packages/script/test/fixtures/index.ts +++ b/packages/script/test/fixtures/index.ts @@ -1,4 +1,4 @@ -import type { JsonAbi } from '@fuel-ts/abi-coder'; +import type { AbiSpecification } from '@fuel-ts/abi'; import { getForcProject } from '@fuel-ts/utils/test-utils'; import { join } from 'path'; @@ -7,7 +7,7 @@ export enum ScriptProjectsEnum { } export const getScriptForcProject = (project: ScriptProjectsEnum) => - getForcProject({ + getForcProject({ projectDir: join(__dirname, 'forc-projects', project), projectName: project, build: 'release', diff --git a/packages/script/test/mocks.ts b/packages/script/test/mocks.ts index 61df118fbb5..b98de2a37b4 100644 --- a/packages/script/test/mocks.ts +++ b/packages/script/test/mocks.ts @@ -1,6 +1,6 @@ -import type { JsonAbi } from '@fuel-ts/abi-coder'; +import type { AbiSpecification } from '@fuel-ts/abi'; -export const jsonAbiMock: JsonAbi = { +export const jsonAbiMock: AbiSpecification = { programType: 'script', specVersion: '1', encodingVersion: '1', diff --git a/packages/transactions/package.json b/packages/transactions/package.json index e5902bd7195..15265c4a40f 100644 --- a/packages/transactions/package.json +++ b/packages/transactions/package.json @@ -37,7 +37,7 @@ }, "license": "Apache-2.0", "dependencies": { - "@fuel-ts/abi-coder": "workspace:*", + "@fuel-ts/abi": "workspace:*", "@fuel-ts/address": "workspace:*", "@fuel-ts/errors": "workspace:*", "@fuel-ts/hasher": "workspace:^", diff --git a/packages/transactions/src/coders/byte-array.test.ts b/packages/transactions/src/coders/byte-array.test.ts index 28edc0ad838..40e2ce611e5 100644 --- a/packages/transactions/src/coders/byte-array.test.ts +++ b/packages/transactions/src/coders/byte-array.test.ts @@ -1,6 +1,6 @@ import { arrayify, hexlify } from '@fuel-ts/utils'; -import { ByteArrayCoder } from './byte-array'; +import { byteArray } from './byte-array'; /** * @group node @@ -10,11 +10,11 @@ describe('ByteArrayCoder', () => { it('Can encode empty byte[]', () => { const bytes = arrayify('0x'); - const encoded = hexlify(new ByteArrayCoder(bytes.length).encode(bytes)); + const encoded = hexlify(byteArray(bytes.length).encode(bytes)); expect(encoded).toEqual('0x'); - const [decoded, offset] = new ByteArrayCoder(bytes.length).decode(arrayify(encoded), 0); + const [decoded, offset] = byteArray(bytes.length).decode(arrayify(encoded), 0); expect(offset).toEqual(0); expect(decoded).toEqual(hexlify(bytes)); @@ -23,11 +23,11 @@ describe('ByteArrayCoder', () => { it('Can encode four-byte byte[]', () => { const bytes = arrayify('0xdeadbeef'); - const encoded = hexlify(new ByteArrayCoder(bytes.length).encode(bytes)); + const encoded = hexlify(byteArray(bytes.length).encode(bytes)); expect(encoded).toEqual('0xdeadbeef00000000'); - const [decoded, offset] = new ByteArrayCoder(bytes.length).decode(arrayify(encoded), 0); + const [decoded, offset] = byteArray(bytes.length).decode(arrayify(encoded), 0); expect(offset).toEqual(8); expect(decoded).toEqual(hexlify(bytes)); diff --git a/packages/transactions/src/coders/byte-array.ts b/packages/transactions/src/coders/byte-array.ts index b5ba3ec11e2..4c00ae342aa 100644 --- a/packages/transactions/src/coders/byte-array.ts +++ b/packages/transactions/src/coders/byte-array.ts @@ -1,51 +1,15 @@ -import { Coder } from '@fuel-ts/abi-coder'; +import type { Coder } from '@fuel-ts/abi'; import type { BytesLike } from '@fuel-ts/utils'; import { concat, hexlify, arrayify } from '@fuel-ts/utils'; -export class ByteArrayCoder extends Coder { - length: number; - #paddingLength: number; - - constructor(length: number) { - const paddingLength = (8 - (length % 8)) % 8; - const encodedLength = length + paddingLength; - super( - 'ByteArray', - // While this might sound like a [u8; N] coder it's actually not. - // A [u8; N] coder would pad every u8 to 8 bytes which would - // make every u8 have the same size as a u64. - // We are packing four u8s into u64s here, avoiding this padding. - `[u64; ${encodedLength / 4}]`, - encodedLength - ); - this.length = length; - this.#paddingLength = paddingLength; - } - - encode(value: BytesLike): Uint8Array { - const parts: Uint8Array[] = []; - - const data = arrayify(value); - parts.push(data); - // Write padding - if (this.#paddingLength) { - parts.push(new Uint8Array(this.#paddingLength)); - } - - return concat(parts); - } - - decode(data: Uint8Array, offset: number): [string, number] { - let decoded; - let o = offset; - - [decoded, o] = [hexlify(data.slice(o, o + this.length)), o + this.length]; - const value = decoded; - // Read padding - if (this.#paddingLength) { - [decoded, o] = [null, o + this.#paddingLength]; - } - - return [value, o]; - } -} +export const byteArray = (length: number): Coder => { + const paddingLength = (8 - (length % 8)) % 8; + return { + type: 'byte_array', + encode: (value: BytesLike) => concat([arrayify(value), new Uint8Array(paddingLength)]), + decode: (data: Uint8Array, initialOffset: number) => [ + hexlify(data.slice(initialOffset, initialOffset + length)), + initialOffset + length + paddingLength, + ], + }; +}; diff --git a/packages/transactions/src/coders/coders.ts b/packages/transactions/src/coders/coders.ts new file mode 100644 index 00000000000..357e896b5dd --- /dev/null +++ b/packages/transactions/src/coders/coders.ts @@ -0,0 +1,18 @@ +import { encoding, WORD_SIZE } from '@fuel-ts/abi'; +import type { Coder } from '@fuel-ts/abi'; + +import { pad } from './pad-coder'; + +const base = encoding.v1; + +export const coders = { + ...base, + type: (type: Type): Coder => ({ + type: 'TypeCoder', + encode: () => new Uint8Array([]), + decode: (_data: Uint8Array, offset: number) => [type, offset], + }), + u8: pad(base.u8, 1, WORD_SIZE), + u16: pad(base.u16, 2, WORD_SIZE), + u32: pad(base.u32, 4, WORD_SIZE), +}; diff --git a/packages/transactions/src/coders/input.test.ts b/packages/transactions/src/coders/input.test.ts index 66c9dc93943..fa120fbe914 100644 --- a/packages/transactions/src/coders/input.test.ts +++ b/packages/transactions/src/coders/input.test.ts @@ -96,7 +96,7 @@ describe('InputCoder', () => { await expectToThrowFuelError( () => new InputCoder().encode(input), - new FuelError(ErrorCode.ENCODE_ERROR, 'Invalid u64.') + new FuelError(ErrorCode.ENCODE_ERROR, 'Invalid u64 value - value exceeds maximum.') ); }); diff --git a/packages/transactions/src/coders/input.ts b/packages/transactions/src/coders/input.ts index 140ab70589f..2bfd6823bd8 100644 --- a/packages/transactions/src/coders/input.ts +++ b/packages/transactions/src/coders/input.ts @@ -1,12 +1,13 @@ /* eslint-disable max-classes-per-file */ -import { Coder, B256Coder, NumberCoder, BigNumberCoder } from '@fuel-ts/abi-coder'; +import { Coder, BYTES_32 } from '@fuel-ts/abi'; import { ErrorCode, FuelError } from '@fuel-ts/errors'; import { sha256 } from '@fuel-ts/hasher'; import type { BN } from '@fuel-ts/math'; import type { BytesLike } from '@fuel-ts/utils'; import { concat, arrayify } from '@fuel-ts/utils'; -import { ByteArrayCoder } from './byte-array'; +import { byteArray } from './byte-array'; +import { coders } from './coders'; import type { TxPointer } from './tx-pointer'; import { TxPointerCoder } from './tx-pointer'; @@ -57,78 +58,47 @@ export type InputCoin = { }; export class InputCoinCoder extends Coder { - constructor() { - super('InputCoin', 'struct InputCoin', 0); - } + private primary = coders.struct({ + txID: coders.b256, + outputIndex: coders.u16, + owner: coders.b256, + amount: coders.u64, + assetId: coders.b256, + txPointer: new TxPointerCoder(), + witnessIndex: coders.u16, + predicateGasUsed: coders.u64, + predicateLength: coders.u64, + predicateDataLength: coders.u64, + }); + + private secondary = (value: Pick) => + coders.struct({ + predicate: byteArray(value.predicateLength.toNumber()), + predicateData: byteArray(value.predicateDataLength.toNumber()), + }); + + override type = 'InputCoin'; encode(value: InputCoin): Uint8Array { const parts: Uint8Array[] = []; - - parts.push(new B256Coder().encode(value.txID)); - parts.push(new NumberCoder('u16', { padToWordSize: true }).encode(value.outputIndex)); - parts.push(new B256Coder().encode(value.owner)); - parts.push(new BigNumberCoder('u64').encode(value.amount)); - parts.push(new B256Coder().encode(value.assetId)); - parts.push(new TxPointerCoder().encode(value.txPointer)); - parts.push(new NumberCoder('u16', { padToWordSize: true }).encode(value.witnessIndex)); - parts.push(new BigNumberCoder('u64').encode(value.predicateGasUsed)); - parts.push(new BigNumberCoder('u64').encode(value.predicateLength)); - parts.push(new BigNumberCoder('u64').encode(value.predicateDataLength)); - parts.push(new ByteArrayCoder(value.predicateLength.toNumber()).encode(value.predicate)); - parts.push( - new ByteArrayCoder(value.predicateDataLength.toNumber()).encode(value.predicateData) - ); - + parts.push(this.primary.encode(value)); + parts.push(this.secondary(value).encode(value)); return concat(parts); } decode(data: Uint8Array, offset: number): [InputCoin, number] { let decoded; let o = offset; - - [decoded, o] = new B256Coder().decode(data, o); - const txID = decoded; - [decoded, o] = new NumberCoder('u16', { padToWordSize: true }).decode(data, o); - const outputIndex = decoded; - [decoded, o] = new B256Coder().decode(data, o); - const owner = decoded; - [decoded, o] = new BigNumberCoder('u64').decode(data, o); - const amount = decoded; - [decoded, o] = new B256Coder().decode(data, o); - const assetId = decoded; - [decoded, o] = new TxPointerCoder().decode(data, o); - const txPointer = decoded; - [decoded, o] = new NumberCoder('u16', { padToWordSize: true }).decode(data, o); - const witnessIndex = Number(decoded); - [decoded, o] = new BigNumberCoder('u64').decode(data, o); - const predicateGasUsed = decoded; - [decoded, o] = new BigNumberCoder('u64').decode(data, o); - const predicateLength = decoded; - [decoded, o] = new BigNumberCoder('u64').decode(data, o); - const predicateDataLength = decoded; - [decoded, o] = new ByteArrayCoder(predicateLength.toNumber()).decode(data, o); - const predicate = decoded; - [decoded, o] = new ByteArrayCoder(predicateDataLength.toNumber()).decode(data, o); - const predicateData = decoded; - - return [ - { - type: InputType.Coin, - txID, - outputIndex, - owner, - amount, - assetId, - txPointer, - witnessIndex, - predicateGasUsed, - predicateLength, - predicateDataLength, - predicate, - predicateData, - }, - o, - ]; + [decoded, o] = this.primary.decode(data, o); + const base = decoded; + [decoded, o] = this.secondary(base).decode(data, o); + const rest = decoded; + const inputCoin: InputCoin = { + type: InputType.Coin, + ...base, + ...rest, + }; + return [inputCoin, o]; } } @@ -155,52 +125,24 @@ export type InputContract = { }; export class InputContractCoder extends Coder { - constructor() { - super('InputContract', 'struct InputContract', 0); - } + private coder = coders.struct({ + type: coders.type(InputType.Contract), + txID: coders.b256, + outputIndex: coders.u16, + balanceRoot: coders.b256, + stateRoot: coders.b256, + txPointer: new TxPointerCoder(), + contractID: coders.b256, + }); + + override type = 'InputContract'; encode(value: InputContract): Uint8Array { - const parts: Uint8Array[] = []; - - parts.push(new B256Coder().encode(value.txID)); - parts.push(new NumberCoder('u16', { padToWordSize: true }).encode(value.outputIndex)); - parts.push(new B256Coder().encode(value.balanceRoot)); - parts.push(new B256Coder().encode(value.stateRoot)); - parts.push(new TxPointerCoder().encode(value.txPointer)); - parts.push(new B256Coder().encode(value.contractID)); - - return concat(parts); + return this.coder.encode(value); } decode(data: Uint8Array, offset: number): [InputContract, number] { - let decoded; - let o = offset; - - [decoded, o] = new B256Coder().decode(data, o); - const txID = decoded; - [decoded, o] = new NumberCoder('u16', { padToWordSize: true }).decode(data, o); - const outputIndex = decoded; - [decoded, o] = new B256Coder().decode(data, o); - const balanceRoot = decoded; - [decoded, o] = new B256Coder().decode(data, o); - const stateRoot = decoded; - [decoded, o] = new TxPointerCoder().decode(data, o); - const txPointer = decoded; - [decoded, o] = new B256Coder().decode(data, o); - const contractID = decoded; - - return [ - { - type: InputType.Contract, - txID, - outputIndex, - balanceRoot, - stateRoot, - txPointer, - contractID, - }, - o, - ]; + return this.coder.decode(data, offset); } } @@ -245,19 +187,17 @@ export type InputMessage = { }; export class InputMessageCoder extends Coder { - constructor() { - super('InputMessage', 'struct InputMessage', 0); - } + override type = 'InputMessage'; static getMessageId( value: Pick ): string { const parts: Uint8Array[] = []; - parts.push(new ByteArrayCoder(32).encode(value.sender)); - parts.push(new ByteArrayCoder(32).encode(value.recipient)); - parts.push(new ByteArrayCoder(32).encode(value.nonce)); - parts.push(new BigNumberCoder('u64').encode(value.amount)); + parts.push(byteArray(BYTES_32).encode(value.sender)); + parts.push(byteArray(BYTES_32).encode(value.recipient)); + parts.push(byteArray(BYTES_32).encode(value.nonce)); + parts.push(coders.u64.encode(value.amount)); parts.push(arrayify(value.data || '0x')); return sha256(concat(parts)); @@ -266,27 +206,25 @@ export class InputMessageCoder extends Coder { static encodeData(messageData?: BytesLike): Uint8Array { const bytes = arrayify(messageData || '0x'); const dataLength = bytes.length; - return new ByteArrayCoder(dataLength).encode(bytes); + return byteArray(dataLength).encode(bytes); } - encode(value: InputMessage): Uint8Array { + override encode(value: InputMessage): Uint8Array { const parts: Uint8Array[] = []; const data = InputMessageCoder.encodeData(value.data); - parts.push(new ByteArrayCoder(32).encode(value.sender)); - parts.push(new ByteArrayCoder(32).encode(value.recipient)); - parts.push(new BigNumberCoder('u64').encode(value.amount)); - parts.push(new ByteArrayCoder(32).encode(value.nonce)); - parts.push(new NumberCoder('u16', { padToWordSize: true }).encode(value.witnessIndex)); - parts.push(new BigNumberCoder('u64').encode(value.predicateGasUsed)); - parts.push(new BigNumberCoder('u64').encode(data.length)); - parts.push(new BigNumberCoder('u64').encode(value.predicateLength)); - parts.push(new BigNumberCoder('u64').encode(value.predicateDataLength)); - parts.push(new ByteArrayCoder(data.length).encode(data)); - parts.push(new ByteArrayCoder(value.predicateLength.toNumber()).encode(value.predicate)); - parts.push( - new ByteArrayCoder(value.predicateDataLength.toNumber()).encode(value.predicateData) - ); + parts.push(byteArray(BYTES_32).encode(value.sender)); + parts.push(byteArray(BYTES_32).encode(value.recipient)); + parts.push(coders.u64.encode(value.amount)); + parts.push(byteArray(BYTES_32).encode(value.nonce)); + parts.push(coders.u16.encode(value.witnessIndex)); + parts.push(coders.u64.encode(value.predicateGasUsed)); + parts.push(coders.u64.encode(data.length)); + parts.push(coders.u64.encode(value.predicateLength)); + parts.push(coders.u64.encode(value.predicateDataLength)); + parts.push(byteArray(data.length).encode(data)); + parts.push(byteArray(value.predicateLength.toNumber()).encode(value.predicate)); + parts.push(byteArray(value.predicateDataLength.toNumber()).encode(value.predicateData)); return concat(parts); } @@ -294,38 +232,38 @@ export class InputMessageCoder extends Coder { static decodeData(messageData: BytesLike): Uint8Array { const bytes = arrayify(messageData); const dataLength = bytes.length; - const [data] = new ByteArrayCoder(dataLength).decode(bytes, 0); + const [data] = byteArray(dataLength).decode(bytes, 0); return arrayify(data); } - decode(data: Uint8Array, offset: number): [InputMessage, number] { + override decode(data: Uint8Array, offset: number): [InputMessage, number] { let decoded; let o = offset; - [decoded, o] = new B256Coder().decode(data, o); + [decoded, o] = coders.b256.decode(data, o); const sender = decoded; - [decoded, o] = new B256Coder().decode(data, o); + [decoded, o] = coders.b256.decode(data, o); const recipient = decoded; - [decoded, o] = new BigNumberCoder('u64').decode(data, o); + [decoded, o] = coders.u64.decode(data, o); const amount = decoded; - [decoded, o] = new B256Coder().decode(data, o); + [decoded, o] = coders.b256.decode(data, o); const nonce = decoded; - [decoded, o] = new NumberCoder('u16', { padToWordSize: true }).decode(data, o); + [decoded, o] = coders.u16.decode(data, o); const witnessIndex = Number(decoded); - [decoded, o] = new BigNumberCoder('u64').decode(data, o); + [decoded, o] = coders.u64.decode(data, o); const predicateGasUsed = decoded; - [decoded, o] = new NumberCoder('u32', { padToWordSize: true }).decode(data, o); + [decoded, o] = coders.u32.decode(data, o); const dataLength = decoded; - [decoded, o] = new BigNumberCoder('u64').decode(data, o); + [decoded, o] = coders.u64.decode(data, o); const predicateLength = decoded; - [decoded, o] = new BigNumberCoder('u64').decode(data, o); + [decoded, o] = coders.u64.decode(data, o); const predicateDataLength = decoded; - [decoded, o] = new ByteArrayCoder(dataLength).decode(data, o); + [decoded, o] = byteArray(dataLength).decode(data, o); const messageData = decoded; - [decoded, o] = new ByteArrayCoder(predicateLength.toNumber()).decode(data, o); + [decoded, o] = byteArray(predicateLength.toNumber()).decode(data, o); const predicate = decoded; - [decoded, o] = new ByteArrayCoder(predicateDataLength.toNumber()).decode(data, o); + [decoded, o] = byteArray(predicateDataLength.toNumber()).decode(data, o); const predicateData = decoded; return [ @@ -352,14 +290,12 @@ export class InputMessageCoder extends Coder { export type Input = InputCoin | InputContract | InputMessage; export class InputCoder extends Coder { - constructor() { - super('Input', 'struct Input', 0); - } + override type = 'Input'; - encode(value: Input): Uint8Array { + override encode(value: Input): Uint8Array { const parts: Uint8Array[] = []; - parts.push(new NumberCoder('u8', { padToWordSize: true }).encode(value.type)); + parts.push(coders.u8.encode(value.type)); const { type } = value; @@ -391,7 +327,7 @@ export class InputCoder extends Coder { let decoded; let o = offset; - [decoded, o] = new NumberCoder('u8', { padToWordSize: true }).decode(data, o); + [decoded, o] = coders.u8.decode(data, o); const type = decoded as InputType; switch (type) { case InputType.Coin: { diff --git a/packages/transactions/src/coders/output.ts b/packages/transactions/src/coders/output.ts index 8110df38f84..596349bc577 100644 --- a/packages/transactions/src/coders/output.ts +++ b/packages/transactions/src/coders/output.ts @@ -1,9 +1,11 @@ /* eslint-disable max-classes-per-file */ -import { Coder, B256Coder, NumberCoder, BigNumberCoder } from '@fuel-ts/abi-coder'; +import { Coder } from '@fuel-ts/abi'; import { ErrorCode, FuelError } from '@fuel-ts/errors'; import type { BN } from '@fuel-ts/math'; import { concat } from '@fuel-ts/utils'; +import { coders } from './coders'; + export enum OutputType /* u8 */ { Coin = 0, Contract = 1, @@ -23,40 +25,21 @@ export type OutputCoin = { }; export class OutputCoinCoder extends Coder { - constructor() { - super('OutputCoin', 'struct OutputCoin', 0); - } - - encode(value: OutputCoin): Uint8Array { - const parts: Uint8Array[] = []; + private coder = coders.struct({ + type: coders.type(OutputType.Coin), + to: coders.b256, + amount: coders.u64, + assetId: coders.b256, + }); - parts.push(new B256Coder().encode(value.to)); - parts.push(new BigNumberCoder('u64').encode(value.amount)); - parts.push(new B256Coder().encode(value.assetId)); + override type = 'OutputCoin'; - return concat(parts); + encode(value: OutputCoin): Uint8Array { + return this.coder.encode(value); } decode(data: Uint8Array, offset: number): [OutputCoin, number] { - let decoded; - let o = offset; - - [decoded, o] = new B256Coder().decode(data, o); - const to = decoded; - [decoded, o] = new BigNumberCoder('u64').decode(data, o); - const amount = decoded; - [decoded, o] = new B256Coder().decode(data, o); - const assetId = decoded; - - return [ - { - type: OutputType.Coin, - to, - amount, - assetId, - }, - o, - ]; + return this.coder.decode(data, offset); } } @@ -71,40 +54,21 @@ export type OutputContract = { }; export class OutputContractCoder extends Coder { - constructor() { - super('OutputContract', 'struct OutputContract', 0); - } - - encode(value: OutputContract): Uint8Array { - const parts: Uint8Array[] = []; + private coder = coders.struct({ + type: coders.type(OutputType.Contract), + inputIndex: coders.u8, + balanceRoot: coders.b256, + stateRoot: coders.b256, + }); - parts.push(new NumberCoder('u8', { padToWordSize: true }).encode(value.inputIndex)); - parts.push(new B256Coder().encode(value.balanceRoot)); - parts.push(new B256Coder().encode(value.stateRoot)); + override type = 'OutputCoin'; - return concat(parts); + encode(value: OutputContract): Uint8Array { + return this.coder.encode(value); } decode(data: Uint8Array, offset: number): [OutputContract, number] { - let decoded; - let o = offset; - - [decoded, o] = new NumberCoder('u8', { padToWordSize: true }).decode(data, o); - const inputIndex = decoded; - [decoded, o] = new B256Coder().decode(data, o); - const balanceRoot = decoded; - [decoded, o] = new B256Coder().decode(data, o); - const stateRoot = decoded; - - return [ - { - type: OutputType.Contract, - inputIndex, - balanceRoot, - stateRoot, - }, - o, - ]; + return this.coder.decode(data, offset); } } @@ -119,40 +83,21 @@ export type OutputChange = { }; export class OutputChangeCoder extends Coder { - constructor() { - super('OutputChange', 'struct OutputChange', 0); - } + private coder = coders.struct({ + type: coders.type(OutputType.Change), + to: coders.b256, + amount: coders.u64, + assetId: coders.b256, + }); - encode(value: OutputChange): Uint8Array { - const parts: Uint8Array[] = []; + override type = 'OutputChange'; - parts.push(new B256Coder().encode(value.to)); - parts.push(new BigNumberCoder('u64').encode(value.amount)); - parts.push(new B256Coder().encode(value.assetId)); - - return concat(parts); + encode(value: OutputChange): Uint8Array { + return this.coder.encode(value); } decode(data: Uint8Array, offset: number): [OutputChange, number] { - let decoded; - let o = offset; - - [decoded, o] = new B256Coder().decode(data, o); - const to = decoded; - [decoded, o] = new BigNumberCoder('u64').decode(data, o); - const amount = decoded; - [decoded, o] = new B256Coder().decode(data, o); - const assetId = decoded; - - return [ - { - type: OutputType.Change, - to, - amount, - assetId, - }, - o, - ]; + return this.coder.decode(data, offset); } } @@ -167,40 +112,21 @@ export type OutputVariable = { }; export class OutputVariableCoder extends Coder { - constructor() { - super('OutputVariable', 'struct OutputVariable', 0); - } - - encode(value: OutputVariable): Uint8Array { - const parts: Uint8Array[] = []; + private coder = coders.struct({ + type: coders.type(OutputType.Variable), + to: coders.b256, + amount: coders.u64, + assetId: coders.b256, + }); - parts.push(new B256Coder().encode(value.to)); - parts.push(new BigNumberCoder('u64').encode(value.amount)); - parts.push(new B256Coder().encode(value.assetId)); + override type = 'OutputVariable'; - return concat(parts); + encode(value: OutputVariable): Uint8Array { + return this.coder.encode(value); } decode(data: Uint8Array, offset: number): [OutputVariable, number] { - let decoded; - let o = offset; - - [decoded, o] = new B256Coder().decode(data, o); - const to = decoded; - [decoded, o] = new BigNumberCoder('u64').decode(data, o); - const amount = decoded; - [decoded, o] = new B256Coder().decode(data, o); - const assetId = decoded; - - return [ - { - type: OutputType.Variable, - to, - amount, - assetId, - }, - o, - ]; + return this.coder.decode(data, offset); } } @@ -216,36 +142,20 @@ export class OutputContractCreatedCoder extends Coder< OutputContractCreated, OutputContractCreated > { - constructor() { - super('OutputContractCreated', 'struct OutputContractCreated', 0); - } + private coder = coders.struct({ + type: coders.type(OutputType.ContractCreated), + contractId: coders.b256, + stateRoot: coders.b256, + }); - encode(value: OutputContractCreated): Uint8Array { - const parts: Uint8Array[] = []; - - parts.push(new B256Coder().encode(value.contractId)); - parts.push(new B256Coder().encode(value.stateRoot)); + override type = 'OutputContractCreated'; - return concat(parts); + encode(value: OutputContractCreated): Uint8Array { + return this.coder.encode(value); } decode(data: Uint8Array, offset: number): [OutputContractCreated, number] { - let decoded; - let o = offset; - - [decoded, o] = new B256Coder().decode(data, o); - const contractId = decoded; - [decoded, o] = new B256Coder().decode(data, o); - const stateRoot = decoded; - - return [ - { - type: OutputType.ContractCreated, - contractId, - stateRoot, - }, - o, - ]; + return this.coder.decode(data, offset); } } @@ -257,15 +167,12 @@ export type Output = | OutputContractCreated; export class OutputCoder extends Coder { - constructor() { - super('Output', ' struct Output', 0); - } + override type = 'Output'; encode(value: Output): Uint8Array { const parts: Uint8Array[] = []; - parts.push(new NumberCoder('u8', { padToWordSize: true }).encode(value.type)); - + parts.push(coders.u8.encode(value.type)); const { type } = value; switch (type) { @@ -300,12 +207,13 @@ export class OutputCoder extends Coder { return concat(parts); } - decode(data: Uint8Array, offset: number): [Output, number] { + decode(data: Uint8Array, initialOffset: number): [Output, number] { let decoded; - let o = offset; + let o = initialOffset; - [decoded, o] = new NumberCoder('u8', { padToWordSize: true }).decode(data, o); + [decoded, o] = coders.u8.decode(data, initialOffset); const type = decoded as OutputType; + switch (type) { case OutputType.Coin: { [decoded, o] = new OutputCoinCoder().decode(data, o); diff --git a/packages/transactions/src/coders/pad-coder.test.ts b/packages/transactions/src/coders/pad-coder.test.ts new file mode 100644 index 00000000000..5cc8075da98 --- /dev/null +++ b/packages/transactions/src/coders/pad-coder.test.ts @@ -0,0 +1,76 @@ +import { WORD_SIZE, encoding } from '@fuel-ts/abi'; + +import { pad } from './pad-coder'; + +/** + * @group node + * @group browser + */ +describe('padded', () => { + describe('encode', () => { + it('should encode and pad to word size [u8]', () => { + const coder = pad(encoding.v1.u8, 1, WORD_SIZE); + const expected = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 255]); + const value = 255; + + const encoded = coder.encode(value); + + expect(encoded).toEqual(expected); + }); + + it('should encode and pad to word size [u16]', () => { + const coder = pad(encoding.v1.u16, 2, WORD_SIZE); + const expected = new Uint8Array([0, 0, 0, 0, 0, 0, 255, 255]); + const value = 65535; + + const encoded = coder.encode(value); + + expect(encoded).toEqual(expected); + }); + + it('should encode and pad to word size [u32]', () => { + const coder = pad(encoding.v1.u32, 4, WORD_SIZE); + const expected = new Uint8Array([0, 0, 0, 0, 255, 255, 255, 255]); + const value = 4294967295; + + const encoded = coder.encode(value); + + expect(encoded).toEqual(expected); + }); + }); + + describe('decode', () => { + it('should decode and remove padding [u8]', () => { + const coder = pad(encoding.v1.u8, 1, WORD_SIZE); + const expected = 255; + const data = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 255]); + + const [decoded, newOffset] = coder.decode(data, 0); + + expect(decoded).toEqual(expected); + expect(newOffset).toEqual(WORD_SIZE); + }); + + it('should decode and remove padding [u16]', () => { + const coder = pad(encoding.v1.u16, 2, WORD_SIZE); + const expected = 65535; + const data = new Uint8Array([0, 0, 0, 0, 0, 0, 255, 255]); + + const [decoded, newOffset] = coder.decode(data, 0); + + expect(decoded).toEqual(expected); + expect(newOffset).toEqual(WORD_SIZE); + }); + + it('should decode and remove padding [u32]', () => { + const coder = pad(encoding.v1.u32, 4, WORD_SIZE); + const expected = 4294967295; + const data = new Uint8Array([0, 0, 0, 0, 255, 255, 255, 255]); + + const [decoded, newOffset] = coder.decode(data, 0); + + expect(decoded).toEqual(expected); + expect(newOffset).toEqual(WORD_SIZE); + }); + }); +}); diff --git a/packages/transactions/src/coders/pad-coder.ts b/packages/transactions/src/coders/pad-coder.ts new file mode 100644 index 00000000000..5f082d63b0b --- /dev/null +++ b/packages/transactions/src/coders/pad-coder.ts @@ -0,0 +1,18 @@ +import type { Coder } from '@fuel-ts/abi'; + +export const pad = ( + coder: Coder, + length: number, + paddedLength: number +): Coder => ({ + type: coder.type, + encode: (value: TEncoded) => { + const encoded = coder.encode(value); + const padding = new Uint8Array(paddedLength - length).fill(0); + return new Uint8Array([...padding, ...encoded]); + }, + decode: (data: Uint8Array, offset: number = 0): [TDecoded, number] => { + const [decoded, newOffset] = coder.decode(data, offset + (paddedLength - length)); + return [decoded, newOffset]; + }, +}); diff --git a/packages/transactions/src/coders/policy.test.ts b/packages/transactions/src/coders/policy.test.ts index 3eda915b208..c21582f8c11 100644 --- a/packages/transactions/src/coders/policy.test.ts +++ b/packages/transactions/src/coders/policy.test.ts @@ -140,7 +140,7 @@ describe('PoliciesCoder', () => { // bitfield is 1 representing tip const policyTypes = PolicyType.Tip; - const [policies] = new PoliciesCoder().decode(data, 0, policyTypes); + const [policies] = new PoliciesCoder(policyTypes).decode(data, 0); expect(policies).toHaveLength(1); expect(policies[0]).toStrictEqual({ @@ -157,7 +157,7 @@ describe('PoliciesCoder', () => { // bitfield is 2 representing witnessLimit const policyTypes = PolicyType.WitnessLimit; - const [policies] = new PoliciesCoder().decode(data, 0, policyTypes); + const [policies] = new PoliciesCoder(policyTypes).decode(data, 0); expect(policies).toHaveLength(1); expect(policies[0]).toStrictEqual({ @@ -174,7 +174,7 @@ describe('PoliciesCoder', () => { // bitfield is 4 representing maturity const policyTypes = PolicyType.Maturity; - const [policies] = new PoliciesCoder().decode(data, 0, policyTypes); + const [policies] = new PoliciesCoder(policyTypes).decode(data, 0); expect(policies).toHaveLength(1); expect(policies[0]).toStrictEqual({ @@ -191,7 +191,7 @@ describe('PoliciesCoder', () => { // bitfield is 8 representing maxFee const policyTypes = PolicyType.MaxFee; - const [policies] = new PoliciesCoder().decode(data, 0, policyTypes); + const [policies] = new PoliciesCoder(policyTypes).decode(data, 0); expect(policies).toHaveLength(1); expect(policies[0]).toStrictEqual({ @@ -210,7 +210,7 @@ describe('PoliciesCoder', () => { const policyTypes = PolicyType.Tip + PolicyType.WitnessLimit; expect(policyTypes).toBe(3); - const [policies] = new PoliciesCoder().decode(data, 0, policyTypes); + const [policies] = new PoliciesCoder(policyTypes).decode(data, 0); expect(policies).toHaveLength(2); expect(policies[0]).toStrictEqual({ @@ -233,7 +233,7 @@ describe('PoliciesCoder', () => { const policyTypes = PolicyType.WitnessLimit + PolicyType.Maturity; expect(policyTypes).toBe(6); - const [policies] = new PoliciesCoder().decode(data, 0, policyTypes); + const [policies] = new PoliciesCoder(policyTypes).decode(data, 0); expect(policies).toHaveLength(2); expect(policies[0]).toStrictEqual({ @@ -256,7 +256,7 @@ describe('PoliciesCoder', () => { const policyTypes = PolicyType.WitnessLimit + PolicyType.MaxFee; expect(policyTypes).toBe(10); - const [policies] = new PoliciesCoder().decode(data, 0, policyTypes); + const [policies] = new PoliciesCoder(policyTypes).decode(data, 0); expect(policies).toHaveLength(2); expect(policies[0]).toStrictEqual({ @@ -287,7 +287,7 @@ describe('PoliciesCoder', () => { PolicyType.Tip + PolicyType.WitnessLimit + PolicyType.Maturity + PolicyType.MaxFee; expect(policyTypes).toBe(15); - const [policies] = new PoliciesCoder().decode(data, 0, policyTypes); + const [policies] = new PoliciesCoder(policyTypes).decode(data, 0); expect(policies).toHaveLength(4); expect(policies).toStrictEqual([ diff --git a/packages/transactions/src/coders/policy.ts b/packages/transactions/src/coders/policy.ts index aeb7c03fb8e..c9cf4bb9aad 100644 --- a/packages/transactions/src/coders/policy.ts +++ b/packages/transactions/src/coders/policy.ts @@ -1,8 +1,10 @@ -import { BigNumberCoder, Coder, NumberCoder } from '@fuel-ts/abi-coder'; +import { Coder } from '@fuel-ts/abi'; import { ErrorCode, FuelError } from '@fuel-ts/errors'; import type { BN } from '@fuel-ts/math'; import { concat } from '@fuel-ts/utils'; +import { coders } from './coders'; + // Bitfield of used policy types. export enum PolicyType { Tip = 1, @@ -51,8 +53,13 @@ function validateDuplicatedPolicies(policies: Policy[]): void { } export class PoliciesCoder extends Coder { - constructor() { - super('Policies', 'array Policy', 0); + private policyTypeFilter: number; + + override type = 'Policies'; + + public constructor(policyTypeFilter: number = 0) { + super(); + this.policyTypeFilter = policyTypeFilter; } encode(policies: Policy[]): Uint8Array { @@ -66,11 +73,11 @@ export class PoliciesCoder extends Coder { case PolicyType.MaxFee: case PolicyType.Tip: case PolicyType.WitnessLimit: - parts.push(new BigNumberCoder('u64').encode(data)); + parts.push(coders.u64.encode(data)); break; case PolicyType.Maturity: - parts.push(new NumberCoder('u32', { padToWordSize: true }).encode(data)); + parts.push(coders.u32.encode(data)); break; default: { @@ -82,33 +89,30 @@ export class PoliciesCoder extends Coder { return concat(parts); } - decode(data: Uint8Array, offset: number, policyTypes: number): [Policy[], number] { + decode(data: Uint8Array, offset: number): [Policy[], number] { let o = offset; const policies: Policy[] = []; - if (policyTypes & PolicyType.Tip) { - const [tip, nextOffset] = new BigNumberCoder('u64').decode(data, o); + if (this.policyTypeFilter & PolicyType.Tip) { + const [tip, nextOffset] = coders.u64.decode(data, o); o = nextOffset; policies.push({ type: PolicyType.Tip, data: tip }); } - if (policyTypes & PolicyType.WitnessLimit) { - const [witnessLimit, nextOffset] = new BigNumberCoder('u64').decode(data, o); + if (this.policyTypeFilter & PolicyType.WitnessLimit) { + const [witnessLimit, nextOffset] = coders.u64.decode(data, o); o = nextOffset; policies.push({ type: PolicyType.WitnessLimit, data: witnessLimit }); } - if (policyTypes & PolicyType.Maturity) { - const [maturity, nextOffset] = new NumberCoder('u32', { padToWordSize: true }).decode( - data, - o - ); + if (this.policyTypeFilter & PolicyType.Maturity) { + const [maturity, nextOffset] = coders.u32.decode(data, o); o = nextOffset; policies.push({ type: PolicyType.Maturity, data: maturity }); } - if (policyTypes & PolicyType.MaxFee) { - const [maxFee, nextOffset] = new BigNumberCoder('u64').decode(data, o); + if (this.policyTypeFilter & PolicyType.MaxFee) { + const [maxFee, nextOffset] = coders.u64.decode(data, o); o = nextOffset; policies.push({ type: PolicyType.MaxFee, data: maxFee }); } diff --git a/packages/transactions/src/coders/storage-slot.ts b/packages/transactions/src/coders/storage-slot.ts index bfef11c5298..e9cd88e10d3 100644 --- a/packages/transactions/src/coders/storage-slot.ts +++ b/packages/transactions/src/coders/storage-slot.ts @@ -1,4 +1,6 @@ -import { B256Coder, StructCoder } from '@fuel-ts/abi-coder'; +import { Coder } from '@fuel-ts/abi'; + +import { coders } from './coders'; export type StorageSlot = { /** Key (b256) */ @@ -7,14 +9,19 @@ export type StorageSlot = { value: string; }; -export class StorageSlotCoder extends StructCoder<{ - key: B256Coder; - value: B256Coder; -}> { - constructor() { - super('StorageSlot', { - key: new B256Coder(), - value: new B256Coder(), - }); +export class StorageSlotCoder extends Coder { + private coder = coders.struct({ + key: coders.b256, + value: coders.b256, + }); + + override type = 'StorageSlot'; + + encode(value: StorageSlot): Uint8Array { + return this.coder.encode(value); + } + + decode(data: Uint8Array, offset: number): [StorageSlot, number] { + return this.coder.decode(data, offset); } } diff --git a/packages/transactions/src/coders/transaction.ts b/packages/transactions/src/coders/transaction.ts index 5c6e2355cc6..e0fb8e3d854 100644 --- a/packages/transactions/src/coders/transaction.ts +++ b/packages/transactions/src/coders/transaction.ts @@ -1,11 +1,12 @@ /* eslint-disable max-classes-per-file */ -import { Coder, ArrayCoder, B256Coder, NumberCoder, BigNumberCoder } from '@fuel-ts/abi-coder'; +import { Coder } from '@fuel-ts/abi'; import { ErrorCode, FuelError } from '@fuel-ts/errors'; import { type BN } from '@fuel-ts/math'; import { concat } from '@fuel-ts/utils'; -import { ByteArrayCoder } from './byte-array'; +import { byteArray } from './byte-array'; +import { coders } from './coders'; import type { Input, InputContract } from './input'; import { InputCoder, InputContractCoder } from './input'; import type { Output, OutputContract } from './output'; @@ -81,27 +82,25 @@ export type TransactionScript = BaseTransactionType & { }; export class TransactionScriptCoder extends Coder { - constructor() { - super('TransactionScript', 'struct TransactionScript', 0); - } + override type = 'TransactionScript'; encode(value: TransactionScript): Uint8Array { const parts: Uint8Array[] = []; - parts.push(new BigNumberCoder('u64').encode(value.scriptGasLimit)); - parts.push(new B256Coder().encode(value.receiptsRoot)); - parts.push(new BigNumberCoder('u64').encode(value.scriptLength)); - parts.push(new BigNumberCoder('u64').encode(value.scriptDataLength)); - parts.push(new NumberCoder('u32', { padToWordSize: true }).encode(value.policyTypes)); - parts.push(new NumberCoder('u16', { padToWordSize: true }).encode(value.inputsCount)); - parts.push(new NumberCoder('u16', { padToWordSize: true }).encode(value.outputsCount)); - parts.push(new NumberCoder('u16', { padToWordSize: true }).encode(value.witnessesCount)); - parts.push(new ByteArrayCoder(value.scriptLength.toNumber()).encode(value.script)); - parts.push(new ByteArrayCoder(value.scriptDataLength.toNumber()).encode(value.scriptData)); + parts.push(coders.u64.encode(value.scriptGasLimit)); + parts.push(coders.b256.encode(value.receiptsRoot)); + parts.push(coders.u64.encode(value.scriptLength)); + parts.push(coders.u64.encode(value.scriptDataLength)); + parts.push(coders.u32.encode(value.policyTypes)); + parts.push(coders.u16.encode(value.inputsCount)); + parts.push(coders.u16.encode(value.outputsCount)); + parts.push(coders.u16.encode(value.witnessesCount)); + parts.push(byteArray(value.scriptLength.toNumber()).encode(value.script)); + parts.push(byteArray(value.scriptDataLength.toNumber()).encode(value.scriptData)); parts.push(new PoliciesCoder().encode(value.policies)); - parts.push(new ArrayCoder(new InputCoder(), value.inputsCount).encode(value.inputs)); - parts.push(new ArrayCoder(new OutputCoder(), value.outputsCount).encode(value.outputs)); - parts.push(new ArrayCoder(new WitnessCoder(), value.witnessesCount).encode(value.witnesses)); + parts.push(coders.array(new InputCoder(), value.inputsCount).encode(value.inputs)); + parts.push(coders.array(new OutputCoder(), value.outputsCount).encode(value.outputs)); + parts.push(coders.array(new WitnessCoder(), value.witnessesCount).encode(value.witnesses)); return concat(parts); } @@ -109,33 +108,33 @@ export class TransactionScriptCoder extends Coder { - constructor() { - super('TransactionCreate', 'struct TransactionCreate', 0); - } + override type = 'TransactionCreate'; encode(value: TransactionCreate): Uint8Array { const parts: Uint8Array[] = []; - parts.push(new NumberCoder('u16', { padToWordSize: true }).encode(value.bytecodeWitnessIndex)); - parts.push(new B256Coder().encode(value.salt)); - parts.push(new BigNumberCoder('u64').encode(value.storageSlotsCount)); - parts.push(new NumberCoder('u32', { padToWordSize: true }).encode(value.policyTypes)); - parts.push(new NumberCoder('u16', { padToWordSize: true }).encode(value.inputsCount)); - parts.push(new NumberCoder('u16', { padToWordSize: true }).encode(value.outputsCount)); - parts.push(new NumberCoder('u16', { padToWordSize: true }).encode(value.witnessesCount)); + parts.push(coders.u16.encode(value.bytecodeWitnessIndex)); + parts.push(coders.b256.encode(value.salt)); + parts.push(coders.u64.encode(value.storageSlotsCount)); + parts.push(coders.u32.encode(value.policyTypes)); + parts.push(coders.u16.encode(value.inputsCount)); + parts.push(coders.u16.encode(value.outputsCount)); + parts.push(coders.u16.encode(value.witnessesCount)); parts.push( - new ArrayCoder(new StorageSlotCoder(), value.storageSlotsCount.toNumber()).encode( - value.storageSlots - ) + coders + .array(new StorageSlotCoder(), value.storageSlotsCount.toNumber()) + .encode(value.storageSlots) ); parts.push(new PoliciesCoder().encode(value.policies)); - parts.push(new ArrayCoder(new InputCoder(), value.inputsCount).encode(value.inputs)); - parts.push(new ArrayCoder(new OutputCoder(), value.outputsCount).encode(value.outputs)); - parts.push(new ArrayCoder(new WitnessCoder(), value.witnessesCount).encode(value.witnesses)); + parts.push(coders.array(new InputCoder(), value.inputsCount).encode(value.inputs)); + parts.push(coders.array(new OutputCoder(), value.outputsCount).encode(value.outputs)); + parts.push(coders.array(new WitnessCoder(), value.witnessesCount).encode(value.witnesses)); return concat(parts); } @@ -209,32 +206,31 @@ export class TransactionCreateCoder extends Coder { - constructor() { - super('TransactionMint', 'struct TransactionMint', 0); - } + override type = 'TransactionMint'; encode(value: TransactionMint): Uint8Array { const parts: Uint8Array[] = []; @@ -290,9 +284,9 @@ export class TransactionMintCoder extends Coder { - constructor() { - super('TransactionUpgrade', 'struct TransactionUpgrade', 0); - } + override type = 'TransactionUpgrade'; encode(value: TransactionUpgrade): Uint8Array { const parts: Uint8Array[] = []; parts.push(new UpgradePurposeCoder().encode(value.upgradePurpose)); - parts.push(new NumberCoder('u32', { padToWordSize: true }).encode(value.policyTypes)); - parts.push(new NumberCoder('u16', { padToWordSize: true }).encode(value.inputsCount)); - parts.push(new NumberCoder('u16', { padToWordSize: true }).encode(value.outputsCount)); - parts.push(new NumberCoder('u16', { padToWordSize: true }).encode(value.witnessesCount)); + parts.push(coders.u32.encode(value.policyTypes)); + parts.push(coders.u16.encode(value.inputsCount)); + parts.push(coders.u16.encode(value.outputsCount)); + parts.push(coders.u16.encode(value.witnessesCount)); parts.push(new PoliciesCoder().encode(value.policies)); - parts.push(new ArrayCoder(new InputCoder(), value.inputsCount).encode(value.inputs)); - parts.push(new ArrayCoder(new OutputCoder(), value.outputsCount).encode(value.outputs)); - parts.push(new ArrayCoder(new WitnessCoder(), value.witnessesCount).encode(value.witnesses)); + parts.push(coders.array(new InputCoder(), value.inputsCount).encode(value.inputs)); + parts.push(coders.array(new OutputCoder(), value.outputsCount).encode(value.outputs)); + parts.push(coders.array(new WitnessCoder(), value.witnessesCount).encode(value.witnesses)); return concat(parts); } @@ -363,21 +355,21 @@ export class TransactionUpgradeCoder extends Coder { - constructor() { - super('TransactionUpload', 'struct TransactionUpload', 0); - } + override type = 'TransactionUpload'; encode(value: TransactionUpload): Uint8Array { const parts: Uint8Array[] = []; - parts.push(new B256Coder().encode(value.root)); - parts.push(new NumberCoder('u16', { padToWordSize: true }).encode(value.witnessIndex)); - parts.push(new NumberCoder('u16', { padToWordSize: true }).encode(value.subsectionIndex)); - parts.push(new NumberCoder('u16', { padToWordSize: true }).encode(value.subsectionsNumber)); - parts.push(new NumberCoder('u16', { padToWordSize: true }).encode(value.proofSetCount)); - parts.push(new NumberCoder('u32', { padToWordSize: true }).encode(value.policyTypes)); - parts.push(new NumberCoder('u16', { padToWordSize: true }).encode(value.inputsCount)); - parts.push(new NumberCoder('u16', { padToWordSize: true }).encode(value.outputsCount)); - parts.push(new NumberCoder('u16', { padToWordSize: true }).encode(value.witnessesCount)); - parts.push(new ArrayCoder(new B256Coder(), value.proofSetCount).encode(value.proofSet)); + parts.push(coders.b256.encode(value.root)); + parts.push(coders.u16.encode(value.witnessIndex)); + parts.push(coders.u16.encode(value.subsectionIndex)); + parts.push(coders.u16.encode(value.subsectionsNumber)); + parts.push(coders.u16.encode(value.proofSetCount)); + parts.push(coders.u32.encode(value.policyTypes)); + parts.push(coders.u16.encode(value.inputsCount)); + parts.push(coders.u16.encode(value.outputsCount)); + parts.push(coders.u16.encode(value.witnessesCount)); + parts.push(coders.array(coders.b256, value.proofSetCount).encode(value.proofSet)); parts.push(new PoliciesCoder().encode(value.policies)); - parts.push(new ArrayCoder(new InputCoder(), value.inputsCount).encode(value.inputs)); - parts.push(new ArrayCoder(new OutputCoder(), value.outputsCount).encode(value.outputs)); - parts.push(new ArrayCoder(new WitnessCoder(), value.witnessesCount).encode(value.witnesses)); + parts.push(coders.array(new InputCoder(), value.inputsCount).encode(value.inputs)); + parts.push(coders.array(new OutputCoder(), value.outputsCount).encode(value.outputs)); + parts.push(coders.array(new WitnessCoder(), value.witnessesCount).encode(value.witnesses)); return concat(parts); } @@ -450,33 +440,33 @@ export class TransactionUploadCoder extends Coder { - constructor() { - super('TransactionBlob', 'struct TransactionBlob', 0); - } + override type = 'TransactionBlob'; encode(value: TransactionBlob): Uint8Array { const parts: Uint8Array[] = []; - parts.push(new B256Coder().encode(value.blobId)); - parts.push(new NumberCoder('u16', { padToWordSize: true }).encode(value.witnessIndex)); - parts.push(new NumberCoder('u32', { padToWordSize: true }).encode(value.policyTypes)); - parts.push(new NumberCoder('u16', { padToWordSize: true }).encode(value.inputsCount)); - parts.push(new NumberCoder('u16', { padToWordSize: true }).encode(value.outputsCount)); - parts.push(new NumberCoder('u16', { padToWordSize: true }).encode(value.witnessesCount)); + parts.push(coders.b256.encode(value.blobId)); + parts.push(coders.u16.encode(value.witnessIndex)); + parts.push(coders.u32.encode(value.policyTypes)); + parts.push(coders.u16.encode(value.inputsCount)); + parts.push(coders.u16.encode(value.outputsCount)); + parts.push(coders.u16.encode(value.witnessesCount)); parts.push(new PoliciesCoder().encode(value.policies)); - parts.push(new ArrayCoder(new InputCoder(), value.inputsCount).encode(value.inputs)); - parts.push(new ArrayCoder(new OutputCoder(), value.outputsCount).encode(value.outputs)); - parts.push(new ArrayCoder(new WitnessCoder(), value.witnessesCount).encode(value.witnesses)); + parts.push(coders.array(new InputCoder(), value.inputsCount).encode(value.inputs)); + parts.push(coders.array(new OutputCoder(), value.outputsCount).encode(value.outputs)); + parts.push(coders.array(new WitnessCoder(), value.witnessesCount).encode(value.witnesses)); return concat(parts); } @@ -538,25 +526,25 @@ export class TransactionBlobCoder extends Coder = TTransactionType extends Tran }; export class TransactionCoder extends Coder { - constructor() { - super('Transaction', 'struct Transaction', 0); - } + override type = 'Transaction'; encode(value: Transaction): Uint8Array { const parts: Uint8Array[] = []; - parts.push(new NumberCoder('u8', { padToWordSize: true }).encode(value.type)); + parts.push(coders.u8.encode(value.type)); const { type } = value; @@ -657,7 +643,7 @@ export class TransactionCoder extends Coder { let decoded; let o = offset; - [decoded, o] = new NumberCoder('u8', { padToWordSize: true }).decode(data, o); + [decoded, o] = coders.u8.decode(data, o); const type = decoded as TransactionType; switch (type) { diff --git a/packages/transactions/src/coders/tx-pointer.ts b/packages/transactions/src/coders/tx-pointer.ts index 6ac2087cd86..1a210264c6b 100644 --- a/packages/transactions/src/coders/tx-pointer.ts +++ b/packages/transactions/src/coders/tx-pointer.ts @@ -1,6 +1,8 @@ -import { NumberCoder, StructCoder } from '@fuel-ts/abi-coder'; +import { Coder } from '@fuel-ts/abi'; import { ErrorCode, FuelError } from '@fuel-ts/errors'; +import { coders } from './coders'; + export type TxPointer = { /** Block height (u32) */ blockHeight: number; @@ -9,18 +11,23 @@ export type TxPointer = { txIndex: number; }; -export class TxPointerCoder extends StructCoder<{ - blockHeight: NumberCoder; - txIndex: NumberCoder; -}> { - constructor() { - super('TxPointer', { - blockHeight: new NumberCoder('u32', { padToWordSize: true }), - txIndex: new NumberCoder('u16', { padToWordSize: true }), - }); +const txPointerCoder = coders.struct({ + blockHeight: coders.u32, + txIndex: coders.u16, +}); + +export class TxPointerCoder extends Coder { + override type = 'TxPointer'; + + encode(value: TxPointer): Uint8Array { + return txPointerCoder.encode(value); + } + + decode(data: Uint8Array, offset: number): [TxPointer, number] { + return txPointerCoder.decode(data, offset); } - public static decodeFromGqlScalar(value: string) { + static decodeFromGqlScalar(value: string): TxPointer { // taken from https://github.com/FuelLabs/fuel-vm/blob/7366db6955589cb3444c9b2bb46e45c8539f19f5/fuel-tx/src/tx_pointer.rs#L87 if (value.length !== 12) { throw new FuelError( diff --git a/packages/transactions/src/coders/upgrade-purpose.test.ts b/packages/transactions/src/coders/upgrade-purpose.test.ts index 9c40186179a..25f3da24419 100644 --- a/packages/transactions/src/coders/upgrade-purpose.test.ts +++ b/packages/transactions/src/coders/upgrade-purpose.test.ts @@ -1,6 +1,6 @@ -import { B256Coder, NumberCoder } from '@fuel-ts/abi-coder'; import { arrayify } from '@fuel-ts/utils'; +import { coders } from './coders'; import type { UpgradePurpose } from './upgrade-purpose'; import { UpgradePurposeCoder, UpgradePurposeTypeEnum } from './upgrade-purpose'; @@ -23,8 +23,8 @@ describe('UpgradePurposeCoder', () => { }; const typeBytes = [0, 0, 0, 0, 0, 0, 0, UpgradePurposeTypeEnum.ConsensusParameters]; - const witnessIndexBytes = new NumberCoder('u8', { padToWordSize: true }).encode(witnessIndex); - const checksumBytes = new B256Coder().encode(checksum); + const witnessIndexBytes = coders.u8.encode(witnessIndex); + const checksumBytes = coders.b256.encode(checksum); const expectedEncoded = Uint8Array.from([...typeBytes, ...witnessIndexBytes, ...checksumBytes]); @@ -42,7 +42,7 @@ describe('UpgradePurposeCoder', () => { }; const typeBytes = [0, 0, 0, 0, 0, 0, 0, UpgradePurposeTypeEnum.StateTransition]; - const bytecodeRootBytes = new B256Coder().encode(bytecodeRoot); + const bytecodeRootBytes = coders.b256.encode(bytecodeRoot); const expectedEncoded = Uint8Array.from([...typeBytes, ...bytecodeRootBytes]); const encoded = new UpgradePurposeCoder().encode(upgradePurpose); diff --git a/packages/transactions/src/coders/upgrade-purpose.ts b/packages/transactions/src/coders/upgrade-purpose.ts index 33db4b8d5ad..758fde6ac42 100644 --- a/packages/transactions/src/coders/upgrade-purpose.ts +++ b/packages/transactions/src/coders/upgrade-purpose.ts @@ -1,7 +1,10 @@ -import { B256Coder, Coder, NumberCoder } from '@fuel-ts/abi-coder'; +/* eslint-disable max-classes-per-file */ +import { Coder } from '@fuel-ts/abi'; import { ErrorCode, FuelError } from '@fuel-ts/errors'; import { concat } from '@fuel-ts/utils'; +import { coders } from './coders'; + export enum UpgradePurposeTypeEnum { ConsensusParameters = 0, StateTransition = 1, @@ -24,36 +27,61 @@ export interface ConsensusParameters { /** The hash of the serialized consensus parameters. */ checksum: string; } +export class ConsensusParametersCoder extends Coder { + private coder = coders.struct({ + witnessIndex: coders.u16, + checksum: coders.b256, + }); + + override type = 'ConsensusParameters'; + + encode(value: ConsensusParameters): Uint8Array { + return this.coder.encode(value); + } + + decode(data: Uint8Array, offset: number): [ConsensusParameters, number] { + return this.coder.decode(data, offset); + } +} export interface StateTransition { /** The root of the new bytecode of the state transition function. */ bytecodeRoot: string; } -export class UpgradePurposeCoder extends Coder { - constructor() { - super('UpgradePurpose', 'UpgradePurpose', 0); +export class StateTransitionCoder extends Coder { + private coder = coders.struct({ + bytecodeRoot: coders.b256, + }); + + override type = 'StateTransition'; + + encode(value: StateTransition): Uint8Array { + return this.coder.encode(value); } + decode(data: Uint8Array, offset: number): [StateTransition, number] { + return this.coder.decode(data, offset); + } +} + +export class UpgradePurposeCoder extends Coder { + override type = 'UpgradePurpose'; + encode(upgradePurposeType: UpgradePurpose): Uint8Array { const parts: Uint8Array[] = []; const { type } = upgradePurposeType; - parts.push(new NumberCoder('u8', { padToWordSize: true }).encode(type)); + parts.push(coders.u8.encode(type)); switch (type) { case UpgradePurposeTypeEnum.ConsensusParameters: { - const data = upgradePurposeType.data as ConsensusParameters; - - parts.push(new NumberCoder('u16', { padToWordSize: true }).encode(data.witnessIndex)); - parts.push(new B256Coder().encode(data.checksum)); + parts.push(new ConsensusParametersCoder().encode(upgradePurposeType.data)); break; } case UpgradePurposeTypeEnum.StateTransition: { - const data = upgradePurposeType.data as StateTransition; - - parts.push(new B256Coder().encode(data.bytecodeRoot)); + parts.push(new StateTransitionCoder().encode(upgradePurposeType.data)); break; } @@ -68,28 +96,18 @@ export class UpgradePurposeCoder extends Coder { return concat(parts); } - decode(data: Uint8Array, offset: number): [UpgradePurpose, number] { - let o = offset; - let decoded; - - [decoded, o] = new NumberCoder('u8', { padToWordSize: true }).decode(data, o); - const type = decoded as UpgradePurposeTypeEnum; + decode(data: Uint8Array, initialOffset: number): [UpgradePurpose, number] { + const [type, offset] = coders.u8.decode(data, initialOffset); switch (type) { case UpgradePurposeTypeEnum.ConsensusParameters: { - [decoded, o] = new NumberCoder('u16', { padToWordSize: true }).decode(data, o); - const witnessIndex = decoded; - [decoded, o] = new B256Coder().decode(data, o); - const checksum = decoded; - - return [{ type, data: { witnessIndex, checksum } }, o]; + const [decoded, o] = new ConsensusParametersCoder().decode(data, offset); + return [{ type, data: decoded }, o]; } case UpgradePurposeTypeEnum.StateTransition: { - [decoded, o] = new B256Coder().decode(data, o); - const bytecodeRoot = decoded; - - return [{ type, data: { bytecodeRoot } }, o]; + const [decoded, o] = new StateTransitionCoder().decode(data, offset); + return [{ type, data: decoded }, o]; } default: { diff --git a/packages/transactions/src/coders/utxo-id.ts b/packages/transactions/src/coders/utxo-id.ts index a967e626c7c..71d5786d73d 100644 --- a/packages/transactions/src/coders/utxo-id.ts +++ b/packages/transactions/src/coders/utxo-id.ts @@ -1,4 +1,6 @@ -import { B256Coder, NumberCoder, StructCoder } from '@fuel-ts/abi-coder'; +import { Coder } from '@fuel-ts/abi'; + +import { coders } from './coders'; export type UtxoId = { /** Transaction ID (b256) */ @@ -7,14 +9,19 @@ export type UtxoId = { outputIndex: number; }; -export class UtxoIdCoder extends StructCoder<{ - transactionId: B256Coder; - outputIndex: NumberCoder; -}> { - constructor() { - super('UtxoId', { - transactionId: new B256Coder(), - outputIndex: new NumberCoder('u16', { padToWordSize: true }), - }); +const utxoIdCoder: Coder = coders.struct({ + transactionId: coders.b256, + outputIndex: coders.u16, +}); + +export class UtxoIdCoder extends Coder { + override type = 'UtxoId'; + + encode(value: UtxoId): Uint8Array { + return utxoIdCoder.encode(value); + } + + decode(data: Uint8Array, offset: number): [UtxoId, number] { + return utxoIdCoder.decode(data, offset); } } diff --git a/packages/transactions/src/coders/witness.test.ts b/packages/transactions/src/coders/witness.test.ts index a33499895ea..44c43a05e8d 100644 --- a/packages/transactions/src/coders/witness.test.ts +++ b/packages/transactions/src/coders/witness.test.ts @@ -1,7 +1,6 @@ import { arrayify, hexlify } from '@fuel-ts/utils'; -import type { Witness } from './witness'; -import { WitnessCoder } from './witness'; +import { WitnessCoder, type Witness } from './witness'; /** * @group node diff --git a/packages/transactions/src/coders/witness.ts b/packages/transactions/src/coders/witness.ts index 5121e60fc3a..b8cd4537910 100644 --- a/packages/transactions/src/coders/witness.ts +++ b/packages/transactions/src/coders/witness.ts @@ -1,7 +1,8 @@ -import { Coder, NumberCoder } from '@fuel-ts/abi-coder'; +import { Coder } from '@fuel-ts/abi'; import { concat } from '@fuel-ts/utils'; -import { ByteArrayCoder } from './byte-array'; +import { byteArray } from './byte-array'; +import { coders } from './coders'; export type Witness = { /** Length of witness data byte array */ @@ -11,20 +12,13 @@ export type Witness = { }; export class WitnessCoder extends Coder { - constructor() { - super( - 'Witness', - // Types of dynamic length are not supported in the ABI - 'unknown', - 0 - ); - } + override type = 'Witness'; encode(value: Witness): Uint8Array { const parts: Uint8Array[] = []; - parts.push(new NumberCoder('u32', { padToWordSize: true }).encode(value.dataLength)); - parts.push(new ByteArrayCoder(value.dataLength).encode(value.data)); + parts.push(coders.u32.encode(value.dataLength)); + parts.push(byteArray(value.dataLength).encode(value.data)); return concat(parts); } @@ -33,17 +27,11 @@ export class WitnessCoder extends Coder { let decoded; let o = offset; - [decoded, o] = new NumberCoder('u32', { padToWordSize: true }).decode(data, o); + [decoded, o] = coders.u32.decode(data, o); const dataLength = decoded; - [decoded, o] = new ByteArrayCoder(dataLength).decode(data, o); + [decoded, o] = byteArray(dataLength).decode(data, o); const witnessData = decoded; - return [ - { - dataLength, - data: witnessData, - }, - o, - ]; + return [{ dataLength, data: witnessData }, o]; } } diff --git a/packages/transactions/src/receipt.test.ts b/packages/transactions/src/receipt.test.ts index 5bae4d01197..00fde520ea7 100644 --- a/packages/transactions/src/receipt.test.ts +++ b/packages/transactions/src/receipt.test.ts @@ -1,11 +1,11 @@ -import { BigNumberCoder } from '@fuel-ts/abi-coder'; +import { encoding } from '@fuel-ts/abi'; import type { AssetId } from '@fuel-ts/address'; import { getRandomB256 } from '@fuel-ts/address'; import { sha256 } from '@fuel-ts/hasher'; import { bn } from '@fuel-ts/math'; import { arrayify, concat } from '@fuel-ts/utils'; -import { ByteArrayCoder } from './coders/byte-array'; +import { byteArray } from './coders/byte-array'; import { getMintedAssetId, createAssetId, getMessageId } from './receipt'; /** @@ -52,10 +52,10 @@ describe('getMessageId', () => { const parts: Uint8Array[] = []; - parts.push(new ByteArrayCoder(32).encode(sender)); - parts.push(new ByteArrayCoder(32).encode(recipient)); - parts.push(new ByteArrayCoder(32).encode(nonce)); - parts.push(new BigNumberCoder('u64').encode(amount)); + parts.push(byteArray(32).encode(sender)); + parts.push(byteArray(32).encode(recipient)); + parts.push(byteArray(32).encode(nonce)); + parts.push(encoding.v1.u64.encode(amount)); parts.push(data); const expected = sha256(concat(parts)); @@ -73,10 +73,10 @@ describe('getMessageId', () => { const parts: Uint8Array[] = []; - parts.push(new ByteArrayCoder(32).encode(sender)); - parts.push(new ByteArrayCoder(32).encode(recipient)); - parts.push(new ByteArrayCoder(32).encode(nonce)); - parts.push(new BigNumberCoder('u64').encode(amount)); + parts.push(byteArray(32).encode(sender)); + parts.push(byteArray(32).encode(recipient)); + parts.push(byteArray(32).encode(nonce)); + parts.push(encoding.v1.u64.encode(amount)); parts.push(data); const expected = sha256(concat(parts)); diff --git a/packages/transactions/src/receipt.ts b/packages/transactions/src/receipt.ts index eb204485006..aa2cf9fa1af 100644 --- a/packages/transactions/src/receipt.ts +++ b/packages/transactions/src/receipt.ts @@ -1,10 +1,10 @@ -import { BigNumberCoder } from '@fuel-ts/abi-coder'; +import { encoding } from '@fuel-ts/abi'; import type { AssetId } from '@fuel-ts/address'; import { sha256 } from '@fuel-ts/hasher'; import type { BN } from '@fuel-ts/math'; import { arrayify, concat } from '@fuel-ts/utils'; -import { ByteArrayCoder } from './coders/byte-array'; +import { byteArray } from './coders/byte-array'; export enum ReceiptType /* u8 */ { Call = 0, @@ -263,10 +263,10 @@ export const getMessageId = ( ): string => { const parts: Uint8Array[] = []; - parts.push(new ByteArrayCoder(32).encode(value.sender)); - parts.push(new ByteArrayCoder(32).encode(value.recipient)); - parts.push(new ByteArrayCoder(32).encode(value.nonce)); - parts.push(new BigNumberCoder('u64').encode(value.amount)); + parts.push(byteArray(32).encode(value.sender)); + parts.push(byteArray(32).encode(value.recipient)); + parts.push(byteArray(32).encode(value.nonce)); + parts.push(encoding.v1.u64.encode(value.amount)); parts.push(arrayify(value.data || '0x')); return sha256(concat(parts)); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d9bb030d0c9..4136b91882f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -508,6 +508,9 @@ importers: internal/check-imports: dependencies: + '@fuel-ts/abi': + specifier: workspace:* + version: link:../../packages/abi '@fuel-ts/abi-coder': specifier: workspace:* version: link:../../packages/abi-coder @@ -575,9 +578,18 @@ importers: packages/abi: dependencies: + '@fuel-ts/crypto': + specifier: workspace:* + version: link:../crypto '@fuel-ts/errors': specifier: workspace:* version: link:../errors + '@fuel-ts/hasher': + specifier: workspace:* + version: link:../hasher + '@fuel-ts/math': + specifier: workspace:* + version: link:../math '@fuel-ts/utils': specifier: workspace:* version: link:../utils @@ -593,6 +605,9 @@ importers: handlebars: specifier: 4.7.8 version: 4.7.8 + type-fest: + specifier: 4.26.1 + version: 4.26.1 packages/abi-coder: dependencies: @@ -657,9 +672,9 @@ importers: packages/account: dependencies: - '@fuel-ts/abi-coder': + '@fuel-ts/abi': specifier: workspace:* - version: link:../abi-coder + version: link:../abi '@fuel-ts/address': specifier: workspace:* version: link:../address @@ -748,9 +763,9 @@ importers: packages/contract: dependencies: - '@fuel-ts/abi-coder': + '@fuel-ts/abi': specifier: workspace:* - version: link:../abi-coder + version: link:../abi '@fuel-ts/account': specifier: workspace:* version: link:../account @@ -868,9 +883,6 @@ importers: '@fuel-ts/abi': specifier: workspace:* version: link:../abi - '@fuel-ts/abi-coder': - specifier: workspace:* - version: link:../abi-coder '@fuel-ts/account': specifier: workspace:* version: link:../account @@ -1011,9 +1023,9 @@ importers: packages/program: dependencies: - '@fuel-ts/abi-coder': + '@fuel-ts/abi': specifier: workspace:* - version: link:../abi-coder + version: link:../abi '@fuel-ts/account': specifier: workspace:* version: link:../account @@ -1048,9 +1060,6 @@ importers: '@fuel-ts/abi': specifier: workspace:* version: link:../abi - '@fuel-ts/abi-coder': - specifier: workspace:* - version: link:../abi-coder '@fuel-ts/account': specifier: workspace:* version: link:../account @@ -1072,9 +1081,9 @@ importers: packages/script: dependencies: - '@fuel-ts/abi-coder': + '@fuel-ts/abi': specifier: workspace:* - version: link:../abi-coder + version: link:../abi '@fuel-ts/account': specifier: workspace:* version: link:../account @@ -1100,9 +1109,9 @@ importers: packages/transactions: dependencies: - '@fuel-ts/abi-coder': + '@fuel-ts/abi': specifier: workspace:* - version: link:../abi-coder + version: link:../abi '@fuel-ts/address': specifier: workspace:* version: link:../address diff --git a/templates/nextjs/src/sway-api/common.ts b/templates/nextjs/src/sway-api/common.ts index 43cb6e6689e..d2f0bd72ea0 100644 --- a/templates/nextjs/src/sway-api/common.ts +++ b/templates/nextjs/src/sway-api/common.ts @@ -9,7 +9,7 @@ */ -import type { FunctionFragment, InvokeFunction } from 'fuels'; +import type { AbiCoderFunction, InvokeFunction } from 'fuels'; /** * Mimics Sway Enum. @@ -49,5 +49,5 @@ export type ProgramFunctionMapper = { }; export type InterfaceFunctionMapper = { - [K in keyof T]: FunctionFragment; + [K in keyof T]: AbiCoderFunction; }; \ No newline at end of file diff --git a/templates/vite/src/sway-api/common.ts b/templates/vite/src/sway-api/common.ts index 43cb6e6689e..d2f0bd72ea0 100644 --- a/templates/vite/src/sway-api/common.ts +++ b/templates/vite/src/sway-api/common.ts @@ -9,7 +9,7 @@ */ -import type { FunctionFragment, InvokeFunction } from 'fuels'; +import type { AbiCoderFunction, InvokeFunction } from 'fuels'; /** * Mimics Sway Enum. @@ -49,5 +49,5 @@ export type ProgramFunctionMapper = { }; export type InterfaceFunctionMapper = { - [K in keyof T]: FunctionFragment; + [K in keyof T]: AbiCoderFunction; }; \ No newline at end of file diff --git a/tsconfig.test.json b/tsconfig.test.json index 0ca9f42bd9a..96ad5020fb9 100644 --- a/tsconfig.test.json +++ b/tsconfig.test.json @@ -3,6 +3,6 @@ "compilerOptions": { "noEmit": true }, - "include": ["**/*.test.ts", "**/*.d.ts"], + "include": ["**/*.test.ts"], "exclude": ["node_modules", "apps/docs/src/**/*.test.ts"] } diff --git a/vitest.d.ts b/vitest.d.ts new file mode 100644 index 00000000000..de38d6e3b2a --- /dev/null +++ b/vitest.d.ts @@ -0,0 +1,12 @@ +import 'vitest'; + +interface CustomMatchers { + toEqualBn: (bn: string | number) => R; +} + +declare module 'vitest' { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + interface Assertion extends CustomMatchers {} + interface ExpectStatic extends CustomMatchers {} + interface AsymmetricMatchersContaining extends CustomMatchers {} +}