chain

package
v1.5.2-rc Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: AGPL-3.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 Chain

type Chain interface {
	GetBlocks(context.Context, []uint64) ([]*types.Block, error)
	GetBlock(context.Context, uint64) (*types.Block, error)
	GetLatestBlock(context.Context) (uint64, error)
	GetTransaction(context.Context, common.Hash) (*types.Transaction, error)
	GetReceipts(context.Context, *big.Int) (types.Receipts, error)
	// Expose provider until we eject from celoutils
	Provider() *ethutils.Provider
}

func NewRPCFetcher

func NewRPCFetcher(o EthRPCOpts) (Chain, error)

type EthRPC

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

func (*EthRPC) GetBlock

func (c *EthRPC) GetBlock(ctx context.Context, blockNumber uint64) (*types.Block, error)

func (*EthRPC) GetBlocks

func (c *EthRPC) GetBlocks(ctx context.Context, blockNumbers []uint64) ([]*types.Block, error)

func (*EthRPC) GetLatestBlock

func (c *EthRPC) GetLatestBlock(ctx context.Context) (uint64, error)

func (*EthRPC) GetReceipts

func (c *EthRPC) GetReceipts(ctx context.Context, blockNumber *big.Int) (types.Receipts, error)

func (*EthRPC) GetTransaction

func (c *EthRPC) GetTransaction(ctx context.Context, txHash common.Hash) (*types.Transaction, error)

func (*EthRPC) Provider

func (c *EthRPC) Provider() *ethutils.Provider

type EthRPCOpts

type EthRPCOpts struct {
	RPCEndpoint string
	ChainID     int64
}

Jump to

Keyboard shortcuts

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