pub struct Config {
pub l1_client_rpc_url: String,
pub rollup_node_rpc_url: String,
pub output_oracle_address: Address,
pub polling_interval: Duration,
pub num_confirmation: u64,
pub safe_abort_nonce_too_low: u64,
pub resubmission_timeout: Duration,
pub mnemonic: String,
pub output_private_key: String,
pub output_hd_path: String,
pub allow_non_finalized: bool,
}Expand description
A system configuration
Fields§
§l1_client_rpc_url: StringThe L1 client rpc url.
rollup_node_rpc_url: StringThe L2 client rollup node rpc url. Note: This is not explicitly the same as an “L2 client rpc url”. The Rollup Node may expose a [RollupRPC] interface on a different port. This is the url that should be used for this field.
output_oracle_address: AddressThe L2OutputOracle contract address.
polling_interval: DurationThe delay between querying L2 for more blocks and creating a new batch.
num_confirmation: u64The number of confirmations which to wait after appending new batches.
safe_abort_nonce_too_low: u64The number of [VarroError::NonceTooLow] errors required to give up on a tx at a particular nonce without receiving confirmation.
resubmission_timeout: DurationThe time to wait before resubmitting a transaction.
mnemonic: StringThe HD seed used to derive the wallet private keys for both the sequencer and proposer. Must be used in conjunction with SequencerHDPath and ProposerHDPath.
If not provided, a new mnemonic will be generated.
output_private_key: StringThe private key used for the L2 Output transactions.
output_hd_path: StringThe HD path used to derive the wallet private key for the sequencer.
allow_non_finalized: boolWhether to use non-finalized L1 data to propose L2 blocks.
Implementations§
Source§impl Config
impl Config
Sourcepub fn get_output_private_key(&self) -> Result<H256>
pub fn get_output_private_key(&self) -> Result<H256>
Parses the output private key string into a 32-byte hash
Sourcepub fn get_output_oracle_address(&self) -> Address
pub fn get_output_oracle_address(&self) -> Address
Returns the output oracle address
Sourcepub fn get_l1_client(&self) -> Result<Provider<Http>>
pub fn get_l1_client(&self) -> Result<Provider<Http>>
Constructs an L1 Provider
Sourcepub fn get_rollup_node_client(&self) -> Result<RollupNode>
pub fn get_rollup_node_client(&self) -> Result<RollupNode>
Constructs a Rollup Node RollupNode using the configured rollup node rpc url.
Sourcepub fn get_output_oracle(&self) -> Result<OutputOracle>
pub fn get_output_oracle(&self) -> Result<OutputOracle>
Get the output oracle contract