Registry / other / ethers-contract

ethers-contract

JSON →
library2.0.14rscratesunverified

Type-safe abstractions for interacting with Ethereum smart contracts.

# Cargo.toml [dependencies] ethers-contract = "2.0.14"
INSTALL
IMPORT
SIG · ETHERS-CONTRACT
E
ethers-contract
otherrustv2.0.14
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 ethers_contract::Contract;

Creates a new Contract instance from an address, ABI, and provider.

use ethers_contract::Contract; use ethers_providers::Provider; use ethers_core::types::Address; let provider = Provider::try_from("http://localhost:8545").unwrap(); let contract_address: Address = "0x...".parse().unwrap(); let contract = Contract::new(contract_address, abi_json, provider);
Debug
Known issues
gotchaRequires an async runtime (e.g., tokio) for provider operations.
fix
Add tokio as a dependency and annotate main with #[tokio::main].
affects: >=2.0.0
Upgrade
Version history
2.0.14latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Meta
1
Resources
ethers-contract — cargo add ethers-contract · libregistry