pub struct KnownChain {
pub name: &'static str,
pub label: &'static str,
pub chain_id: u64,
pub public_rpc: &'static str,
/* private fields */
}Expand description
A deployment target config init knows how to bake into a fresh config.
Fields§
§name: &'static str--chain selector, e.g. "arbitrum-sepolia".
label: &'static strHuman-readable label for generated comments and error messages.
chain_id: u64EIP-155 chain id; must match the embedded manifest’s chainId.
public_rpc: &'static strPublic JSON-RPC endpoint baked into the emitted config. Fine for light use; operators point this at their own provider for production.
Implementations§
Source§impl KnownChain
impl KnownChain
Sourcepub fn addresses(&self) -> Result<ChainAddresses>
pub fn addresses(&self) -> Result<ChainAddresses>
Parse the embedded manifest and pull the addresses config init bakes
in. Fails (rather than panics) if the manifest is malformed, its
chainId disagrees with this entry, or an expected contract is absent.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KnownChain
impl RefUnwindSafe for KnownChain
impl Send for KnownChain
impl Sync for KnownChain
impl Unpin for KnownChain
impl UnsafeUnpin for KnownChain
impl UnwindSafe for KnownChain
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> 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