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 ErrHeaderMismatch ¶ added in v0.1.0
type ErrHeaderMismatch struct {
// contains filtered or unexported fields
}
func NewErrHeaderMismatch ¶
func NewErrHeaderMismatch(DBHash, diffHash string) *ErrHeaderMismatch
func (ErrHeaderMismatch) Error ¶
func (e ErrHeaderMismatch) Error() string
type EventWatcher ¶
type EventWatcher struct { LogExtractor logs.ILogExtractor ExpectedExtractorError error LogDelegator logs.ILogDelegator ExpectedDelegatorError error MaxConsecutiveUnexpectedErrs int RetryInterval time.Duration // contains filtered or unexported fields }
func NewEventWatcher ¶
func NewEventWatcher(db *postgres.DB, bc core.BlockChain, extractor logs.ILogExtractor, delegator logs.ILogDelegator, maxConsecutiveUnexpectedErrs int, retryInterval time.Duration) EventWatcher
func (*EventWatcher) AddTransformers ¶
func (watcher *EventWatcher) AddTransformers(initializers []transformer.EventTransformerInitializer) error
Adds transformers to the watcher so that their logs will be extracted and delegated.
func (*EventWatcher) Execute ¶
func (watcher *EventWatcher) Execute(recheckHeaders constants.TransformerExecution) error
Extracts and delegates watched log events.
type IStorageWatcher ¶ added in v0.0.10
type IStorageWatcher interface { AddTransformers(initializers []transformer.StorageTransformerInitializer) Execute() error }
type StorageWatcher ¶
type StorageWatcher struct { HeaderRepository datastore.HeaderRepository KeccakAddressTransformers map[common.Hash]transformer.StorageTransformer // keccak hash of an address => transformer RetryInterval time.Duration StorageDiffRepository storage.DiffRepository // contains filtered or unexported fields }
func NewStorageWatcher ¶
func NewStorageWatcher(db *postgres.DB, retryInterval time.Duration) 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.