scraper

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionManager

type ActionManager interface {
	GetImplementedContractNames() []string
	GetBlockHeader(ctx context.Context, height big.Int) (h *types.Header, err error)
	AfterEventLog(ctx context.Context, c contract.ContractsContents, ce structs.ContractEvent) error
	SyncForBeginningOfEpoch(ctx context.Context, contractVersion string, currentBlock uint64, blockTime time.Time) error
}

type EthereumAPI

type EthereumAPI struct {
	AM ActionManager
	// contains filtered or unexported fields
}

func NewEthereumAPI

func NewEthereumAPI(log *zap.Logger, transport transport.EthereumTransport, spb types.Header, am ActionManager) *EthereumAPI

func (*EthereumAPI) GetLatestBlockHeight

func (eAPI *EthereumAPI) GetLatestBlockHeight(ctx context.Context) (uint64, error)

func (*EthereumAPI) ParseLogs

func (eAPI *EthereumAPI) ParseLogs(ctx context.Context, ccs *contract.Contracts, taskID string, from, to big.Int) (err error)

type ProcInput

type ProcInput struct {
	Order             int
	Log               types.Log
	Header            types.Header
	PreviousBlockTime time.Time

	Error error
}

type ProcOutput

type ProcOutput struct {
	InID  int
	CE    structs.ContractEvent
	Error error
}

Directories

Path Synopsis
eth

Jump to

Keyboard shortcuts

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