Crates.io | op-alloy-genesis |
lib.rs | op-alloy-genesis |
version | |
source | src |
created_at | 2024-09-13 18:42:10.372693 |
updated_at | 2024-11-08 00:05:32.779803 |
description | Optimism genesis types |
homepage | https://github.com/alloy-rs/op-alloy |
repository | https://github.com/alloy-rs/op-alloy |
max_upload_size | |
id | 1374060 |
Cargo.toml error: | TOML parse error at line 23, column 1 | 23 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Genesis types for Optimism.
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"] }
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);
This is based off of alloy-genesis.