chain

package
v0.0.0-...-4544163 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: CC0-1.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockchainReader

type BlockchainReader interface {
	io.Closer
	ethereum.ChainStateReader
	ethereum.TransactionReader

	// blockchain
	BlockByHash(ctx context.Context, hash common.Hash) (*types.Block, error)
	BlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error)
	BlockNumber(context.Context) (uint64, error)
	BlockHashByNumber(context.Context, *big.Int) (common.Hash, error)
	HeaderByHash(ctx context.Context, hash common.Hash) (*types.Header, error)
	HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error)
	TransactionCount(ctx context.Context, blockHash common.Hash) (uint, error)
	TransactionInBlock(ctx context.Context, blockHash common.Hash, index uint) (*types.Transaction, error)

	// misc
	ChainID(context.Context) (*big.Int, error)
}

BlockchainReader defines functions that read information from blockchain.

Directories

Path Synopsis
Package chain_mocks is a generated GoMock package.
Package chain_mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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