Skip to content

Commit

Permalink
feat: pay both base and prio fee to preconf.eth treasury (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
shaspitz authored Jul 31, 2024
1 parent 553c7c3 commit e862e72
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/state_transition.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,14 +456,15 @@ func (st *StateTransition) TransitionDb() (*ExecutionResult, error) {
} else {
priorityFee := &uint256.Int{st.gasUsed()}
priorityFee.Mul(priorityFee, effectiveTipU256)
st.state.AddBalance(st.evm.Context.Coinbase, priorityFee)

baseFee := &uint256.Int{st.gasUsed()}
multiplier, _ := uint256.FromBig(st.evm.Context.BaseFee)
baseFee.Mul(baseFee, multiplier)

treasuryAccount := common.HexToAddress("0x0FD1bDBB92AF752a201A900e0E2bc68253C14b4c")
st.state.AddBalance(treasuryAccount, baseFee)
// Send both base and prio fee to preconf.eth address
treasuryAccount := common.HexToAddress("0xfA0B0f5d298d28EFE4d35641724141ef19C05684")
bothFees := baseFee.Add(baseFee, priorityFee)
st.state.AddBalance(treasuryAccount, bothFees)
}

return &ExecutionResult{
Expand Down

0 comments on commit e862e72

Please sign in to comment.