Skip to content

Commit cd88653

Browse files
committed
improve ConfigureEvmEnv docs
1 parent 8ed0b7d commit cd88653

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

crates/node-api/src/evm/traits.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,14 @@ pub trait ConfigureEvm: ConfigureEvmEnv {
1515
}
1616
}
1717

18-
/// This represents the set of methods used to configure the EVM's environment before block execution.
18+
/// This represents the set of methods used to configure the EVM's environment before block
19+
/// execution.
1920
pub trait ConfigureEvmEnv: Send + Sync + Unpin + Clone {
20-
/// The type of the transaction metadata.
21+
/// The type of the transaction metadata that should be used to fill fields in the transaction
22+
/// environment.
23+
///
24+
/// On ethereum mainnet, this is `()`, and on optimism these are the L1 fee fields and
25+
/// additional L1 block info.
2126
type TxMeta;
2227

2328
/// Fill transaction environment from a [Transaction] and the given sender address.

crates/node-optimism/src/evm.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,11 @@ impl ConfigureEvmEnv for OptimismEvmConfig {
4747
}
4848

4949
impl ConfigureEvm for OptimismEvmConfig {
50-
/// Returns new EVM with the given database
5150
fn evm<'a, DB: Database + 'a>(&self, db: DB) -> Evm<'a, (), DB> {
5251
let handler_cfg = HandlerCfg { spec_id: SpecId::LATEST, is_optimism: true };
5352
EvmBuilder::default().with_db(db).with_handler_cfg(handler_cfg).build()
5453
}
5554

56-
/// Returns a new EVM with the given inspector
5755
fn evm_with_inspector<'a, DB: Database + 'a, I>(&self, db: DB, inspector: I) -> Evm<'a, I, DB> {
5856
let handler_cfg = HandlerCfg { spec_id: SpecId::LATEST, is_optimism: true };
5957
EvmBuilder::default()

0 commit comments

Comments
 (0)