From 8989d55f7ae79194bc53aa8aa672be3e01c103a7 Mon Sep 17 00:00:00 2001 From: Shawn <44221603+shaspitz@users.noreply.github.com> Date: Mon, 5 Feb 2024 18:40:59 -0800 Subject: [PATCH 1/2] fix: fee suggestion --- pkg/settler/settler.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/settler/settler.go b/pkg/settler/settler.go index a510637..2cfe7c0 100644 --- a/pkg/settler/settler.go +++ b/pkg/settler/settler.go @@ -110,19 +110,19 @@ func (s *Settler) getTransactOpts(ctx context.Context) (*bind.TransactOpts, erro } auth.Nonce = big.NewInt(int64(nonce)) + // Returns priority fee per gas gasTip, err := s.client.SuggestGasTipCap(ctx) if err != nil { return nil, err } + // Returns priority fee per gas + base fee per gas gasPrice, err := s.client.SuggestGasPrice(ctx) if err != nil { return nil, err } - gasFeeCap := new(big.Int).Add(gasTip, gasPrice) - - auth.GasFeeCap = gasFeeCap + auth.GasFeeCap = gasPrice auth.GasTipCap = gasTip return auth, nil From b63e192b5f9bba18ac046d7e27a96fbbd5901da7 Mon Sep 17 00:00:00 2001 From: Shawn <44221603+shaspitz@users.noreply.github.com> Date: Tue, 13 Feb 2024 16:15:21 -0800 Subject: [PATCH 2/2] missed spot --- pkg/node/node.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/node/node.go b/pkg/node/node.go index deba334..d310611 100644 --- a/pkg/node/node.go +++ b/pkg/node/node.go @@ -292,19 +292,20 @@ func setBuilderMapping( return err } auth.Nonce = big.NewInt(int64(nonce)) + + // Returns priority fee per gas gasTip, err := client.SuggestGasTipCap(ctx) if err != nil { return err } + // Returns priority fee per gas + base fee per gas gasPrice, err := client.SuggestGasPrice(ctx) if err != nil { return err } - gasFeeCap := new(big.Int).Add(gasTip, gasPrice) - - auth.GasFeeCap = gasFeeCap + auth.GasFeeCap = gasPrice auth.GasTipCap = gasTip txn, err := rc.AddBuilderAddress(auth, builderName, common.HexToAddress(builderAddress))