blockscrapers

package
v1.1.1-rc-25 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: GPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockScraper

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

type BlockScraperInterface

type BlockScraperInterface interface {
	// NFT data should be streamed through dia.NFT channel.
	GetDataChannel() chan dia.BlockData
	// Should fetch nft data and send it to the channel.
	FetchData() error
}

type EthereumBlockData

type EthereumBlockData struct {
	GasLimit    uint64             `json:"gas_limit"`
	GasUsed     uint64             `json:"gas_used"`
	Difficulty  *big.Int           `json:"difficulty"`
	Time        uint64             `json:"time"`
	Size        common.StorageSize `json:"size"`
	Number      uint64             `json:"number"`
	MixDigest   common.Hash        `json:"mix_digest"`
	Nonce       uint64             `json:"nonce"`
	Coinbase    common.Address     `json:"coinbase"`
	Root        common.Hash        `json:"root"`
	ParentHash  common.Hash        `json:"parent_hash"`
	TxHash      common.Hash        `json:"tx_hash"`
	ReceiptHash common.Hash        `json:"receipt_hash"`
	UncleHash   common.Hash        `json:"uncle_hash"`
	Extra       []byte             `json:"extra"`
}

type EthereumScraper

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

func NewEthereumScraper

func NewEthereumScraper(rdb *models.RelDB) *EthereumScraper

func (*EthereumScraper) Close

func (scraper *EthereumScraper) Close() error

Close closes any existing API connections

func (*EthereumScraper) FetchData

func (scraper *EthereumScraper) FetchData() error

func (*EthereumScraper) GetDataChannel

func (scraper *EthereumScraper) GetDataChannel() chan dia.BlockData

Jump to

Keyboard shortcuts

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