converter

package
Version: v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2019 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Converter

type Converter struct {
	ContractInfo *contract.Contract
}

Converter is the underlying struct for the ConverterInterface

func (*Converter) Convert

func (c *Converter) Convert(logs []gethTypes.Log, event types.Event, headerID int64) ([]types.Log, error)

Convert the given watched event log into a types.Log for the given event

func (*Converter) ConvertBatch

func (c *Converter) ConvertBatch(logs []gethTypes.Log, events map[string]types.Event, headerID int64) (map[string][]types.Log, error)

ConvertBatch converts the given watched event logs into types.Logs; returns a map of event names to a slice of their converted logs

func (*Converter) Update

func (c *Converter) Update(info *contract.Contract)

Update is used to configure the converter with a specific contract

type ConverterInterface

type ConverterInterface interface {
	Convert(logs []gethTypes.Log, event types.Event, headerID int64) ([]types.Log, error)
	ConvertBatch(logs []gethTypes.Log, events map[string]types.Event, headerID int64) (map[string][]types.Log, error)
	Update(info *contract.Contract)
}

ConverterInterface is the interface for converting geth logs to our custom log type

Source Files

Jump to

Keyboard shortcuts

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