Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Transformer ¶
type Transformer struct { // Database interfaces EventRepository srep.EventRepository // Holds transformed watched event log data HeaderRepository repository.HeaderRepository // Interface for interaction with header repositories // Pre-processing interfaces Parser parser.Parser // Parses events and methods out of contract abi fetched using contract address Retriever retriever.BlockRetriever // Retrieves first block for contract // Processing interfaces Fetcher fetcher.Fetcher // Fetches event logs, using header hashes Converter converter.ConverterInterface // Converts watched event logs into custom log Poller poller.Poller // Polls methods using arguments collected from events and persists them using a method datastore // Store contract configuration information Config config.ContractConfig // Store contract info as mapping to contract address Contracts map[string]*contract.Contract Start int64 // Hold the lowest starting block and the highest ending block // contains filtered or unexported fields }
Requires a header synced vDB (headers) and a running eth node (or infura)
func NewTransformer ¶
func NewTransformer(con config.ContractConfig, bc core.BlockChain, db *postgres.DB) *Transformer
Transformer takes in config for blockchain, database, and network id
func (*Transformer) Execute ¶
func (tr *Transformer) Execute() error
func (*Transformer) GetConfig ¶
func (tr *Transformer) GetConfig() config.ContractConfig
func (*Transformer) Init ¶
func (tr *Transformer) Init() error
Use after creating and setting transformer Loops over all of the addr => filter sets Uses parser to pull event info from abi Use this info to generate event filters
Click to show internal directories.
Click to hide internal directories.