Skip to main content

EvmEnv

Trait EvmEnv 

Source
pub trait EvmEnv:
    Debug
    + Clone
    + Send
    + Sync
    + 'static {
    type EvmTypes: EvmTypes;

Show 14 methods // Required methods fn spec_id(&self) -> <Self::EvmTypes as EvmTypesHost>::SpecId; fn chain_id(&self) -> u64; fn block_env(&self) -> &BlockEnv<Self::EvmTypes>; fn block_env_mut(&mut self) -> &mut BlockEnv<Self::EvmTypes>; fn version(&self) -> &Version; fn version_mut(&mut self) -> &mut Version; fn block_base_fee(&self) -> u64; fn block_blob_base_fee(&self) -> u64; fn transaction_validation_limits(&self) -> EvmTransactionValidationLimits; fn transaction_validation_gas_rules( &self, ) -> EvmTransactionValidationGasRules; fn with_nonce_check_disabled(self) -> Self; fn with_balance_check_disabled(self) -> Self; // Provided methods fn uses_separate_block_gas(&self) -> bool { ... } fn regular_gas_limit_cap(&self) -> u64 { ... }
}
Expand description

Resolved EVM environment data needed by the EVM execution path.

Required Associated Types§

Source

type EvmTypes: EvmTypes

Runtime EVM type family.

Required Methods§

Source

fn spec_id(&self) -> <Self::EvmTypes as EvmTypesHost>::SpecId

Returns the active EVM specification.

Source

fn chain_id(&self) -> u64

Returns the active chain ID.

Source

fn block_env(&self) -> &BlockEnv<Self::EvmTypes>

Returns the configured block environment.

Source

fn block_env_mut(&mut self) -> &mut BlockEnv<Self::EvmTypes>

Returns the configured block environment mutably.

Source

fn version(&self) -> &Version

Returns the active EVM version.

Source

fn version_mut(&mut self) -> &mut Version

Returns the active EVM version mutably.

Source

fn block_base_fee(&self) -> u64

Returns the block base fee resolved for this environment.

Source

fn block_blob_base_fee(&self) -> u64

Returns the block blob base fee resolved for this environment.

Source

fn transaction_validation_limits(&self) -> EvmTransactionValidationLimits

Returns transaction validation limits active in this environment.

Source

fn transaction_validation_gas_rules(&self) -> EvmTransactionValidationGasRules

Returns transaction validation gas rules active in this environment.

Source

fn with_nonce_check_disabled(self) -> Self

Returns this environment with transaction nonce checks disabled.

Source

fn with_balance_check_disabled(self) -> Self

Returns this environment with transaction balance checks disabled.

Provided Methods§

Source

fn uses_separate_block_gas(&self) -> bool

Returns whether the block uses independent regular and state gas capacity.

Source

fn regular_gas_limit_cap(&self) -> u64

Returns the transaction limit used to reserve regular block gas.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§