revm_context_interface/
cfg.rs1use auto_impl::auto_impl;
2use core::fmt::Debug;
3use core::hash::Hash;
4use primitives::{TxKind, U256};
5use specification::hardfork::SpecId;
6
7#[auto_impl(&, &mut, Box, Arc)]
8pub trait Cfg {
9 type Spec: Into<SpecId> + Clone;
10
11 fn chain_id(&self) -> u64;
12
13 fn spec(&self) -> Self::Spec;
15
16 fn blob_max_count(&self, spec_id: SpecId) -> u8;
20
21 fn max_code_size(&self) -> usize;
22
23 fn is_eip3607_disabled(&self) -> bool;
24
25 fn is_balance_check_disabled(&self) -> bool;
26
27 fn is_gas_refund_disabled(&self) -> bool;
28
29 fn is_block_gas_limit_disabled(&self) -> bool;
30
31 fn is_nonce_check_disabled(&self) -> bool;
32
33 fn is_base_fee_check_disabled(&self) -> bool;
34}
35
36#[derive(Clone, Default, Debug, Eq, PartialEq, Hash)]
38#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
39pub enum AnalysisKind {
40 Raw,
42 #[default]
44 Analyse,
45}
46
47pub type TransactTo = TxKind;
49
50#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
52#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
53pub enum CreateScheme {
54 Create,
56 Create2 {
58 salt: U256,
60 },
61}