Macro fuels_macros::abigen

source ยท
abigen!() { /* proc-macro */ }
Expand description

Used to generate bindings for Contracts, Scripts and Predicates. Accepts input in the form of ProgramType(name="MyBindings", abi=ABI_SOURCE)...

ProgramType is either Contract, Script or Predicate.

ABI_SOURCE is a string literal representing either a path to the JSON ABI file or the contents of the JSON ABI file itself.

 abigen!(Contract(
         name = "MyContract",
         abi = "packages/fuels/tests/contracts/token_ops/out/release/token_ops-abi.json"
     ));

More details can be found in the Fuel Rust SDK Book