axos-primitives
Primitive Optimism types in Rust.
Types
- Chain configurations for superchains.
- Block info types for deposits and L1 Block Info.
Example
Type usage is straighforward with verbose documentation where needed. Axos primitives uses alloy-primitives under the hood, and re-exports all used types.
use ;
// Create an Optimism Mainnet Chain Config.
let chain_config = optimism;
// Create the Optimism Mainnet L1 start epoch block.
let l1_epoch = new;
assert_eq!;
// Create the Optimism Mainnet L2 genesis block info,
// without the convenience [BlockInfo::new] constructor.
let l2_genesis = BlockInfo ;
assert_eq!;
// Create the Optimism Mainnet System Config object
let system_config = SystemConfig ;
assert_eq!;