scraper

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	NodeURL      string
	EnableUncles bool
}

type Scraper

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

func New

func New(config Config) (*Scraper, error)

func (*Scraper) Exec

func (s *Scraper) Exec(block int64) (*data.FullBlock, error)

Exec does the JSONRPC calls necessary for scraping a given block and returns the raw data It: - scrapes the block using eth_getBlockByNumber - for each transaction in the block, scrapes the receipts using eth_getTransactionReceipt - for each uncle in the block, scrapes the data using eth_getUncleByBlockHashAndIndex

Jump to

Keyboard shortcuts

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