Bindings for the etherscan API and other block explorers.

Overview

foundry-block-explorers

Bindings for the etherscan.io web API and other block explorers.

Examples

use ethers_core::types::Chain;
use foundry_block_explorers::Client;

async fn foo() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::new(Chain::Mainnet, "<your_api_key>")?;
    // Or using environment variables
    let client = Client::new_from_env(Chain::Mainnet)?;

    let address = "0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413".parse()?;
    let metadata = client.contract_source_code(address).await?;
    assert_eq!(metadata.items[0].contract_name, "DAO");
    Ok(())
}
You might also like...
Sodium Oxide: Fast cryptographic library for Rust (bindings to libsodium)

sodiumoxide |Crate|Documentation|Gitter| |:---:|:-----------:|:--------:|:-----:|:------:|:----:| |||| NaCl (pronounced "salt") is a new easy-to-use h

rust-native-tls — Bindings for native TLS libraries

rust-native-tls Documentation An abstraction over platform-specific TLS implementations. Specifically, this crate uses SChannel on Windows (via the sc

OpenSSL bindings for Rust

rust-openssl OpenSSL bindings for the Rust programming language. Documentation. Release Support The current supported release of openssl is 0.10 and o

Bindings to the macOS Security.framework

macOS/iOS Security framework for Rust Documentation Bindings to the Apple's Security.framework. Allows use of TLS and Keychain from Rust. License Lice

Rust FFI bindings for StarkWare's crypto-cpp library

starkware-crypto-rs Rust FFI bindings for StarkWare's crypto-cpp library Note that currently target x86_64-pc-windows-msvc is not supported. If you're

Python bindings for rage (age in Rust)

pyrage Python bindings for the Rust implementation of age. Index Installation Usage Development Licensing Installation You can install pyrage with pip

OpenAI's tiktoken but with node bindings

⏳ tiktoken-node tiktoken is a fast BPE tokeniser for use with OpenAI's models. const tiktoken = require('tiktoken-node') let enc = tiktoken.getEncodin

A node API for the dprint TypeScript and JavaScript code formatter

dprint-node A node API for the dprint TypeScript and JavaScript code formatter. It's written in Rust for blazing fast speed. Usage Pass a file path an

An API and test-app that exposes zcash functionality for app consumption

Zingolib This repo provides both a library for zingoproxyclient and zingo-mobile, as well as an included cli application to interact with zcashd via l

Comments
  • Remove `ethers-core` dependency

    Remove `ethers-core` dependency

    Right now we're coupled to ethers due to using RawAbi, and the Chain enum. This means we need to keep patches on foundry to keep ethers versions in sync. We should remove the dep as follows:

    • Integrate alloy-rs/chains when ready
    • Move RawAbi into block-explorers, as it's not an alloy-related type nor an RPC type. It just uses some metadata from the ABI for verification purposes.
    opened by Evalir 0
Owner
Foundry
Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.
Foundry
Substreams development kit for Ethereum chains, contains Firehose Block model and helpers as well as utilities for Ethereum ABI encoding/decoding.

Substreams Ethereum Substreams development kit for Ethereum chains, contains Rust Firehose Block model and helpers as well as utilities for Ethereum A

StreamingFast 15 Oct 25, 2022
Collection of block cipher algorithms written in pure Rust

RustCrypto: block ciphers Collection of block ciphers and block modes written in pure Rust. Warnings Currently only the aes crate provides constant-ti

Rust Crypto 506 Jan 3, 2023
A small block explorer for geth PoAs written in rust

Tesseracts A minimalistic block explorer initially created to learn rust. This block explorer has been created as a rust self-learning project to give

adria0.eth 15 Jun 25, 2022
Example of a block root with a Verkle state root

Example of a block root with a Verkle state root Block content This is a standard RLP block containing 3 transactions, and an added VerkleProof field

Guillaume Ballet 25 Nov 25, 2022
The Stage 2 building block to reach the dream of DSNs with Bitcoin DeFi

rust-nostr Intro A complete suite of nostr Bitcoin libraries that can be used to develop Decentralized Social Networks (DSN) with integrated Bitcoin f

Raj 82 Jan 2, 2023
Kinda functional block engine for testing bundles on jito-solana locally

Half Baked Block Engine About This is a half-baked block engine. It can be used for testing bundles running through jito-solana. Shortcomings The bare

null 8 Nov 16, 2022
Bindings to MLIR using the full C++ API

Mithril Oxide Mithril MLIR is hard to rust but we did it anyway. Rust bindings to MLIR via the C++ API. Project structure mithril-oxide: Our Rusty bin

Lambdaclass 6 Jun 10, 2023
Rust bindings for Solidity's AST and visitors

solc-ast solc-ast provides rust bindings for the solidity AST and visitors. The visitors were built to be 1-1 compatible with the visitors from solc.

Hari 35 May 7, 2023
Rust bindings and SDK for the ELSTER Rich Client (ERiC)

Eric Rust bindings and SDK for the ELSTER Rich Client (ERiC) What is ELSTER? What is ERiC? Requirements Rust bindings Select bindings Generate binding

null 24 Sep 3, 2024
reth-indexer reads directly from the reth db and indexes the data into a postgres database all decoded with a simple config file and no extra setup alongside exposing a API ready to query the data.

reth-indexer reth-indexer reads directly from the reth db and indexes the data into a postgres database all decoded with a simple config file and no e

Josh Stevens 306 Jul 12, 2023