Arbitrum integrations for the Alloy Rust SDK.
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.
use alloy_provider::{Provider, ProviderBuilder};
use arb_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;
}- Docs Index
- Quickstart Guide
- Connect To A Provider
- Provider Extensions
- Use Precompiles
- Local Dev Chain
- FAQ
This workspace contains:
arb-alloy-consensus: Arbitrum consensus transaction and receipt types.arb-alloy-network:Networkimplementation for Arbitrum.arb-alloy-rpc-types: Arbitrum RPC request/response types.arb-alloy-provider: provider extension traits forarb_*RPC methods.arb-sequencer-network: Arbitrum sequencer feed protocol types.arb-alloy: umbrella crate re-exporting the components above.
