https://github.com/deltartificial/alloy-flashblocks
Flashblocks Rollup Boost client integration using Alloy written in Rust
https://github.com/deltartificial/alloy-flashblocks
alloy base boost evm flashblocks flashbots mev rollup rollup-boost rust
Last synced: 4 months ago
JSON representation
Flashblocks Rollup Boost client integration using Alloy written in Rust
- Host: GitHub
- URL: https://github.com/deltartificial/alloy-flashblocks
- Owner: deltartificial
- License: mit
- Created: 2025-02-28T09:30:45.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-02-28T15:43:40.000Z (4 months ago)
- Last Synced: 2025-02-28T17:56:52.573Z (4 months ago)
- Topics: alloy, base, boost, evm, flashblocks, flashbots, mev, rollup, rollup-boost, rust
- Language: Rust
- Homepage: https://github.com/flashbots/rollup-boost
- Size: 761 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Alloy Flashblocks
A Rust implementation for interacting with Base's Flashblocks service. Provides WebSocket streaming, monitoring, and RPC functionality for real-time block data, using Alloy.

## Features
- WebSocket streaming of Flashblocks data
- Real-time block monitoring with statistics
- RPC client for blockchain queries
- Automatic reconnection handling
- Comprehensive transaction and block tracking## Installation
```bash
git clone https://github.com/deltartificial/alloy-flashblocks
cd alloy-flashblocks
cargo build --release
```## Usage
The main binary provides several commands:
```bash
# Stream blocks (default: 5 blocks)
cargo run --bin alloy-flashblocks stream
cargo run --bin alloy-flashblocks stream --blocks 10cargo run --bin flashblocks-ws -- stream --blocks 50
# Query the latest flashblock
cargo run --bin alloy-flashblocks query-latest# Get balance for an address
cargo run --bin alloy-flashblocks get-balance# Get receipt for a transaction
cargo run --bin alloy-flashblocks get-receipt
```Additional monitoring tools are available:
```bash
# Run the detailed block monitor
cargo run --bin flashblocks-monitor# Run the WebSocket client
cargo run --bin flashblocks-ws# Run the transaction submitter
cargo run --bin tx_submitter
```## Configuration
Default endpoint: `wss://sepolia.flashblocks.base.org/ws`
To use a custom endpoint, modify the URL in the respective binary files.
## Example Output
```
=== Flashblocks Statistics ===
Block #123456: payload_id=0x...
Sub-blocks: 3
Total transactions: 150
Duration: 500ms
Average sub-block interval: 166.67ms
Transactions per second: 300.00
===========================
```