etherscan

package
v0.0.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEstimatedGasPrice

func GetEstimatedGasPrice() *big.Int

func GetTokenBalance added in v0.0.6

func GetTokenBalance(walletAddress common.Address, tokenAddress common.Address) (*big.Int, error)

func GetWETHBalance added in v0.0.6

func GetWETHBalance(walletAddress common.Address) (*big.Int, error)

Types

type AccountBalance

type AccountBalance struct {
	Account     string   `json:"account"`
	BalanceETH  *big.Int `json:"balance"`
	BalanceWETH *big.Int `json:"balance_weth"`
}

func GetBalances added in v0.0.6

func GetBalances(wallets *wallet.Wallets) ([]*AccountBalance, error)

func MultiAccountBalance

func MultiAccountBalance(wallets *wallet.Wallets) []*AccountBalance

type AccountBalancesResponse

type AccountBalancesResponse struct {
	Response
	Result []struct {
		Account string `json:"account"`
		Balance string `json:"balance"`
	} `json:"result"`
}

type GasOracle

type GasOracle struct {
	LastBlock       string `json:"LastBlock"`
	SafeGasPrice    string `json:"SafeGasPrice"`
	ProposeGasPrice string `json:"ProposeGasPrice"`
	FastGasPrice    string `json:"FastGasPrice"`
	SuggestBaseFee  string `json:"suggestBaseFee"`
	GasUsedRatio    string `json:"gasUsedRatio"`
}

func GetGasOracle

func GetGasOracle() *GasOracle

type GasOracleResponse

type GasOracleResponse struct {
	Response
	Result GasOracle `json:"result"`
}

type Response

type Response struct {
	Status  string `json:"status"`
	Message string `json:"message"`
}

type Token added in v0.0.6

type Token string
const (
	WETH Token = "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
)

type TokenBalancesResponse added in v0.0.6

type TokenBalancesResponse struct {
	Response
	Result string `json:"result"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL