watcher

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2019 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Contract watcher is built with a more generic interface that allows offloading more of the operational logic to the transformers, allowing them to act more dynamically Built to work primarily with the contract_watcher packaging

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContractWatcher

type ContractWatcher struct {
	Transformers []transformer.ContractTransformer
	DB           *postgres.DB
	BlockChain   core.BlockChain
}

func NewContractWatcher

func NewContractWatcher(db *postgres.DB, bc core.BlockChain) ContractWatcher

func (*ContractWatcher) AddTransformers

func (watcher *ContractWatcher) AddTransformers(inits interface{}) error

func (*ContractWatcher) Execute

func (watcher *ContractWatcher) Execute() error

type EventWatcher

type EventWatcher struct {
	Transformers  []transformer.EventTransformer
	BlockChain    core.BlockChain
	DB            *postgres.DB
	Fetcher       fetcher.ILogFetcher
	Chunker       chunker.Chunker
	Addresses     []common.Address
	Topics        []common.Hash
	StartingBlock *int64
	Syncer        transactions.ITransactionsSyncer
}

func NewEventWatcher

func NewEventWatcher(db *postgres.DB, bc core.BlockChain) EventWatcher

func (*EventWatcher) AddTransformers

func (watcher *EventWatcher) AddTransformers(initializers []transformer.EventTransformerInitializer)

Adds transformers to the watcher and updates the chunker, so that it will consider the new transformers.

func (*EventWatcher) Execute

func (watcher *EventWatcher) Execute(recheckHeaders constants.TransformerExecution) error

type StorageWatcher

type StorageWatcher struct {
	StorageFetcher fetcher.IStorageFetcher
	Queue          storage.IStorageQueue
	Transformers   map[common.Address]transformer.StorageTransformer
	// contains filtered or unexported fields
}

func NewStorageWatcher

func NewStorageWatcher(fetcher fetcher.IStorageFetcher, db *postgres.DB) StorageWatcher

func (StorageWatcher) AddTransformers

func (storageWatcher StorageWatcher) AddTransformers(initializers []transformer.StorageTransformerInitializer)

func (StorageWatcher) Execute

func (storageWatcher StorageWatcher) Execute(rows chan utils.StorageDiffRow, errs chan error, queueRecheckInterval time.Duration)

Jump to

Keyboard shortcuts

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