avax

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2022 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WeiPerEth  float64 = 1e18
	WeiPerGwei float64 = 1e9
)

Conversion factors

Variables

This section is empty.

Functions

func EstimateSendTransactionGas

func EstimateSendTransactionGas(client *client.EthClientProxy, toAddress common.Address, opts *bind.TransactOpts) (gogopool.GasInfo, error)

Estimate the gas of SendTransaction

func EthToWei

func EthToWei(eth float64) *big.Int

Convert eth to wei

func FilterContractLogs

func FilterContractLogs(ggp *gogopool.GoGoPool, contractName string, q FilterQuery, intervalSize *big.Int) ([]types.Log, error)

func GetLogs

func GetLogs(ggp *gogopool.GoGoPool, addressFilter []common.Address, topicFilter [][]common.Hash, intervalSize, fromBlock, toBlock *big.Int, blockHash *common.Hash) ([]types.Log, error)

Gets the logs for a particular log request, breaking the calls into batches if necessary

func GweiToWei

func GweiToWei(gwei float64) *big.Int

Convert gigawei to wei

func SendTransaction

func SendTransaction(client *client.EthClientProxy, toAddress common.Address, chainID *big.Int, opts *bind.TransactOpts) (common.Hash, error)

Send a transaction to an address

func WeiToEth

func WeiToEth(wei *big.Int) float64

Convert wei to eth

func WeiToGwei

func WeiToGwei(wei *big.Int) float64

Convert wei to gigawei

Types

type FilterQuery

type FilterQuery struct {
	BlockHash *common.Hash
	FromBlock *big.Int
	ToBlock   *big.Int
	Topics    [][]common.Hash
}

Jump to

Keyboard shortcuts

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