14 releases (4 breaking)

new 0.6.3 Nov 8, 2024
0.6.2 Nov 6, 2024
0.5.2 Oct 29, 2024
0.4.0 Oct 9, 2024
0.2.12 Sep 18, 2024

#22 in Magic Beans

Download history 1835/week @ 2024-09-13 5251/week @ 2024-09-20 6507/week @ 2024-09-27 7807/week @ 2024-10-04 7873/week @ 2024-10-11 11076/week @ 2024-10-18 10929/week @ 2024-10-25 7033/week @ 2024-11-01

38,351 downloads per month
Used in 12 crates (8 directly)

MIT/Apache

93KB
1.5K SLoC

op-alloy-genesis

op-alloy-genesis crate

Genesis types for Optimism.

Usage

By default, op-alloy-genesis enables both std and serde features.

If you're working in a no_std environment (like kona), disable default features like so.

[dependencies]
op-alloy-genesis = { version = "x.y.z", default-features = false, features = ["serde"] }

Rollup Config

op-alloy-genesis exports a RollupConfig, the primary genesis type for Optimism Consensus.

There are a few constant declarations for various chain's rollup configs.

use op_alloy_genesis::{OP_MAINNET_CONFIG, rollup_config_from_chain_id};

let op_mainnet_config = rollup_config_from_chain_id(10).expect("infallible");
assert_eq!(OP_MAINNET_CONFIG, op_mainnet_config);

Provenance

This is based off of alloy-genesis.

Dependencies

~7–9.5MB
~185K SLoC