pub struct ChainOptions {
pub description: String,
pub chain_id: u32,
pub live: bool,
pub default_provider: String,
pub etherscan_api_url: Option<String>,
pub max_fee_per_gas: String,
pub max_priority_fee_per_gas: String,
pub native_token_name: String,
pub hopr_token_name: String,
pub block_time: u64,
pub max_rpc_requests_per_sec: Option<u32>,
pub tags: Option<Vec<String>>,
}
Expand description
Holds all information we need about the blockchain network the client is going to use
Fields§
§description: String
§chain_id: u32
= 0
live: bool
§default_provider: String
a valid HTTP url pointing at a RPC endpoint
etherscan_api_url: Option<String>
a valid HTTP url pointing at a RPC endpoint
max_fee_per_gas: String
The absolute maximum you are willing to pay per unit of gas to get your transaction included in a block, e.g. ‘10 gwei’
max_priority_fee_per_gas: String
Tips paid directly to miners, e.g. ‘2 gwei’
native_token_name: String
§hopr_token_name: String
§block_time: u64
expected block time on the chain in milliseconds
max_rpc_requests_per_sec: Option<u32>
optional maximum number of RPC requests per second for this chain provider
Trait Implementations§
Source§impl Clone for ChainOptions
impl Clone for ChainOptions
Source§fn clone(&self) -> ChainOptions
fn clone(&self) -> ChainOptions
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 ChainOptions
impl Debug for ChainOptions
Source§impl<'de> Deserialize<'de> for ChainOptions
impl<'de> Deserialize<'de> for ChainOptions
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 ChainOptions
impl PartialEq for ChainOptions
Source§impl Serialize for ChainOptions
impl Serialize for ChainOptions
impl Eq for ChainOptions
impl StructuralPartialEq for ChainOptions
Auto Trait Implementations§
impl Freeze for ChainOptions
impl RefUnwindSafe for ChainOptions
impl Send for ChainOptions
impl Sync for ChainOptions
impl Unpin for ChainOptions
impl UnwindSafe for ChainOptions
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,
§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
Compare self to
key
and return true
if they are equal.§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
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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