reader

package
v0.0.0-...-0c526e4 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const TIMEOUT time.Duration = 4 * time.Second

Variables

This section is empty.

Functions

This section is empty.

Types

type EthReader

type EthReader struct {
	// contains filtered or unexported fields
}
var SharedReader *EthReader

func NewEthReader

func NewEthReader() *EthReader

func NewRopstenReader

func NewRopstenReader() *EthReader

func (*EthReader) Call

func (self *EthReader) Call(result interface{}, method string, args ...interface{}) error

func (*EthReader) ERC20Allowance

func (self *EthReader) ERC20Allowance(caddr string, owner string, spender string) (*big.Int, error)

func (*EthReader) ERC20Balance

func (self *EthReader) ERC20Balance(caddr string, user string) (*big.Int, error)

func (*EthReader) ERC20Decimal

func (self *EthReader) ERC20Decimal(caddr string) (int64, error)

func (*EthReader) EstimateGas

func (self *EthReader) EstimateGas(from, to string, priceGwei, value float64, data []byte) (uint64, error)

func (*EthReader) GetABI

func (self *EthReader) GetABI(address string) (*abi.ABI, error)

func (*EthReader) GetBalance

func (self *EthReader) GetBalance(address string) (balance *big.Int, err error)

func (*EthReader) GetCode

func (self *EthReader) GetCode(address string) (code []byte, err error)

func (*EthReader) GetMinedNonce

func (self *EthReader) GetMinedNonce(address string) (nonce uint64, err error)

func (*EthReader) GetPendingNonce

func (self *EthReader) GetPendingNonce(address string) (nonce uint64, err error)

func (*EthReader) HeaderByNumber

func (self *EthReader) HeaderByNumber(number int64) (*types.Header, error)

func (*EthReader) ReadContract

func (self *EthReader) ReadContract(result interface{}, caddr string, method string, args ...interface{}) error

func (*EthReader) ReadContractWithABI

func (self *EthReader) ReadContractWithABI(result interface{}, caddr string, abi *abi.ABI, method string, args ...interface{}) error

func (*EthReader) RecommendedGasPrice

func (self *EthReader) RecommendedGasPrice() (float64, error)

return gwei

func (*EthReader) TransactionByHash

func (self *EthReader) TransactionByHash(txHash string) (tx *eu.Transaction, isPending bool, err error)

func (*EthReader) TransactionReceipt

func (self *EthReader) TransactionReceipt(txHash string) (receipt *types.Receipt, err error)

func (*EthReader) TxInfoFromHash

func (self *EthReader) TxInfoFromHash(tx string) (eu.TxInfo, error)

Jump to

Keyboard shortcuts

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