Skip to main content

Module multi

Module multi 

Source
Expand description

Support for running multiple fork backends.

The design is similar to the single SharedBackend, BackendHandler but supports multiple concurrently active pairs at once.

Re-exportsΒ§

use super::CreateFork; πŸ”’
use super::Fork; πŸ”’
use super::bal; πŸ”’
use crate::FoundryBlock; πŸ”’
use crate::opts::ForkContext; πŸ”’
use alloy_eips::BlockNumHash; πŸ”’
use alloy_eips::eip7928::BlockAccessList; πŸ”’
use alloy_evm::EvmEnv; πŸ”’
use alloy_network::AnyNetwork; πŸ”’
use alloy_network::Network; πŸ”’
use alloy_primitives::map::HashMap; πŸ”’
use foundry_config::Config; πŸ”’
use foundry_fork_db::BackendHandler; πŸ”’
use foundry_fork_db::BlockchainDb; πŸ”’
use foundry_fork_db::ForkBlock; πŸ”’
use foundry_fork_db::ForkBlockEnv; πŸ”’
use foundry_fork_db::SharedBackend; πŸ”’
use foundry_fork_db::cache::BlockchainDbMeta; πŸ”’
use futures::FutureExt; πŸ”’
use futures::StreamExt; πŸ”’
use futures::channel::mpsc::Receiver; πŸ”’
use futures::channel::mpsc::Sender; πŸ”’
use futures::channel::mpsc::channel; πŸ”’
use futures::stream::Fuse; πŸ”’
use futures::task::Context; πŸ”’
use futures::task::Poll; πŸ”’
use revm::primitives::hardfork::SpecId; πŸ”’
use std::fmt; πŸ”’
use std::fmt::Write; πŸ”’
use std::pin::Pin; πŸ”’
use std::sync::Arc; πŸ”’
use std::sync::atomic::AtomicBool; πŸ”’
use std::sync::atomic::AtomicUsize; πŸ”’
use std::sync::atomic::Ordering; πŸ”’
use std::sync::mpsc::Sender as OneshotSender; πŸ”’
use std::sync::mpsc::channel as oneshot_channel; πŸ”’
use std::time::Duration; πŸ”’

StructsΒ§

CreatedFork πŸ”’
Tracks the created Fork
ForkId
The unique identifier for a specific fork, this could be the name of the network a custom descriptive name.
ForkResult
Backend, environment, and identity returned after creating or rolling a fork.
MultiFork
The Sender half of multi fork pair. Can send requests to the MultiForkHandler to create forks.
MultiForkHandler
The type that manages connections in the background.
ShutDownMultiFork πŸ”’
A type that’s used to signaling the MultiForkHandler when it’s time to shut down.

EnumsΒ§

ForkTask πŸ”’
Request πŸ”’
Request that’s send to the handler.

FunctionsΒ§

create_backend πŸ”’
Creates the backend of a resolved fork.
create_fork πŸ”’
Creates a new fork.

Type AliasesΒ§

CreateFuture πŸ”’
CreateSender πŸ”’
GetEvmEnvSender πŸ”’