eth

package
v0.0.0-...-57b9f6b Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: LGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Contract

type Contract struct {
	// contains filtered or unexported fields
}

func NewContract

func NewContract(abiString string, contractAddr ...string) (*Contract, error)

func (*Contract) Address

func (c *Contract) Address() common.Address

func (*Contract) Call

func (c *Contract) Call(methodName string, args ...interface{}) (interface{}, error)

func (*Contract) CallWithFromAndValue

func (c *Contract) CallWithFromAndValue(
	methodName string,
	from common.Address,
	value *big.Int,
	args ...interface{},
) ([]interface{}, error)

func (*Contract) CallWithMultiReturns

func (c *Contract) CallWithMultiReturns(methodName string, args ...interface{}) ([]interface{}, error)

func (*Contract) EncodeABI

func (c *Contract) EncodeABI(methodName string, args ...interface{}) ([]byte, error)

func (*Contract) Methods

func (c *Contract) Methods(methodName string) abi.Method

type Eth

type Eth struct {
	// contains filtered or unexported fields
}

Eth is the eth namespace

func NewEth

func NewEth(c *rpc.Client) *Eth

func (*Eth) Accounts

func (e *Eth) Accounts() ([]common.Address, error)

func (*Eth) Address

func (e *Eth) Address() common.Address

func (*Eth) Call

func (e *Eth) Call(msg *types.CallMsg, block *big.Int) (string, error)

func (*Eth) ChainID

func (e *Eth) ChainID() (*big.Int, error)

func (*Eth) EncodeParams

func (e *Eth) EncodeParams()

func (*Eth) EstimateGas

func (e *Eth) EstimateGas(msg *types.CallMsg) (uint64, error)

func (*Eth) EstimateGasContract

func (e *Eth) EstimateGasContract(bin []byte) (uint64, error)

func (*Eth) GasPrice

func (e *Eth) GasPrice() (uint64, error)

func (*Eth) GetBalance

func (e *Eth) GetBalance(addr common.Address, blockNumber *big.Int) (*big.Int, error)

func (*Eth) GetBlockByHash

func (e *Eth) GetBlockByHash(hash common.Hash, full bool) (*eTypes.Block, error)

func (*Eth) GetBlockByNumber

func (e *Eth) GetBlockByNumber(i *big.Int, full bool) (*eTypes.Block, error)

func (*Eth) GetBlockNumber

func (e *Eth) GetBlockNumber() (uint64, error)

func (*Eth) GetNonce

func (e *Eth) GetNonce(addr common.Address, blockNumber *big.Int) (uint64, error)

func (*Eth) GetTransactionByHash

func (e *Eth) GetTransactionByHash(hash common.Hash) (*eTypes.Transaction, error)

func (*Eth) GetTransactionReceipt

func (e *Eth) GetTransactionReceipt(hash common.Hash) (*eTypes.Receipt, error)

func (*Eth) NewContract

func (e *Eth) NewContract(abiString string, contractAddr ...string) (*Contract, error)

func (*Eth) SendRawTransaction

func (e *Eth) SendRawTransaction(
	to common.Address,
	amount *big.Int,
	gasLimit uint64,
	gasPrice *big.Int,
	data []byte,
) (common.Hash, error)

func (*Eth) SendTransaction

func (e *Eth) SendTransaction(txn *eTypes.Transaction) (common.Hash, error)

func (*Eth) SetAccount

func (e *Eth) SetAccount(privateKey string) error

func (*Eth) SetChainId

func (e *Eth) SetChainId(chainId int64)

func (*Eth) SetTxPollTimeout

func (e *Eth) SetTxPollTimeout(timeout int)

func (*Eth) SyncSendRawTransaction

func (e *Eth) SyncSendRawTransaction(
	to common.Address,
	amount *big.Int,
	gasLimit uint64,
	gasPrice *big.Int,
	data []byte,
) (*eTypes.Receipt, error)

Jump to

Keyboard shortcuts

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