Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Derive Clone for EvmEnv #204

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions steel/src/host/db/alloy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ use tokio::runtime::Handle;
/// must *not* be executed inside an async runtime, or it will panic when trying to block. If the
/// immediate context is only synchronous, but a transitive caller is async, use
/// [tokio::task::spawn_blocking] around the calls that need to be blocked.
#[derive(Clone)]
pub struct AlloyDb<T: Transport + Clone, N: Network, P: Provider<T, N>> {
/// Provider to fetch the data from.
provider: P,
Expand Down
1 change: 1 addition & 0 deletions steel/src/host/db/trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ use revm::{
};

/// A simple revm [Database] wrapper that records all DB queries.
#[derive(Clone)]
pub struct TraceDb<D> {
accounts: HashMap<Address, HashSet<U256>>,
contracts: HashMap<B256, Bytes>,
Expand Down
1 change: 1 addition & 0 deletions steel/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ impl<H: EvmBlockHeader> EvmInput<H> {
pub(crate) type GuestEvmEnv<H> = EvmEnv<StateDb, H>;

/// The environment to execute the contract calls in.
#[derive(Clone)]
pub struct EvmEnv<D, H> {
db: Option<D>,
cfg_env: CfgEnvWithHandlerCfg,
Expand Down
Loading