pub struct GlobalSettings {Show 23 fields
pub debug: bool,
pub chains: Vec<u64>,
pub wallet_key: String,
pub wallet_address: Address,
pub profit_receiver_address: Option<Address>,
pub max_gas_price_gwei: u64,
pub simulation_backend: String,
pub flashloan_enabled: bool,
pub sandwich_attacks_enabled: bool,
pub rpc_urls: Option<HashMap<String, String>>,
pub ws_urls: Option<HashMap<String, String>>,
pub chainlink_feeds: Option<HashMap<String, String>>,
pub flashbots_relay_url: Option<String>,
pub bundle_signer_key: Option<String>,
pub metrics_port: u16,
pub strategy_enabled: bool,
pub slippage_bps: u64,
pub gas_caps_gwei: Option<HashMap<String, u64>>,
pub mev_share_stream_url: String,
pub mev_share_history_limit: u32,
pub mev_share_enabled: bool,
pub router_allowlist_by_chain: Option<HashMap<String, HashMap<String, String>>>,
pub chainlink_feeds_by_chain: Option<HashMap<String, HashMap<String, String>>>,
}Fields§
§debug: bool§chains: Vec<u64>§wallet_key: String§wallet_address: Address§profit_receiver_address: Option<Address>§max_gas_price_gwei: u64§simulation_backend: String§flashloan_enabled: bool§sandwich_attacks_enabled: bool§rpc_urls: Option<HashMap<String, String>>§ws_urls: Option<HashMap<String, String>>§chainlink_feeds: Option<HashMap<String, String>>§flashbots_relay_url: Option<String>§bundle_signer_key: Option<String>§metrics_port: u16§strategy_enabled: bool§slippage_bps: u64§gas_caps_gwei: Option<HashMap<String, u64>>§router_allowlist_by_chain: Option<HashMap<String, HashMap<String, String>>>§chainlink_feeds_by_chain: Option<HashMap<String, HashMap<String, String>>>Implementations§
Source§impl GlobalSettings
impl GlobalSettings
pub fn load_with_path(path: Option<&str>) -> Result<Self, AppError>
pub fn load() -> Result<Self, AppError>
Sourcepub fn get_rpc_url(&self, chain_id: u64) -> Result<String, AppError>
pub fn get_rpc_url(&self, chain_id: u64) -> Result<String, AppError>
Helper to get RPC URL for a specific chain
Sourcepub fn get_ws_url(&self, chain_id: u64) -> Result<String, AppError>
pub fn get_ws_url(&self, chain_id: u64) -> Result<String, AppError>
Helper to get WS URL for a specific chain
pub fn get_chainlink_feed(&self, symbol: &str) -> Option<String>
pub fn flashbots_relay_url(&self) -> String
pub fn bundle_signer_key(&self) -> String
pub fn gas_cap_for_chain(&self, chain_id: u64) -> Option<u64>
pub fn routers_for_chain( &self, chain_id: u64, ) -> Result<HashMap<String, Address>, AppError>
pub fn chainlink_feeds_for_chain( &self, chain_id: u64, ) -> Result<HashMap<String, Address>, AppError>
Trait Implementations§
Source§impl Clone for GlobalSettings
impl Clone for GlobalSettings
Source§fn clone(&self) -> GlobalSettings
fn clone(&self) -> GlobalSettings
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 GlobalSettings
impl Debug for GlobalSettings
Source§impl<'de> Deserialize<'de> for GlobalSettings
impl<'de> Deserialize<'de> for GlobalSettings
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
Auto Trait Implementations§
impl Freeze for GlobalSettings
impl RefUnwindSafe for GlobalSettings
impl Send for GlobalSettings
impl Sync for GlobalSettings
impl Unpin for GlobalSettings
impl UnwindSafe for GlobalSettings
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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 more