alloy
The alloy crate group extends Alloy, the standard Rust toolkit for Ethereum types and RPC, with Base-specific consensus types, RPC types, EVM behavior, and hardfork definitions.
Sub-crates
Section titled “Sub-crates”| Crate | Package Name | Purpose |
|---|---|---|
| consensus | base-alloy-consensus | Base-specific consensus types |
| evm | base-alloy-evm | EVM customizations for Base |
| hardforks | base-alloy-hardforks | Base hardfork definitions |
| network | base-alloy-network | Network type definitions |
| provider | base-alloy-provider | Alloy provider extensions |
| rpc-jsonrpsee | base-alloy-rpc-jsonrpsee | JSON-RPC server traits (jsonrpsee) |
| rpc-types-engine | base-alloy-rpc-types-engine | Engine API RPC types |
| rpc-types | base-alloy-rpc-types | General RPC type extensions |
Role in the Architecture
Section titled “Role in the Architecture”The alloy crates sit at the foundation of the dependency graph. They define the types that flow through every other layer — from how blocks and transactions are represented in consensus, to the RPC types returned to users, to the EVM execution context.
These crates extend the upstream Alloy types with Base-specific fields and behaviors needed for the OP Stack L2 environment.