vechain / vechain-sdk-js

The official JavaScript SDK for VeChain.
24 stars 9 forks source link

Analyze json ABI import #1134

Open Valazan opened 1 month ago

Valazan commented 1 month ago

Currently, TypeScript does not support direct type inference from JSON files. The issue arises because we are registering the contracts on VeChain in the folder https://github.com/vechain/b32/tree/master as JSON files.

The goal of this task is to find a method to load an ABI from a .json file while enabling TypeScript to utilize type inference.

Valazan commented 1 month ago

Idea: after speaking with @lucanicoladebiasi, we thought that it will be possible to read the b32 registry during the build phase of the SDK and synthetically create the abi ts constants compatible with the abitype specification.