Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/tx_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down
2 changes: 1 addition & 1 deletion core/types/receipt.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions internal/ethapi/transaction_args.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions rollup/fees/rate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}