diff --git a/core/state_transition.go b/core/state_transition.go index 5d6c790813..7d25e01350 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -427,9 +427,9 @@ func (st *StateTransition) innerTransitionDb() (*ExecutionResult, error) { } if optimismConfig := st.evm.ChainConfig().Optimism; optimismConfig != nil { - st.state.AddBalance(optimismConfig.BaseFeeRecipient, new(big.Int).Mul(new(big.Int).SetUint64(st.gasUsed()), st.evm.Context.BaseFee)) + st.state.AddBalance(params.OptimismBaseFeeRecipient, new(big.Int).Mul(new(big.Int).SetUint64(st.gasUsed()), st.evm.Context.BaseFee)) if cost := st.evm.Context.L1CostFunc(st.evm.Context.BlockNumber.Uint64(), st.msg); cost != nil { - st.state.AddBalance(optimismConfig.L1FeeRecipient, cost) + st.state.AddBalance(params.OptimismL1FeeRecipient, cost) } } diff --git a/params/config.go b/params/config.go index 7a75ce2e96..cf671b9e7c 100644 --- a/params/config.go +++ b/params/config.go @@ -411,10 +411,8 @@ func (c *CliqueConfig) String() string { // OptimismConfig is the optimism config. type OptimismConfig struct { - BaseFeeRecipient common.Address `json:"baseFeeRecipient"` - L1FeeRecipient common.Address `json:"l1FeeRecipient"` - EIP1559Elasticity uint64 `json:"eip1559Elasticity"` - EIP1559Denominator uint64 `json:"eip1559Denominator"` + EIP1559Elasticity uint64 `json:"eip1559Elasticity"` + EIP1559Denominator uint64 `json:"eip1559Denominator"` } // String implements the stringer interface, returning the optimism fee config details. diff --git a/params/protocol_params.go b/params/protocol_params.go index 5f154597a7..6373b7df88 100644 --- a/params/protocol_params.go +++ b/params/protocol_params.go @@ -16,7 +16,18 @@ package params -import "math/big" +import ( + "math/big" + + "github.com/ethereum/go-ethereum/common" +) + +var ( + // The base fee portion of the transaction fee accumulates at this predeploy + OptimismBaseFeeRecipient = common.HexToAddress("0x4200000000000000000000000000000000000019") + // The L1 portion of the transaction fee accumulates at this predeploy + OptimismL1FeeRecipient = common.HexToAddress("0x420000000000000000000000000000000000001A") +) const ( GasLimitBoundDivisor uint64 = 1024 // The bound divisor of the gas limit, used in update calculations.