Skip to content

Latest commit

 

History

61 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

arbitrum-alloy

arbitrum-alloy logo

Arbitrum integrations for the Alloy Rust SDK.

⚠️ Warning

This project is under active development and not yet stable. API and feature coverage may change at any time. This project is neither affiliated or endorsed by Alloy or OffchainLabs.

Quick Start

use alloy_provider::{Provider, ProviderBuilder};
use arbitrum_alloy::{network::Arbitrum, provider::ArbProviderExt};

#[tokio::main()]
async fn main() {
    let provider = ProviderBuilder::<_, _, Arbitrum>::default()
        .connect("http://localhost:8547")
        .await.unwrap();

    let latest = provider.get_block_number().await.unwrap();
    println!("latest block: {latest}");

    let _ = provider.arb_maintenance_status().await;
}

Documentation

Crates

Published on crates.io under the arbitrum-alloy-* namespace (the shorter arb-alloy-* names are held by an unrelated project):

The package name and import path match (hyphens become underscores), so arbitrum-alloy-consensus is use arbitrum_alloy_consensus. For the umbrella:

[dependencies]
arbitrum-alloy = { version = "0.2", features = ["network", "provider"] }
use arbitrum_alloy::{network::Arbitrum, provider::ArbProviderExt};

About

No description, website, or topics provided.

Resources

Stars

7 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages