transformer

package
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: 5 Imported by: 52

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 []core.HeaderSyncLog) 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(diff utils.StorageDiff) error
	KeccakContractAddress() common.Hash
}

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