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

refactor: add Send and Sync as supertraits of fillers #65

Merged
merged 1 commit into from
Dec 2, 2024
Merged
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
2 changes: 1 addition & 1 deletion src/fill/alloy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ impl Block for alloy::rpc::types::eth::Header {
}
}

impl<T> Block for alloy::rpc::types::eth::Block<T> {
impl<T: Send + Sync> Block for alloy::rpc::types::eth::Block<T> {
fn fill_block_env(&self, block_env: &mut revm::primitives::BlockEnv) {
self.header.fill_block_env(block_env);
}
Expand Down
6 changes: 3 additions & 3 deletions src/fill/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use revm::{
};

/// Types that can fill the EVM transaction environment [`TxEnv`].
pub trait Tx {
pub trait Tx: Send + Sync {
/// Fill the transaction environment.
///
/// ## Note:
Expand All @@ -23,7 +23,7 @@ pub trait Tx {
}
}
/// Types that can fill the EVM block environment [`BlockEnv`].
pub trait Block {
pub trait Block: Send + Sync {
/// Fill the block environment.
///
/// ## Note:
Expand Down Expand Up @@ -64,7 +64,7 @@ pub trait Block {
/// - `disable_beneficiary_reward` - gated by `optional_beneficiary_reward`
///
/// Cfg fillers should consider these feature gates when implementing the trait.
pub trait Cfg {
pub trait Cfg: Send + Sync {
/// Fill the configuration environment.
fn fill_cfg_env(&self, cfg_env: &mut CfgEnv);

Expand Down