From c8e818a747fcdeba0d4007db27e65e482ced9b13 Mon Sep 17 00:00:00 2001 From: glihm Date: Fri, 22 Dec 2023 16:08:10 -0600 Subject: [PATCH] docs: update README with new version and ABI file --- crates/rs/README.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/crates/rs/README.md b/crates/rs/README.md index d8d527c..65f5410 100644 --- a/crates/rs/README.md +++ b/crates/rs/README.md @@ -7,7 +7,7 @@ This crates contains the compile-time rust macro `abigen` to generate rust bindi ```toml # Cargo.toml -cainome = { git = "https://github.com/cartridge-gg/cainome", tag = "v0.1.5", features = ["abigen-rs"] } +cainome = { git = "https://github.com/cartridge-gg/cainome", tag = "v0.1.7", features = ["abigen-rs"] } ``` ```rust @@ -24,11 +24,14 @@ For examples, please refer to the [examples](../../examples) folder. The `abigen!` macro takes 2 or 3 inputs: 1. The name you want to assign to the contract type being generated. -2. Path to the JSON file containing only the list of ABI entries. This can be easily generated with `jq` doing the following: +2. Path to the JSON file containing the ABI. This file can have two format: -``` -jq .abi ./target/dev/package_contract.contract_class.json > /path/contract.json -``` + - The entire Sierra file (`*.contract_class.json`) + - Only the array of ABI entries. These can be easily extracted with `jq` doing the following: + + ``` + jq .abi ./target/dev/package_contract.contract_class.json > /path/contract.json + ``` 3. Optional parameters: - `output_path`: if provided, the content will be generated in the given file instead of being expanded at the location of the macro invocation.