pub struct ChainConfig {Show 21 fields
pub name: String,
pub l1_chain_id: u64,
pub public_rpc: String,
pub sequencer_rpc: String,
pub explorer: String,
pub superchain_level: SuperchainLevel,
pub governed_by_optimism: bool,
pub superchain_time: Option<u64>,
pub data_availability_type: String,
pub chain_id: u64,
pub batch_inbox_addr: Address,
pub block_time: u64,
pub seq_window_size: u64,
pub max_sequencer_drift: u64,
pub gas_paying_token: Option<Address>,
pub hardfork_config: HardForkConfig,
pub optimism: Option<BaseFeeConfig>,
pub alt_da: Option<AltDAConfig>,
pub genesis: ChainGenesis,
pub roles: Option<Roles>,
pub addresses: Option<AddressList>,
}Expand description
Defines core blockchain settings per block.
Tailors unique settings for each network based on its genesis block and superchain configuration.
This struct bridges the interface between the ChainConfig
defined in the superchain-registry and the ChainConfig
defined in op-geth.
Fields§
§name: StringChain name (e.g. “Base”)
l1_chain_id: u64L1 chain ID
public_rpc: StringChain public RPC endpoint
sequencer_rpc: StringChain sequencer RPC endpoint
explorer: StringChain explorer HTTP endpoint
superchain_level: SuperchainLevelLevel of integration with the superchain.
governed_by_optimism: boolWhether the chain is governed by optimism.
superchain_time: Option<u64>Time of when a given chain is opted in to the Superchain. If set, hardforks times after the superchain time will be inherited from the superchain-wide config.
data_availability_type: StringData availability type.
chain_id: u64Chain ID
batch_inbox_addr: AddressChain-specific batch inbox address
block_time: u64The block time in seconds.
seq_window_size: u64The sequencer window size in seconds.
max_sequencer_drift: u64The maximum sequencer drift in seconds.
gas_paying_token: Option<Address>Gas paying token metadata. Not consumed by downstream OPStack components.
hardfork_config: HardForkConfigHardfork Config. These values may override the superchain-wide defaults.
optimism: Option<BaseFeeConfig>Optimism configuration
alt_da: Option<AltDAConfig>Alternative DA configuration
genesis: ChainGenesisChain-specific genesis information
roles: Option<Roles>Roles
addresses: Option<AddressList>Addresses
Implementations§
Source§impl ChainConfig
impl ChainConfig
Sourcepub fn base_fee_params(&self) -> BaseFeeParams
pub fn base_fee_params(&self) -> BaseFeeParams
Returns the base fee params for the chain.
Sourcepub fn canyon_base_fee_params(&self) -> BaseFeeParams
pub fn canyon_base_fee_params(&self) -> BaseFeeParams
Returns the canyon base fee params for the chain.
Sourcepub fn base_fee_config(&self) -> BaseFeeConfig
pub fn base_fee_config(&self) -> BaseFeeConfig
Returns the base fee config for the chain.
Sourcepub fn load_op_stack_rollup_config(&self) -> RollupConfig
👎Deprecated since 0.2.1: please use as_rollup_config instead
pub fn load_op_stack_rollup_config(&self) -> RollupConfig
as_rollup_config insteadLoads the rollup config for the OP-Stack chain given the chain config and address list.
Sourcepub fn as_rollup_config(&self) -> RollupConfig
pub fn as_rollup_config(&self) -> RollupConfig
Loads the rollup config for the OP-Stack chain given the chain config and address list.
Trait Implementations§
Source§impl Clone for ChainConfig
impl Clone for ChainConfig
Source§fn clone(&self) -> ChainConfig
fn clone(&self) -> ChainConfig
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ChainConfig
impl Debug for ChainConfig
Source§impl Default for ChainConfig
impl Default for ChainConfig
Source§fn default() -> ChainConfig
fn default() -> ChainConfig
Source§impl<'de> Deserialize<'de> for ChainConfig
impl<'de> Deserialize<'de> for ChainConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ChainConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ChainConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ChainConfig
impl PartialEq for ChainConfig
Source§impl Serialize for ChainConfig
impl Serialize for ChainConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for ChainConfig
impl StructuralPartialEq for ChainConfig
Auto Trait Implementations§
impl Freeze for ChainConfig
impl RefUnwindSafe for ChainConfig
impl Send for ChainConfig
impl Sync for ChainConfig
impl Unpin for ChainConfig
impl UnwindSafe for ChainConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more