diff --git a/core/tx_list.go b/core/tx_list.go index cc1016b69..e7edda2e8 100644 --- a/core/tx_list.go +++ b/core/tx_list.go @@ -357,7 +357,7 @@ func (l *txList) Add(tx *types.Transaction, state *state.StateDB, priceBump uint ethCost = new(big.Int).Add(tx.Cost(), l1DataFee) } if ethCost != nil && ethCost.Sign() > 0 { - if l.costcap.Eth() == nil || l.costcap.Eth().Cmp(ethCost) < 0 { + if l.costcap.Eth().Cmp(ethCost) < 0 { l.costcap.SetEthAmount(ethCost) } } diff --git a/core/types/receipt.go b/core/types/receipt.go index 40946fef8..96bb17f98 100644 --- a/core/types/receipt.go +++ b/core/types/receipt.go @@ -124,7 +124,7 @@ type storedReceiptRLP struct { } // v7StoredReceiptRLP is the storage encoding of a receipt used in database version 7. -// This version was introduced when AltFee feature was added (2024-11). +// This version was introduced when AltFee feature was added. // It includes L1Fee and all AltFee fields (FeeTokenID, FeeRate, TokenScale, FeeLimit). type v7StoredReceiptRLP struct { PostStateOrStatus []byte diff --git a/internal/ethapi/transaction_args.go b/internal/ethapi/transaction_args.go index a59ba3e1e..383829875 100644 --- a/internal/ethapi/transaction_args.go +++ b/internal/ethapi/transaction_args.go @@ -170,6 +170,7 @@ func (args *TransactionArgs) setDefaults(ctx context.Context, b Backend) error { MaxFeePerGas: args.MaxFeePerGas, MaxPriorityFeePerGas: args.MaxPriorityFeePerGas, FeeTokenID: args.FeeTokenID, + FeeLimit: args.FeeLimit, Value: args.Value, Data: (*hexutil.Bytes)(&data), AccessList: args.AccessList, diff --git a/rollup/fees/rate.go b/rollup/fees/rate.go index 06e3abb44..84879aa8c 100644 --- a/rollup/fees/rate.go +++ b/rollup/fees/rate.go @@ -40,17 +40,17 @@ func TokenRate(state StateDB, tokenID uint16) (*big.Int, *big.Int, error) { } func EthToAlt(state StateDB, tokenID uint16, amount *big.Int) (*big.Int, error) { - rate, tokenSacle, err := TokenRate(state, tokenID) + rate, tokenScale, err := TokenRate(state, tokenID) if err != nil { return nil, err } - return types.EthToAlt(amount, rate, tokenSacle), nil + return types.EthToAlt(amount, rate, tokenScale), nil } func AltToETH(state StateDB, tokenID uint16, amount *big.Int) (*big.Int, error) { - rate, tokenSacle, err := TokenRate(state, tokenID) + rate, tokenScale, err := TokenRate(state, tokenID) if err != nil { return nil, err } - return types.AltToEth(amount, rate, tokenSacle), nil + return types.AltToEth(amount, rate, tokenScale), nil }