| Crates.io | linera-alloy-json-abi |
| lib.rs | linera-alloy-json-abi |
| version | 0.7.4 |
| created_at | 2024-05-30 20:02:21.021361+00 |
| updated_at | 2024-05-30 20:02:21.021361+00 |
| description | Full Ethereum JSON-ABI implementation |
| homepage | https://github.com/MathieuDutSik/ethreum_core/tree/main/crates/json-abi |
| repository | https://github.com/MathieuDutSik/ethreum_core |
| max_upload_size | |
| id | 1257225 |
| size | 124,370 |
Full Ethereum JSON-ABI implementation.
This crate is a re-implementation of a part of ethabi's API, with a few main differences:
Contract struct is now called JsonAbi and also contains the fallback
and receive functionsParam and EventParam structs only partially parse the type string
instead of fully resolving it into a Solidity typeParse a JSON ABI file into a JsonAbi struct:
use linera_alloy_json_abi::JsonAbi;
# stringify!(
let path = "path/to/abi.json";
let json = std::fs::read_to_string(path).unwrap();
# );
# let json = "[]";
let abi: JsonAbi = serde_json::from_str(&json).unwrap();
for item in abi.items() {
println!("{item:?}");
}