eth

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2021 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 *ethclient.Client, toAddress common.Address, opts *bind.TransactOpts) (rocketpool.GasInfo, error)

Estimate the gas of SendTransaction

func EthToWei

func EthToWei(eth float64) *big.Int

Convert eth to wei

func FilterContractLogs

func FilterContractLogs(rp *rocketpool.RocketPool, contractName string, q FilterQuery, intervalSize *big.Int) ([]types.Log, error)

func GetLogs

func GetLogs(rp *rocketpool.RocketPool, 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 *ethclient.Client, 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