pub struct InternalApiConfig {Show 23 fields
pub l1_chain_id: L1ChainId,
pub l2_chain_id: L2ChainId,
pub max_tx_size: usize,
pub estimate_gas_scale_factor: f64,
pub estimate_gas_acceptable_overestimation: u32,
pub estimate_gas_optimize_search: bool,
pub bridge_addresses: BridgeAddresses,
pub l1_ecosystem_contracts: EcosystemCommonContracts,
pub server_notifier_addr: Option<Address>,
pub l1_bytecodes_supplier_addr: Option<Address>,
pub l1_wrapped_base_token_store: Option<Address>,
pub l1_diamond_proxy_addr: Address,
pub l2_testnet_paymaster_addr: Option<Address>,
pub req_entities_limit: usize,
pub fee_history_limit: u64,
pub base_token_address: Option<Address>,
pub filters_disabled: bool,
pub dummy_verifier: bool,
pub l1_batch_commit_data_generator_mode: L1BatchCommitmentMode,
pub timestamp_asserter_address: Option<Address>,
pub l2_multicall3: Option<Address>,
pub l1_to_l2_txs_paused: bool,
pub settlement_layer: SettlementLayer,
}Expand description
Configuration values for the API.
This structure is detached from ZkSyncConfig, since different node types (main, external, etc.)
may require different configuration layouts.
The intention is to only keep the actually used information here.
Fields§
§l1_chain_id: L1ChainIdChain ID of the L1 network. Note, that it may be different from the chain id of the settlement layer.
l2_chain_id: L2ChainId§max_tx_size: usize§estimate_gas_scale_factor: f64§estimate_gas_acceptable_overestimation: u32§estimate_gas_optimize_search: bool§bridge_addresses: BridgeAddresses§l1_ecosystem_contracts: EcosystemCommonContracts§server_notifier_addr: Option<Address>§l1_bytecodes_supplier_addr: Option<Address>§l1_wrapped_base_token_store: Option<Address>§l1_diamond_proxy_addr: Address§l2_testnet_paymaster_addr: Option<Address>§req_entities_limit: usize§fee_history_limit: u64§base_token_address: Option<Address>§filters_disabled: bool§dummy_verifier: bool§l1_batch_commit_data_generator_mode: L1BatchCommitmentMode§timestamp_asserter_address: Option<Address>§l2_multicall3: Option<Address>§l1_to_l2_txs_paused: bool§settlement_layer: SettlementLayerImplementations§
Source§impl InternalApiConfig
impl InternalApiConfig
pub fn from_base_and_contracts( base: InternalApiConfigBase, l1_contracts_config: &SettlementLayerSpecificContracts, l1_ecosystem_contracts: &L1SpecificContracts, l2_contracts: &L2Contracts, settlement_layer: SettlementLayer, ) -> Self
pub fn new( web3_config: &Web3JsonRpcConfig, l1_contracts_config: &SettlementLayerSpecificContracts, l1_ecosystem_contracts: &L1SpecificContracts, l2_contracts: &L2Contracts, genesis_config: &GenesisConfig, l1_to_l2_txs_paused: bool, settlement_layer: SettlementLayer, ) -> Self
Trait Implementations§
Source§impl Clone for InternalApiConfig
impl Clone for InternalApiConfig
Source§fn clone(&self) -> InternalApiConfig
fn clone(&self) -> InternalApiConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for InternalApiConfig
impl RefUnwindSafe for InternalApiConfig
impl Send for InternalApiConfig
impl Sync for InternalApiConfig
impl Unpin for InternalApiConfig
impl UnwindSafe for InternalApiConfig
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> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
impl<T> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
fn clone_storage(&self) -> Box<dyn CloneDebuggableStorage>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CloneableStorage for T
impl<T> CloneableStorage for T
fn clone_storage(&self) -> Box<dyn CloneableStorage>
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 moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);