Ethers-rs CCIP-Read Middleware

Overview

Ethers-rs CCIP-Read Middleware

CI Status Crates.io Docs.rs

Ready to dive into the world of cross-chain data access? Look no further! This Rust library provides an Ethers middleware to extend ENS (Ethereum Name Service) functionality with CCIP-Read (Cross-Chain Interoperability Protocol - Secure offchain data retrieval) support. Easily interact with ENS names that support the CCIP-Read protocol and make your decentralized applications more fun and powerful!

Installation: As Easy as 1-2-3!

To install the ethers-ccip-read middleware, add it to your Cargo.toml file:

ethers-ccip-read = { git = "https://github.com/ensdomains/ethers-ccip-read" }

Usage: Let the Cross-Chain Fun Begin!

Hook up the middleware to your Ethers provider and start your cross-chain adventure! Here's a simple example to get you going;

use anyhow::Result;
use ethers_ccip_read::*;
use std::convert::TryFrom;

#[tokio::main]
async fn main() -> Result<()> {
    // Connect to the network
    let provider = Provider::<Http>::try_from("https://your.web3.provider")?;

    // Enable the middleware
    let provider = CCIPReadMiddleware::new(
        provider,
    );

    // Now you can query CCIP-Read supported ENS names.
    let ens_name = "1.offchainexample.eth";
    let resolver_address = provider.get_resolver(ens_name).await.unwrap();
    println!("resolver_address: {:?}", resolver_address);

    let supports_wildcard = provider.supports_wildcard(resolver_address).await.unwrap();
    println!("supports_wildcard: {:?}", supports_wildcard);

    let resolved_address = provider.resolve_name(ens_name).await.unwrap();
    println!("resolved_address: {:?}", resolved_address);

    Ok(())
}

For more examples, check out the examples directory.

Helpful Resources: What more I can learn about CCIP-Read?

You might also like...
Ethernaut solutions with ethers-rs

the full repository is using Ethers-rs for the finding of CTF unless requirement of smart contract like in case of re-entrancy. best way get good at e

ethers-rs signer using GCP KMS

ethers-gcp-kms-signer Installation Cargo cargo add ethers-gcp-kms-signer Usage Signer use ethers::prelude::*; use ethers_gcp_kms_signer::{GcpKeyRingRe

An MEV back-running template for ethers-rs

MEV price prediction I show how to predict ChainLink price updates from the mempool. For the sake of illustration I work with AAVE V2 price oracles. E

An extensible and practical demonstration of constructing evm-based sandwich attacks built with ethers-rs and Huff language.
An extensible and practical demonstration of constructing evm-based sandwich attacks built with ethers-rs and Huff language.

subway-rs • Construct evm-based sandwich attacks using Rust and Huff. Getting Started subway-rs is a port of libevm's original subway, implemented wit

An open source, high performance limit order book for the Seaport smart contracts. Implemented in Rust using ethers-rs, this offers a turnkey option for digital asset marketplaces.

Quay Quay is an open source, high performance backend for the Seaport smart contracts. The project is implemented in Rust, using Postgres as a storage

ethers-rs scripting boilerplate

ethers-rs script boilerplate ethers-rs is a great blockchain scripting framework! This repo contains the essentials I find are useful when reading/wri

Key derivation and cryptographic signing functionality for Ethereum applications (ethers-rs)

ethers-signer-factory ethers-signer-factory is a Rust crate that provides functions for key derivation and signing of Ethereum transactions and messag

Wrapper around reqwest to allow for client middleware chains.

reqwest-middleware A crate implementing a wrapper around reqwest to allow for client middleware chains. Overview The reqwest-middleware client exposes

A cookie manager middleware built on top of tower.

tower-cookies A cookie manager middleware built on top of tower. Example With axum: use axum::{handler::get, Router}; use std::net::SocketAddr; use to

Handlebars middleware for Iron web framework

handlebars-iron Handlebars middleware for the Iron web framework. This library, together with handlebars, iron and hyper, works on both stable and nig

In-progress extractors and middleware for Actix Web

actix-web-lab Experimental extractors, middleware, and other extras for possible inclusion in Actix Web. Things To Know About This Crate It will never

Tide middleware for Diesel pooled connections & transactions

tide-diesel Tide middleware for Diesel pooled connections & transactions. A Tide middleware which holds a pool of Diesel database connections, and aut

Rate limit middleware for Poem framework

Rate limit middleware for Poem framework Usage Check examples, poem-ratelimit is available on crates.io. A yaml configuration file is used to set limi

Rate limit middleware for poem web framework

Rate limit middleware for Poem framework Usage Check examples, poem-ratelimit is available on crates.io. A yaml configuration file is used to set limi

🔎 Prometheus metrics middleware for Axum

Axum-Prometheus A Prometheus middleware to collect HTTP metrics for Axum applications. axum-prometheus relies on metrics_exporter_prometheus as a back

Middleware/ios shortcut to setup alarms automatically based on the first class

Webuntis alarm This is a small little "middleware" / web server intended to connect to a webuntis timetable used in german schools which i wrote when

Rate Limiting middleware for Tower/Axum/Tonic/Hyper utilizing the governor crate

A Tower service and layer that provides a rate-limiting backend by governor. Based heavily on the work done for actix-governor. Works with Axum, Hyper

An ether-rs middleware to access reth's db directly, bypassing JSON-RPC
An ether-rs middleware to access reth's db directly, bypassing JSON-RPC

Octane A ether-rs middleware for reth that bypasses JSON-RPC allowing for faster db queries. Work in Progress! Please note that Octane is currently in

Write Rack middleware in Rust.

RacksOnRacks Write Rack middleware in Rust. This repo is a proof of concept and should be used as an example. The best way to use this at the moment w

Owner
Ethereum Name Service (ENS)
Ethereum Name Service (ENS)
ethers-rs signer using GCP KMS

ethers-gcp-kms-signer Installation Cargo cargo add ethers-gcp-kms-signer Usage Signer use ethers::prelude::*; use ethers_gcp_kms_signer::{GcpKeyRingRe

null 12 Apr 16, 2023
An MEV back-running template for ethers-rs

MEV price prediction I show how to predict ChainLink price updates from the mempool. For the sake of illustration I work with AAVE V2 price oracles. E

Andrea Simeoni 54 Apr 19, 2023
An extensible and practical demonstration of constructing evm-based sandwich attacks built with ethers-rs and Huff language.

subway-rs • Construct evm-based sandwich attacks using Rust and Huff. Getting Started subway-rs is a port of libevm's original subway, implemented wit

refcell.eth 230 Apr 25, 2023
An open source, high performance limit order book for the Seaport smart contracts. Implemented in Rust using ethers-rs, this offers a turnkey option for digital asset marketplaces.

Quay Quay is an open source, high performance backend for the Seaport smart contracts. The project is implemented in Rust, using Postgres as a storage

Valorem Labs Inc. 169 Jun 23, 2023
ethers-rs scripting boilerplate

ethers-rs script boilerplate ethers-rs is a great blockchain scripting framework! This repo contains the essentials I find are useful when reading/wri

null 38 Sep 5, 2023
Key derivation and cryptographic signing functionality for Ethereum applications (ethers-rs)

ethers-signer-factory ethers-signer-factory is a Rust crate that provides functions for key derivation and signing of Ethereum transactions and messag

Ilia 3 Sep 27, 2023
An ether-rs middleware to access reth's db directly, bypassing JSON-RPC

Octane A ether-rs middleware for reth that bypasses JSON-RPC allowing for faster db queries. Work in Progress! Please note that Octane is currently in

Sorella Labs 75 Jun 4, 2023
An ether-rs middleware to craft UserOperations

Ethers UserOp An ether-rs middleware to craft UserOperations Pre-requisites Geth (tested with v1.12.2). Use To start a Silius bundler with user operat

null 7 Sep 11, 2023
An Ethers middleware for submitting Flashbots bundles

Ethers Flashbots An Ethers middleware to send transactions as Flashbots bundles. Installation Add ethers-flashbots to your Cargo.toml. # This is the d

Oliver Nordbjerg 267 Jan 4, 2023
Structopt derived ethers-rs types, useful for building Ethereum CLIs

ethers-structopt Provides ethers-compatible Structopt derives, useful for building Ethereum CLIs. Contributing Pull requests are welcome. For major ch

Georgios Konstantopoulos 6 Dec 27, 2022