forked from cerc-io/ipld-eth-server
Add and use transformer labels in shared constants
This commit is contained in:
parent
f55449d0e5
commit
a0deb5eb62
@ -86,33 +86,33 @@ func getTransformerInititalizers(transformerNames []string) []shared2.Transforme
|
|||||||
func buildTransformerInitializerMap() map[string]shared2.TransformerInitializer {
|
func buildTransformerInitializerMap() map[string]shared2.TransformerInitializer {
|
||||||
transformerInitializerMap := make(map[string]shared2.TransformerInitializer)
|
transformerInitializerMap := make(map[string]shared2.TransformerInitializer)
|
||||||
|
|
||||||
transformerInitializerMap["bite"] = transformers.BiteTransformerInitializer
|
transformerInitializerMap[shared2.BiteLabel] = transformers.BiteTransformerInitializer
|
||||||
transformerInitializerMap["catFileChopLump"] = transformers.CatFileChopLumpTransformerInitializer
|
transformerInitializerMap[shared2.CatFileChopLumpLabel] = transformers.CatFileChopLumpTransformerInitializer
|
||||||
transformerInitializerMap["catFileFlip"] = transformers.CatFileFlipTransformerInitializer
|
transformerInitializerMap[shared2.CatFileFlipLabel] = transformers.CatFileFlipTransformerInitializer
|
||||||
transformerInitializerMap["catFilePitVow"] = transformers.CatFilePitVowTransformerInitializer
|
transformerInitializerMap[shared2.CatFilePitVowLabel] = transformers.CatFilePitVowTransformerInitializer
|
||||||
transformerInitializerMap["deal"] = transformers.DealTransformerInitializer
|
transformerInitializerMap[shared2.DealLabel] = transformers.DealTransformerInitializer
|
||||||
transformerInitializerMap["dent"] = transformers.DentTransformerInitializer
|
transformerInitializerMap[shared2.DentLabel] = transformers.DentTransformerInitializer
|
||||||
transformerInitializerMap["dripDrip"] = transformers.DripDripTransformerInitializer
|
transformerInitializerMap[shared2.DripDripLabel] = transformers.DripDripTransformerInitializer
|
||||||
transformerInitializerMap["dripFileIlk"] = transformers.DripFileIlkTransformerInitializer
|
transformerInitializerMap[shared2.DripFileIlkLabel] = transformers.DripFileIlkTransformerInitializer
|
||||||
transformerInitializerMap["dripFileRepo"] = transformers.DripFileRepoTransformerInitializer
|
transformerInitializerMap[shared2.DripFileRepoLabel] = transformers.DripFileRepoTransformerInitializer
|
||||||
transformerInitializerMap["dripFileVow"] = transformers.DripFileVowTransfromerInitializer
|
transformerInitializerMap[shared2.DripFileVowLabel] = transformers.DripFileVowTransfromerInitializer
|
||||||
transformerInitializerMap["flipKick"] = transformers.FlipKickTransformerInitializer
|
transformerInitializerMap[shared2.FlipKickLabel] = transformers.FlipKickTransformerInitializer
|
||||||
transformerInitializerMap["flopKick"] = transformers.FlopKickTransformerInitializer
|
transformerInitializerMap[shared2.FlopKickLabel] = transformers.FlopKickTransformerInitializer
|
||||||
transformerInitializerMap["frob"] = transformers.FrobTransformerInitializer
|
transformerInitializerMap[shared2.FrobLabel] = transformers.FrobTransformerInitializer
|
||||||
transformerInitializerMap["pitFileDebtCeiling"] = transformers.PitFileDebtCeilingTransformerInitializer
|
transformerInitializerMap[shared2.PitFileDebtCeilingLabel] = transformers.PitFileDebtCeilingTransformerInitializer
|
||||||
transformerInitializerMap["pitFileIlk"] = transformers.PitFileIlkTransformerInitializer
|
transformerInitializerMap[shared2.PitFileIlkLabel] = transformers.PitFileIlkTransformerInitializer
|
||||||
transformerInitializerMap["pitFileStabilityFee"] = transformers.PitFileStabilityFeeTransformerInitializer
|
transformerInitializerMap[shared2.PitFileStabilityFeeLabel] = transformers.PitFileStabilityFeeTransformerInitializer
|
||||||
transformerInitializerMap["priceFeed"] = transformers.PriceFeedTransformerInitializer
|
transformerInitializerMap[shared2.PriceFeedLabel] = transformers.PriceFeedTransformerInitializer
|
||||||
transformerInitializerMap["tend"] = transformers.TendTransformerInitializer
|
transformerInitializerMap[shared2.TendLabel] = transformers.TendTransformerInitializer
|
||||||
transformerInitializerMap["vatGrab"] = transformers.VatGrabTransformerInitializer
|
transformerInitializerMap[shared2.VatGrabLabel] = transformers.VatGrabTransformerInitializer
|
||||||
transformerInitializerMap["vatInit"] = transformers.VatInitTransformerInitializer
|
transformerInitializerMap[shared2.VatInitLabel] = transformers.VatInitTransformerInitializer
|
||||||
transformerInitializerMap["vatMove"] = transformers.VatMoveTransformerInitializer
|
transformerInitializerMap[shared2.VatMoveLabel] = transformers.VatMoveTransformerInitializer
|
||||||
transformerInitializerMap["vatHeal"] = transformers.VatHealTransformerInitializer
|
transformerInitializerMap[shared2.VatHealLabel] = transformers.VatHealTransformerInitializer
|
||||||
transformerInitializerMap["vatFold"] = transformers.VatFoldTransformerInitializer
|
transformerInitializerMap[shared2.VatFoldLabel] = transformers.VatFoldTransformerInitializer
|
||||||
transformerInitializerMap["vatSlip"] = transformers.VatSlipTransformerInitializer
|
transformerInitializerMap[shared2.VatSlipLabel] = transformers.VatSlipTransformerInitializer
|
||||||
transformerInitializerMap["vatToll"] = transformers.VatTollTransformerInitializer
|
transformerInitializerMap[shared2.VatTollLabel] = transformers.VatTollTransformerInitializer
|
||||||
transformerInitializerMap["vatTune"] = transformers.VatTuneTransformerInitializer
|
transformerInitializerMap[shared2.VatTuneLabel] = transformers.VatTuneTransformerInitializer
|
||||||
transformerInitializerMap["vatFlux"] = transformers.VatFluxTransformerInitializer
|
transformerInitializerMap[shared2.VatFluxLabel] = transformers.VatFluxTransformerInitializer
|
||||||
|
|
||||||
return transformerInitializerMap
|
return transformerInitializerMap
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ package ilk
|
|||||||
import "github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
import "github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||||
|
|
||||||
var DripFileIlkConfig = shared.SingleTransformerConfig{
|
var DripFileIlkConfig = shared.SingleTransformerConfig{
|
||||||
TransformerName: "drip file ilk",
|
TransformerName: shared.DripFileIlkLabel,
|
||||||
ContractAddresses: []string{shared.DripContractAddress},
|
ContractAddresses: []string{shared.DripContractAddress},
|
||||||
ContractAbi: shared.DripABI,
|
ContractAbi: shared.DripABI,
|
||||||
Topic: shared.DripFileIlkSignature,
|
Topic: shared.DripFileIlkSignature,
|
||||||
|
@ -17,7 +17,7 @@ package repo
|
|||||||
import "github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
import "github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||||
|
|
||||||
var DripFileRepoConfig = shared.SingleTransformerConfig{
|
var DripFileRepoConfig = shared.SingleTransformerConfig{
|
||||||
TransformerName: "drip file repo",
|
TransformerName: shared.DripFileRepoLabel,
|
||||||
ContractAddresses: []string{shared.DripContractAddress},
|
ContractAddresses: []string{shared.DripContractAddress},
|
||||||
ContractAbi: shared.DripABI,
|
ContractAbi: shared.DripABI,
|
||||||
Topic: shared.DripFileRepoSignature,
|
Topic: shared.DripFileRepoSignature,
|
||||||
|
@ -17,7 +17,7 @@ package vow
|
|||||||
import "github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
import "github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||||
|
|
||||||
var DripFileVowConfig = shared.SingleTransformerConfig{
|
var DripFileVowConfig = shared.SingleTransformerConfig{
|
||||||
TransformerName: "drip file vow",
|
TransformerName: shared.DripFileVowLabel,
|
||||||
ContractAddresses: []string{shared.DripContractAddress},
|
ContractAddresses: []string{shared.DripContractAddress},
|
||||||
ContractAbi: shared.DripABI,
|
ContractAbi: shared.DripABI,
|
||||||
Topic: shared.DripFileVowSignature,
|
Topic: shared.DripFileVowSignature,
|
||||||
|
@ -19,7 +19,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var DebtCeilingFileConfig = shared.SingleTransformerConfig{
|
var DebtCeilingFileConfig = shared.SingleTransformerConfig{
|
||||||
TransformerName: "pit file debt ceiling",
|
TransformerName: shared.PitFileDebtCeilingLabel,
|
||||||
ContractAddresses: []string{shared.PitContractAddress},
|
ContractAddresses: []string{shared.PitContractAddress},
|
||||||
ContractAbi: shared.PitABI,
|
ContractAbi: shared.PitABI,
|
||||||
Topic: shared.PitFileDebtCeilingSignature,
|
Topic: shared.PitFileDebtCeilingSignature,
|
||||||
|
@ -19,7 +19,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var IlkFileConfig = shared.SingleTransformerConfig{
|
var IlkFileConfig = shared.SingleTransformerConfig{
|
||||||
TransformerName: "pit file ilk",
|
TransformerName: shared.PitFileIlkLabel,
|
||||||
ContractAddresses: []string{shared.PitContractAddress},
|
ContractAddresses: []string{shared.PitContractAddress},
|
||||||
ContractAbi: shared.PitABI,
|
ContractAbi: shared.PitABI,
|
||||||
Topic: shared.PitFileIlkSignature,
|
Topic: shared.PitFileIlkSignature,
|
||||||
|
@ -19,7 +19,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var StabilityFeeFileConfig = shared.SingleTransformerConfig{
|
var StabilityFeeFileConfig = shared.SingleTransformerConfig{
|
||||||
TransformerName: "pit file stability fee",
|
TransformerName: shared.PitFileStabilityFeeLabel,
|
||||||
ContractAddresses: []string{shared.PitContractAddress},
|
ContractAddresses: []string{shared.PitContractAddress},
|
||||||
ContractAbi: shared.PitABI,
|
ContractAbi: shared.PitABI,
|
||||||
Topic: shared.PitFileStabilityFeeSignature,
|
Topic: shared.PitFileStabilityFeeSignature,
|
||||||
|
@ -102,4 +102,32 @@ var (
|
|||||||
VatTollSignature = GetLogNoteSignature(vatTollMethod)
|
VatTollSignature = GetLogNoteSignature(vatTollMethod)
|
||||||
VatTuneSignature = GetLogNoteSignature(vatTuneMethod)
|
VatTuneSignature = GetLogNoteSignature(vatTuneMethod)
|
||||||
VatFluxSignature = GetLogNoteSignature(vatFluxMethod)
|
VatFluxSignature = GetLogNoteSignature(vatFluxMethod)
|
||||||
|
|
||||||
|
BiteLabel = "bite"
|
||||||
|
DealLabel = "deal"
|
||||||
|
CatFileChopLumpLabel = "catFileChopLump"
|
||||||
|
CatFileFlipLabel = "catFileFlip"
|
||||||
|
CatFilePitVowLabel = "catFilePitVow"
|
||||||
|
DentLabel = "dent"
|
||||||
|
DripDripLabel = "dripDrip"
|
||||||
|
DripFileIlkLabel = "dripFileIlk"
|
||||||
|
DripFileRepoLabel = "dripFileRepo"
|
||||||
|
DripFileVowLabel = "dripFileVow"
|
||||||
|
FlipKickLabel = "flipKick"
|
||||||
|
FlopKickLabel = "flopKick"
|
||||||
|
FrobLabel = "frob"
|
||||||
|
PitFileDebtCeilingLabel = "pitFileDebtCeiling"
|
||||||
|
PitFileIlkLabel = "pitFileIlk"
|
||||||
|
PitFileStabilityFeeLabel = "pitFileStabilityFee"
|
||||||
|
PriceFeedLabel = "priceFeed"
|
||||||
|
TendLabel = "tend"
|
||||||
|
VatHealLabel = "vatHeal"
|
||||||
|
VatGrabLabel = "vatGrab"
|
||||||
|
VatInitLabel = "vatInit"
|
||||||
|
VatMoveLabel = "vatMove"
|
||||||
|
VatFoldLabel = "vatFold"
|
||||||
|
VatSlipLabel = "vatSlip"
|
||||||
|
VatTollLabel = "vatToll"
|
||||||
|
VatTuneLabel = "vatTune"
|
||||||
|
VatFluxLabel = "vatFlux"
|
||||||
)
|
)
|
||||||
|
@ -17,7 +17,7 @@ package tend
|
|||||||
import "github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
import "github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||||
|
|
||||||
var TendConfig = shared.SingleTransformerConfig{
|
var TendConfig = shared.SingleTransformerConfig{
|
||||||
TransformerName: "tend",
|
TransformerName: shared.TendLabel,
|
||||||
ContractAddresses: []string{shared.FlipperContractAddress},
|
ContractAddresses: []string{shared.FlipperContractAddress},
|
||||||
ContractAbi: shared.FlipperABI,
|
ContractAbi: shared.FlipperABI,
|
||||||
Topic: shared.TendFunctionSignature,
|
Topic: shared.TendFunctionSignature,
|
||||||
|
@ -19,7 +19,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var VatInitConfig = shared.SingleTransformerConfig{
|
var VatInitConfig = shared.SingleTransformerConfig{
|
||||||
TransformerName: "vat init",
|
TransformerName: shared.VatInitLabel,
|
||||||
ContractAddresses: []string{shared.VatContractAddress},
|
ContractAddresses: []string{shared.VatContractAddress},
|
||||||
ContractAbi: shared.VatABI,
|
ContractAbi: shared.VatABI,
|
||||||
Topic: shared.VatInitSignature,
|
Topic: shared.VatInitSignature,
|
||||||
|
@ -19,7 +19,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var VatMoveConfig = shared.SingleTransformerConfig{
|
var VatMoveConfig = shared.SingleTransformerConfig{
|
||||||
TransformerName: "vat move",
|
TransformerName: shared.VatMoveLabel,
|
||||||
ContractAddresses: []string{shared.VatContractAddress},
|
ContractAddresses: []string{shared.VatContractAddress},
|
||||||
ContractAbi: shared.VatABI,
|
ContractAbi: shared.VatABI,
|
||||||
Topic: shared.VatMoveSignature,
|
Topic: shared.VatMoveSignature,
|
||||||
|
Loading…
Reference in New Issue
Block a user