ethereum

package
v0.0.0-...-8682519 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBlock

func GetBlock(ctxt c.Context, bn uint64) (*c.Block, error)

func GetData

func GetData[R c.Fetchable](ctxt c.Context, hs []c.Hashable, fr c.Fetcher[R]) ([]R, error)

func GetFinalizedBlock

func GetFinalizedBlock(ctxt c.Context, blockNumber uint64) (*c.FinalizedBlock, error)

func GetTransactions

func GetTransactions(ctxt c.Context, blockNumber uint64) ([]c.Transaction, error)

func InitABI

func InitABI() (map[string]abi.ABI, error)

func MostRecentBlockNumber

func MostRecentBlockNumber(ctxt c.Context) (uint64, error)

Types

type EthGetBlockByNumberRequest

type EthGetBlockByNumberRequest struct {
	JsonRPC string        `json:"jsonrpc"` // nolint:revive
	Method  string        `json:"method"`
	Params  []interface{} `json:"params"`
	ID      int           `json:"id"`
}

type TXBHFetcher

type TXBHFetcher struct{}

func (TXBHFetcher) Fetch

func (txbh TXBHFetcher) Fetch(ctxt c.Context, hs []c.Hashable) ([]c.TxByHash, error)

type TxByHashBody

type TxByHashBody struct {
	Jsonrpc string      `json:"jsonrpc"`
	ID      int         `json:"id"`
	Result  *c.TxByHash `json:"result"`
}

type TxReceiptBody

type TxReceiptBody struct {
	Jsonrpc string      `json:"jsonrpc"`
	ID      int         `json:"id"`
	Result  c.TxReceipt `json:"result"`
}

Jump to

Keyboard shortcuts

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