revm_context_interface/
cfg.rs1use auto_impl::auto_impl;
2use core::fmt::Debug;
3use core::hash::Hash;
4use primitives::{hardfork::SpecId, Address, TxKind, U256};
5
6#[auto_impl(&, &mut, Box, Arc)]
7pub trait Cfg {
8 type Spec: Into<SpecId> + Clone;
9
10 fn chain_id(&self) -> u64;
11
12 fn spec(&self) -> Self::Spec;
14
15 fn blob_max_count(&self) -> Option<u64>;
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_block_gas_limit_disabled(&self) -> bool;
28
29 fn is_nonce_check_disabled(&self) -> bool;
30
31 fn is_base_fee_check_disabled(&self) -> bool;
32}
33
34#[derive(Clone, Default, Debug, Eq, PartialEq, Hash)]
36#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
37pub enum AnalysisKind {
38 Raw,
40 #[default]
42 Analyse,
43}
44
45pub type TransactTo = TxKind;
47
48#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
50#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
51pub enum CreateScheme {
52 Create,
54 Create2 {
56 salt: U256,
58 },
59 Custom { address: Address },
61}