Trait Cfg

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

    // Required methods
    fn chain_id(&self) -> u64;
    fn tx_chain_id_check(&self) -> bool;
    fn spec(&self) -> Self::Spec;
    fn blob_max_count(&self) -> Option<u64>;
    fn max_code_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;
}
Expand description

Configuration for the EVM.

Required Associated Types§

type Spec: Into<SpecId> + Clone

Required Methods§

fn chain_id(&self) -> u64

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

fn tx_chain_id_check(&self) -> bool

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

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

fn blob_max_count(&self) -> Option<u64>

Returns the blob target and max count for the given spec id. If it is None, check for max count will be skipped.

EIP-7840: Add blob schedule to execution client configuration files

fn max_code_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

Implementations on Foreign Types§

§

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

§

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

§

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

§

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