pub enum Network {
Mainnet,
Gnosis,
}Expand description
Settlement chain selector for stamp duration calculations.
Variants§
Mainnet
Ethereum mainnet — 15-second average block time.
Gnosis
Gnosis Chain — 5-second average block time. Default for Swarm.
Implementations§
Source§impl Network
impl Network
Sourcepub const fn block_time_seconds(self) -> u64
pub const fn block_time_seconds(self) -> u64
Average block time in seconds.
Sourcepub const fn seconds_to_blocks(self, seconds: u64) -> u64
pub const fn seconds_to_blocks(self, seconds: u64) -> u64
Number of blocks in seconds rounded up to the next block.
Sourcepub const fn blocks_to_seconds(self, blocks: u64) -> u64
pub const fn blocks_to_seconds(self, blocks: u64) -> u64
Wall-clock seconds covered by blocks blocks.
Trait Implementations§
impl Copy for Network
impl Eq for Network
impl StructuralPartialEq for Network
Auto Trait Implementations§
impl Freeze for Network
impl RefUnwindSafe for Network
impl Send for Network
impl Sync for Network
impl Unpin for Network
impl UnsafeUnpin for Network
impl UnwindSafe for Network
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