Skip to content

Commit

Permalink
basefee
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberhorsey committed Aug 21, 2024
1 parent b7e2714 commit e1ecc09
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions packages/taiko-client/pkg/rpc/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (

"github.com/taikoxyz/taiko-mono/packages/taiko-client/bindings/encoding"
v2 "github.com/taikoxyz/taiko-mono/packages/taiko-client/bindings/v2"
"github.com/taikoxyz/taiko-mono/packages/taiko-client/internal/utils"
)

var (
Expand Down Expand Up @@ -279,29 +278,11 @@ func (c *Client) GetPoolContent(
ctxWithTimeout, cancel := CtxWithTimeoutOrDefault(ctx, defaultTimeout)
defer cancel()

l1Head, err := c.L1.HeaderByNumber(ctx, nil)
if err != nil {
return nil, err
}

l2Head, err := c.L2.HeaderByNumber(ctx, nil)
if err != nil {
return nil, err
}

log.Info("before base fee", "l1Head", l1Head, "l2Head", l2Head)

baseFeeInfo, err := c.V1.TaikoL2.GetBasefee(
&bind.CallOpts{Context: ctx},
l1Head.Number.Uint64(),
uint32(l2Head.GasUsed),
)
if err != nil {
return nil, err
}

log.Info("Current base fee", "fee", utils.WeiToGWei(baseFeeInfo.Basefee))

var localsArg []string
for _, local := range locals {
localsArg = append(localsArg, local.Hex())
Expand All @@ -310,7 +291,7 @@ func (c *Client) GetPoolContent(
return c.L2Engine.TxPoolContentWithMinTip(
ctxWithTimeout,
beneficiary,
baseFeeInfo.Basefee,
l2Head.BaseFee,
uint64(blockMaxGasLimit),
maxBytesPerTxList,
localsArg,
Expand Down

0 comments on commit e1ecc09

Please sign in to comment.