No longer burn base fees (#33)

* no longer burn base fees

* remove prints

* don't burn base fee

* just do 1 AddBalance to Coinbase addr

* remove print

* fix
This commit is contained in:
Jeremy Wei 2024-09-25 17:12:16 -04:00 committed by GitHub
parent 0050f0abba
commit af807e581c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -458,7 +458,9 @@ func (st *StateTransition) TransitionDb() (*ExecutionResult, error) {
// the coinbase when simulating calls. // the coinbase when simulating calls.
} else { } else {
fee := new(big.Int).SetUint64(st.gasUsed()) fee := new(big.Int).SetUint64(st.gasUsed())
fee.Mul(fee, effectiveTip) // Sei doesn't don't burn the base fee and instead funds the Coinbase address with the base fee
totalFeePerGas := new(big.Int).Add(st.evm.Context.BaseFee, effectiveTip)
fee.Mul(fee, totalFeePerGas)
st.state.AddBalance(st.evm.Context.Coinbase, fee, tracing.BalanceIncreaseRewardTransactionFee) st.state.AddBalance(st.evm.Context.Coinbase, fee, tracing.BalanceIncreaseRewardTransactionFee)
} }