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§
Required Methods§
Sourcefn spec_id(&self) -> <Self::EvmTypes as EvmTypesHost>::SpecId
fn spec_id(&self) -> <Self::EvmTypes as EvmTypesHost>::SpecId
Returns the active EVM specification.
Sourcefn block_env_mut(&mut self) -> &mut BlockEnv<Self::EvmTypes>
fn block_env_mut(&mut self) -> &mut BlockEnv<Self::EvmTypes>
Returns the configured block environment mutably.
Sourcefn version_mut(&mut self) -> &mut Version
fn version_mut(&mut self) -> &mut Version
Returns the active EVM version mutably.
Sourcefn block_base_fee(&self) -> u64
fn block_base_fee(&self) -> u64
Returns the block base fee resolved for this environment.
Sourcefn block_blob_base_fee(&self) -> u64
fn block_blob_base_fee(&self) -> u64
Returns the block blob base fee resolved for this environment.
Sourcefn transaction_validation_limits(&self) -> EvmTransactionValidationLimits
fn transaction_validation_limits(&self) -> EvmTransactionValidationLimits
Returns transaction validation limits active in this environment.
Sourcefn transaction_validation_gas_rules(&self) -> EvmTransactionValidationGasRules
fn transaction_validation_gas_rules(&self) -> EvmTransactionValidationGasRules
Returns transaction validation gas rules active in this environment.
Sourcefn with_nonce_check_disabled(self) -> Self
fn with_nonce_check_disabled(self) -> Self
Returns this environment with transaction nonce checks disabled.
Sourcefn with_balance_check_disabled(self) -> Self
fn with_balance_check_disabled(self) -> Self
Returns this environment with transaction balance checks disabled.
Provided Methods§
Sourcefn uses_separate_block_gas(&self) -> bool
fn uses_separate_block_gas(&self) -> bool
Returns whether the block uses independent regular and state gas capacity.
Sourcefn regular_gas_limit_cap(&self) -> u64
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".