Skip to content

Commit

Permalink
Fix refund base fee (paritytech#1118) (paritytech#1120)
Browse files Browse the repository at this point in the history
Co-authored-by: tgmichel <[email protected]>
  • Loading branch information
boundless-forest and tgmichel authored Jul 28, 2023
1 parent c260555 commit 9fd5782
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 9fd5782

Please sign in to comment.