eth

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoundContractC

type BoundContractC struct {
	ET *EthTransport
	// contains filtered or unexported fields
}

func (*BoundContractC) AbiUnpack

func (bcc *BoundContractC) AbiUnpack(method string, data []byte) (res []interface{}, err error)

func (*BoundContractC) GetContract

func (bcc *BoundContractC) GetContract() *bind.BoundContract

func (*BoundContractC) RawCall

func (bcc *BoundContractC) RawCall(ctx context.Context, opts *bind.CallOpts, method string, params ...interface{}) (output []byte, err error)

type EthTransport

type EthTransport struct {
	C   *ethclient.Client
	Url string
}

func NewEthTransport

func NewEthTransport(url string) *EthTransport

func (*EthTransport) Close

func (et *EthTransport) Close(ctx context.Context)

func (*EthTransport) Dial

func (et *EthTransport) Dial(ctx context.Context) (err error)

func (*EthTransport) GetBlockHeader

func (et *EthTransport) GetBlockHeader(ctx context.Context, height *big.Int) (h *types.Header, err error)

func (*EthTransport) GetBoundContractCaller

func (et *EthTransport) GetBoundContractCaller(ctx context.Context, address common.Address, a abi.ABI) transport.BoundContractCaller

func (*EthTransport) GetLatestBlockHeight

func (et *EthTransport) GetLatestBlockHeight(ctx context.Context) (uint64, error)

func (*EthTransport) GetLogs

func (et *EthTransport) GetLogs(ctx context.Context, from, to big.Int, contracts []common.Address) (logs []types.Log, err error)

TODO: validate from-to range

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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