#abi #parser #generic #variant #members #input #type

starknet-abigen-parser-stopgap

parser for generating StarkNet ABI bindings by glihm

1 unstable release

0.1.0 Dec 5, 2023

#20 in #members

22 downloads per month

MIT license

80KB
2K SLoC

This crates is about parsing Cairo types from an ABI. Later, this will also be able to parse Cairo type from Cairo code.

The important consideration are the generic type. Indeed, in the ABI there is no information about a type genericity and how exactly the members/variants are following the generic type as everything is flattened.

abi_types is the low level parsing of the types. It supports nested types.

CairoStruct, CairoEnum and CairoFunction are higher level types to resolve the genericity and manage members/variants/inputs/outputs for simpler expansion.

Dependencies

~12–28MB
~416K SLoC