Skip to content

Commit

Permalink
fix: fee suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
shaspitz committed Feb 6, 2024
1 parent 921cbc0 commit 8989d55
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/settler/settler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8989d55

Please sign in to comment.