Skip to content

Commit

Permalink
Merge pull request #4 from KyberNetwork/feat/AG-1021
Browse files Browse the repository at this point in the history
Implement GasEstimator interface for ethClient
  • Loading branch information
ChauNguyen-K authored Oct 17, 2023
2 parents 1c5bcd9 + d83a92a commit f84afad
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"math/big"

"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/ethclient"
Expand Down Expand Up @@ -48,6 +49,10 @@ func (c *Client) SuggestGasPrice(ctx context.Context) (*big.Int, error) {
return c.ethClient.SuggestGasPrice(ctx)
}

func (c *Client) EstimateGas(ctx context.Context, msg ethereum.CallMsg) (uint64, error) {
return c.ethClient.EstimateGas(ctx, msg)
}

func (c *Client) R() *Request {
r := &Request{
client: c,
Expand Down

0 comments on commit f84afad

Please sign in to comment.