FuelLabs / fuels-ts

Fuel Network Typescript SDK
https://docs.fuel.network/docs/fuels-ts/
Apache License 2.0
44.06k stars 1.34k forks source link

Abi - Refactor / Kickoff #3029

Closed arboleya closed 1 month ago

arboleya commented 2 months ago

Instead of merely combining both packages in a single folder, the aim is to refactor them using the same structural approach. After recently modified Spec and Encoding strategies, and with future-proofing in mind, we can look ahead and strategize a proper foundation that should be resilient to future needs.

arboleya commented 2 months ago

overview

arboleya commented 2 months ago

Basic sketch of what could be a starting point for the file structure.

abi
├── coder
│   ├── AbiCoder.ts
│   ├── encodings
│   │   ├── v1
│   │   │   ├── array.ts
│   │   │   └── enum.ts
│   │   └── v2
│   │       ├── array.ts
│   │       └── enum.ts
│   └── types
├── gen
│   ├── AbiGen.ts
│   ├── formatters
│   │   ├── configurables.ts
│   │   ├── enums.ts
│   │   ├── functions.ts
│   │   └── ...
│   ├── renders
│   │   ├── renderContract.ts
│   │   └── ...
│   ├── templates
│   │   ├── typescript
│   │   │   ├── contract-factory.hbs
│   │   │   ├── contract.hbs
│   │   │   └── ...
│   │   └── javascript
│   └── types
├── parser
│   ├── AbiParser.ts
│   ├── specs
│   │   ├── v1
│   │   │   ├── interface.ts
│   │   │   └── transpiler.ts
│   │   └── v2
│   └── types
└── test
    ├── fixtures
    │   └── forc-projects
    └── integration
petertonysmith94 commented 1 month ago

We have addressed the key issues of this PR, so I am closing this as complete.