transformer

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HexStringsToAddresses

func HexStringsToAddresses(strings []string) (addresses []common.Address)

func HexToInt64

func HexToInt64(byteString string) int64

func HexToString

func HexToString(byteString string) string

Types

type ContractTransformer

type ContractTransformer interface {
	Init() error
	Execute() error
	GetConfig() config.ContractConfig
}

type ContractTransformerInitializer

type ContractTransformerInitializer func(db *postgres.DB, bc core.BlockChain) ContractTransformer

type EventTransformer

type EventTransformer interface {
	Execute(logs []types.Log, header core.Header) error
	GetConfig() EventTransformerConfig
}

type EventTransformerConfig

type EventTransformerConfig struct {
	TransformerName     string
	ContractAddresses   []string
	ContractAbi         string
	Topic               string
	StartingBlockNumber int64
	EndingBlockNumber   int64 // Set -1 for indefinite transformer
}

type EventTransformerInitializer

type EventTransformerInitializer func(db *postgres.DB) EventTransformer

type StorageTransformer

type StorageTransformer interface {
	Execute(row utils.StorageDiffRow) error
	ContractAddress() common.Address
}

type StorageTransformerInitializer

type StorageTransformerInitializer func(db *postgres.DB) StorageTransformer

Jump to

Keyboard shortcuts

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