eth_logs

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTransformer

func NewTransformer() interfaces.Transformer

NewTransformer satisfies interfaces.TransformerConstructor for eth.log_cids

Types

type CSVWriter added in v1.1.0

type CSVWriter struct {
	// contains filtered or unexported fields
}

CSVWriter struct for writing v3 DB eth.log_cids models to a csv file

func NewWriter added in v1.1.0

func NewWriter(dst io.WriteCloser) *CSVWriter

NewWriter satisfies interfaces.WriterConstructor for eth.log_cids

func (*CSVWriter) Close added in v1.1.0

func (cw *CSVWriter) Close() error

Close satisfies io.Closer

func (*CSVWriter) Write added in v1.1.0

func (cw *CSVWriter) Write(pgStr csv.WriteCSVStr, models interface{}) error

Write satisfies cshModel.Writer for v3 database for eth.log_cids

type LogModelV2

type LogModelV2 struct {
	ID        int64  `db:"id"`
	LeafCID   string `db:"leaf_cid"`
	LeafMhKey string `db:"leaf_mh_key"`
	ReceiptID int64  `db:"receipt_id"`
	Address   string `db:"address"`
	Index     int64  `db:"index"`
	Data      []byte `db:"log_data"`
	Topic0    string `db:"topic0"`
	Topic1    string `db:"topic1"`
	Topic2    string `db:"topic2"`
	Topic3    string `db:"topic3"`
}

LogModelV2 is the db model for eth.logs for v2 DB

type LogModelV2WithMeta

type LogModelV2WithMeta struct {
	TxHash string `db:"tx_hash"`
	LogModelV2
}

LogModelV2WithMeta is the db model for eth.logs for v2 DB with the additional metadata required to convert to v3 model

type LogModelV3

type LogModelV3 struct {
	LeafCID   string `db:"leaf_cid"`
	LeafMhKey string `db:"leaf_mh_key"`
	ReceiptID string `db:"rct_id"`
	Address   string `db:"address"`
	Index     int64  `db:"index"`
	Topic0    string `db:"topic0"`
	Topic1    string `db:"topic1"`
	Topic2    string `db:"topic2"`
	Topic3    string `db:"topic3"`
	Data      []byte `db:"log_data"`
}

LogModelV3 is the db model for eth.logs for v3 DB

type Transformer

type Transformer struct {
}

Transformer struct for transforming v2 DB eth.log_cids models to v3 DB models

func (*Transformer) Transform

func (t *Transformer) Transform(models interface{}, expectedRange [2]uint64) (interface{}, [][2]uint64, error)

Transform satisfies interfaces.Transformer for eth.log_cids

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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