diff --git a/crates/revm/src/optimism/handler_register.rs b/crates/revm/src/optimism/handler_register.rs index 37f8fec9..e75d7403 100644 --- a/crates/revm/src/optimism/handler_register.rs +++ b/crates/revm/src/optimism/handler_register.rs @@ -234,7 +234,7 @@ pub fn deduct_caller( )); }; - let tx_l1_cost = if context.evm.inner.env.tx.gas_price.is_zero() && SPEC::enabled(WRIGHT) { + let tx_l1_cost = if context.evm.inner.env.effective_gas_price().is_zero() && SPEC::enabled(WRIGHT) { U256::ZERO } else { context @@ -287,7 +287,7 @@ pub fn reward_beneficiary( )); }; - let l1_cost = if context.evm.inner.env.tx.gas_price.is_zero() && SPEC::enabled(WRIGHT) { + let l1_cost = if context.evm.inner.env.effective_gas_price().is_zero() && SPEC::enabled(WRIGHT) { U256::ZERO } else { l1_block_info.calculate_tx_l1_cost(enveloped_tx, SPEC::SPEC_ID)