revm_context_interface/
cfg.rs1use auto_impl::auto_impl;
2use core::fmt::Debug;
3use core::hash::Hash;
4use primitives::{hardfork::SpecId, 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, spec_id: SpecId) -> u8;
19
20 fn max_code_size(&self) -> usize;
21
22 fn is_eip3607_disabled(&self) -> bool;
23
24 fn is_balance_check_disabled(&self) -> bool;
25
26 fn is_block_gas_limit_disabled(&self) -> bool;
27
28 fn is_nonce_check_disabled(&self) -> bool;
29
30 fn is_base_fee_check_disabled(&self) -> bool;
31}
32
33#[derive(Clone, Default, Debug, Eq, PartialEq, Hash)]
35#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
36pub enum AnalysisKind {
37 Raw,
39 #[default]
41 Analyse,
42}
43
44pub type TransactTo = TxKind;
46
47#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
49#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
50pub enum CreateScheme {
51 Create,
53 Create2 {
55 salt: U256,
57 },
58}