Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions crates/context/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,10 @@ dev = [
"optional_balance_check",
"optional_block_gas_limit",
"optional_eip3607",
"optional_gas_refund",
"optional_no_base_fee",
]
memory_limit = []
optional_balance_check = []
optional_block_gas_limit = []
optional_eip3607 = []
optional_gas_refund = []
optional_no_base_fee = []
2 changes: 0 additions & 2 deletions crates/context/interface/src/cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ pub trait Cfg {

fn is_balance_check_disabled(&self) -> bool;

fn is_gas_refund_disabled(&self) -> bool;

fn is_block_gas_limit_disabled(&self) -> bool;

fn is_nonce_check_disabled(&self) -> bool;
Expand Down
23 changes: 0 additions & 23 deletions crates/context/src/cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,6 @@ pub struct CfgEnv<SPEC = SpecId> {
/// By default, it is set to `false`.
#[cfg(feature = "optional_eip3607")]
pub disable_eip3607: bool,
/// Disables all gas refunds
///
/// This is useful when using chains that have gas refunds disabled, e.g. Avalanche.
///
/// Reasoning behind removing gas refunds can be found in EIP-3298.
///
/// By default, it is set to `false`.
#[cfg(feature = "optional_gas_refund")]
pub disable_gas_refund: bool,
/// Disables base fee checks for EIP-1559 transactions
///
/// This is useful for testing method calls with zero gas price.
Expand Down Expand Up @@ -105,8 +96,6 @@ impl<SPEC> CfgEnv<SPEC> {
disable_block_gas_limit: self.disable_block_gas_limit,
#[cfg(feature = "optional_eip3607")]
disable_eip3607: self.disable_eip3607,
#[cfg(feature = "optional_gas_refund")]
disable_gas_refund: self.disable_gas_refund,
#[cfg(feature = "optional_no_base_fee")]
disable_base_fee: self.disable_base_fee,
}
Expand Down Expand Up @@ -168,16 +157,6 @@ impl<SPEC: Into<SpecId> + Copy> Cfg for CfgEnv<SPEC> {
}
}

fn is_gas_refund_disabled(&self) -> bool {
cfg_if::cfg_if! {
if #[cfg(feature = "optional_gas_refund")] {
self.disable_gas_refund
} else {
false
}
}
}

fn is_block_gas_limit_disabled(&self) -> bool {
cfg_if::cfg_if! {
if #[cfg(feature = "optional_block_gas_limit")] {
Expand Down Expand Up @@ -219,8 +198,6 @@ impl<SPEC: Default> Default for CfgEnv<SPEC> {
disable_block_gas_limit: false,
#[cfg(feature = "optional_eip3607")]
disable_eip3607: false,
#[cfg(feature = "optional_gas_refund")]
disable_gas_refund: false,
#[cfg(feature = "optional_no_base_fee")]
disable_base_fee: false,
}
Expand Down
2 changes: 0 additions & 2 deletions crates/optimism/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,12 @@ dev = [
"optional_balance_check",
"optional_block_gas_limit",
"optional_eip3607",
"optional_gas_refund",
"optional_no_base_fee",
]
memory_limit = ["revm/memory_limit"]
optional_balance_check = ["revm/optional_balance_check"]
optional_block_gas_limit = ["revm/optional_block_gas_limit"]
optional_eip3607 = ["revm/optional_eip3607"]
optional_gas_refund = ["revm/optional_gas_refund"]
optional_no_base_fee = ["revm/optional_no_base_fee"]

# See comments in `revm-precompile`
Expand Down
2 changes: 0 additions & 2 deletions crates/revm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,12 @@ dev = [
"optional_balance_check",
"optional_block_gas_limit",
"optional_eip3607",
"optional_gas_refund",
"optional_no_base_fee",
]
memory_limit = ["context/memory_limit", "interpreter/memory_limit"]
optional_balance_check = ["context/optional_balance_check"]
optional_block_gas_limit = ["context/optional_block_gas_limit"]
optional_eip3607 = ["context/optional_eip3607"]
optional_gas_refund = ["context/optional_gas_refund"]
optional_no_base_fee = ["context/optional_no_base_fee"]

# See comments in `precompile`
Expand Down
Loading