pub struct NetworkPreset {
pub chain_id: ChainId,
pub rpc_url: String,
pub explorer_base_url: String,
pub name: String,
}Expand description
Re-export common types A preset configuration for a Starknet network.
Fields§
§chain_id: ChainId§rpc_url: String§explorer_base_url: String§name: StringImplementations§
Source§impl NetworkPreset
impl NetworkPreset
Sourcepub fn mainnet() -> NetworkPreset
pub fn mainnet() -> NetworkPreset
Starknet Mainnet defaults.
Sourcepub fn sepolia() -> NetworkPreset
pub fn sepolia() -> NetworkPreset
Starknet Sepolia testnet defaults.
Sourcepub fn devnet() -> NetworkPreset
pub fn devnet() -> NetworkPreset
Local devnet defaults.
Sourcepub fn explorer_tx_url(&self, hash: &str) -> String
pub fn explorer_tx_url(&self, hash: &str) -> String
Build an explorer URL for a transaction hash.
Sourcepub fn explorer_contract_url(&self, address: &Address) -> String
pub fn explorer_contract_url(&self, address: &Address) -> String
Build an explorer URL for a contract address.
Trait Implementations§
Source§impl Clone for NetworkPreset
impl Clone for NetworkPreset
Source§fn clone(&self) -> NetworkPreset
fn clone(&self) -> NetworkPreset
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 moreAuto Trait Implementations§
impl Freeze for NetworkPreset
impl RefUnwindSafe for NetworkPreset
impl Send for NetworkPreset
impl Sync for NetworkPreset
impl Unpin for NetworkPreset
impl UnsafeUnpin for NetworkPreset
impl UnwindSafe for NetworkPreset
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> 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