diff --git a/pkg/transformers/bite/config.go b/pkg/transformers/bite/config.go index 063d6266..0579a918 100644 --- a/pkg/transformers/bite/config.go +++ b/pkg/transformers/bite/config.go @@ -20,7 +20,7 @@ import ( "github.com/vulcanize/vulcanizedb/pkg/transformers/shared" ) -var BiteConfig = shared.SingleTransformerConfig{ +var BiteConfig = shared.TransformerConfig{ TransformerName: shared.BiteLabel, ContractAddresses: []string{shared.CatContractAddress}, ContractAbi: shared.CatABI, diff --git a/pkg/transformers/cat_file/chop_lump/config.go b/pkg/transformers/cat_file/chop_lump/config.go index 6dfb8f93..4486630b 100644 --- a/pkg/transformers/cat_file/chop_lump/config.go +++ b/pkg/transformers/cat_file/chop_lump/config.go @@ -16,7 +16,7 @@ package chop_lump import "github.com/vulcanize/vulcanizedb/pkg/transformers/shared" -var CatFileChopLumpConfig = shared.SingleTransformerConfig{ +var CatFileChopLumpConfig = shared.TransformerConfig{ TransformerName: shared.CatFileChopLumpLabel, ContractAddresses: []string{shared.CatContractAddress}, ContractAbi: shared.CatABI, diff --git a/pkg/transformers/cat_file/flip/config.go b/pkg/transformers/cat_file/flip/config.go index 9ea57237..29552bbf 100644 --- a/pkg/transformers/cat_file/flip/config.go +++ b/pkg/transformers/cat_file/flip/config.go @@ -16,7 +16,7 @@ package flip import "github.com/vulcanize/vulcanizedb/pkg/transformers/shared" -var CatFileFlipConfig = shared.SingleTransformerConfig{ +var CatFileFlipConfig = shared.TransformerConfig{ TransformerName: shared.CatFileFlipLabel, ContractAddresses: []string{shared.CatContractAddress}, ContractAbi: shared.CatABI, diff --git a/pkg/transformers/cat_file/pit_vow/config.go b/pkg/transformers/cat_file/pit_vow/config.go index 678f4c57..51e317f8 100644 --- a/pkg/transformers/cat_file/pit_vow/config.go +++ b/pkg/transformers/cat_file/pit_vow/config.go @@ -16,7 +16,7 @@ package pit_vow import "github.com/vulcanize/vulcanizedb/pkg/transformers/shared" -var CatFilePitVowConfig = shared.SingleTransformerConfig{ +var CatFilePitVowConfig = shared.TransformerConfig{ TransformerName: shared.CatFilePitVowLabel, ContractAddresses: []string{shared.CatContractAddress}, ContractAbi: shared.CatABI, diff --git a/pkg/transformers/deal/config.go b/pkg/transformers/deal/config.go index 443f89b1..07ed5736 100644 --- a/pkg/transformers/deal/config.go +++ b/pkg/transformers/deal/config.go @@ -16,7 +16,7 @@ package deal import "github.com/vulcanize/vulcanizedb/pkg/transformers/shared" -var DealConfig = shared.SingleTransformerConfig{ +var DealConfig = shared.TransformerConfig{ TransformerName: shared.DealLabel, ContractAddresses: []string{shared.FlipperContractAddress, shared.FlopperContractAddress}, ContractAbi: shared.FlipperABI, diff --git a/pkg/transformers/dent/config.go b/pkg/transformers/dent/config.go index 2151cab4..03b34817 100644 --- a/pkg/transformers/dent/config.go +++ b/pkg/transformers/dent/config.go @@ -16,7 +16,7 @@ package dent import "github.com/vulcanize/vulcanizedb/pkg/transformers/shared" -var DentConfig = shared.SingleTransformerConfig{ +var DentConfig = shared.TransformerConfig{ TransformerName: shared.DentLabel, ContractAddresses: []string{shared.FlipperContractAddress}, ContractAbi: shared.FlipperABI, diff --git a/pkg/transformers/drip_drip/config.go b/pkg/transformers/drip_drip/config.go index fdfeb8d1..541005a9 100644 --- a/pkg/transformers/drip_drip/config.go +++ b/pkg/transformers/drip_drip/config.go @@ -16,7 +16,7 @@ package drip_drip import "github.com/vulcanize/vulcanizedb/pkg/transformers/shared" -var DripDripConfig = shared.SingleTransformerConfig{ +var DripDripConfig = shared.TransformerConfig{ TransformerName: shared.DripDripLabel, ContractAddresses: []string{shared.DripContractAddress}, ContractAbi: shared.DripABI, diff --git a/pkg/transformers/drip_file/ilk/config.go b/pkg/transformers/drip_file/ilk/config.go index de6ad5ca..c4f302b5 100644 --- a/pkg/transformers/drip_file/ilk/config.go +++ b/pkg/transformers/drip_file/ilk/config.go @@ -16,7 +16,7 @@ package ilk import "github.com/vulcanize/vulcanizedb/pkg/transformers/shared" -var DripFileIlkConfig = shared.SingleTransformerConfig{ +var DripFileIlkConfig = shared.TransformerConfig{ TransformerName: shared.DripFileIlkLabel, ContractAddresses: []string{shared.DripContractAddress}, ContractAbi: shared.DripABI, diff --git a/pkg/transformers/drip_file/repo/config.go b/pkg/transformers/drip_file/repo/config.go index c0609644..61080c35 100644 --- a/pkg/transformers/drip_file/repo/config.go +++ b/pkg/transformers/drip_file/repo/config.go @@ -16,7 +16,7 @@ package repo import "github.com/vulcanize/vulcanizedb/pkg/transformers/shared" -var DripFileRepoConfig = shared.SingleTransformerConfig{ +var DripFileRepoConfig = shared.TransformerConfig{ TransformerName: shared.DripFileRepoLabel, ContractAddresses: []string{shared.DripContractAddress}, ContractAbi: shared.DripABI, diff --git a/pkg/transformers/drip_file/vow/config.go b/pkg/transformers/drip_file/vow/config.go index 1bd5e940..5638fa02 100644 --- a/pkg/transformers/drip_file/vow/config.go +++ b/pkg/transformers/drip_file/vow/config.go @@ -16,7 +16,7 @@ package vow import "github.com/vulcanize/vulcanizedb/pkg/transformers/shared" -var DripFileVowConfig = shared.SingleTransformerConfig{ +var DripFileVowConfig = shared.TransformerConfig{ TransformerName: shared.DripFileVowLabel, ContractAddresses: []string{shared.DripContractAddress}, ContractAbi: shared.DripABI, diff --git a/pkg/transformers/factories/log_note_transformer.go b/pkg/transformers/factories/log_note_transformer.go index 68f8e459..11351c00 100644 --- a/pkg/transformers/factories/log_note_transformer.go +++ b/pkg/transformers/factories/log_note_transformer.go @@ -25,7 +25,7 @@ import ( ) type LogNoteTransformer struct { - Config shared.SingleTransformerConfig + Config shared.TransformerConfig Converter LogNoteConverter Repository Repository Fetcher shared.SettableLogFetcher diff --git a/pkg/transformers/factories/transformer.go b/pkg/transformers/factories/transformer.go index 0c67a993..4137c015 100644 --- a/pkg/transformers/factories/transformer.go +++ b/pkg/transformers/factories/transformer.go @@ -25,7 +25,7 @@ import ( ) type Transformer struct { - Config shared.SingleTransformerConfig + Config shared.TransformerConfig Converter Converter Repository Repository Fetcher shared.SettableLogFetcher diff --git a/pkg/transformers/flap_kick/config.go b/pkg/transformers/flap_kick/config.go index 32ac1cf2..7d3dbaab 100644 --- a/pkg/transformers/flap_kick/config.go +++ b/pkg/transformers/flap_kick/config.go @@ -16,7 +16,7 @@ package flap_kick import "github.com/vulcanize/vulcanizedb/pkg/transformers/shared" -var FlapKickConfig = shared.SingleTransformerConfig{ +var FlapKickConfig = shared.TransformerConfig{ TransformerName: shared.FlapKickLabel, ContractAddresses: []string{shared.FlapperContractAddress}, ContractAbi: shared.FlapperABI, diff --git a/pkg/transformers/flip_kick/config.go b/pkg/transformers/flip_kick/config.go index b9ba11b8..ff84df93 100644 --- a/pkg/transformers/flip_kick/config.go +++ b/pkg/transformers/flip_kick/config.go @@ -16,7 +16,7 @@ package flip_kick import "github.com/vulcanize/vulcanizedb/pkg/transformers/shared" -var FlipKickConfig = shared.SingleTransformerConfig{ +var FlipKickConfig = shared.TransformerConfig{ TransformerName: shared.FlipKickLabel, ContractAddresses: []string{shared.FlipperContractAddress}, ContractAbi: shared.FlipperABI, diff --git a/pkg/transformers/flop_kick/config.go b/pkg/transformers/flop_kick/config.go index 0775b953..907ac67c 100644 --- a/pkg/transformers/flop_kick/config.go +++ b/pkg/transformers/flop_kick/config.go @@ -16,7 +16,7 @@ package flop_kick import "github.com/vulcanize/vulcanizedb/pkg/transformers/shared" -var Config = shared.SingleTransformerConfig{ +var Config = shared.TransformerConfig{ TransformerName: shared.FlopKickLabel, ContractAddresses: []string{shared.FlopperContractAddress}, ContractAbi: shared.FlopperABI, diff --git a/pkg/transformers/frob/config.go b/pkg/transformers/frob/config.go index 71af2185..2ee49a0a 100644 --- a/pkg/transformers/frob/config.go +++ b/pkg/transformers/frob/config.go @@ -16,7 +16,7 @@ package frob import "github.com/vulcanize/vulcanizedb/pkg/transformers/shared" -var FrobConfig = shared.SingleTransformerConfig{ +var FrobConfig = shared.TransformerConfig{ TransformerName: shared.FrobLabel, ContractAddresses: []string{shared.PitContractAddress}, ContractAbi: shared.PitABI, diff --git a/pkg/transformers/pit_file/debt_ceiling/config.go b/pkg/transformers/pit_file/debt_ceiling/config.go index 52dae6fc..084ab555 100644 --- a/pkg/transformers/pit_file/debt_ceiling/config.go +++ b/pkg/transformers/pit_file/debt_ceiling/config.go @@ -18,7 +18,7 @@ import ( "github.com/vulcanize/vulcanizedb/pkg/transformers/shared" ) -var DebtCeilingFileConfig = shared.SingleTransformerConfig{ +var DebtCeilingFileConfig = shared.TransformerConfig{ TransformerName: shared.PitFileDebtCeilingLabel, ContractAddresses: []string{shared.PitContractAddress}, ContractAbi: shared.PitABI, diff --git a/pkg/transformers/pit_file/ilk/config.go b/pkg/transformers/pit_file/ilk/config.go index 20d35bc3..f021c44e 100644 --- a/pkg/transformers/pit_file/ilk/config.go +++ b/pkg/transformers/pit_file/ilk/config.go @@ -18,7 +18,7 @@ import ( "github.com/vulcanize/vulcanizedb/pkg/transformers/shared" ) -var IlkFileConfig = shared.SingleTransformerConfig{ +var IlkFileConfig = shared.TransformerConfig{ TransformerName: shared.PitFileIlkLabel, ContractAddresses: []string{shared.PitContractAddress}, ContractAbi: shared.PitABI, diff --git a/pkg/transformers/pit_file/stability_fee/config.go b/pkg/transformers/pit_file/stability_fee/config.go index 01848543..84a6aced 100644 --- a/pkg/transformers/pit_file/stability_fee/config.go +++ b/pkg/transformers/pit_file/stability_fee/config.go @@ -18,7 +18,7 @@ import ( "github.com/vulcanize/vulcanizedb/pkg/transformers/shared" ) -var StabilityFeeFileConfig = shared.SingleTransformerConfig{ +var StabilityFeeFileConfig = shared.TransformerConfig{ TransformerName: shared.PitFileStabilityFeeLabel, ContractAddresses: []string{shared.PitContractAddress}, ContractAbi: shared.PitABI, diff --git a/pkg/transformers/price_feeds/config.go b/pkg/transformers/price_feeds/config.go index 5ca114d4..34198eef 100644 --- a/pkg/transformers/price_feeds/config.go +++ b/pkg/transformers/price_feeds/config.go @@ -16,7 +16,7 @@ package price_feeds import "github.com/vulcanize/vulcanizedb/pkg/transformers/shared" -var PriceFeedConfig = shared.SingleTransformerConfig{ +var PriceFeedConfig = shared.TransformerConfig{ TransformerName: shared.PriceFeedLabel, ContractAddresses: []string{ shared.PepContractAddress, diff --git a/pkg/transformers/shared/transformer.go b/pkg/transformers/shared/transformer.go index a647e9a7..8e2e526b 100644 --- a/pkg/transformers/shared/transformer.go +++ b/pkg/transformers/shared/transformer.go @@ -28,15 +28,6 @@ type Transformer interface { type TransformerInitializer func(db *postgres.DB, blockChain core.BlockChain) Transformer type TransformerConfig struct { - TransformerName string - ContractAddresses []string - ContractAbi string - Topics []string // TODO Change this to single topic - StartingBlockNumber int64 - EndingBlockNumber int64 -} - -type SingleTransformerConfig struct { TransformerName string ContractAddresses []string ContractAbi string diff --git a/pkg/transformers/tend/config.go b/pkg/transformers/tend/config.go index d4911e45..e5071343 100644 --- a/pkg/transformers/tend/config.go +++ b/pkg/transformers/tend/config.go @@ -16,7 +16,7 @@ package tend import "github.com/vulcanize/vulcanizedb/pkg/transformers/shared" -var TendConfig = shared.SingleTransformerConfig{ +var TendConfig = shared.TransformerConfig{ TransformerName: shared.TendLabel, ContractAddresses: []string{shared.FlipperContractAddress}, ContractAbi: shared.FlipperABI, diff --git a/pkg/transformers/test_data/generic.go b/pkg/transformers/test_data/generic.go index 6719dfe6..64a59ea0 100644 --- a/pkg/transformers/test_data/generic.go +++ b/pkg/transformers/test_data/generic.go @@ -35,7 +35,7 @@ var GenericTestLogs = []types.Log{{ BlockNumber: uint64(startingBlockNumber), }} -var GenericTestConfig = shared.SingleTransformerConfig{ +var GenericTestConfig = shared.TransformerConfig{ TransformerName: "generic-test-transformer", ContractAddresses: []string{address}, ContractAbi: randomString(100), diff --git a/pkg/transformers/vat_flux/config.go b/pkg/transformers/vat_flux/config.go index 737266c3..aff8561c 100644 --- a/pkg/transformers/vat_flux/config.go +++ b/pkg/transformers/vat_flux/config.go @@ -2,7 +2,7 @@ package vat_flux import "github.com/vulcanize/vulcanizedb/pkg/transformers/shared" -var VatFluxConfig = shared.SingleTransformerConfig{ +var VatFluxConfig = shared.TransformerConfig{ TransformerName: shared.VatFluxLabel, ContractAddresses: []string{shared.VatContractAddress}, ContractAbi: shared.VatABI, diff --git a/pkg/transformers/vat_fold/config.go b/pkg/transformers/vat_fold/config.go index 747be3fd..ad4ac3ef 100644 --- a/pkg/transformers/vat_fold/config.go +++ b/pkg/transformers/vat_fold/config.go @@ -18,7 +18,7 @@ import ( "github.com/vulcanize/vulcanizedb/pkg/transformers/shared" ) -var VatFoldConfig = shared.SingleTransformerConfig{ +var VatFoldConfig = shared.TransformerConfig{ TransformerName: shared.VatFoldLabel, ContractAddresses: []string{shared.VatContractAddress}, ContractAbi: shared.VatABI, diff --git a/pkg/transformers/vat_grab/config.go b/pkg/transformers/vat_grab/config.go index ee1f957e..5f28bace 100644 --- a/pkg/transformers/vat_grab/config.go +++ b/pkg/transformers/vat_grab/config.go @@ -2,7 +2,7 @@ package vat_grab import "github.com/vulcanize/vulcanizedb/pkg/transformers/shared" -var VatGrabConfig = shared.SingleTransformerConfig{ +var VatGrabConfig = shared.TransformerConfig{ TransformerName: shared.VatGrabLabel, ContractAddresses: []string{shared.VatContractAddress}, ContractAbi: shared.VatABI, diff --git a/pkg/transformers/vat_heal/config.go b/pkg/transformers/vat_heal/config.go index 25f769dc..6319f06e 100644 --- a/pkg/transformers/vat_heal/config.go +++ b/pkg/transformers/vat_heal/config.go @@ -16,7 +16,7 @@ package vat_heal import "github.com/vulcanize/vulcanizedb/pkg/transformers/shared" -var VatHealConfig = shared.SingleTransformerConfig{ +var VatHealConfig = shared.TransformerConfig{ TransformerName: shared.VatHealLabel, ContractAddresses: []string{shared.VatContractAddress}, ContractAbi: shared.VatABI, diff --git a/pkg/transformers/vat_init/config.go b/pkg/transformers/vat_init/config.go index d54abb56..3f77310d 100644 --- a/pkg/transformers/vat_init/config.go +++ b/pkg/transformers/vat_init/config.go @@ -18,7 +18,7 @@ import ( "github.com/vulcanize/vulcanizedb/pkg/transformers/shared" ) -var VatInitConfig = shared.SingleTransformerConfig{ +var VatInitConfig = shared.TransformerConfig{ TransformerName: shared.VatInitLabel, ContractAddresses: []string{shared.VatContractAddress}, ContractAbi: shared.VatABI, diff --git a/pkg/transformers/vat_move/config.go b/pkg/transformers/vat_move/config.go index 93f25e55..8fa2e86e 100644 --- a/pkg/transformers/vat_move/config.go +++ b/pkg/transformers/vat_move/config.go @@ -18,7 +18,7 @@ import ( "github.com/vulcanize/vulcanizedb/pkg/transformers/shared" ) -var VatMoveConfig = shared.SingleTransformerConfig{ +var VatMoveConfig = shared.TransformerConfig{ TransformerName: shared.VatMoveLabel, ContractAddresses: []string{shared.VatContractAddress}, ContractAbi: shared.VatABI, diff --git a/pkg/transformers/vat_slip/config.go b/pkg/transformers/vat_slip/config.go index bb28a9ed..87932eb7 100644 --- a/pkg/transformers/vat_slip/config.go +++ b/pkg/transformers/vat_slip/config.go @@ -2,7 +2,7 @@ package vat_slip import "github.com/vulcanize/vulcanizedb/pkg/transformers/shared" -var VatSlipConfig = shared.SingleTransformerConfig{ +var VatSlipConfig = shared.TransformerConfig{ TransformerName: shared.VatSlipLabel, ContractAddresses: []string{shared.VatContractAddress}, ContractAbi: shared.VatABI, diff --git a/pkg/transformers/vat_toll/config.go b/pkg/transformers/vat_toll/config.go index de57c23a..c51e4fa6 100644 --- a/pkg/transformers/vat_toll/config.go +++ b/pkg/transformers/vat_toll/config.go @@ -2,7 +2,7 @@ package vat_toll import "github.com/vulcanize/vulcanizedb/pkg/transformers/shared" -var VatTollConfig = shared.SingleTransformerConfig{ +var VatTollConfig = shared.TransformerConfig{ TransformerName: shared.VatTollLabel, ContractAddresses: []string{shared.VatContractAddress}, ContractAbi: shared.VatABI, diff --git a/pkg/transformers/vat_tune/config.go b/pkg/transformers/vat_tune/config.go index bef750ed..08310e13 100644 --- a/pkg/transformers/vat_tune/config.go +++ b/pkg/transformers/vat_tune/config.go @@ -2,7 +2,7 @@ package vat_tune import "github.com/vulcanize/vulcanizedb/pkg/transformers/shared" -var VatTuneConfig = shared.SingleTransformerConfig{ +var VatTuneConfig = shared.TransformerConfig{ TransformerName: shared.VatTuneLabel, ContractAddresses: []string{shared.VatContractAddress}, ContractAbi: shared.VatABI, diff --git a/pkg/transformers/vow_flog/config.go b/pkg/transformers/vow_flog/config.go index fd2c55f6..7ab4e9fd 100644 --- a/pkg/transformers/vow_flog/config.go +++ b/pkg/transformers/vow_flog/config.go @@ -16,7 +16,7 @@ package vow_flog import "github.com/vulcanize/vulcanizedb/pkg/transformers/shared" -var VowFlogConfig = shared.SingleTransformerConfig{ +var VowFlogConfig = shared.TransformerConfig{ TransformerName: shared.VowFlogLabel, ContractAddresses: []string{shared.VowContractAddress}, ContractAbi: shared.VowABI,