feat: parser scaffolding
Summary
- Adds the parsing functionality for an ABI
import type { Abi, AbiSpecification } from '@fuel-ts/abi'
import { AbiParser } from '@fuel-ts/abi'
const jsonAbi: AbiSpecification = '{ "specVersion": "1" }'
const abi: Abi = AbiParser.parse(jsonAbi);
Checklist
- [ ] All changes are covered by tests (or not applicable)
- [ ] All changes are documented (or not applicable)
- [ ] I reviewed the entire PR myself (preferably, on GH UI)
- [ ] I described all Breaking Changes (or there's none)
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| create-fuels-template | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jan 22, 2025 1:48pm |
| fuels-template | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jan 22, 2025 1:48pm |
| ts-api-docs | ❌ Failed (Inspect) | Jan 22, 2025 1:48pm | ||
| ts-docs | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jan 22, 2025 1:48pm |
| ts-docs-api | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jan 22, 2025 1:48pm |
1 Skipped Deployment
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| create-fuels-counter-example | ⬜️ Ignored (Inspect) | Jan 22, 2025 1:48pm |
CodSpeed Performance Report
Merging #3089 will degrade performances by 17.21%
Comparing ns/feat/abi-parser (a2f0004) with np/feat/abi-refactor (1390116)
Summary
❌ 1 regressions
✅ 17 untouched benchmarks
:warning: Please fix the performance issues or acknowledge them on CodSpeed.
Benchmarks breakdown
| Benchmark | np/feat/abi-refactor |
ns/feat/abi-parser |
Change | |
|---|---|---|---|---|
| ❌ | should successfully conduct a custom transfer between wallets (x20 times) |
99.4 ms | 120 ms | -17.21% |
@maschad Thanks for the approval! Still, given that this parser is public-facing as well, we realized that we need to test its outputs independently also. Although it satisfies our needs for the coder and typegen, we might inadvertently introduce regressions that aren't caught by them and which'd be caught by tests targeting it specifically. Therefore, we'll re-request a round of review after the tests are done.
This is a comment from @danielbate on #3402 - with a couple amendments (ref):
- [ ] Documentation around the
AbiSpecification. (ref) - [ ] Documentation on the metadata types. (ref)
- [ ] Documentation the flow from
Abi(JSON) ->AbiSpecification-> Normalised ABI -> Coder/gen isn't completely clear to me. So I can still use the coder and gen without normalising the ABI? (ref). And because the user can still interact directly with just ABI?
(This has been added to the description)