pub trait Cfg {
type Spec: Into<SpecId> + Clone;
Show 20 methods
// Required methods
fn chain_id(&self) -> u64;
fn tx_chain_id_check(&self) -> bool;
fn tx_gas_limit_cap(&self) -> u64;
fn spec(&self) -> Self::Spec;
fn max_blobs_per_tx(&self) -> Option<u64>;
fn max_code_size(&self) -> usize;
fn max_initcode_size(&self) -> usize;
fn is_eip3607_disabled(&self) -> bool;
fn is_eip3541_disabled(&self) -> bool;
fn is_eip7623_disabled(&self) -> bool;
fn is_balance_check_disabled(&self) -> bool;
fn is_block_gas_limit_disabled(&self) -> bool;
fn is_nonce_check_disabled(&self) -> bool;
fn is_base_fee_check_disabled(&self) -> bool;
fn is_priority_fee_check_disabled(&self) -> bool;
fn is_fee_charge_disabled(&self) -> bool;
fn is_eip7708_disabled(&self) -> bool;
fn is_eip7708_delayed_burn_disabled(&self) -> bool;
fn memory_limit(&self) -> u64;
fn gas_params(&self) -> &GasParams;
}Expand description
Configuration for the EVM.
Required Associated Types§
Required Methods§
Sourcefn chain_id(&self) -> u64
fn chain_id(&self) -> u64
Returns the chain ID of the EVM that is compared with the transaction’s chain ID.
Sourcefn tx_chain_id_check(&self) -> bool
fn tx_chain_id_check(&self) -> bool
Returns whether the transaction’s chain ID check is enabled.
Sourcefn tx_gas_limit_cap(&self) -> u64
fn tx_gas_limit_cap(&self) -> u64
Returns the gas limit cap for the transaction.
Cap is introduced in EIP-7825: Transaction Gas Limit Cap
with initial cap of 30M gas.
Value before EIP-7825 is u64::MAX.
Sourcefn max_blobs_per_tx(&self) -> Option<u64>
fn max_blobs_per_tx(&self) -> Option<u64>
Returns the maximum number of blobs allowed per transaction. If it is None, check for max count will be skipped.
Sourcefn max_code_size(&self) -> usize
fn max_code_size(&self) -> usize
Returns the maximum code size for the given spec id.
Sourcefn max_initcode_size(&self) -> usize
fn max_initcode_size(&self) -> usize
Returns the max initcode size for the given spec id.
Sourcefn is_eip3607_disabled(&self) -> bool
fn is_eip3607_disabled(&self) -> bool
Returns whether the EIP-3607 (account clearing) is disabled.
Sourcefn is_eip3541_disabled(&self) -> bool
fn is_eip3541_disabled(&self) -> bool
Returns whether the EIP-3541 (disallowing new contracts with 0xEF prefix) is disabled.
Sourcefn is_eip7623_disabled(&self) -> bool
fn is_eip7623_disabled(&self) -> bool
Returns whether the EIP-7623 (increased calldata cost) is disabled.
Sourcefn is_balance_check_disabled(&self) -> bool
fn is_balance_check_disabled(&self) -> bool
Returns whether the balance check is disabled.
Sourcefn is_block_gas_limit_disabled(&self) -> bool
fn is_block_gas_limit_disabled(&self) -> bool
Returns whether the block gas limit check is disabled.
Sourcefn is_nonce_check_disabled(&self) -> bool
fn is_nonce_check_disabled(&self) -> bool
Returns whether the nonce check is disabled.
Sourcefn is_base_fee_check_disabled(&self) -> bool
fn is_base_fee_check_disabled(&self) -> bool
Returns whether the base fee check is disabled.
Sourcefn is_priority_fee_check_disabled(&self) -> bool
fn is_priority_fee_check_disabled(&self) -> bool
Returns whether the priority fee check is disabled.
Sourcefn is_fee_charge_disabled(&self) -> bool
fn is_fee_charge_disabled(&self) -> bool
Returns whether the fee charge is disabled.
Sourcefn is_eip7708_disabled(&self) -> bool
fn is_eip7708_disabled(&self) -> bool
Returns whether EIP-7708 (ETH transfers emit logs) is disabled.
Sourcefn is_eip7708_delayed_burn_disabled(&self) -> bool
fn is_eip7708_delayed_burn_disabled(&self) -> bool
Returns whether EIP-7708 delayed burn logging is disabled.
When enabled, revm tracks all self-destructed addresses and emits logs for accounts that still have remaining balance at the end of the transaction. This can be disabled for performance reasons as it requires storing and iterating over all self-destructed accounts. When disabled, the logging can be done outside of revm when applying accounts to database state.
Sourcefn memory_limit(&self) -> u64
fn memory_limit(&self) -> u64
Returns the limit in bytes for the memory buffer.
Sourcefn gas_params(&self) -> &GasParams
fn gas_params(&self) -> &GasParams
Returns the gas params for the EVM.