Expand description
§op-alloy-genesis
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.
Re-exports§
pub use params::base_fee_params;
pub use params::OpBaseFeeParams;
pub use params::BASE_SEPOLIA_BASE_FEE_PARAMS;
pub use params::BASE_SEPOLIA_EIP1559_DEFAULT_ELASTICITY_MULTIPLIER;
pub use params::OP_MAINNET_BASE_FEE_PARAMS;
pub use params::OP_SEPOLIA_BASE_FEE_PARAMS;
pub use params::OP_SEPOLIA_EIP1559_BASE_FEE_MAX_CHANGE_DENOMINATOR_CANYON;
pub use params::OP_SEPOLIA_EIP1559_DEFAULT_BASE_FEE_MAX_CHANGE_DENOMINATOR;
pub use params::OP_SEPOLIA_EIP1559_DEFAULT_ELASTICITY_MULTIPLIER;
pub use addresses::AddressList;
pub use system::BatcherUpdateError;
pub use system::GasConfigUpdateError;
pub use system::GasLimitUpdateError;
pub use system::LogProcessingError;
pub use system::SystemAccounts;
pub use system::SystemConfig;
pub use system::SystemConfigUpdateError;
pub use system::SystemConfigUpdateType;
pub use chain::ChainConfig;
pub use chain::HardForkConfiguration;
pub use chain::SuperchainLevel;
pub use genesis::ChainGenesis;
pub use rollup::rollup_config_from_chain_id;
pub use rollup::RollupConfig;
pub use rollup::BASE_MAINNET_CONFIG;
pub use rollup::BASE_SEPOLIA_CONFIG;
pub use rollup::FJORD_MAX_SEQUENCER_DRIFT;
pub use rollup::GRANITE_CHANNEL_TIMEOUT;
pub use rollup::MAX_RLP_BYTES_PER_CHANNEL_BEDROCK;
pub use rollup::MAX_RLP_BYTES_PER_CHANNEL_FJORD;
pub use rollup::OP_MAINNET_CONFIG;
pub use rollup::OP_SEPOLIA_CONFIG;
Modules§
- Address Types
- Chain Config Types
- Genesis types.
- Module containing fee parameters.
- Rollup Config Types
- System Config Type