@@ -166,7 +166,7 @@ func IntrinsicGas(data []byte, accessList types.AccessList, isContractCreation b
166
166
// NewStateTransition initialises and returns a new state transition object.
167
167
func NewStateTransition (evm * vm.EVM , msg Message , gp * GasPool ) * StateTransition {
168
168
l1Fee := new (big.Int )
169
- if evm .ChainConfig ().UsingScroll {
169
+ if evm .ChainConfig ().Scroll . L1FeeEnabled () {
170
170
l1Fee , _ = fees .CalculateL1MsgFee (msg , evm .StateDB )
171
171
}
172
172
@@ -207,7 +207,7 @@ func (st *StateTransition) buyGas() error {
207
207
mgval := new (big.Int ).SetUint64 (st .msg .Gas ())
208
208
mgval = mgval .Mul (mgval , st .gasPrice )
209
209
210
- if st .evm .ChainConfig ().UsingScroll {
210
+ if st .evm .ChainConfig ().Scroll . L1FeeEnabled () {
211
211
// always add l1fee, because all tx are L2-to-L1 ATM
212
212
log .Debug ("Adding L1 fee" , "l1_fee" , st .l1Fee )
213
213
mgval = mgval .Add (mgval , st .l1Fee )
@@ -218,7 +218,7 @@ func (st *StateTransition) buyGas() error {
218
218
balanceCheck = new (big.Int ).SetUint64 (st .msg .Gas ())
219
219
balanceCheck = balanceCheck .Mul (balanceCheck , st .gasFeeCap )
220
220
balanceCheck .Add (balanceCheck , st .value )
221
- if st .evm .ChainConfig ().UsingScroll {
221
+ if st .evm .ChainConfig ().Scroll . L1FeeEnabled () {
222
222
// always add l1fee, because all tx are L2-to-L1 ATM
223
223
balanceCheck .Add (balanceCheck , st .l1Fee )
224
224
}
@@ -370,7 +370,7 @@ func (st *StateTransition) TransitionDb() (*ExecutionResult, error) {
370
370
}
371
371
}
372
372
373
- if st .evm .ChainConfig ().UsingScroll {
373
+ if st .evm .ChainConfig ().Scroll . L1FeeEnabled () {
374
374
// The L2 Fee is the same as the fee that is charged in the normal geth
375
375
// codepath. Add the L1 fee to the L2 fee for the total fee that is sent
376
376
// to the sequencer.
0 commit comments