Full Ethereum [JSON-ABI] implementation.
This crate is a re-implementation of a part of [ethabi]'s API, with a few main
differences:
- the Contract
struct is now called JsonAbi
and also contains the fallback
and receive
functions
- the Param
and EventParam
structs only partially parse the type string
instead of fully resolving it into a Solidity type
Parse a JSON ABI file into a JsonAbi
struct:
```rust use alloyjsonabi::JsonAbi;
let path = "path/to/abi.json"; let json = std::fs::readtostring(path).unwrap();
let abi: JsonAbi = serdejson::fromstr(&json).unwrap(); for item in abi.items() { println!("{item:?}"); } ```
Resolve a Function
's input type with alloy-dyn-abi
:
rust,ignore
todo!()