Registry / crypto / ethabi

ethabi

JSON →
library18.0.0rscratesunverified

Easy to use conversion of Ethereum contract calls to bytecode.

# Cargo.toml [dependencies] ethabi = "18.0.0"
INSTALL
IMPORT
SIG · ETHABI
E
ethabi
cryptorustv18.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Contract
use ethabi::Contract;

Load an Ethereum contract ABI from a JSON file.

use ethabi::Contract; use std::fs; let abi_json = fs::read_to_string("contract.abi.json").unwrap(); let contract = Contract::load(abi_json.as_bytes()).unwrap();
Debug
Known issues
breakingBreaking changes in version 18.0.0: `Contract::load` now takes bytes instead of a string.
fix
Pass `abi_json.as_bytes()` instead of `&abi_json`.
affects: >=18.0.0
Upgrade
Version history
18.0.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
10
Resources
ethabi — cargo add ethabi · libregistry