ethbind 0.2.4

This is a code generation framework for Solidity(Contract) ABI.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::path::PathBuf;

use ethbind::rustgen::bind_hardhat_artifact;

#[test]
fn gen_rust_code() {
    let root_dir: PathBuf = env!("CARGO_MANIFEST_DIR").parse().unwrap();

    let tmp_dir: PathBuf = env!("CARGO_TARGET_TMPDIR").parse().unwrap();

    bind_hardhat_artifact(
        root_dir.join("src/abi.json"),
        root_dir.join("../macros/src/mapping.json"),
        tmp_dir,
    )
    .unwrap();
}