use auto_impl::auto_impl;
use core::fmt::Debug;
use core::hash::Hash;
use primitives::{hardfork::SpecId, Address, TxKind, U256};
#[auto_impl(&, &mut, Box, Arc)]
pub trait Cfg {
type Spec: Into<SpecId> + Clone;
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 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;
}
#[derive(Clone, Default, Debug, Eq, PartialEq, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub enum AnalysisKind {
Raw,
#[default]
Analyse,
}
pub type TransactTo = TxKind;
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub enum CreateScheme {
Create,
Create2 {
salt: U256,
},
Custom {
address: Address,
},
}