pub struct ChainConfig {Show 22 fields
pub name: String,
pub chain_id: u64,
pub l1_chain_id: u64,
pub public_rpc: String,
pub sequencer_rpc: String,
pub explorer: String,
pub superchain_level: SuperchainLevel,
pub standard_chain_candidate: bool,
pub superchain_time: Option<u64>,
pub batch_inbox_addr: Address,
pub superchain: String,
pub chain: String,
pub hardfork_configuration: HardForkConfiguration,
pub block_time: u64,
pub seq_window_size: u64,
pub max_sequencer_drift: u64,
pub data_availability_type: String,
pub optimism: Option<OpBaseFeeParams>,
pub alt_da: Option<AltDAConfig>,
pub genesis: ChainGenesis,
pub addresses: Option<AddressList>,
pub gas_paying_token: Option<Address>,
}
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: String
Chain name (e.g. “Base”)
chain_id: u64
Chain ID
l1_chain_id: u64
L1 chain ID
public_rpc: String
Chain public RPC endpoint
sequencer_rpc: String
Chain sequencer RPC endpoint
explorer: String
Chain explorer HTTP endpoint
superchain_level: SuperchainLevel
Level of integration with the superchain.
standard_chain_candidate: bool
Toggles standard chain validation checks on for this chain, even if it is a frontier chain.
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.
batch_inbox_addr: Address
Chain-specific batch inbox address
superchain: String
Superchain is a simple string to identify the superchain. This is implied by directory structure, and not encoded in the config file itself.
chain: String
Chain is a simple string to identify the chain, within its superchain context. This matches the resource filename, it is not encoded in the config file itself.
hardfork_configuration: HardForkConfiguration
Hardfork Configuration. These values may override the superchain-wide defaults.
block_time: u64
The block time in seconds.
seq_window_size: u64
The sequencer window size in seconds.
max_sequencer_drift: u64
The maximum sequencer drift in seconds.
data_availability_type: String
Data availability type.
optimism: Option<OpBaseFeeParams>
Optimism configuration
alt_da: Option<AltDAConfig>
Alternative DA configuration
genesis: ChainGenesis
Chain-specific genesis information
addresses: Option<AddressList>
Addresses
gas_paying_token: Option<Address>
Gas paying token metadata. Not consumed by downstream OPStack components.
Implementations§
Source§impl ChainConfig
impl ChainConfig
Sourcepub fn set_missing_fork_configs(&mut self, defaults: &HardForkConfiguration)
pub fn set_missing_fork_configs(&mut self, defaults: &HardForkConfiguration)
Set missing hardfork configurations to the defaults, if the chain has a superchain_time set. Defaults are only used if the chain’s hardfork activated after the superchain_time.
Sourcepub fn load_op_stack_rollup_config(&self) -> RollupConfig
pub fn load_op_stack_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§fn clone_from(&mut self, source: &Self)
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<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ChainConfig
impl PartialEq for ChainConfig
Source§impl Serialize for ChainConfig
impl Serialize for ChainConfig
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)