Skip to content

Commit

Permalink
fix: update gas price check for opBNB
Browse files Browse the repository at this point in the history
  • Loading branch information
yutianwu committed Nov 11, 2024
1 parent 0978bcb commit 36c058a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/revm/src/optimism/handler_register.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ pub fn deduct_caller<SPEC: Spec, EXT, DB: Database>(
));
};

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
Expand Down Expand Up @@ -287,7 +287,7 @@ pub fn reward_beneficiary<SPEC: Spec, EXT, DB: Database>(
));
};

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)
Expand Down

0 comments on commit 36c058a

Please sign in to comment.