utils

package
v0.0.0-...-10d2874 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AverageBlockGenerationTime = int64(15)
View Source
var NilAddress = common.HexToAddress("0x0")
View Source
var TrialCount = 10

Functions

func BlockByTime

func BlockByTime(client *ethclient.Client, t time.Time) (*types.Block, error)

func CancelTx

func CancelTx(client *ethclient.Client, transactOpts *bind.TransactOpts) (*types.Transaction, error)

func GetGasPrice

func GetGasPrice(client *ethclient.Client, addon *big.Int, limit *big.Int) (*big.Int, error)

func GweiToWei

func GweiToWei(gwei int64) (*big.Int, error)

func IsContractAddress

func IsContractAddress(client *ethclient.Client, address common.Address) (bool, error)

func NewEthClient

func NewEthClient(rpc string) (*ethclient.Client, error)

func NewTransactorFromECDSA

func NewTransactorFromECDSA(filePath string) (*bind.TransactOpts, error)

func NewTransactorFromKeystore

func NewTransactorFromKeystore(keystore, passphrase string) (*bind.TransactOpts, error)

func SendEther

func SendEther(client *ethclient.Client, transactOpts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error)

func ToEther

func ToEther(wei *big.Int) *big.Float

func ToGwei

func ToGwei(wei *big.Int) *big.Float

func ToWei

func ToWei(ether *big.Float) (*big.Int, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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