Skip to content

Commit

Permalink
Fix refund base fee (#1118)
Browse files Browse the repository at this point in the history
  • Loading branch information
tgmichel authored Jul 27, 2023
1 parent 04301b0 commit b27304a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions frame/evm/src/runner/stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,15 +261,20 @@ where
_ => used_gas.into(),
};
let actual_fee = effective_gas.saturating_mul(total_fee_per_gas);
let actual_base_fee = effective_gas.saturating_mul(base_fee);

log::debug!(
target: "evm",
"Execution {:?} [source: {:?}, value: {}, gas_limit: {}, actual_fee: {}, is_transactional: {}]",
"Execution {:?} [source: {:?}, value: {}, gas_limit: {}, actual_fee: {}, used_gas: {}, effective_gas: {}, base_fee: {}, total_fee_per_gas: {}, is_transactional: {}]",
reason,
source,
value,
gas_limit,
actual_fee,
used_gas,
effective_gas,
base_fee,
total_fee_per_gas,
is_transactional
);
// The difference between initially withdrawn and the actual cost is refunded.
Expand Down Expand Up @@ -298,7 +303,7 @@ where
// Actual fee after evm execution, including tip.
actual_fee,
// Base fee.
executor.fee(base_fee),
actual_base_fee,
// Fee initially withdrawn.
fee,
);
Expand Down

0 comments on commit b27304a

Please sign in to comment.