helpers

package
v0.0.0-...-ca2eb29 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2018 License: GPL-3.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ETHClient *ethclient.Client

ETHClient the eth client

View Source
var RPCClient *rpc.Client

RPCClient the rpc client

Functions

func GetBlockNumber

func GetBlockNumber(client *ethclient.Client) (string, error)

GetBlockNumber gets the block number

func GetWeiBalance

func GetWeiBalance(address string, client *ethclient.Client) (*big.Int, error)

GetWeiBalance the balance in wei for a given address

func InitEthClient

func InitEthClient(url string) error

InitEthClient initializez the the client

func InitRPCClient

func InitRPCClient(url string) error

InitRPCClient initializez the rpc client

func IsSyncying

func IsSyncying(client *ethclient.Client) (bool, error)

IsSyncying returns false if it's not syncing

func IsValidAddress

func IsValidAddress(iaddress interface{}) bool

IsValidAddress validate hex address

func NewTokenCaller

func NewTokenCaller(address common.Address, caller bind.ContractCaller) (*tokenCaller, error)

NewTokenCaller creates a new read-only instance of token, bound to a specific deployed contract.

func SignAndSendTx

func SignAndSendTx(client *ethclient.Client, value *big.Int, toAddress string, senderPrivateKey string) (string, error)

SignAndSendTx - all the info you need for a transaction of ETH is here

Types

This section is empty.

Jump to

Keyboard shortcuts

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