Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
klkvr committed Jan 30, 2025
1 parent 6f3795e commit be954c7
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions crates/evm/src/evm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@ pub trait Evm {
type DB;
/// The transaction object that the EVM will execute.
type Tx;
/// The error type that the EVM can return, in case the transaction execution failed, for
/// example if the transaction was invalid.
/// Error type returned by EVM. Contains either errors related to invalid transactions or
/// internal irrecoverable execution errors.
type Error: EvmError;
/// Halt reason type.
/// Halt reason. Enum over all possible reasons for halting the execution. When execution halts,
/// it means that transaction is valid, however, it's execution was interrupted (e.g because of
/// running out of gas or overflowing stack).
type HaltReason: HaltReasonTrait + Send + Sync;

/// Reference to [`BlockEnv`].
Expand Down Expand Up @@ -81,10 +83,10 @@ pub trait EvmFactory<Input> {
type Context<DB: Database>: EthContext<Database = DB> + JournalExtGetter;
/// Transaction environment.
type Tx;
/// Halt reason.
type HaltReason: HaltReasonTrait + Send + Sync;
/// EV< error.
/// EVM error. See [`Evm::Error`].
type Error<DBError: core::error::Error + Send + Sync + 'static>: EvmError;
/// Halt reason. See [`Evm::HaltReason`].
type HaltReason: HaltReasonTrait + Send + Sync;

/// Creates a new instance of an EVM.
fn create_evm<DB: Database>(&self, db: DB, input: Input) -> Self::Evm<DB, NoOpInspector>;
Expand Down

0 comments on commit be954c7

Please sign in to comment.