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.LogFetcher
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 {
Queue storage.IStorageQueue
Transformers map[common.Address]transformer.StorageTransformer
// contains filtered or unexported fields
}
func NewStorageWatcher ¶
func NewStorageWatcher(tailer fs.Tailer, db *postgres.DB) StorageWatcher
func (StorageWatcher) AddTransformers ¶
func (watcher StorageWatcher) AddTransformers(initializers []transformer.StorageTransformerInitializer)
func (StorageWatcher) Execute ¶
func (watcher StorageWatcher) Execute() error
Click to show internal directories.
Click to hide internal directories.