helpers

package
v0.0.0-...-d05a2dc Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Client client

Functions

func DecimalsToWei

func DecimalsToWei(amount *decimal.Decimal, decimals *big.Int) *big.Int

func EthToWei

func EthToWei(amount *decimal.Decimal) *big.Int

func GetAccountBalance

func GetAccountBalance(address string) (*big.Int, error)

func GetLatestBlockNumber

func GetLatestBlockNumber() (*big.Int, error)

func GetSigRSVBytes

func GetSigRSVBytes(sig []byte) ([32]byte, [32]byte, uint8)

func GetTokenAllowance

func GetTokenAllowance(_tokenAddress string, _accountAddress string, _spenderAddress string) (*big.Int, error)

func GetTokenBalance

func GetTokenBalance(_tokenAddress string, _accountAddress string) (*big.Int, error)

func GetTokenDecimals

func GetTokenDecimals(tokenAddress string) (*big.Int, error)

func IsValidAddress

func IsValidAddress(address string) bool

func SetClientProviderURI

func SetClientProviderURI(providerURI string)

SetClientProviderURI ETH provider client URI

func TransferTokens

func TransferTokens(auth bind.TransactOpts, _tokenAddress string, _toAddress string, amount *big.Int) (*types.Transaction, error)

Types

type RSV

type RSV struct {
	R string `json:"r"`
	S string `json:"s"`
	V int    `json:"v"`
}

func GetSigRSV

func GetSigRSV(sig []byte) *RSV

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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