pub struct ChainConfig {Show 16 fields
pub network: String,
pub l1_chain_id: u64,
pub l2_chain_id: u64,
pub l1_start_epoch: Epoch,
pub l2_genesis: BlockInfo,
pub system_config: SystemConfig,
pub batch_inbox: Address,
pub deposit_contract: Address,
pub system_config_contract: Address,
pub max_channel_size: u64,
pub channel_timeout: u64,
pub seq_window_size: u64,
pub max_seq_drift: u64,
pub regolith_time: u64,
pub blocktime: u64,
pub l2_to_l1_message_passer: Address,
}Expand description
A Chain Configuration
Fields§
§network: StringThe network name
l1_chain_id: u64The L1 chain id
l2_chain_id: u64The L2 chain id
l1_start_epoch: EpochThe L1 block referenced by the L2 chain
l2_genesis: BlockInfoThe L2 genesis block info
system_config: SystemConfigThe initial system config value
batch_inbox: AddressThe batch inbox address
deposit_contract: AddressThe deposit contract address
system_config_contract: AddressThe L1 system config contract
max_channel_size: u64The maximum byte size of all pending channels
channel_timeout: u64The max timeout for a channel (as measured by the frame L1 block number)
seq_window_size: u64Number of L1 blocks in a sequence window
max_seq_drift: u64Maximum timestamp drift
regolith_time: u64Timestamp of the regolith hardfork
blocktime: u64Network blocktime
l2_to_l1_message_passer: AddressL2 To L1 Message passer address
Implementations§
Source§impl ChainConfig
impl ChainConfig
Sourcepub fn base_goerli() -> Self
pub fn base_goerli() -> Self
Base Goerli ChainConfig.
Source§impl ChainConfig
impl ChainConfig
Sourcepub fn base() -> Self
pub fn base() -> Self
Base Mainnet ChainConfig.
Source§impl ChainConfig
impl ChainConfig
Sourcepub fn optimism_goerli() -> Self
pub fn optimism_goerli() -> Self
Optimism Goerli ChainConfig.
Source§impl ChainConfig
impl ChainConfig
Sourcepub fn optimism() -> Self
pub fn optimism() -> Self
Optimism Mainnet ChainConfig.
Source§impl ChainConfig
impl ChainConfig
Sourcepub fn optimism_sepolia() -> Self
pub fn optimism_sepolia() -> Self
Optimism Sepolia ChainConfig.
Trait Implementations§
Source§impl Clone for ChainConfig
impl Clone for ChainConfig
Source§fn clone(&self) -> ChainConfig
fn clone(&self) -> ChainConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChainConfig
impl Debug for 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>,
Deserialize this value from the given Serde deserializer. Read more
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
Mutably borrows from an owned value. Read more