cartridge-gg / cainome

A library to generate bindings from Cairo ABI.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cainome binary

glihm opened this issue · comments

To ease the abigen use without depending on rust directly, having a binary for cainome can be great.
The idea here is to provide a cainomeup script for quick and easy install.

Features:

  1. Generate binding for a given backend from a Sierra class file JSON file.
  2. Generate binding for a given backend from a contract address and a rpc url, to have cainome binary fetching the ABI from the chain to generate the bindings.
  3. Specify the backend (only rust is available for now).

Examples (arbitrary names that can be changed):

cainome gen --sierra my_contract.contract_class.json --rust /tmp/my_contract.rs
cainome gen --address 0x1234 --rpc-url https://sepolia... --typescript /tmp/my_contract.ts

First version is done, to be improved.