rpc

package
v0.0.0-...-da200cc Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EthBlockChainRPC

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

func NewEthRPC

func NewEthRPC(api string) *EthBlockChainRPC

func (EthBlockChainRPC) GetBlockByNum

func (rpc EthBlockChainRPC) GetBlockByNum(num uint64) (sdk.Block, error)

func (EthBlockChainRPC) GetCurrentBlockNum

func (rpc EthBlockChainRPC) GetCurrentBlockNum() (uint64, error)

func (EthBlockChainRPC) GetTransactionReceipt

func (rpc EthBlockChainRPC) GetTransactionReceipt(txHash string) (sdk.TransactionReceipt, error)

type EthBlockChainRPCWithRetry

type EthBlockChainRPCWithRetry struct {
	*EthBlockChainRPC
	// contains filtered or unexported fields
}

func NewEthRPCWithRetry

func NewEthRPCWithRetry(api string, maxRetryCount int) *EthBlockChainRPCWithRetry

func (EthBlockChainRPCWithRetry) GetBlockByNum

func (rpc EthBlockChainRPCWithRetry) GetBlockByNum(num uint64) (rst sdk.Block, err error)

func (EthBlockChainRPCWithRetry) GetCurrentBlockNum

func (rpc EthBlockChainRPCWithRetry) GetCurrentBlockNum() (rst uint64, err error)

func (EthBlockChainRPCWithRetry) GetTransactionReceipt

func (rpc EthBlockChainRPCWithRetry) GetTransactionReceipt(txHash string) (rst sdk.TransactionReceipt, err error)

type IBlockChainRPC

type IBlockChainRPC interface {
	GetCurrentBlockNum() (uint64, error)

	GetBlockByNum(uint64) (sdk.Block, error)
	GetTransactionReceipt(txHash string) (sdk.TransactionReceipt, error)
}

Jump to

Keyboard shortcuts

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