pub struct SystemConfig {
pub batcher_address: Address,
pub overhead: U256,
pub scalar: U256,
pub gas_limit: u64,
pub base_fee_scalar: Option<u64>,
pub blob_base_fee_scalar: Option<u64>,
pub eip1559_denominator: Option<u32>,
pub eip1559_elasticity: Option<u32>,
}
Expand description
System configuration.
Fields§
§batcher_address: Address
Batcher address
overhead: U256
Fee overhead value
scalar: U256
Fee scalar value
gas_limit: u64
Gas limit value
base_fee_scalar: Option<u64>
Base fee scalar value
blob_base_fee_scalar: Option<u64>
Blob base fee scalar value
eip1559_denominator: Option<u32>
EIP-1559 denominator
eip1559_elasticity: Option<u32>
EIP-1559 elasticity
Implementations§
source§impl SystemConfig
impl SystemConfig
sourcepub fn update_with_receipts(
&mut self,
receipts: &[Receipt],
l1_system_config_address: Address,
ecotone_active: bool,
) -> Result<(), SystemConfigUpdateError>
pub fn update_with_receipts( &mut self, receipts: &[Receipt], l1_system_config_address: Address, ecotone_active: bool, ) -> Result<(), SystemConfigUpdateError>
Filters all L1 receipts to find config updates and applies the config updates.
sourcefn process_config_update_log(
&mut self,
log: &Log,
ecotone_active: bool,
) -> Result<SystemConfigUpdateType, SystemConfigUpdateError>
fn process_config_update_log( &mut self, log: &Log, ecotone_active: bool, ) -> Result<SystemConfigUpdateType, SystemConfigUpdateError>
Decodes an EVM log entry emitted by the system config contract and applies it as a SystemConfig change.
Parse log data for:
event ConfigUpdate(
uint256 indexed version,
UpdateType indexed updateType,
bytes data
);
sourcefn update_batcher_address(
&mut self,
log_data: &[u8],
) -> Result<SystemConfigUpdateType, BatcherUpdateError>
fn update_batcher_address( &mut self, log_data: &[u8], ) -> Result<SystemConfigUpdateType, BatcherUpdateError>
Updates the batcher address in the SystemConfig given the log data.
sourcefn update_gas_config(
&mut self,
log_data: &[u8],
ecotone_active: bool,
) -> Result<SystemConfigUpdateType, GasConfigUpdateError>
fn update_gas_config( &mut self, log_data: &[u8], ecotone_active: bool, ) -> Result<SystemConfigUpdateType, GasConfigUpdateError>
Updates the SystemConfig gas config - both the overhead and scalar values given the log data and rollup config.
sourcefn update_gas_limit(
&mut self,
log_data: &[u8],
) -> Result<SystemConfigUpdateType, GasLimitUpdateError>
fn update_gas_limit( &mut self, log_data: &[u8], ) -> Result<SystemConfigUpdateType, GasLimitUpdateError>
Updates the gas limit of the SystemConfig given the log data.
sourcefn update_eip1559_params(
&mut self,
log_data: &[u8],
) -> Result<SystemConfigUpdateType, EIP1559UpdateError>
fn update_eip1559_params( &mut self, log_data: &[u8], ) -> Result<SystemConfigUpdateType, EIP1559UpdateError>
Updates the EIP-1559 parameters of the SystemConfig given the log data.
Trait Implementations§
source§impl Clone for SystemConfig
impl Clone for SystemConfig
source§fn clone(&self) -> SystemConfig
fn clone(&self) -> SystemConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SystemConfig
impl Debug for SystemConfig
source§impl Default for SystemConfig
impl Default for SystemConfig
source§fn default() -> SystemConfig
fn default() -> SystemConfig
source§impl<'de> Deserialize<'de> for SystemConfig
impl<'de> Deserialize<'de> for SystemConfig
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 Hash for SystemConfig
impl Hash for SystemConfig
source§impl PartialEq for SystemConfig
impl PartialEq for SystemConfig
source§impl Serialize for SystemConfig
impl Serialize for SystemConfig
impl Copy for SystemConfig
impl Eq for SystemConfig
impl StructuralPartialEq for SystemConfig
Auto Trait Implementations§
impl Freeze for SystemConfig
impl RefUnwindSafe for SystemConfig
impl Send for SystemConfig
impl Sync for SystemConfig
impl Unpin for SystemConfig
impl UnwindSafe for SystemConfig
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
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 144 bytes