Struct era_test_node::fork::ForkDetails
source · pub struct ForkDetails<S> {
pub fork_source: S,
pub l1_block: L1BatchNumber,
pub l2_block: Block<TransactionVariant>,
pub l2_miniblock: u64,
pub l2_miniblock_hash: H256,
pub block_timestamp: u64,
pub overwrite_chain_id: Option<L2ChainId>,
pub l1_gas_price: u64,
}
Expand description
Holds the information about the original chain. “S” is the implementation of the ForkSource.
Fields§
§fork_source: S
§l1_block: L1BatchNumber
§l2_block: Block<TransactionVariant>
§l2_miniblock: u64
§l2_miniblock_hash: H256
§block_timestamp: u64
§overwrite_chain_id: Option<L2ChainId>
§l1_gas_price: u64
Implementations§
source§impl ForkDetails<HttpForkSource>
impl ForkDetails<HttpForkSource>
pub async fn from_url_and_miniblock_and_chain( url: &str, client: HttpClient, miniblock: u64, chain_id: Option<L2ChainId>, cache_config: CacheConfig ) -> Self
sourcepub async fn from_network(
fork: &str,
fork_at: Option<u64>,
cache_config: CacheConfig
) -> Self
pub async fn from_network( fork: &str, fork_at: Option<u64>, cache_config: CacheConfig ) -> Self
Create a fork from a given network at a given height.
sourcepub async fn from_network_tx(
fork: &str,
tx: H256,
cache_config: CacheConfig
) -> Self
pub async fn from_network_tx( fork: &str, tx: H256, cache_config: CacheConfig ) -> Self
Create a fork from a given network, at a height BEFORE a transaction. This will allow us to apply this transaction locally on top of this fork.
source§impl<S: ForkSource> ForkDetails<S>
impl<S: ForkSource> ForkDetails<S>
sourcepub fn fork_to_url_and_client(fork: &str) -> (&str, HttpClient)
pub fn fork_to_url_and_client(fork: &str) -> (&str, HttpClient)
Return URL and HTTP client for a given fork name.
sourcepub async fn get_earlier_transactions_in_same_block(
&self,
replay_tx: H256
) -> Vec<L2Tx>
pub async fn get_earlier_transactions_in_same_block( &self, replay_tx: H256 ) -> Vec<L2Tx>
Returns transactions that are in the same L2 miniblock as replay_tx, but were executed before it.
Trait Implementations§
source§impl<S: Clone> Clone for ForkDetails<S>
impl<S: Clone> Clone for ForkDetails<S>
source§fn clone(&self) -> ForkDetails<S>
fn clone(&self) -> ForkDetails<S>
Returns a copy 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<S> RefUnwindSafe for ForkDetails<S>where S: RefUnwindSafe,
impl<S> Send for ForkDetails<S>where S: Send,
impl<S> Sync for ForkDetails<S>where S: Sync,
impl<S> Unpin for ForkDetails<S>where S: Unpin,
impl<S> UnwindSafe for ForkDetails<S>where S: UnwindSafe,
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