Trait Cfg

Source
pub trait Cfg {
    type Spec: Into<SpecId> + Clone;

Show 13 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_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;
}
Expand description

Configuration for the EVM.

Required Associated Types§

Source

type Spec: Into<SpecId> + Clone

Specification id type, in requires to be convertible to SpecId so it can be used by default in mainnet.

Required Methods§

Source

fn chain_id(&self) -> u64

Returns the chain ID of the EVM that is compared with the transaction’s chain ID.

Source

fn tx_chain_id_check(&self) -> bool

Returns whether the transaction’s chain ID check is enabled.

Source

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.

Source

fn spec(&self) -> Self::Spec

Specification id

Source

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.

Source

fn max_code_size(&self) -> usize

Returns the maximum code size for the given spec id.

Source

fn max_initcode_size(&self) -> usize

Returns the max initcode size for the given spec id.

Source

fn is_eip3607_disabled(&self) -> bool

Returns whether the EIP-3607 (account clearing) is disabled.

Source

fn is_balance_check_disabled(&self) -> bool

Returns whether the balance check is disabled.

Source

fn is_block_gas_limit_disabled(&self) -> bool

Returns whether the block gas limit check is disabled.

Source

fn is_nonce_check_disabled(&self) -> bool

Returns whether the nonce check is disabled.

Source

fn is_base_fee_check_disabled(&self) -> bool

Returns whether the base fee check is disabled.

Source

fn is_priority_fee_check_disabled(&self) -> bool

Returns whether the priority fee check is disabled.

Implementations on Foreign Types§

Source§

impl<'a, T> Cfg for &'a T
where T: 'a + Cfg + ?Sized,

Source§

impl<'a, T> Cfg for &'a mut T
where T: 'a + Cfg + ?Sized,

Source§

impl<T> Cfg for Box<T>
where T: Cfg + ?Sized,

Source§

impl<T> Cfg for Arc<T>
where T: Cfg + ?Sized,

Implementors§

Source§

impl<SPEC: Into<SpecId> + Copy> Cfg for CfgEnv<SPEC>

Source§

type Spec = SPEC