VDB-205 Fix external configuration values (#121)

* Updated loading config from /Users/konstantinzolotarev/.vulcanizedb for addreses

* Updated contract addresses loading from env variables.

* Implement getter chain for addresses, configs and transformers

Solves the issue with declaring stuff as vars when the environment file hasn't been loaded yet. Instead, this data is fetched dynamically when the root commands are called.

* Update test data to use constant Kovan addresses

* Decouple integration tests from config file IO

* Add ABI to environment file, convert getter chains for related values

* Decouple tests suites from ABI config file IO

* Add startingBlock to environment and implement getter chain

* Exit when called without config file

* Add missing deployment blocks to staging.toml

* Remove comment
This commit is contained in:
Konstantin Zolotarev 2019-01-23 19:44:09 +01:00 committed by Edvard Hübinette
parent c24a073ff7
commit 65cb6e9092
97 changed files with 1051 additions and 651 deletions

View File

@ -88,34 +88,34 @@ func getTransformerInitializers(transformerNames []string) []shared2.Transformer
func buildTransformerInitializerMap() map[string]shared2.TransformerInitializer { func buildTransformerInitializerMap() map[string]shared2.TransformerInitializer {
initializerMap := make(map[string]shared2.TransformerInitializer) initializerMap := make(map[string]shared2.TransformerInitializer)
initializerMap[constants.BiteLabel] = transformers.BiteTransformer.NewTransformer initializerMap[constants.BiteLabel] = transformers.GetBiteTransformer().NewTransformer
initializerMap[constants.CatFileChopLumpLabel] = transformers.CatFileChopLumpTransformer.NewLogNoteTransformer initializerMap[constants.CatFileChopLumpLabel] = transformers.GetCatFileChopLumpTransformer().NewLogNoteTransformer
initializerMap[constants.CatFileFlipLabel] = transformers.CatFileFlipTransformer.NewLogNoteTransformer initializerMap[constants.CatFileFlipLabel] = transformers.GetCatFileFlipTransformer().NewLogNoteTransformer
initializerMap[constants.CatFilePitVowLabel] = transformers.CatFilePitVowTransformer.NewLogNoteTransformer initializerMap[constants.CatFilePitVowLabel] = transformers.GetCatFilePitVowTransformer().NewLogNoteTransformer
initializerMap[constants.DealLabel] = transformers.DealTransformer.NewLogNoteTransformer initializerMap[constants.DealLabel] = transformers.GetDealTransformer().NewLogNoteTransformer
initializerMap[constants.DentLabel] = transformers.DentTransformer.NewLogNoteTransformer initializerMap[constants.DentLabel] = transformers.GetDentTransformer().NewLogNoteTransformer
initializerMap[constants.DripDripLabel] = transformers.DripDripTransformer.NewLogNoteTransformer initializerMap[constants.DripDripLabel] = transformers.GetDripDripTransformer().NewLogNoteTransformer
initializerMap[constants.DripFileIlkLabel] = transformers.DripFileIlkTransformer.NewLogNoteTransformer initializerMap[constants.DripFileIlkLabel] = transformers.GetDripFileIlkTransformer().NewLogNoteTransformer
initializerMap[constants.DripFileRepoLabel] = transformers.DripFileRepoTransformer.NewLogNoteTransformer initializerMap[constants.DripFileRepoLabel] = transformers.GetDripFileRepoTransformer().NewLogNoteTransformer
initializerMap[constants.DripFileVowLabel] = transformers.DripFileVowTransfromer.NewLogNoteTransformer initializerMap[constants.DripFileVowLabel] = transformers.GetDripFileVowTransformer().NewLogNoteTransformer
initializerMap[constants.FlapKickLabel] = transformers.FlapKickTransformer.NewTransformer initializerMap[constants.FlapKickLabel] = transformers.GetFlapKickTransformer().NewTransformer
initializerMap[constants.FlipKickLabel] = transformers.FlipKickTransformer.NewTransformer initializerMap[constants.FlipKickLabel] = transformers.GetFlipKickTransformer().NewTransformer
initializerMap[constants.FlopKickLabel] = transformers.FlopKickTransformer.NewTransformer initializerMap[constants.FlopKickLabel] = transformers.GetFlopKickTransformer().NewTransformer
initializerMap[constants.FrobLabel] = transformers.FrobTransformer.NewTransformer initializerMap[constants.FrobLabel] = transformers.GetFrobTransformer().NewTransformer
initializerMap[constants.PitFileDebtCeilingLabel] = transformers.PitFileDebtCeilingTransformer.NewLogNoteTransformer initializerMap[constants.PitFileDebtCeilingLabel] = transformers.GetPitFileDebtCeilingTransformer().NewLogNoteTransformer
initializerMap[constants.PitFileIlkLabel] = transformers.PitFileIlkTransformer.NewLogNoteTransformer initializerMap[constants.PitFileIlkLabel] = transformers.GetPitFileIlkTransformer().NewLogNoteTransformer
initializerMap[constants.PriceFeedLabel] = transformers.PriceFeedTransformer.NewLogNoteTransformer initializerMap[constants.PriceFeedLabel] = transformers.GetPriceFeedTransformer().NewLogNoteTransformer
initializerMap[constants.TendLabel] = transformers.TendTransformer.NewLogNoteTransformer initializerMap[constants.TendLabel] = transformers.GetTendTransformer().NewLogNoteTransformer
initializerMap[constants.VatFluxLabel] = transformers.VatFluxTransformer.NewLogNoteTransformer initializerMap[constants.VatFluxLabel] = transformers.GetVatFluxTransformer().NewLogNoteTransformer
initializerMap[constants.VatFoldLabel] = transformers.VatFoldTransformer.NewLogNoteTransformer initializerMap[constants.VatFoldLabel] = transformers.GetVatFoldTransformer().NewLogNoteTransformer
initializerMap[constants.VatGrabLabel] = transformers.VatGrabTransformer.NewLogNoteTransformer initializerMap[constants.VatGrabLabel] = transformers.GetVatGrabTransformer().NewLogNoteTransformer
initializerMap[constants.VatHealLabel] = transformers.VatHealTransformer.NewLogNoteTransformer initializerMap[constants.VatHealLabel] = transformers.GetVatHealTransformer().NewLogNoteTransformer
initializerMap[constants.VatInitLabel] = transformers.VatInitTransformer.NewLogNoteTransformer initializerMap[constants.VatInitLabel] = transformers.GetVatInitTransformer().NewLogNoteTransformer
initializerMap[constants.VatMoveLabel] = transformers.VatMoveTransformer.NewLogNoteTransformer initializerMap[constants.VatMoveLabel] = transformers.GetVatMoveTransformer().NewLogNoteTransformer
initializerMap[constants.VatSlipLabel] = transformers.VatSlipTransformer.NewLogNoteTransformer initializerMap[constants.VatSlipLabel] = transformers.GetVatSlipTransformer().NewLogNoteTransformer
initializerMap[constants.VatTollLabel] = transformers.VatTollTransformer.NewLogNoteTransformer initializerMap[constants.VatTollLabel] = transformers.GetVatTollTransformer().NewLogNoteTransformer
initializerMap[constants.VatTuneLabel] = transformers.VatTuneTransformer.NewLogNoteTransformer initializerMap[constants.VatTuneLabel] = transformers.GetVatTuneTransformer().NewLogNoteTransformer
initializerMap[constants.VowFlogLabel] = transformers.FlogTransformer.NewLogNoteTransformer initializerMap[constants.VowFlogLabel] = transformers.GetFlogTransformer().NewLogNoteTransformer
return initializerMap return initializerMap
} }

View File

@ -15,7 +15,7 @@
package cmd package cmd
import ( import (
log "github.com/sirupsen/logrus" "fmt"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
) )
@ -33,37 +33,37 @@ vulcanizedb getSignatures`,
func getSignatures() { func getSignatures() {
signatures := make(map[string]string) signatures := make(map[string]string)
signatures["BiteSignature"] = constants.BiteSignature signatures["BiteSignature"] = constants.GetBiteSignature()
signatures["CatFileChopLumpSignature"] = constants.CatFileChopLumpSignature signatures["CatFileChopLumpSignature"] = constants.GetCatFileChopLumpSignature()
signatures["CatFileFlipSignature"] = constants.CatFileFlipSignature signatures["CatFileFlipSignature"] = constants.GetCatFileFlipSignature()
signatures["CatFilePitVowSignature"] = constants.CatFilePitVowSignature signatures["CatFilePitVowSignature"] = constants.GetCatFilePitVowSignature()
signatures["DealSignature"] = constants.DealSignature signatures["DealSignature"] = constants.GetDealSignature()
signatures["DentFunctionSignature"] = constants.DentFunctionSignature signatures["DentFunctionSignature"] = constants.GetDentFunctionSignature()
signatures["DripDripSignature"] = constants.DripDripSignature signatures["DripDripSignature"] = constants.GetDripDripSignature()
signatures["DripFileIlkSignature"] = constants.DripFileIlkSignature signatures["DripFileIlkSignature"] = constants.GetDripFileIlkSignature()
signatures["DripFileRepoSignature"] = constants.DripFileRepoSignature signatures["DripFileRepoSignature"] = constants.GetDripFileRepoSignature()
signatures["DripFileVowSignature"] = constants.DripFileVowSignature signatures["DripFileVowSignature"] = constants.GetDripFileVowSignature()
signatures["FlapKickSignature"] = constants.FlapKickSignature signatures["FlapKickSignature"] = constants.GetFlapKickSignature()
signatures["FlipKickSignature"] = constants.FlipKickSignature signatures["FlipKickSignature"] = constants.GetFlipKickSignature()
signatures["FlopKickSignature"] = constants.FlopKickSignature signatures["FlopKickSignature"] = constants.GetFlopKickSignature()
signatures["FrobSignature"] = constants.FrobSignature signatures["FrobSignature"] = constants.GetFrobSignature()
signatures["LogValueSignature"] = constants.LogValueSignature signatures["LogValueSignature"] = constants.GetLogValueSignature()
signatures["PitFileDebtCeilingSignature"] = constants.PitFileDebtCeilingSignature signatures["PitFileDebtCeilingSignature"] = constants.GetPitFileDebtCeilingSignature()
signatures["PitFileIlkSignature"] = constants.PitFileIlkSignature signatures["PitFileIlkSignature"] = constants.GetPitFileIlkSignature()
signatures["TendFunctionSignature"] = constants.TendFunctionSignature signatures["TendFunctionSignature"] = constants.GetTendFunctionSignature()
signatures["VatFluxSignature"] = constants.VatFluxSignature signatures["VatFluxSignature"] = constants.GetVatFluxSignature()
signatures["VatFoldSignature"] = constants.VatFoldSignature signatures["VatFoldSignature"] = constants.GetVatFoldSignature()
signatures["VatGrabSignature"] = constants.VatGrabSignature signatures["VatGrabSignature"] = constants.GetVatGrabSignature()
signatures["VatHealSignature"] = constants.VatHealSignature signatures["VatHealSignature"] = constants.GetVatHealSignature()
signatures["VatInitSignature"] = constants.VatInitSignature signatures["VatInitSignature"] = constants.GetVatInitSignature()
signatures["VatMoveSignature"] = constants.VatMoveSignature signatures["VatMoveSignature"] = constants.GetVatMoveSignature()
signatures["VatSlipSignature"] = constants.VatSlipSignature signatures["VatSlipSignature"] = constants.GetVatSlipSignature()
signatures["VatTollSignature"] = constants.VatTollSignature signatures["VatTollSignature"] = constants.GetVatTollSignature()
signatures["VatTuneSignature"] = constants.VatTuneSignature signatures["VatTuneSignature"] = constants.GetVatTuneSignature()
signatures["VowFlogSignature"] = constants.VowFlogSignature signatures["VowFlogSignature"] = constants.GetVowFlogSignature()
for name, sig := range signatures { for name, sig := range signatures {
log.Println(name, ": ", sig) fmt.Println(name, ": ", sig)
} }
} }

View File

@ -15,11 +15,11 @@
package cmd package cmd
import ( import (
"fmt"
"os" "os"
"time" "time"
"github.com/ethereum/go-ethereum/rpc" "github.com/ethereum/go-ethereum/rpc"
"github.com/mitchellh/go-homedir"
log "github.com/sirupsen/logrus" log "github.com/sirupsen/logrus"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"github.com/spf13/viper" "github.com/spf13/viper"
@ -75,7 +75,7 @@ func database(cmd *cobra.Command, args []string) {
func init() { func init() {
cobra.OnInitialize(initConfig) cobra.OnInitialize(initConfig)
rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "environment/public.toml", "config file location") rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file location")
rootCmd.PersistentFlags().String("database-name", "vulcanize_public", "database name") rootCmd.PersistentFlags().String("database-name", "vulcanize_public", "database name")
rootCmd.PersistentFlags().Int("database-port", 5432, "database port") rootCmd.PersistentFlags().Int("database-port", 5432, "database port")
rootCmd.PersistentFlags().String("database-hostname", "localhost", "database hostname") rootCmd.PersistentFlags().String("database-hostname", "localhost", "database hostname")
@ -99,20 +99,19 @@ func initConfig() {
if cfgFile != "" { if cfgFile != "" {
viper.SetConfigFile(cfgFile) viper.SetConfigFile(cfgFile)
} else { } else {
home, err := homedir.Dir() noConfigError := "No config file passed with --config flag"
if err != nil { fmt.Println("Error: ", noConfigError)
log.Fatal(err) log.Fatal(noConfigError)
os.Exit(1) os.Exit(1)
}
viper.AddConfigPath(home)
viper.SetConfigName(".vulcanizedb")
} }
viper.AutomaticEnv()
if err := viper.ReadInConfig(); err == nil { if err := viper.ReadInConfig(); err == nil {
log.Printf("Using config file: %s\n\n", viper.ConfigFileUsed()) log.Printf("Using config file: %s\n\n", viper.ConfigFileUsed())
} else {
invalidConfigError := "Couldn't read config file"
fmt.Println("Error: ", invalidConfigError)
log.Fatal(invalidConfigError)
os.Exit(1)
} }
} }

View File

@ -1,25 +1,49 @@
[database] [database]
name = "vulcanize_public" name = "vulcanize_public"
hostname = "localhost" hostname = "localhost"
user = "vulcanize" user = "vulcanize"
password = "vulcanize" password = "vulcanize"
port = 5432 port = 5432
[client] [client]
ipcPath = "http://kovan0.vulcanize.io:8545" ipcPath = "http://kovan0.vulcanize.io:8545"
[datadog] [datadog]
name = "maker_vdb_staging" name = "maker_vdb_staging"
[contract] [contract]
cat = "0x2f34f22a00ee4b7a8f8bbc4eaee1658774c624e0" [contract.address]
drip = "0x891c04639a5edcae088e546fa125b5d7fb6a2b9d" cat = "0x2f34f22a00ee4b7a8f8bbc4eaee1658774c624e0"
eth_flip = "0x32D496Ad866D110060866B7125981C73642cc509" drip = "0x891c04639a5edcae088e546fa125b5d7fb6a2b9d"
mcd_flap = "0x8868BAd8e74FcA4505676D1B5B21EcC23328d132" eth_flip = "0x32D496Ad866D110060866B7125981C73642cc509"
mcd_flop = "0x6191C9b0086c2eBF92300cC507009b53996FbFFa" mcd_flap = "0x8868BAd8e74FcA4505676D1B5B21EcC23328d132"
pep = "0xB1997239Cfc3d15578A3a09730f7f84A90BB4975" mcd_flop = "0x6191C9b0086c2eBF92300cC507009b53996FbFFa"
pip = "0x9FfFE440258B79c5d6604001674A4722FfC0f7Bc" pep = "0xB1997239Cfc3d15578A3a09730f7f84A90BB4975"
pit = "0xe7cf3198787c9a4daac73371a38f29aaeeced87e" pip = "0x9FfFE440258B79c5d6604001674A4722FfC0f7Bc"
rep = "0xf88bbdc1e2718f8857f30a180076ec38d53cf296" pit = "0xe7cf3198787c9a4daac73371a38f29aaeeced87e"
vat = "0xcd726790550afcd77e9a7a47e86a3f9010af126b" rep = "0xf88bbdc1e2718f8857f30a180076ec38d53cf296"
vow = "0x3728e9777B2a0a611ee0F89e00E01044ce4736d1" vat = "0xcd726790550afcd77e9a7a47e86a3f9010af126b"
vow = "0x3728e9777B2a0a611ee0F89e00E01044ce4736d1"
[contract.abi]
cat = '[{"constant":true,"inputs":[],"name":"vat","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x36569e77"},{"constant":true,"inputs":[],"name":"vow","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x626cb3c5"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"flips","outputs":[{"name":"ilk","type":"bytes32"},{"name":"urn","type":"bytes32"},{"name":"ink","type":"uint256"},{"name":"tab","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x70d9235a"},{"constant":true,"inputs":[],"name":"nflip","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x76181a51"},{"constant":true,"inputs":[],"name":"live","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x957aa58c"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"wards","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xbf353dbb"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"ilks","outputs":[{"name":"flip","type":"address"},{"name":"chop","type":"uint256"},{"name":"lump","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xd9638d36"},{"constant":true,"inputs":[],"name":"pit","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xf03c7c6e"},{"inputs":[{"name":"vat_","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor","signature":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"ilk","type":"bytes32"},{"indexed":true,"name":"urn","type":"bytes32"},{"indexed":false,"name":"ink","type":"uint256"},{"indexed":false,"name":"art","type":"uint256"},{"indexed":false,"name":"tab","type":"uint256"},{"indexed":false,"name":"flip","type":"uint256"},{"indexed":false,"name":"iArt","type":"uint256"}],"name":"Bite","type":"event","signature":"0x99b5620489b6ef926d4518936cfec15d305452712b88bd59da2d9c10fb0953e8"},{"anonymous":true,"inputs":[{"indexed":true,"name":"sig","type":"bytes4"},{"indexed":true,"name":"guy","type":"address"},{"indexed":true,"name":"foo","type":"bytes32"},{"indexed":true,"name":"bar","type":"bytes32"},{"indexed":false,"name":"wad","type":"uint256"},{"indexed":false,"name":"fax","type":"bytes"}],"name":"LogNote","type":"event","signature":"0x644843f351d3fba4abcd60109eaff9f54bac8fb8ccf0bab941009c21df21cf31"},{"constant":false,"inputs":[{"name":"guy","type":"address"}],"name":"rely","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x65fae35e"},{"constant":false,"inputs":[{"name":"guy","type":"address"}],"name":"deny","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x9c52a7f1"},{"constant":false,"inputs":[{"name":"ilk","type":"bytes32"},{"name":"what","type":"bytes32"},{"name":"data","type":"uint256"}],"name":"file","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x1a0b287e"},{"constant":false,"inputs":[{"name":"what","type":"bytes32"},{"name":"data","type":"address"}],"name":"file","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0xd4e8be83"},{"constant":false,"inputs":[{"name":"ilk","type":"bytes32"},{"name":"what","type":"bytes32"},{"name":"flip","type":"address"}],"name":"file","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0xebecb39d"},{"constant":false,"inputs":[{"name":"ilk","type":"bytes32"},{"name":"urn","type":"bytes32"}],"name":"bite","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x72f7b593"},{"constant":false,"inputs":[{"name":"n","type":"uint256"},{"name":"wad","type":"uint256"}],"name":"flip","outputs":[{"name":"id","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0xe6f95917"}]'
drip = '[{"constant":true,"inputs":[],"name":"vat","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x36569e77"},{"constant":true,"inputs":[],"name":"repo","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x56ff3122"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"wards","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xbf353dbb"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"ilks","outputs":[{"name":"vow","type":"bytes32"},{"name":"tax","type":"uint256"},{"name":"rho","type":"uint48"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xd9638d36"},{"inputs":[{"name":"vat_","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor","signature":"constructor"},{"anonymous":true,"inputs":[{"indexed":true,"name":"sig","type":"bytes4"},{"indexed":true,"name":"guy","type":"address"},{"indexed":true,"name":"foo","type":"bytes32"},{"indexed":true,"name":"bar","type":"bytes32"},{"indexed":false,"name":"wad","type":"uint256"},{"indexed":false,"name":"fax","type":"bytes"}],"name":"LogNote","type":"event","signature":"0x644843f351d3fba4abcd60109eaff9f54bac8fb8ccf0bab941009c21df21cf31"},{"constant":false,"inputs":[{"name":"guy","type":"address"}],"name":"rely","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x65fae35e"},{"constant":false,"inputs":[{"name":"guy","type":"address"}],"name":"deny","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x9c52a7f1"},{"constant":true,"inputs":[],"name":"era","outputs":[{"name":"","type":"uint48"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x143e55e0"},{"constant":false,"inputs":[{"name":"ilk","type":"bytes32"},{"name":"vow","type":"bytes32"},{"name":"tax","type":"uint256"}],"name":"file","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x1a0b287e"},{"constant":false,"inputs":[{"name":"what","type":"bytes32"},{"name":"data","type":"uint256"}],"name":"file","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x29ae8114"},{"constant":false,"inputs":[{"name":"ilk","type":"bytes32"}],"name":"drip","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x44e2a5a8"}]'
mcd_flap = '[{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"bids","outputs":[{"name":"bid","type":"uint256"},{"name":"lot","type":"uint256"},{"name":"guy","type":"address"},{"name":"tic","type":"uint48"},{"name":"end","type":"uint48"},{"name":"gal","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ttl","outputs":[{"name":"","type":"uint48"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"gem","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"beg","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tau","outputs":[{"name":"","type":"uint48"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"kicks","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"dai","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"dai_","type":"address"},{"name":"gem_","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"id","type":"uint256"},{"indexed":false,"name":"lot","type":"uint256"},{"indexed":false,"name":"bid","type":"uint256"},{"indexed":false,"name":"gal","type":"address"},{"indexed":false,"name":"end","type":"uint48"}],"name":"Kick","type":"event"},{"anonymous":true,"inputs":[{"indexed":true,"name":"sig","type":"bytes4"},{"indexed":true,"name":"guy","type":"address"},{"indexed":true,"name":"foo","type":"bytes32"},{"indexed":true,"name":"bar","type":"bytes32"},{"indexed":false,"name":"wad","type":"uint256"},{"indexed":false,"name":"fax","type":"bytes"}],"name":"LogNote","type":"event"},{"constant":false,"inputs":[{"name":"gal","type":"address"},{"name":"lot","type":"uint256"},{"name":"bid","type":"uint256"}],"name":"kick","outputs":[{"name":"id","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"},{"name":"lot","type":"uint256"},{"name":"bid","type":"uint256"}],"name":"tend","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"}],"name":"deal","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]'
eth_flip = '[{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"bids","outputs":[{"name":"bid","type":"uint256"},{"name":"lot","type":"uint256"},{"name":"guy","type":"address"},{"name":"tic","type":"uint48"},{"name":"end","type":"uint48"},{"name":"urn","type":"bytes32"},{"name":"gal","type":"address"},{"name":"tab","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x4423c5f1"},{"constant":true,"inputs":[],"name":"ttl","outputs":[{"name":"","type":"uint48"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x4e8b1dd5"},{"constant":true,"inputs":[],"name":"gem","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x7bd2bea7"},{"constant":true,"inputs":[],"name":"beg","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x7d780d82"},{"constant":true,"inputs":[],"name":"tau","outputs":[{"name":"","type":"uint48"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xcfc4af55"},{"constant":true,"inputs":[],"name":"kicks","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xcfdd3302"},{"constant":true,"inputs":[],"name":"dai","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xf4b9fa75"},{"inputs":[{"name":"dai_","type":"address"},{"name":"gem_","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor","signature":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"id","type":"uint256"},{"indexed":false,"name":"lot","type":"uint256"},{"indexed":false,"name":"bid","type":"uint256"},{"indexed":false,"name":"gal","type":"address"},{"indexed":false,"name":"end","type":"uint48"},{"indexed":true,"name":"urn","type":"bytes32"},{"indexed":false,"name":"tab","type":"uint256"}],"name":"Kick","type":"event","signature":"0xbac86238bdba81d21995024470425ecb370078fa62b7271b90cf28cbd1e3e87e"},{"anonymous":true,"inputs":[{"indexed":true,"name":"sig","type":"bytes4"},{"indexed":true,"name":"guy","type":"address"},{"indexed":true,"name":"foo","type":"bytes32"},{"indexed":true,"name":"bar","type":"bytes32"},{"indexed":false,"name":"wad","type":"uint256"},{"indexed":false,"name":"fax","type":"bytes"}],"name":"LogNote","type":"event","signature":"0x644843f351d3fba4abcd60109eaff9f54bac8fb8ccf0bab941009c21df21cf31"},{"constant":true,"inputs":[],"name":"era","outputs":[{"name":"","type":"uint48"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x143e55e0"},{"constant":false,"inputs":[{"name":"urn","type":"bytes32"},{"name":"gal","type":"address"},{"name":"tab","type":"uint256"},{"name":"lot","type":"uint256"},{"name":"bid","type":"uint256"}],"name":"kick","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0xeae19d9e"},{"constant":false,"inputs":[{"name":"id","type":"uint256"}],"name":"tick","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0xfc7b6aee"},{"constant":false,"inputs":[{"name":"id","type":"uint256"},{"name":"lot","type":"uint256"},{"name":"bid","type":"uint256"}],"name":"tend","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x4b43ed12"},{"constant":false,"inputs":[{"name":"id","type":"uint256"},{"name":"lot","type":"uint256"},{"name":"bid","type":"uint256"}],"name":"dent","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x5ff3a382"},{"constant":false,"inputs":[{"name":"id","type":"uint256"}],"name":"deal","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0xc959c42b"}]'
mcd_flop = '[{"constant":true,"inputs":[],"name":"era","outputs":[{"name":"","type":"uint48"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"bids","outputs":[{"name":"bid","type":"uint256"},{"name":"lot","type":"uint256"},{"name":"guy","type":"address"},{"name":"tic","type":"uint48"},{"name":"end","type":"uint48"},{"name":"vow","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ttl","outputs":[{"name":"","type":"uint48"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"},{"name":"lot","type":"uint256"},{"name":"bid","type":"uint256"}],"name":"dent","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"guy","type":"address"}],"name":"rely","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"gem","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"beg","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"guy","type":"address"}],"name":"deny","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"gal","type":"address"},{"name":"lot","type":"uint256"},{"name":"bid","type":"uint256"}],"name":"kick","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"wards","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"}],"name":"deal","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"tau","outputs":[{"name":"","type":"uint48"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"kicks","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"dai","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"dai_","type":"address"},{"name":"gem_","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"id","type":"uint256"},{"indexed":false,"name":"lot","type":"uint256"},{"indexed":false,"name":"bid","type":"uint256"},{"indexed":false,"name":"gal","type":"address"},{"indexed":false,"name":"end","type":"uint48"}],"name":"Kick","type":"event"},{"anonymous":true,"inputs":[{"indexed":true,"name":"sig","type":"bytes4"},{"indexed":true,"name":"guy","type":"address"},{"indexed":true,"name":"foo","type":"bytes32"},{"indexed":true,"name":"bar","type":"bytes32"},{"indexed":false,"name":"wad","type":"uint256"},{"indexed":false,"name":"fax","type":"bytes"}],"name":"LogNote","type":"event"}]'
medianizer = '[{"constant":false,"inputs":[{"name":"owner_","type":"address"}],"name":"setOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"","type":"bytes32"}],"name":"poke","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"poke","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"compute","outputs":[{"name":"","type":"bytes32"},{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"wat","type":"address"}],"name":"set","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"wat","type":"address"}],"name":"unset","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"indexes","outputs":[{"name":"","type":"bytes12"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"next","outputs":[{"name":"","type":"bytes12"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"read","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"peek","outputs":[{"name":"","type":"bytes32"},{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes12"}],"name":"values","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"min_","type":"uint96"}],"name":"setMin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"authority_","type":"address"}],"name":"setAuthority","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"void","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"pos","type":"bytes12"},{"name":"wat","type":"address"}],"name":"set","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"authority","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"pos","type":"bytes12"}],"name":"unset","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"next_","type":"bytes12"}],"name":"setNext","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"min","outputs":[{"name":"","type":"uint96"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"val","type":"bytes32"}],"name":"LogValue","type":"event"},{"anonymous":true,"inputs":[{"indexed":true,"name":"sig","type":"bytes4"},{"indexed":true,"name":"guy","type":"address"},{"indexed":true,"name":"foo","type":"bytes32"},{"indexed":true,"name":"bar","type":"bytes32"},{"indexed":false,"name":"wad","type":"uint256"},{"indexed":false,"name":"fax","type":"bytes"}],"name":"LogNote","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"authority","type":"address"}],"name":"LogSetAuthority","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"}],"name":"LogSetOwner","type":"event"}]]'
# TODO: replace with updated ABI when contract is deployed (with no pit file stability fee method + modified Frob event)
pit = '[{"constant":true,"inputs":[],"name":"vat","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x36569e77"},{"constant":true,"inputs":[],"name":"live","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x957aa58c"},{"constant":true,"inputs":[],"name":"drip","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x9f678cca"},{"constant":true,"inputs":[],"name":"Line","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xbabe8a3f"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"wards","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xbf353dbb"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"ilks","outputs":[{"name":"spot","type":"uint256"},{"name":"line","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xd9638d36"},{"inputs":[{"name":"vat_","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor","signature":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"ilk","type":"bytes32"},{"indexed":true,"name":"urn","type":"bytes32"},{"indexed":false,"name":"ink","type":"uint256"},{"indexed":false,"name":"art","type":"uint256"},{"indexed":false,"name":"dink","type":"int256"},{"indexed":false,"name":"dart","type":"int256"},{"indexed":false,"name":"iArt","type":"uint256"}],"name":"Frob","type":"event","signature":"0xb2afa28318bcc689926b52835d844de174ef8de97e982a85c0199d584920791b"},{"anonymous":true,"inputs":[{"indexed":true,"name":"sig","type":"bytes4"},{"indexed":true,"name":"guy","type":"address"},{"indexed":true,"name":"foo","type":"bytes32"},{"indexed":true,"name":"bar","type":"bytes32"},{"indexed":false,"name":"wad","type":"uint256"},{"indexed":false,"name":"fax","type":"bytes"}],"name":"LogNote","type":"event","signature":"0x644843f351d3fba4abcd60109eaff9f54bac8fb8ccf0bab941009c21df21cf31"},{"constant":false,"inputs":[{"name":"guy","type":"address"}],"name":"rely","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x65fae35e"},{"constant":false,"inputs":[{"name":"guy","type":"address"}],"name":"deny","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x9c52a7f1"},{"constant":false,"inputs":[{"name":"ilk","type":"bytes32"},{"name":"what","type":"bytes32"},{"name":"data","type":"uint256"}],"name":"file","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x1a0b287e"},{"constant":false,"inputs":[{"name":"what","type":"bytes32"},{"name":"data","type":"uint256"}],"name":"file","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x29ae8114"},{"constant":false,"inputs":[{"name":"what","type":"bytes32"},{"name":"data","type":"address"}],"name":"file","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0xd4e8be83"},{"constant":false,"inputs":[{"name":"ilk","type":"bytes32"},{"name":"dink","type":"int256"},{"name":"dart","type":"int256"}],"name":"frob","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x5a984ded"}]'
vat = '[{"constant":true,"inputs":[],"name":"debt","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x0dca59c1"},{"constant":true,"inputs":[{"name":"","type":"bytes32"},{"name":"","type":"bytes32"}],"name":"urns","outputs":[{"name":"ink","type":"uint256"},{"name":"art","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x26e27482"},{"constant":true,"inputs":[],"name":"vice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x2d61a355"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"sin","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xa60f1d3e"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"wards","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xbf353dbb"},{"constant":true,"inputs":[{"name":"","type":"bytes32"},{"name":"","type":"bytes32"}],"name":"gem","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xc0912683"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"ilks","outputs":[{"name":"take","type":"uint256"},{"name":"rate","type":"uint256"},{"name":"Ink","type":"uint256"},{"name":"Art","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xd9638d36"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"dai","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xf53e4e69"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor","signature":"constructor"},{"anonymous":true,"inputs":[{"indexed":true,"name":"sig","type":"bytes4"},{"indexed":true,"name":"foo","type":"bytes32"},{"indexed":true,"name":"bar","type":"bytes32"},{"indexed":true,"name":"too","type":"bytes32"},{"indexed":false,"name":"fax","type":"bytes"}],"name":"Note","type":"event","signature":"0x8c2dbbc2b33ffaa77c104b777e574a8a4ff79829dfee8b66f4dc63e3f8067152"},{"constant":false,"inputs":[{"name":"guy","type":"address"}],"name":"rely","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x65fae35e"},{"constant":false,"inputs":[{"name":"guy","type":"address"}],"name":"deny","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x9c52a7f1"},{"constant":false,"inputs":[{"name":"ilk","type":"bytes32"}],"name":"init","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x3b663195"},{"constant":false,"inputs":[{"name":"ilk","type":"bytes32"},{"name":"guy","type":"bytes32"},{"name":"rad","type":"int256"}],"name":"slip","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x42066cbb"},{"constant":false,"inputs":[{"name":"ilk","type":"bytes32"},{"name":"src","type":"bytes32"},{"name":"dst","type":"bytes32"},{"name":"rad","type":"int256"}],"name":"flux","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0xa6e41821"},{"constant":false,"inputs":[{"name":"src","type":"bytes32"},{"name":"dst","type":"bytes32"},{"name":"rad","type":"int256"}],"name":"move","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x78f19470"},{"constant":false,"inputs":[{"name":"i","type":"bytes32"},{"name":"u","type":"bytes32"},{"name":"v","type":"bytes32"},{"name":"w","type":"bytes32"},{"name":"dink","type":"int256"},{"name":"dart","type":"int256"}],"name":"tune","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x5dd6471a"},{"constant":false,"inputs":[{"name":"i","type":"bytes32"},{"name":"u","type":"bytes32"},{"name":"v","type":"bytes32"},{"name":"w","type":"bytes32"},{"name":"dink","type":"int256"},{"name":"dart","type":"int256"}],"name":"grab","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x3690ae4c"},{"constant":false,"inputs":[{"name":"u","type":"bytes32"},{"name":"v","type":"bytes32"},{"name":"rad","type":"int256"}],"name":"heal","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x990a5f63"},{"constant":false,"inputs":[{"name":"i","type":"bytes32"},{"name":"u","type":"bytes32"},{"name":"rate","type":"int256"}],"name":"fold","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0xe6a6a64d"},{"constant":false,"inputs":[{"name":"i","type":"bytes32"},{"name":"u","type":"bytes32"},{"name":"take","type":"int256"}],"name":"toll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x09b7a0b5"}]'
vow = '[{"constant":true,"inputs":[],"name":"Awe","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"Joy","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"flap","outputs":[{"name":"id","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"hump","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"wad","type":"uint256"}],"name":"kiss","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"what","type":"bytes32"},{"name":"data","type":"uint256"}],"name":"file","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"Ash","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"era","type":"uint48"}],"name":"flog","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"vat","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"Woe","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"wait","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"guy","type":"address"}],"name":"rely","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"bump","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"tab","type":"uint256"}],"name":"fess","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"row","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint48"}],"name":"sin","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"guy","type":"address"}],"name":"deny","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"flop","outputs":[{"name":"id","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"wards","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"sump","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"Sin","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"what","type":"bytes32"},{"name":"addr","type":"address"}],"name":"file","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"cow","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"wad","type":"uint256"}],"name":"heal","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":true,"inputs":[{"indexed":true,"name":"sig","type":"bytes4"},{"indexed":true,"name":"guy","type":"address"},{"indexed":true,"name":"foo","type":"bytes32"},{"indexed":true,"name":"bar","type":"bytes32"},{"indexed":false,"name":"wad","type":"uint256"},{"indexed":false,"name":"fax","type":"bytes"}],"name":"LogNote","type":"event"}]'
[contract.deployment-block]
cat = 8751794
drip = 8762197
eth_flip = 8535561
mcd_flap = 8535544
mcd_flop = 8535545
pep = 8760655
pip = 8760588
pit = 8535538
rep = 8760681
vat = 8535536
vow = 8751792

View File

@ -21,11 +21,13 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
) )
var BiteConfig = shared.TransformerConfig{ func GetBiteConfig() shared.TransformerConfig {
TransformerName: constants.BiteLabel, return shared.TransformerConfig{
ContractAddresses: []string{constants.CatContractAddress}, TransformerName: constants.BiteLabel,
ContractAbi: constants.CatABI, ContractAddresses: []string{constants.CatContractAddress()},
Topic: constants.BiteSignature, ContractAbi: constants.CatABI(),
StartingBlockNumber: 0, Topic: constants.GetBiteSignature(),
EndingBlockNumber: -1, StartingBlockNumber: constants.CatDeploymentBlock(),
EndingBlockNumber: -1,
}
} }

View File

@ -24,7 +24,6 @@ import (
. "github.com/onsi/gomega" . "github.com/onsi/gomega"
"github.com/vulcanize/vulcanizedb/pkg/transformers/bite" "github.com/vulcanize/vulcanizedb/pkg/transformers/bite"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/pkg/transformers/test_data" "github.com/vulcanize/vulcanizedb/pkg/transformers/test_data"
) )
@ -33,7 +32,7 @@ var _ = Describe("Bite Converter", func() {
Describe("ToEntity", func() { Describe("ToEntity", func() {
It("converts an eth log to a bite entity", func() { It("converts an eth log to a bite entity", func() {
entities, err := converter.ToEntities(constants.CatABI, []types.Log{test_data.EthBiteLog}) entities, err := converter.ToEntities(test_data.KovanCatABI, []types.Log{test_data.EthBiteLog})
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
Expect(len(entities)).To(Equal(1)) Expect(len(entities)).To(Equal(1))

View File

@ -19,11 +19,13 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
) )
var CatFileChopLumpConfig = shared.TransformerConfig{ func GetCatFileChopLumpConfig() shared.TransformerConfig {
TransformerName: constants.CatFileChopLumpLabel, return shared.TransformerConfig{
ContractAddresses: []string{constants.CatContractAddress}, TransformerName: constants.CatFileChopLumpLabel,
ContractAbi: constants.CatABI, ContractAddresses: []string{constants.CatContractAddress()},
Topic: constants.CatFileChopLumpSignature, ContractAbi: constants.CatABI(),
StartingBlockNumber: 0, Topic: constants.GetCatFileChopLumpSignature(),
EndingBlockNumber: -1, StartingBlockNumber: constants.CatDeploymentBlock(),
EndingBlockNumber: -1,
}
} }

View File

@ -19,11 +19,13 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
) )
var CatFileFlipConfig = shared.TransformerConfig{ func GetCatFileFlipConfig() shared.TransformerConfig {
TransformerName: constants.CatFileFlipLabel, return shared.TransformerConfig{
ContractAddresses: []string{constants.CatContractAddress}, TransformerName: constants.CatFileFlipLabel,
ContractAbi: constants.CatABI, ContractAddresses: []string{constants.CatContractAddress()},
Topic: constants.CatFileFlipSignature, ContractAbi: constants.CatABI(),
StartingBlockNumber: 0, Topic: constants.GetCatFileFlipSignature(),
EndingBlockNumber: -1, StartingBlockNumber: constants.CatDeploymentBlock(),
EndingBlockNumber: -1,
}
} }

View File

@ -19,11 +19,13 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
) )
var CatFilePitVowConfig = shared.TransformerConfig{ func GetCatFilePitVowConfig() shared.TransformerConfig {
TransformerName: constants.CatFilePitVowLabel, return shared.TransformerConfig{
ContractAddresses: []string{constants.CatContractAddress}, TransformerName: constants.CatFilePitVowLabel,
ContractAbi: constants.CatABI, ContractAddresses: []string{constants.CatContractAddress()},
Topic: constants.CatFilePitVowSignature, ContractAbi: constants.CatABI(),
StartingBlockNumber: 0, Topic: constants.GetCatFilePitVowSignature(),
EndingBlockNumber: -1, StartingBlockNumber: constants.CatDeploymentBlock(),
EndingBlockNumber: -1,
}
} }

View File

@ -19,11 +19,14 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
) )
var DealConfig = shared.TransformerConfig{ func GetDealConfig() shared.TransformerConfig {
TransformerName: constants.DealLabel, return shared.TransformerConfig{
ContractAddresses: []string{constants.FlapperContractAddress, constants.FlipperContractAddress, constants.FlopperContractAddress}, TransformerName: constants.DealLabel,
ContractAbi: constants.FlipperABI, ContractAddresses: []string{constants.FlapperContractAddress(), constants.FlipperContractAddress(), constants.FlopperContractAddress()},
Topic: constants.DealSignature, ContractAbi: constants.FlipperABI(),
StartingBlockNumber: 0, Topic: constants.GetDealSignature(),
EndingBlockNumber: -1, StartingBlockNumber: shared.MinInt64([]int64{
constants.FlapperDeploymentBlock(), constants.FlipperDeploymentBlock(), constants.FlopperDeploymentBlock()}),
EndingBlockNumber: -1,
}
} }

View File

@ -19,11 +19,13 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
) )
var DentConfig = shared.TransformerConfig{ func GetDentConfig() shared.TransformerConfig {
TransformerName: constants.DentLabel, return shared.TransformerConfig{
ContractAddresses: []string{constants.FlipperContractAddress, constants.FlopperContractAddress}, TransformerName: constants.DentLabel,
ContractAbi: constants.FlipperABI, ContractAddresses: []string{constants.FlipperContractAddress(), constants.FlopperContractAddress()},
Topic: constants.DentFunctionSignature, ContractAbi: constants.FlipperABI(),
StartingBlockNumber: 0, Topic: constants.GetDentFunctionSignature(),
EndingBlockNumber: -1, StartingBlockNumber: shared.MinInt64([]int64{constants.FlipperDeploymentBlock(), constants.FlopperDeploymentBlock()}),
EndingBlockNumber: -1,
}
} }

View File

@ -19,11 +19,12 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
) )
var DripDripConfig = shared.TransformerConfig{ func GetDripDripConfig() shared.TransformerConfig {
TransformerName: constants.DripDripLabel, return shared.TransformerConfig{
ContractAddresses: []string{constants.DripContractAddress}, ContractAddresses: []string{constants.DripContractAddress()},
ContractAbi: constants.DripABI, ContractAbi: constants.DripABI(),
Topic: constants.DripDripSignature, Topic: constants.GetDripDripSignature(),
StartingBlockNumber: 0, StartingBlockNumber: constants.DripDeploymentBlock(),
EndingBlockNumber: -1, EndingBlockNumber: -1,
}
} }

View File

@ -19,11 +19,13 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
) )
var DripFileIlkConfig = shared.TransformerConfig{ func GetDripFileIlkConfig() shared.TransformerConfig {
TransformerName: constants.DripFileIlkLabel, return shared.TransformerConfig{
ContractAddresses: []string{constants.DripContractAddress}, TransformerName: constants.DripFileIlkLabel,
ContractAbi: constants.DripABI, ContractAddresses: []string{constants.DripContractAddress()},
Topic: constants.DripFileIlkSignature, ContractAbi: constants.DripABI(),
StartingBlockNumber: 0, Topic: constants.GetDripFileIlkSignature(),
EndingBlockNumber: -1, StartingBlockNumber: constants.DripDeploymentBlock(),
EndingBlockNumber: -1,
}
} }

View File

@ -19,11 +19,13 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
) )
var DripFileRepoConfig = shared.TransformerConfig{ func GetDripFileRepoConfig() shared.TransformerConfig {
TransformerName: constants.DripFileRepoLabel, return shared.TransformerConfig{
ContractAddresses: []string{constants.DripContractAddress}, TransformerName: constants.DripFileRepoLabel,
ContractAbi: constants.DripABI, ContractAddresses: []string{constants.DripContractAddress()},
Topic: constants.DripFileRepoSignature, ContractAbi: constants.DripABI(),
StartingBlockNumber: 0, Topic: constants.GetDripFileRepoSignature(),
EndingBlockNumber: -1, StartingBlockNumber: constants.DripDeploymentBlock(),
EndingBlockNumber: -1,
}
} }

View File

@ -19,11 +19,13 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
) )
var DripFileVowConfig = shared.TransformerConfig{ func GetDripFileVowConfig() shared.TransformerConfig {
TransformerName: constants.DripFileVowLabel, return shared.TransformerConfig{
ContractAddresses: []string{constants.DripContractAddress}, TransformerName: constants.DripFileVowLabel,
ContractAbi: constants.DripABI, ContractAddresses: []string{constants.DripContractAddress()},
Topic: constants.DripFileVowSignature, ContractAbi: constants.DripABI(),
StartingBlockNumber: 0, Topic: constants.GetDripFileVowSignature(),
EndingBlockNumber: -1, StartingBlockNumber: constants.DripDeploymentBlock(),
EndingBlockNumber: -1,
}
} }

View File

@ -19,11 +19,13 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
) )
var FlapKickConfig = shared.TransformerConfig{ func GetFlapKickConfig() shared.TransformerConfig {
TransformerName: constants.FlapKickLabel, return shared.TransformerConfig{
ContractAddresses: []string{constants.FlapperContractAddress}, TransformerName: constants.FlapKickLabel,
ContractAbi: constants.FlapperABI, ContractAddresses: []string{constants.FlapperContractAddress()},
Topic: constants.FlapKickSignature, ContractAbi: constants.FlapperABI(),
StartingBlockNumber: 0, Topic: constants.GetFlapKickSignature(),
EndingBlockNumber: -1, StartingBlockNumber: constants.FlapperDeploymentBlock(),
EndingBlockNumber: -1,
}
} }

View File

@ -20,7 +20,6 @@ import (
. "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo"
. "github.com/onsi/gomega" . "github.com/onsi/gomega"
"github.com/vulcanize/vulcanizedb/pkg/transformers/flap_kick" "github.com/vulcanize/vulcanizedb/pkg/transformers/flap_kick"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/pkg/transformers/test_data" "github.com/vulcanize/vulcanizedb/pkg/transformers/test_data"
"math/big" "math/big"
"time" "time"
@ -31,7 +30,7 @@ var _ = Describe("Flap kick converter", func() {
Describe("ToEntity", func() { Describe("ToEntity", func() {
It("converts an Eth Log to a FlapKickEntity", func() { It("converts an Eth Log to a FlapKickEntity", func() {
entities, err := converter.ToEntities(constants.FlapperABI, []types.Log{test_data.EthFlapKickLog}) entities, err := converter.ToEntities(test_data.KovanFlapperABI, []types.Log{test_data.EthFlapKickLog})
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
Expect(len(entities)).To(Equal(1)) Expect(len(entities)).To(Equal(1))

View File

@ -19,11 +19,13 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
) )
var FlipKickConfig = shared.TransformerConfig{ func GetFlipKickConfig() shared.TransformerConfig {
TransformerName: constants.FlipKickLabel, return shared.TransformerConfig{
ContractAddresses: []string{constants.FlipperContractAddress}, TransformerName: constants.FlipKickLabel,
ContractAbi: constants.FlipperABI, ContractAddresses: []string{constants.FlipperContractAddress()},
Topic: constants.FlipKickSignature, ContractAbi: constants.FlipperABI(),
StartingBlockNumber: 0, Topic: constants.GetFlipKickSignature(),
EndingBlockNumber: -1, StartingBlockNumber: constants.FlipperDeploymentBlock(),
EndingBlockNumber: -1,
}
} }

View File

@ -24,7 +24,6 @@ import (
. "github.com/onsi/gomega" . "github.com/onsi/gomega"
"github.com/vulcanize/vulcanizedb/pkg/transformers/flip_kick" "github.com/vulcanize/vulcanizedb/pkg/transformers/flip_kick"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/pkg/transformers/test_data" "github.com/vulcanize/vulcanizedb/pkg/transformers/test_data"
) )
@ -33,7 +32,7 @@ var _ = Describe("FlipKick Converter", func() {
Describe("ToEntity", func() { Describe("ToEntity", func() {
It("converts an Eth Log to a FlipKickEntity", func() { It("converts an Eth Log to a FlipKickEntity", func() {
entities, err := converter.ToEntities(constants.FlipperABI, []types.Log{test_data.EthFlipKickLog}) entities, err := converter.ToEntities(test_data.KovanFlipperABI, []types.Log{test_data.EthFlipKickLog})
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
Expect(len(entities)).To(Equal(1)) Expect(len(entities)).To(Equal(1))

View File

@ -19,11 +19,13 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
) )
var Config = shared.TransformerConfig{ func GetFlopKickConfig() shared.TransformerConfig {
TransformerName: constants.FlopKickLabel, return shared.TransformerConfig{
ContractAddresses: []string{constants.FlopperContractAddress}, TransformerName: constants.FlopKickLabel,
ContractAbi: constants.FlopperABI, ContractAddresses: []string{constants.FlopperContractAddress()},
Topic: constants.FlopKickSignature, ContractAbi: constants.FlopperABI(),
StartingBlockNumber: 0, Topic: constants.GetFlopKickSignature(),
EndingBlockNumber: -1, StartingBlockNumber: constants.FlopperDeploymentBlock(),
EndingBlockNumber: -1,
}
} }

View File

@ -23,7 +23,6 @@ import (
. "github.com/onsi/gomega" . "github.com/onsi/gomega"
"github.com/vulcanize/vulcanizedb/pkg/transformers/flop_kick" "github.com/vulcanize/vulcanizedb/pkg/transformers/flop_kick"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/pkg/transformers/test_data" "github.com/vulcanize/vulcanizedb/pkg/transformers/test_data"
) )
@ -31,7 +30,7 @@ var _ = Describe("FlopKick Converter", func() {
Describe("ToEntities", func() { Describe("ToEntities", func() {
It("converts a log to a FlopKick entity", func() { It("converts a log to a FlopKick entity", func() {
converter := flop_kick.FlopKickConverter{} converter := flop_kick.FlopKickConverter{}
entities, err := converter.ToEntities(constants.FlopperABI, []types.Log{test_data.FlopKickLog}) entities, err := converter.ToEntities(test_data.KovanFlopperABI, []types.Log{test_data.FlopKickLog})
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
entity := entities[0] entity := entities[0]

View File

@ -19,11 +19,13 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
) )
var FrobConfig = shared.TransformerConfig{ func GetFrobConfig() shared.TransformerConfig {
TransformerName: constants.FrobLabel, return shared.TransformerConfig{
ContractAddresses: []string{constants.PitContractAddress}, TransformerName: constants.FrobLabel,
ContractAbi: constants.PitABI, ContractAddresses: []string{constants.PitContractAddress()},
Topic: constants.FrobSignature, ContractAbi: constants.PitABI(),
StartingBlockNumber: 0, Topic: constants.GetFrobSignature(),
EndingBlockNumber: -1, StartingBlockNumber: constants.PitDeploymentBlock(),
EndingBlockNumber: -1,
}
} }

View File

@ -20,14 +20,13 @@ import (
. "github.com/onsi/gomega" . "github.com/onsi/gomega"
"github.com/vulcanize/vulcanizedb/pkg/transformers/frob" "github.com/vulcanize/vulcanizedb/pkg/transformers/frob"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/pkg/transformers/test_data" "github.com/vulcanize/vulcanizedb/pkg/transformers/test_data"
) )
var _ = Describe("Frob converter", func() { var _ = Describe("Frob converter", func() {
var converter = frob.FrobConverter{} var converter = frob.FrobConverter{}
It("converts a log to an entity", func() { It("converts a log to an entity", func() {
entities, err := converter.ToEntities(constants.PitABI, []types.Log{test_data.EthFrobLog}) entities, err := converter.ToEntities(test_data.KovanPitABI, []types.Log{test_data.EthFrobLog})
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
Expect(len(entities)).To(Equal(1)) Expect(len(entities)).To(Equal(1))

View File

@ -30,10 +30,19 @@ import (
"github.com/vulcanize/vulcanizedb/test_config" "github.com/vulcanize/vulcanizedb/test_config"
) )
var testBiteConfig = shared.TransformerConfig{
TransformerName: constants.BiteLabel,
ContractAddresses: []string{test_data.KovanCatContractAddress},
ContractAbi: test_data.KovanCatABI,
Topic: test_data.KovanBiteSignature,
StartingBlockNumber: 0,
EndingBlockNumber: -1,
}
var _ = Describe("Bite Transformer", func() { var _ = Describe("Bite Transformer", func() {
It("fetches and transforms a Bite event from Kovan chain", func() { It("fetches and transforms a Bite event from Kovan chain", func() {
blockNumber := int64(8956422) blockNumber := int64(8956422)
config := bite.BiteConfig config := testBiteConfig
config.StartingBlockNumber = blockNumber config.StartingBlockNumber = blockNumber
config.EndingBlockNumber = blockNumber config.EndingBlockNumber = blockNumber
@ -80,8 +89,8 @@ var _ = Describe("Bite Transformer", func() {
}) })
It("unpacks an event log", func() { It("unpacks an event log", func() {
address := common.HexToAddress(constants.CatContractAddress) address := common.HexToAddress(test_data.KovanCatContractAddress)
abi, err := geth.ParseAbi(constants.CatABI) abi, err := geth.ParseAbi(test_data.KovanCatABI)
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
contract := bind.NewBoundContract(address, abi, nil, nil, nil) contract := bind.NewBoundContract(address, abi, nil, nil, nil)

View File

@ -18,6 +18,8 @@ import (
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/vulcanize/vulcanizedb/pkg/transformers/factories" "github.com/vulcanize/vulcanizedb/pkg/transformers/factories"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/pkg/transformers/test_data"
"sort" "sort"
"github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/ethclient"
@ -61,9 +63,14 @@ var _ = Describe("Cat File transformer", func() {
header, err := persistHeader(db, chopLumpBlockNumber, blockChain) header, err := persistHeader(db, chopLumpBlockNumber, blockChain)
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
config := chop_lump.CatFileChopLumpConfig config := shared.TransformerConfig{
config.StartingBlockNumber = chopLumpBlockNumber TransformerName: constants.CatFileChopLumpLabel,
config.EndingBlockNumber = chopLumpBlockNumber ContractAddresses: []string{test_data.KovanCatContractAddress},
ContractAbi: test_data.KovanCatABI,
Topic: test_data.KovanCatFileChopLumpSignature,
StartingBlockNumber: chopLumpBlockNumber,
EndingBlockNumber: chopLumpBlockNumber,
}
initializer := factories.LogNoteTransformer{ initializer := factories.LogNoteTransformer{
Config: config, Config: config,
@ -105,9 +112,14 @@ var _ = Describe("Cat File transformer", func() {
header, err := persistHeader(db, flipBlockNumber, blockChain) header, err := persistHeader(db, flipBlockNumber, blockChain)
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
config := flip.CatFileFlipConfig config := shared.TransformerConfig{
config.StartingBlockNumber = flipBlockNumber TransformerName: constants.CatFileFlipLabel,
config.EndingBlockNumber = flipBlockNumber ContractAddresses: []string{test_data.KovanCatContractAddress},
ContractAbi: test_data.KovanCatABI,
Topic: test_data.KovanCatFileFlipSignature,
StartingBlockNumber: flipBlockNumber,
EndingBlockNumber: flipBlockNumber,
}
initializer := factories.LogNoteTransformer{ initializer := factories.LogNoteTransformer{
Config: config, Config: config,
@ -142,9 +154,14 @@ var _ = Describe("Cat File transformer", func() {
header, err := persistHeader(db, pitVowBlockNumber, blockChain) header, err := persistHeader(db, pitVowBlockNumber, blockChain)
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
config := pit_vow.CatFilePitVowConfig config := shared.TransformerConfig{
config.StartingBlockNumber = pitVowBlockNumber TransformerName: constants.CatFilePitVowLabel,
config.EndingBlockNumber = pitVowBlockNumber ContractAddresses: []string{test_data.KovanCatContractAddress},
ContractAbi: test_data.KovanCatABI,
Topic: test_data.KovanCatFilePitVowSignature,
StartingBlockNumber: pitVowBlockNumber,
EndingBlockNumber: pitVowBlockNumber,
}
initializer := factories.LogNoteTransformer{ initializer := factories.LogNoteTransformer{
Config: config, Config: config,

View File

@ -18,13 +18,14 @@ import (
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
. "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo"
. "github.com/onsi/gomega" . "github.com/onsi/gomega"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/pkg/transformers/test_data"
"github.com/vulcanize/vulcanizedb/pkg/core" "github.com/vulcanize/vulcanizedb/pkg/core"
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
"github.com/vulcanize/vulcanizedb/pkg/transformers/deal" "github.com/vulcanize/vulcanizedb/pkg/transformers/deal"
"github.com/vulcanize/vulcanizedb/pkg/transformers/factories" "github.com/vulcanize/vulcanizedb/pkg/transformers/factories"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/test_config" "github.com/vulcanize/vulcanizedb/test_config"
) )
@ -47,7 +48,14 @@ var _ = Describe("Deal transformer", func() {
db = test_config.NewTestDB(blockChain.Node()) db = test_config.NewTestDB(blockChain.Node())
test_config.CleanTestDB(db) test_config.CleanTestDB(db)
config = deal.DealConfig config = shared.TransformerConfig{
TransformerName: constants.DealLabel,
ContractAddresses: []string{test_data.KovanFlapperContractAddress, test_data.KovanFlipperContractAddress, test_data.KovanFlopperContractAddress},
ContractAbi: test_data.KovanFlipperABI,
Topic: test_data.KovanDealSignature,
StartingBlockNumber: 0,
EndingBlockNumber: -1,
}
initializer = factories.LogNoteTransformer{ initializer = factories.LogNoteTransformer{
Config: config, Config: config,
@ -83,7 +91,7 @@ var _ = Describe("Deal transformer", func() {
Expect(len(dbResult)).To(Equal(1)) Expect(len(dbResult)).To(Equal(1))
Expect(dbResult[0].BidId).To(Equal("6")) Expect(dbResult[0].BidId).To(Equal("6"))
Expect(dbResult[0].ContractAddress).To(Equal(constants.FlipperContractAddress)) Expect(dbResult[0].ContractAddress).To(Equal(test_data.KovanFlipperContractAddress))
}) })
It("persists a flop deal log event", func() { It("persists a flop deal log event", func() {
@ -111,6 +119,6 @@ var _ = Describe("Deal transformer", func() {
Expect(len(dbResult)).To(Equal(1)) Expect(len(dbResult)).To(Equal(1))
Expect(dbResult[0].BidId).To(Equal("1")) Expect(dbResult[0].BidId).To(Equal("1"))
Expect(dbResult[0].ContractAddress).To(Equal(constants.FlapperContractAddress)) Expect(dbResult[0].ContractAddress).To(Equal(test_data.KovanFlapperContractAddress))
}) })
}) })

View File

@ -5,6 +5,7 @@ import (
. "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo"
. "github.com/onsi/gomega" . "github.com/onsi/gomega"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/pkg/transformers/test_data"
"github.com/vulcanize/vulcanizedb/pkg/core" "github.com/vulcanize/vulcanizedb/pkg/core"
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
@ -34,7 +35,15 @@ var _ = Describe("Dent transformer", func() {
db = test_config.NewTestDB(blockChain.Node()) db = test_config.NewTestDB(blockChain.Node())
test_config.CleanTestDB(db) test_config.CleanTestDB(db)
config = dent.DentConfig config = shared.TransformerConfig{
TransformerName: constants.DentLabel,
ContractAddresses: []string{test_data.KovanFlipperContractAddress, test_data.KovanFlopperContractAddress},
ContractAbi: test_data.KovanFlipperABI,
Topic: test_data.KovanDentFunctionSignature,
StartingBlockNumber: 0,
EndingBlockNumber: -1,
}
addresses = shared.HexStringsToAddresses(config.ContractAddresses) addresses = shared.HexStringsToAddresses(config.ContractAddresses)
topics = []common.Hash{common.HexToHash(config.Topic)} topics = []common.Hash{common.HexToHash(config.Topic)}
fetcher = shared.NewFetcher(blockChain) fetcher = shared.NewFetcher(blockChain)

View File

@ -22,6 +22,7 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
"github.com/vulcanize/vulcanizedb/pkg/transformers/factories" "github.com/vulcanize/vulcanizedb/pkg/transformers/factories"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
"github.com/vulcanize/vulcanizedb/pkg/transformers/test_data"
"github.com/vulcanize/vulcanizedb/pkg/transformers/drip_drip" "github.com/vulcanize/vulcanizedb/pkg/transformers/drip_drip"
"github.com/vulcanize/vulcanizedb/test_config" "github.com/vulcanize/vulcanizedb/test_config"
@ -31,6 +32,7 @@ var _ = Describe("DripDrip Transformer", func() {
var ( var (
db *postgres.DB db *postgres.DB
blockChain core.BlockChain blockChain core.BlockChain
config shared.TransformerConfig
) )
BeforeEach(func() { BeforeEach(func() {
@ -40,10 +42,18 @@ var _ = Describe("DripDrip Transformer", func() {
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
db = test_config.NewTestDB(blockChain.Node()) db = test_config.NewTestDB(blockChain.Node())
test_config.CleanTestDB(db) test_config.CleanTestDB(db)
config = shared.TransformerConfig{
ContractAddresses: []string{test_data.KovanDripContractAddress},
ContractAbi: test_data.KovanDripABI,
Topic: test_data.KovanDripDripSignature,
StartingBlockNumber: 0,
EndingBlockNumber: -1,
}
}) })
It("transforms DripDrip log events", func() { It("transforms DripDrip log events", func() {
blockNumber := int64(8934775) blockNumber := int64(8934775)
config := drip_drip.DripDripConfig
config.StartingBlockNumber = blockNumber config.StartingBlockNumber = blockNumber
config.EndingBlockNumber = blockNumber config.EndingBlockNumber = blockNumber

View File

@ -22,6 +22,8 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
"github.com/vulcanize/vulcanizedb/pkg/transformers/factories" "github.com/vulcanize/vulcanizedb/pkg/transformers/factories"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/pkg/transformers/test_data"
"github.com/vulcanize/vulcanizedb/pkg/transformers/drip_file/vow" "github.com/vulcanize/vulcanizedb/pkg/transformers/drip_file/vow"
"github.com/vulcanize/vulcanizedb/test_config" "github.com/vulcanize/vulcanizedb/test_config"
@ -44,9 +46,14 @@ var _ = Describe("Drip File Vow LogNoteTransformer", func() {
It("transforms DripFileVow log events", func() { It("transforms DripFileVow log events", func() {
blockNumber := int64(8762197) blockNumber := int64(8762197)
config := vow.DripFileVowConfig config := shared.TransformerConfig{
config.StartingBlockNumber = blockNumber TransformerName: constants.DripFileVowLabel,
config.EndingBlockNumber = blockNumber ContractAddresses: []string{test_data.KovanDripContractAddress},
ContractAbi: test_data.KovanDripABI,
Topic: test_data.KovanDripFileVowSignature,
StartingBlockNumber: blockNumber,
EndingBlockNumber: blockNumber,
}
header, err := persistHeader(db, blockNumber, blockChain) header, err := persistHeader(db, blockNumber, blockChain)
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())

View File

@ -18,6 +18,8 @@ import (
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/vulcanize/vulcanizedb/pkg/core" "github.com/vulcanize/vulcanizedb/pkg/core"
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/pkg/transformers/test_data"
"github.com/vulcanize/vulcanizedb/test_config" "github.com/vulcanize/vulcanizedb/test_config"
"time" "time"
@ -46,9 +48,14 @@ var _ = Describe("FlapKick Transformer", func() {
It("fetches and transforms a FlapKick event from Kovan chain", func() { It("fetches and transforms a FlapKick event from Kovan chain", func() {
blockNumber := int64(9002933) blockNumber := int64(9002933)
config := flap_kick.FlapKickConfig config := shared.TransformerConfig{
config.StartingBlockNumber = blockNumber TransformerName: constants.FlapKickLabel,
config.EndingBlockNumber = blockNumber ContractAddresses: []string{test_data.KovanFlapperContractAddress},
ContractAbi: test_data.KovanFlapperABI,
Topic: test_data.KovanFlapKickSignature,
StartingBlockNumber: blockNumber,
EndingBlockNumber: blockNumber,
}
header, err := persistHeader(db, blockNumber, blockChain) header, err := persistHeader(db, blockNumber, blockChain)
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())

View File

@ -33,8 +33,8 @@ import (
var _ = Describe("FlipKick Transformer", func() { var _ = Describe("FlipKick Transformer", func() {
It("unpacks an event log", func() { It("unpacks an event log", func() {
address := common.HexToAddress(constants.FlipperContractAddress) address := common.HexToAddress(test_data.KovanFlipperContractAddress)
abi, err := geth.ParseAbi(constants.FlipperABI) abi, err := geth.ParseAbi(test_data.KovanFlipperABI)
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
contract := bind.NewBoundContract(address, abi, nil, nil, nil) contract := bind.NewBoundContract(address, abi, nil, nil, nil)
@ -57,9 +57,14 @@ var _ = Describe("FlipKick Transformer", func() {
It("fetches and transforms a FlipKick event from Kovan chain", func() { It("fetches and transforms a FlipKick event from Kovan chain", func() {
blockNumber := int64(8956476) blockNumber := int64(8956476)
config := flip_kick.FlipKickConfig config := shared.TransformerConfig{
config.StartingBlockNumber = blockNumber TransformerName: constants.FlipKickLabel,
config.EndingBlockNumber = blockNumber ContractAddresses: []string{test_data.KovanFlipperContractAddress},
ContractAbi: test_data.KovanFlipperABI,
Topic: test_data.KovanFlipKickSignature,
StartingBlockNumber: blockNumber,
EndingBlockNumber: blockNumber,
}
rpcClient, ethClient, err := getClients(ipc) rpcClient, ethClient, err := getClients(ipc)
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())

View File

@ -52,7 +52,14 @@ var _ = Describe("FlopKick Transformer", func() {
db = test_config.NewTestDB(blockChain.Node()) db = test_config.NewTestDB(blockChain.Node())
test_config.CleanTestDB(db) test_config.CleanTestDB(db)
config = flop_kick.Config config = shared.TransformerConfig{
TransformerName: constants.FlopKickLabel,
ContractAddresses: []string{test_data.KovanFlopperContractAddress},
ContractAbi: test_data.KovanFlopperABI,
Topic: test_data.KovanFlopKickSignature,
StartingBlockNumber: 0,
EndingBlockNumber: -1,
}
initializer = factories.Transformer{ initializer = factories.Transformer{
Config: config, Config: config,
@ -121,8 +128,8 @@ var _ = Describe("FlopKick Transformer", func() {
}) })
It("unpacks an flop kick event log", func() { It("unpacks an flop kick event log", func() {
address := common.HexToAddress(constants.FlopperContractAddress) address := common.HexToAddress(test_data.KovanFlopperContractAddress)
abi, err := geth.ParseAbi(constants.FlopperABI) abi, err := geth.ParseAbi(test_data.KovanFlopperABI)
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
contract := bind.NewBoundContract(address, abi, nil, nil, nil) contract := bind.NewBoundContract(address, abi, nil, nil, nil)

View File

@ -49,7 +49,15 @@ var _ = Describe("Frob Transformer", func() {
test_config.CleanTestDB(db) test_config.CleanTestDB(db)
fetcher = shared.NewFetcher(blockChain) fetcher = shared.NewFetcher(blockChain)
config = frob.FrobConfig config = shared.TransformerConfig{
TransformerName: constants.FrobLabel,
ContractAddresses: []string{test_data.KovanPitContractAddress},
ContractAbi: test_data.KovanPitABI,
Topic: test_data.KovanFrobSignature,
StartingBlockNumber: 0,
EndingBlockNumber: -1,
}
initializer = factories.Transformer{ initializer = factories.Transformer{
Config: config, Config: config,
Converter: &frob.FrobConverter{}, Converter: &frob.FrobConverter{},
@ -90,8 +98,8 @@ var _ = Describe("Frob Transformer", func() {
}) })
It("unpacks an event log", func() { It("unpacks an event log", func() {
address := common.HexToAddress(constants.PitContractAddress) address := common.HexToAddress(test_data.KovanPitContractAddress)
abi, err := geth.ParseAbi(constants.PitABI) abi, err := geth.ParseAbi(test_data.KovanPitABI)
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
contract := bind.NewBoundContract(address, abi, nil, nil, nil) contract := bind.NewBoundContract(address, abi, nil, nil, nil)

View File

@ -22,6 +22,8 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
"github.com/vulcanize/vulcanizedb/pkg/transformers/factories" "github.com/vulcanize/vulcanizedb/pkg/transformers/factories"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/pkg/transformers/test_data"
"github.com/vulcanize/vulcanizedb/pkg/transformers/pit_file/debt_ceiling" "github.com/vulcanize/vulcanizedb/pkg/transformers/pit_file/debt_ceiling"
"github.com/vulcanize/vulcanizedb/test_config" "github.com/vulcanize/vulcanizedb/test_config"
@ -44,9 +46,14 @@ var _ = Describe("PitFileDebtCeiling LogNoteTransformer", func() {
It("fetches and transforms a PitFileDebtCeiling event from Kovan chain", func() { It("fetches and transforms a PitFileDebtCeiling event from Kovan chain", func() {
blockNumber := int64(8535578) blockNumber := int64(8535578)
config := debt_ceiling.DebtCeilingFileConfig config := shared.TransformerConfig{
config.StartingBlockNumber = blockNumber TransformerName: constants.PitFileDebtCeilingLabel,
config.EndingBlockNumber = blockNumber ContractAddresses: []string{test_data.KovanPitContractAddress},
ContractAbi: test_data.KovanPitABI,
Topic: test_data.KovanPitFileDebtCeilingSignature,
StartingBlockNumber: blockNumber,
EndingBlockNumber: blockNumber,
}
header, err := persistHeader(db, blockNumber, blockChain) header, err := persistHeader(db, blockNumber, blockChain)
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())

View File

@ -20,6 +20,8 @@ import (
. "github.com/onsi/gomega" . "github.com/onsi/gomega"
"github.com/vulcanize/vulcanizedb/pkg/core" "github.com/vulcanize/vulcanizedb/pkg/core"
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/pkg/transformers/test_data"
"github.com/vulcanize/vulcanizedb/pkg/transformers/factories" "github.com/vulcanize/vulcanizedb/pkg/transformers/factories"
"github.com/vulcanize/vulcanizedb/pkg/transformers/pit_file/ilk" "github.com/vulcanize/vulcanizedb/pkg/transformers/pit_file/ilk"
@ -43,7 +45,14 @@ var _ = Describe("PitFileIlk LogNoteTransformer", func() {
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
db = test_config.NewTestDB(blockChain.Node()) db = test_config.NewTestDB(blockChain.Node())
test_config.CleanTestDB(db) test_config.CleanTestDB(db)
config := ilk.IlkFileConfig config := shared.TransformerConfig{
TransformerName: constants.PitFileIlkLabel,
ContractAddresses: []string{test_data.KovanPitContractAddress},
ContractAbi: test_data.KovanPitABI,
Topic: test_data.KovanPitFileIlkSignature,
StartingBlockNumber: 0,
EndingBlockNumber: -1,
}
addresses = shared.HexStringsToAddresses(config.ContractAddresses) addresses = shared.HexStringsToAddresses(config.ContractAddresses)
topics = []common.Hash{common.HexToHash(config.Topic)} topics = []common.Hash{common.HexToHash(config.Topic)}

View File

@ -18,13 +18,14 @@ import (
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
. "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo"
. "github.com/onsi/gomega" . "github.com/onsi/gomega"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/pkg/transformers/test_data"
"github.com/vulcanize/vulcanizedb/pkg/core" "github.com/vulcanize/vulcanizedb/pkg/core"
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
"github.com/vulcanize/vulcanizedb/pkg/transformers/factories" "github.com/vulcanize/vulcanizedb/pkg/transformers/factories"
"github.com/vulcanize/vulcanizedb/pkg/transformers/price_feeds" "github.com/vulcanize/vulcanizedb/pkg/transformers/price_feeds"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/test_config" "github.com/vulcanize/vulcanizedb/test_config"
) )
@ -46,7 +47,19 @@ var _ = Describe("Price feeds transformer", func() {
db = test_config.NewTestDB(blockChain.Node()) db = test_config.NewTestDB(blockChain.Node())
test_config.CleanTestDB(db) test_config.CleanTestDB(db)
config = price_feeds.PriceFeedConfig config = shared.TransformerConfig{
TransformerName: constants.PriceFeedLabel,
ContractAddresses: []string{
test_data.KovanPepContractAddress,
test_data.KovanPipContractAddress,
test_data.KovanRepContractAddress,
},
ContractAbi: test_data.KovanMedianizerABI,
Topic: test_data.KovanLogValueSignature,
StartingBlockNumber: 0,
EndingBlockNumber: -1,
}
topics = []common.Hash{common.HexToHash(config.Topic)} topics = []common.Hash{common.HexToHash(config.Topic)}
fetcher = shared.NewFetcher(blockChain) fetcher = shared.NewFetcher(blockChain)
@ -62,7 +75,7 @@ var _ = Describe("Price feeds transformer", func() {
blockNumber := int64(8763054) blockNumber := int64(8763054)
header, err := persistHeader(db, blockNumber, blockChain) header, err := persistHeader(db, blockNumber, blockChain)
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
addresses := []string{constants.PipContractAddress} addresses := []string{test_data.KovanPipContractAddress}
initializer.Config.ContractAddresses = addresses initializer.Config.ContractAddresses = addresses
initializer.Config.StartingBlockNumber = blockNumber initializer.Config.StartingBlockNumber = blockNumber
initializer.Config.EndingBlockNumber = blockNumber initializer.Config.EndingBlockNumber = blockNumber
@ -88,7 +101,7 @@ var _ = Describe("Price feeds transformer", func() {
blockNumber := int64(8763059) blockNumber := int64(8763059)
header, err := persistHeader(db, blockNumber, blockChain) header, err := persistHeader(db, blockNumber, blockChain)
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
addresses := []string{constants.PepContractAddress} addresses := []string{test_data.KovanPepContractAddress}
initializer.Config.ContractAddresses = addresses initializer.Config.ContractAddresses = addresses
initializer.Config.StartingBlockNumber = blockNumber initializer.Config.StartingBlockNumber = blockNumber
initializer.Config.EndingBlockNumber = blockNumber initializer.Config.EndingBlockNumber = blockNumber
@ -114,7 +127,7 @@ var _ = Describe("Price feeds transformer", func() {
blockNumber := int64(8763062) blockNumber := int64(8763062)
header, err := persistHeader(db, blockNumber, blockChain) header, err := persistHeader(db, blockNumber, blockChain)
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
addresses := []string{constants.RepContractAddress} addresses := []string{test_data.KovanRepContractAddress}
initializer.Config.ContractAddresses = addresses initializer.Config.ContractAddresses = addresses
initializer.Config.StartingBlockNumber = blockNumber initializer.Config.StartingBlockNumber = blockNumber
initializer.Config.EndingBlockNumber = blockNumber initializer.Config.EndingBlockNumber = blockNumber

View File

@ -24,6 +24,7 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/pkg/transformers/tend" "github.com/vulcanize/vulcanizedb/pkg/transformers/tend"
"github.com/vulcanize/vulcanizedb/pkg/transformers/test_data"
"github.com/vulcanize/vulcanizedb/test_config" "github.com/vulcanize/vulcanizedb/test_config"
) )
@ -46,7 +47,14 @@ var _ = Describe("Tend LogNoteTransformer", func() {
db = test_config.NewTestDB(blockChain.Node()) db = test_config.NewTestDB(blockChain.Node())
test_config.CleanTestDB(db) test_config.CleanTestDB(db)
config = tend.TendConfig config = shared.TransformerConfig{
TransformerName: constants.TendLabel,
ContractAddresses: []string{test_data.KovanFlapperContractAddress, test_data.KovanFlipperContractAddress},
ContractAbi: test_data.KovanFlipperABI,
Topic: test_data.KovanTendFunctionSignature,
StartingBlockNumber: 0,
EndingBlockNumber: -1,
}
fetcher = shared.NewFetcher(blockChain) fetcher = shared.NewFetcher(blockChain)
addresses = shared.HexStringsToAddresses(config.ContractAddresses) addresses = shared.HexStringsToAddresses(config.ContractAddresses)

View File

@ -18,6 +18,8 @@ import (
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
. "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo"
. "github.com/onsi/gomega" . "github.com/onsi/gomega"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/pkg/transformers/test_data"
"github.com/vulcanize/vulcanizedb/pkg/transformers/factories" "github.com/vulcanize/vulcanizedb/pkg/transformers/factories"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
@ -28,9 +30,14 @@ import (
var _ = Describe("VatFlux LogNoteTransformer", func() { var _ = Describe("VatFlux LogNoteTransformer", func() {
It("transforms VatFlux log events", func() { It("transforms VatFlux log events", func() {
blockNumber := int64(9004474) blockNumber := int64(9004474)
config := vat_flux.VatFluxConfig config := shared.TransformerConfig{
config.StartingBlockNumber = blockNumber TransformerName: constants.VatFluxLabel,
config.EndingBlockNumber = blockNumber ContractAddresses: []string{test_data.KovanVatContractAddress},
ContractAbi: test_data.KovanVatABI,
Topic: test_data.KovanVatFluxSignature,
StartingBlockNumber: blockNumber,
EndingBlockNumber: blockNumber,
}
rpcClient, ethClient, err := getClients(ipc) rpcClient, ethClient, err := getClients(ipc)
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())

View File

@ -20,6 +20,8 @@ import (
. "github.com/onsi/gomega" . "github.com/onsi/gomega"
"github.com/vulcanize/vulcanizedb/pkg/core" "github.com/vulcanize/vulcanizedb/pkg/core"
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/pkg/transformers/test_data"
"github.com/vulcanize/vulcanizedb/test_config" "github.com/vulcanize/vulcanizedb/test_config"
"github.com/vulcanize/vulcanizedb/pkg/transformers/factories" "github.com/vulcanize/vulcanizedb/pkg/transformers/factories"
@ -44,9 +46,14 @@ var _ = Describe("VatFold Transformer", func() {
It("transforms VatFold log events", func() { It("transforms VatFold log events", func() {
blockNumber := int64(9367233) blockNumber := int64(9367233)
config := vat_fold.VatFoldConfig config := shared.TransformerConfig{
config.StartingBlockNumber = blockNumber TransformerName: constants.VatFoldLabel,
config.EndingBlockNumber = blockNumber ContractAddresses: []string{test_data.KovanVatContractAddress},
ContractAbi: test_data.KovanVatABI,
Topic: test_data.KovanVatFoldSignature,
StartingBlockNumber: blockNumber,
EndingBlockNumber: blockNumber,
}
header, err := persistHeader(db, blockNumber, blockChain) header, err := persistHeader(db, blockNumber, blockChain)
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())

View File

@ -16,6 +16,8 @@ package integration_tests
import ( import (
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/pkg/transformers/test_data"
"math/big" "math/big"
. "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo"
@ -30,9 +32,14 @@ import (
var _ = Describe("Vat Grab Transformer", func() { var _ = Describe("Vat Grab Transformer", func() {
It("transforms VatGrab log events", func() { It("transforms VatGrab log events", func() {
blockNumber := int64(8958230) blockNumber := int64(8958230)
config := vat_grab.VatGrabConfig config := shared.TransformerConfig{
config.StartingBlockNumber = blockNumber TransformerName: constants.VatGrabLabel,
config.EndingBlockNumber = blockNumber ContractAddresses: []string{test_data.KovanVatContractAddress},
ContractAbi: test_data.KovanVatABI,
Topic: test_data.KovanVatGrabSignature,
StartingBlockNumber: blockNumber,
EndingBlockNumber: blockNumber,
}
rpcClient, ethClient, err := getClients(ipc) rpcClient, ethClient, err := getClients(ipc)
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())

View File

@ -18,6 +18,8 @@ import (
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
. "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo"
. "github.com/onsi/gomega" . "github.com/onsi/gomega"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/pkg/transformers/test_data"
"github.com/vulcanize/vulcanizedb/pkg/transformers/factories" "github.com/vulcanize/vulcanizedb/pkg/transformers/factories"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
@ -28,9 +30,14 @@ import (
var _ = Describe("VatHeal Transformer", func() { var _ = Describe("VatHeal Transformer", func() {
It("transforms VatHeal log events", func() { It("transforms VatHeal log events", func() {
blockNumber := int64(8935578) blockNumber := int64(8935578)
config := vat_heal.VatHealConfig config := shared.TransformerConfig{
config.StartingBlockNumber = blockNumber TransformerName: constants.VatHealLabel,
config.EndingBlockNumber = blockNumber ContractAddresses: []string{test_data.KovanVatContractAddress},
ContractAbi: test_data.KovanVatABI,
Topic: test_data.KovanVatHealSignature,
StartingBlockNumber: blockNumber,
EndingBlockNumber: blockNumber,
}
rpcClient, ethClient, err := getClients(ipc) rpcClient, ethClient, err := getClients(ipc)
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())

View File

@ -20,6 +20,8 @@ import (
. "github.com/onsi/gomega" . "github.com/onsi/gomega"
"github.com/vulcanize/vulcanizedb/pkg/transformers/factories" "github.com/vulcanize/vulcanizedb/pkg/transformers/factories"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/pkg/transformers/test_data"
"github.com/vulcanize/vulcanizedb/pkg/transformers/vat_init" "github.com/vulcanize/vulcanizedb/pkg/transformers/vat_init"
"github.com/vulcanize/vulcanizedb/test_config" "github.com/vulcanize/vulcanizedb/test_config"
@ -28,9 +30,14 @@ import (
var _ = Describe("VatInit LogNoteTransformer", func() { var _ = Describe("VatInit LogNoteTransformer", func() {
It("transforms VatInit log events", func() { It("transforms VatInit log events", func() {
blockNumber := int64(8535561) blockNumber := int64(8535561)
config := vat_init.VatInitConfig config := shared.TransformerConfig{
config.StartingBlockNumber = blockNumber TransformerName: constants.VatInitLabel,
config.EndingBlockNumber = blockNumber ContractAddresses: []string{test_data.KovanVatContractAddress},
ContractAbi: test_data.KovanVatABI,
Topic: test_data.KovanVatInitSignature,
StartingBlockNumber: blockNumber,
EndingBlockNumber: blockNumber,
}
rpcClient, ethClient, err := getClients(ipc) rpcClient, ethClient, err := getClients(ipc)
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())

View File

@ -20,6 +20,8 @@ import (
. "github.com/onsi/gomega" . "github.com/onsi/gomega"
"github.com/vulcanize/vulcanizedb/pkg/transformers/factories" "github.com/vulcanize/vulcanizedb/pkg/transformers/factories"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/pkg/transformers/test_data"
"github.com/vulcanize/vulcanizedb/pkg/transformers/vat_move" "github.com/vulcanize/vulcanizedb/pkg/transformers/vat_move"
"github.com/vulcanize/vulcanizedb/test_config" "github.com/vulcanize/vulcanizedb/test_config"
@ -28,9 +30,14 @@ import (
var _ = Describe("VatMove LogNoteTransformer", func() { var _ = Describe("VatMove LogNoteTransformer", func() {
It("transforms VatMove log events", func() { It("transforms VatMove log events", func() {
blockNumber := int64(9004628) blockNumber := int64(9004628)
config := vat_move.VatMoveConfig config := shared.TransformerConfig{
config.StartingBlockNumber = blockNumber TransformerName: constants.VatMoveLabel,
config.EndingBlockNumber = blockNumber ContractAddresses: []string{test_data.KovanVatContractAddress},
ContractAbi: test_data.KovanVatABI,
Topic: test_data.KovanVatMoveSignature,
StartingBlockNumber: blockNumber,
EndingBlockNumber: blockNumber,
}
rpcClient, ethClient, err := getClients(ipc) rpcClient, ethClient, err := getClients(ipc)
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())

View File

@ -4,6 +4,8 @@ import (
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
. "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo"
. "github.com/onsi/gomega" . "github.com/onsi/gomega"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/pkg/transformers/test_data"
"github.com/vulcanize/vulcanizedb/pkg/core" "github.com/vulcanize/vulcanizedb/pkg/core"
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
@ -30,9 +32,14 @@ var _ = Describe("Vat slip transformer", func() {
It("persists vat slip event", func() { It("persists vat slip event", func() {
blockNumber := int64(8953655) blockNumber := int64(8953655)
config := vat_slip.VatSlipConfig config := shared.TransformerConfig{
config.StartingBlockNumber = blockNumber TransformerName: constants.VatSlipLabel,
config.EndingBlockNumber = blockNumber ContractAddresses: []string{test_data.KovanVatContractAddress},
ContractAbi: test_data.KovanVatABI,
Topic: test_data.KovanVatSlipSignature,
StartingBlockNumber: blockNumber,
EndingBlockNumber: blockNumber,
}
header, err := persistHeader(db, blockNumber, blockChain) header, err := persistHeader(db, blockNumber, blockChain)
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())

View File

@ -16,6 +16,8 @@ package integration_tests
import ( import (
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/pkg/transformers/test_data"
"math/big" "math/big"
. "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo"
@ -30,9 +32,14 @@ import (
var _ = Describe("VatTune LogNoteTransformer", func() { var _ = Describe("VatTune LogNoteTransformer", func() {
It("transforms VatTune log events", func() { It("transforms VatTune log events", func() {
blockNumber := int64(8761670) blockNumber := int64(8761670)
config := vat_tune.VatTuneConfig config := shared.TransformerConfig{
config.StartingBlockNumber = blockNumber TransformerName: constants.VatTuneLabel,
config.EndingBlockNumber = blockNumber ContractAddresses: []string{test_data.KovanVatContractAddress},
ContractAbi: test_data.KovanVatABI,
Topic: test_data.KovanVatTuneSignature,
StartingBlockNumber: blockNumber,
EndingBlockNumber: blockNumber,
}
rpcClient, ethClient, err := getClients(ipc) rpcClient, ethClient, err := getClients(ipc)
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())

View File

@ -20,6 +20,8 @@ import (
. "github.com/onsi/gomega" . "github.com/onsi/gomega"
"github.com/vulcanize/vulcanizedb/pkg/core" "github.com/vulcanize/vulcanizedb/pkg/core"
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres" "github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/pkg/transformers/test_data"
"github.com/vulcanize/vulcanizedb/pkg/transformers/factories" "github.com/vulcanize/vulcanizedb/pkg/transformers/factories"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
@ -44,9 +46,14 @@ var _ = Describe("VowFlog LogNoteTransformer", func() {
It("transforms VowFlog log events", func() { It("transforms VowFlog log events", func() {
blockNumber := int64(8946819) blockNumber := int64(8946819)
config := vow_flog.VowFlogConfig config := shared.TransformerConfig{
config.StartingBlockNumber = blockNumber TransformerName: constants.VowFlogLabel,
config.EndingBlockNumber = blockNumber ContractAddresses: []string{test_data.KovanVowContractAddress},
ContractAbi: test_data.KovanVowABI,
Topic: test_data.KovanVowFlogSignature,
StartingBlockNumber: blockNumber,
EndingBlockNumber: blockNumber,
}
header, err := persistHeader(db, blockNumber, blockChain) header, err := persistHeader(db, blockNumber, blockChain)
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())

View File

@ -19,11 +19,13 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
) )
var DebtCeilingFileConfig = shared.TransformerConfig{ func GetDebtCeilingFileConfig() shared.TransformerConfig {
TransformerName: constants.PitFileDebtCeilingLabel, return shared.TransformerConfig{
ContractAddresses: []string{constants.PitContractAddress}, TransformerName: constants.PitFileDebtCeilingLabel,
ContractAbi: constants.PitABI, ContractAddresses: []string{constants.PitContractAddress()},
Topic: constants.PitFileDebtCeilingSignature, ContractAbi: constants.PitABI(),
StartingBlockNumber: 0, Topic: constants.GetPitFileDebtCeilingSignature(),
EndingBlockNumber: -1, StartingBlockNumber: constants.PitDeploymentBlock(),
EndingBlockNumber: -1,
}
} }

View File

@ -19,11 +19,13 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
) )
var IlkFileConfig = shared.TransformerConfig{ func GetIlkFileConfig() shared.TransformerConfig {
TransformerName: constants.PitFileIlkLabel, return shared.TransformerConfig{
ContractAddresses: []string{constants.PitContractAddress}, TransformerName: constants.PitFileIlkLabel,
ContractAbi: constants.PitABI, ContractAddresses: []string{constants.PitContractAddress()},
Topic: constants.PitFileIlkSignature, ContractAbi: constants.PitABI(),
StartingBlockNumber: 0, Topic: constants.GetPitFileIlkSignature(),
EndingBlockNumber: -1, StartingBlockNumber: constants.PitDeploymentBlock(),
EndingBlockNumber: -1,
}
} }

View File

@ -19,15 +19,17 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
) )
var PriceFeedConfig = shared.TransformerConfig{ func GetPriceFeedConfig() shared.TransformerConfig {
TransformerName: constants.PriceFeedLabel, return shared.TransformerConfig{
ContractAddresses: []string{ TransformerName: constants.PriceFeedLabel,
constants.PepContractAddress, ContractAddresses: []string{
constants.PipContractAddress, constants.PepContractAddress(), constants.PipContractAddress(), constants.RepContractAddress(),
constants.RepContractAddress, },
}, ContractAbi: constants.MedianizerABI(),
ContractAbi: constants.MedianizerABI, Topic: constants.GetLogValueSignature(),
Topic: constants.LogValueSignature, StartingBlockNumber: shared.MinInt64([]int64{
StartingBlockNumber: 0, constants.PepDeploymentBlock(), constants.PipDeploymentBlock(), constants.RepDeploymentBlock(),
EndingBlockNumber: -1, }),
EndingBlockNumber: -1,
}
} }

View File

@ -1,14 +0,0 @@
package constants
var (
CatABI = `[{"constant":true,"inputs":[],"name":"vat","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x36569e77"},{"constant":true,"inputs":[],"name":"vow","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x626cb3c5"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"flips","outputs":[{"name":"ilk","type":"bytes32"},{"name":"urn","type":"bytes32"},{"name":"ink","type":"uint256"},{"name":"tab","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x70d9235a"},{"constant":true,"inputs":[],"name":"nflip","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x76181a51"},{"constant":true,"inputs":[],"name":"live","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x957aa58c"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"wards","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xbf353dbb"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"ilks","outputs":[{"name":"flip","type":"address"},{"name":"chop","type":"uint256"},{"name":"lump","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xd9638d36"},{"constant":true,"inputs":[],"name":"pit","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xf03c7c6e"},{"inputs":[{"name":"vat_","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor","signature":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"ilk","type":"bytes32"},{"indexed":true,"name":"urn","type":"bytes32"},{"indexed":false,"name":"ink","type":"uint256"},{"indexed":false,"name":"art","type":"uint256"},{"indexed":false,"name":"tab","type":"uint256"},{"indexed":false,"name":"flip","type":"uint256"},{"indexed":false,"name":"iArt","type":"uint256"}],"name":"Bite","type":"event","signature":"0x99b5620489b6ef926d4518936cfec15d305452712b88bd59da2d9c10fb0953e8"},{"anonymous":true,"inputs":[{"indexed":true,"name":"sig","type":"bytes4"},{"indexed":true,"name":"guy","type":"address"},{"indexed":true,"name":"foo","type":"bytes32"},{"indexed":true,"name":"bar","type":"bytes32"},{"indexed":false,"name":"wad","type":"uint256"},{"indexed":false,"name":"fax","type":"bytes"}],"name":"LogNote","type":"event","signature":"0x644843f351d3fba4abcd60109eaff9f54bac8fb8ccf0bab941009c21df21cf31"},{"constant":false,"inputs":[{"name":"guy","type":"address"}],"name":"rely","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x65fae35e"},{"constant":false,"inputs":[{"name":"guy","type":"address"}],"name":"deny","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x9c52a7f1"},{"constant":false,"inputs":[{"name":"ilk","type":"bytes32"},{"name":"what","type":"bytes32"},{"name":"data","type":"uint256"}],"name":"file","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x1a0b287e"},{"constant":false,"inputs":[{"name":"what","type":"bytes32"},{"name":"data","type":"address"}],"name":"file","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0xd4e8be83"},{"constant":false,"inputs":[{"name":"ilk","type":"bytes32"},{"name":"what","type":"bytes32"},{"name":"flip","type":"address"}],"name":"file","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0xebecb39d"},{"constant":false,"inputs":[{"name":"ilk","type":"bytes32"},{"name":"urn","type":"bytes32"}],"name":"bite","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x72f7b593"},{"constant":false,"inputs":[{"name":"n","type":"uint256"},{"name":"wad","type":"uint256"}],"name":"flip","outputs":[{"name":"id","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0xe6f95917"}]`
DripABI = `[{"constant":true,"inputs":[],"name":"vat","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x36569e77"},{"constant":true,"inputs":[],"name":"repo","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x56ff3122"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"wards","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xbf353dbb"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"ilks","outputs":[{"name":"vow","type":"bytes32"},{"name":"tax","type":"uint256"},{"name":"rho","type":"uint48"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xd9638d36"},{"inputs":[{"name":"vat_","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor","signature":"constructor"},{"anonymous":true,"inputs":[{"indexed":true,"name":"sig","type":"bytes4"},{"indexed":true,"name":"guy","type":"address"},{"indexed":true,"name":"foo","type":"bytes32"},{"indexed":true,"name":"bar","type":"bytes32"},{"indexed":false,"name":"wad","type":"uint256"},{"indexed":false,"name":"fax","type":"bytes"}],"name":"LogNote","type":"event","signature":"0x644843f351d3fba4abcd60109eaff9f54bac8fb8ccf0bab941009c21df21cf31"},{"constant":false,"inputs":[{"name":"guy","type":"address"}],"name":"rely","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x65fae35e"},{"constant":false,"inputs":[{"name":"guy","type":"address"}],"name":"deny","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x9c52a7f1"},{"constant":true,"inputs":[],"name":"era","outputs":[{"name":"","type":"uint48"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x143e55e0"},{"constant":false,"inputs":[{"name":"ilk","type":"bytes32"},{"name":"vow","type":"bytes32"},{"name":"tax","type":"uint256"}],"name":"file","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x1a0b287e"},{"constant":false,"inputs":[{"name":"what","type":"bytes32"},{"name":"data","type":"uint256"}],"name":"file","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x29ae8114"},{"constant":false,"inputs":[{"name":"ilk","type":"bytes32"}],"name":"drip","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x44e2a5a8"}]`
FlapperABI = `[{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"bids","outputs":[{"name":"bid","type":"uint256"},{"name":"lot","type":"uint256"},{"name":"guy","type":"address"},{"name":"tic","type":"uint48"},{"name":"end","type":"uint48"},{"name":"gal","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ttl","outputs":[{"name":"","type":"uint48"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"gem","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"beg","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tau","outputs":[{"name":"","type":"uint48"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"kicks","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"dai","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"dai_","type":"address"},{"name":"gem_","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"id","type":"uint256"},{"indexed":false,"name":"lot","type":"uint256"},{"indexed":false,"name":"bid","type":"uint256"},{"indexed":false,"name":"gal","type":"address"},{"indexed":false,"name":"end","type":"uint48"}],"name":"Kick","type":"event"},{"anonymous":true,"inputs":[{"indexed":true,"name":"sig","type":"bytes4"},{"indexed":true,"name":"guy","type":"address"},{"indexed":true,"name":"foo","type":"bytes32"},{"indexed":true,"name":"bar","type":"bytes32"},{"indexed":false,"name":"wad","type":"uint256"},{"indexed":false,"name":"fax","type":"bytes"}],"name":"LogNote","type":"event"},{"constant":false,"inputs":[{"name":"gal","type":"address"},{"name":"lot","type":"uint256"},{"name":"bid","type":"uint256"}],"name":"kick","outputs":[{"name":"id","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"},{"name":"lot","type":"uint256"},{"name":"bid","type":"uint256"}],"name":"tend","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"}],"name":"deal","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]`
FlipperABI = `[{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"bids","outputs":[{"name":"bid","type":"uint256"},{"name":"lot","type":"uint256"},{"name":"guy","type":"address"},{"name":"tic","type":"uint48"},{"name":"end","type":"uint48"},{"name":"urn","type":"bytes32"},{"name":"gal","type":"address"},{"name":"tab","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x4423c5f1"},{"constant":true,"inputs":[],"name":"ttl","outputs":[{"name":"","type":"uint48"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x4e8b1dd5"},{"constant":true,"inputs":[],"name":"gem","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x7bd2bea7"},{"constant":true,"inputs":[],"name":"beg","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x7d780d82"},{"constant":true,"inputs":[],"name":"tau","outputs":[{"name":"","type":"uint48"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xcfc4af55"},{"constant":true,"inputs":[],"name":"kicks","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xcfdd3302"},{"constant":true,"inputs":[],"name":"dai","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xf4b9fa75"},{"inputs":[{"name":"dai_","type":"address"},{"name":"gem_","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor","signature":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"id","type":"uint256"},{"indexed":false,"name":"lot","type":"uint256"},{"indexed":false,"name":"bid","type":"uint256"},{"indexed":false,"name":"gal","type":"address"},{"indexed":false,"name":"end","type":"uint48"},{"indexed":true,"name":"urn","type":"bytes32"},{"indexed":false,"name":"tab","type":"uint256"}],"name":"Kick","type":"event","signature":"0xbac86238bdba81d21995024470425ecb370078fa62b7271b90cf28cbd1e3e87e"},{"anonymous":true,"inputs":[{"indexed":true,"name":"sig","type":"bytes4"},{"indexed":true,"name":"guy","type":"address"},{"indexed":true,"name":"foo","type":"bytes32"},{"indexed":true,"name":"bar","type":"bytes32"},{"indexed":false,"name":"wad","type":"uint256"},{"indexed":false,"name":"fax","type":"bytes"}],"name":"LogNote","type":"event","signature":"0x644843f351d3fba4abcd60109eaff9f54bac8fb8ccf0bab941009c21df21cf31"},{"constant":true,"inputs":[],"name":"era","outputs":[{"name":"","type":"uint48"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x143e55e0"},{"constant":false,"inputs":[{"name":"urn","type":"bytes32"},{"name":"gal","type":"address"},{"name":"tab","type":"uint256"},{"name":"lot","type":"uint256"},{"name":"bid","type":"uint256"}],"name":"kick","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0xeae19d9e"},{"constant":false,"inputs":[{"name":"id","type":"uint256"}],"name":"tick","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0xfc7b6aee"},{"constant":false,"inputs":[{"name":"id","type":"uint256"},{"name":"lot","type":"uint256"},{"name":"bid","type":"uint256"}],"name":"tend","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x4b43ed12"},{"constant":false,"inputs":[{"name":"id","type":"uint256"},{"name":"lot","type":"uint256"},{"name":"bid","type":"uint256"}],"name":"dent","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x5ff3a382"},{"constant":false,"inputs":[{"name":"id","type":"uint256"}],"name":"deal","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0xc959c42b"}]`
FlopperABI = `[{"constant":true,"inputs":[],"name":"era","outputs":[{"name":"","type":"uint48"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"bids","outputs":[{"name":"bid","type":"uint256"},{"name":"lot","type":"uint256"},{"name":"guy","type":"address"},{"name":"tic","type":"uint48"},{"name":"end","type":"uint48"},{"name":"vow","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ttl","outputs":[{"name":"","type":"uint48"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"},{"name":"lot","type":"uint256"},{"name":"bid","type":"uint256"}],"name":"dent","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"guy","type":"address"}],"name":"rely","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"gem","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"beg","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"guy","type":"address"}],"name":"deny","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"gal","type":"address"},{"name":"lot","type":"uint256"},{"name":"bid","type":"uint256"}],"name":"kick","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"wards","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"}],"name":"deal","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"tau","outputs":[{"name":"","type":"uint48"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"kicks","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"dai","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"dai_","type":"address"},{"name":"gem_","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"id","type":"uint256"},{"indexed":false,"name":"lot","type":"uint256"},{"indexed":false,"name":"bid","type":"uint256"},{"indexed":false,"name":"gal","type":"address"},{"indexed":false,"name":"end","type":"uint48"}],"name":"Kick","type":"event"},{"anonymous":true,"inputs":[{"indexed":true,"name":"sig","type":"bytes4"},{"indexed":true,"name":"guy","type":"address"},{"indexed":true,"name":"foo","type":"bytes32"},{"indexed":true,"name":"bar","type":"bytes32"},{"indexed":false,"name":"wad","type":"uint256"},{"indexed":false,"name":"fax","type":"bytes"}],"name":"LogNote","type":"event"}]`
MedianizerABI = `[{"constant":false,"inputs":[{"name":"owner_","type":"address"}],"name":"setOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"","type":"bytes32"}],"name":"poke","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"poke","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"compute","outputs":[{"name":"","type":"bytes32"},{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"wat","type":"address"}],"name":"set","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"wat","type":"address"}],"name":"unset","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"indexes","outputs":[{"name":"","type":"bytes12"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"next","outputs":[{"name":"","type":"bytes12"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"read","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"peek","outputs":[{"name":"","type":"bytes32"},{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes12"}],"name":"values","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"min_","type":"uint96"}],"name":"setMin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"authority_","type":"address"}],"name":"setAuthority","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"void","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"pos","type":"bytes12"},{"name":"wat","type":"address"}],"name":"set","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"authority","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"pos","type":"bytes12"}],"name":"unset","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"next_","type":"bytes12"}],"name":"setNext","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"min","outputs":[{"name":"","type":"uint96"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"val","type":"bytes32"}],"name":"LogValue","type":"event"},{"anonymous":true,"inputs":[{"indexed":true,"name":"sig","type":"bytes4"},{"indexed":true,"name":"guy","type":"address"},{"indexed":true,"name":"foo","type":"bytes32"},{"indexed":true,"name":"bar","type":"bytes32"},{"indexed":false,"name":"wad","type":"uint256"},{"indexed":false,"name":"fax","type":"bytes"}],"name":"LogNote","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"authority","type":"address"}],"name":"LogSetAuthority","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"}],"name":"LogSetOwner","type":"event"}]]`
// TODO: replace with updated ABI when contract is deployed (with no pit file stability fee method + modified Frob event)
PitABI = `[{"constant":true,"inputs":[],"name":"vat","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x36569e77"},{"constant":true,"inputs":[],"name":"live","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x957aa58c"},{"constant":true,"inputs":[],"name":"drip","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x9f678cca"},{"constant":true,"inputs":[],"name":"Line","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xbabe8a3f"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"wards","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xbf353dbb"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"ilks","outputs":[{"name":"spot","type":"uint256"},{"name":"line","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xd9638d36"},{"inputs":[{"name":"vat_","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor","signature":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"ilk","type":"bytes32"},{"indexed":true,"name":"urn","type":"bytes32"},{"indexed":false,"name":"ink","type":"uint256"},{"indexed":false,"name":"art","type":"uint256"},{"indexed":false,"name":"dink","type":"int256"},{"indexed":false,"name":"dart","type":"int256"},{"indexed":false,"name":"iArt","type":"uint256"}],"name":"Frob","type":"event","signature":"0xb2afa28318bcc689926b52835d844de174ef8de97e982a85c0199d584920791b"},{"anonymous":true,"inputs":[{"indexed":true,"name":"sig","type":"bytes4"},{"indexed":true,"name":"guy","type":"address"},{"indexed":true,"name":"foo","type":"bytes32"},{"indexed":true,"name":"bar","type":"bytes32"},{"indexed":false,"name":"wad","type":"uint256"},{"indexed":false,"name":"fax","type":"bytes"}],"name":"LogNote","type":"event","signature":"0x644843f351d3fba4abcd60109eaff9f54bac8fb8ccf0bab941009c21df21cf31"},{"constant":false,"inputs":[{"name":"guy","type":"address"}],"name":"rely","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x65fae35e"},{"constant":false,"inputs":[{"name":"guy","type":"address"}],"name":"deny","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x9c52a7f1"},{"constant":false,"inputs":[{"name":"ilk","type":"bytes32"},{"name":"what","type":"bytes32"},{"name":"data","type":"uint256"}],"name":"file","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x1a0b287e"},{"constant":false,"inputs":[{"name":"what","type":"bytes32"},{"name":"data","type":"uint256"}],"name":"file","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x29ae8114"},{"constant":false,"inputs":[{"name":"what","type":"bytes32"},{"name":"data","type":"address"}],"name":"file","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0xd4e8be83"},{"constant":false,"inputs":[{"name":"ilk","type":"bytes32"},{"name":"dink","type":"int256"},{"name":"dart","type":"int256"}],"name":"frob","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x5a984ded"}]`
VatABI = `[{"constant":true,"inputs":[],"name":"debt","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x0dca59c1"},{"constant":true,"inputs":[{"name":"","type":"bytes32"},{"name":"","type":"bytes32"}],"name":"urns","outputs":[{"name":"ink","type":"uint256"},{"name":"art","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x26e27482"},{"constant":true,"inputs":[],"name":"vice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x2d61a355"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"sin","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xa60f1d3e"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"wards","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xbf353dbb"},{"constant":true,"inputs":[{"name":"","type":"bytes32"},{"name":"","type":"bytes32"}],"name":"gem","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xc0912683"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"ilks","outputs":[{"name":"take","type":"uint256"},{"name":"rate","type":"uint256"},{"name":"Ink","type":"uint256"},{"name":"Art","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xd9638d36"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"dai","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xf53e4e69"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor","signature":"constructor"},{"anonymous":true,"inputs":[{"indexed":true,"name":"sig","type":"bytes4"},{"indexed":true,"name":"foo","type":"bytes32"},{"indexed":true,"name":"bar","type":"bytes32"},{"indexed":true,"name":"too","type":"bytes32"},{"indexed":false,"name":"fax","type":"bytes"}],"name":"Note","type":"event","signature":"0x8c2dbbc2b33ffaa77c104b777e574a8a4ff79829dfee8b66f4dc63e3f8067152"},{"constant":false,"inputs":[{"name":"guy","type":"address"}],"name":"rely","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x65fae35e"},{"constant":false,"inputs":[{"name":"guy","type":"address"}],"name":"deny","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x9c52a7f1"},{"constant":false,"inputs":[{"name":"ilk","type":"bytes32"}],"name":"init","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x3b663195"},{"constant":false,"inputs":[{"name":"ilk","type":"bytes32"},{"name":"guy","type":"bytes32"},{"name":"rad","type":"int256"}],"name":"slip","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x42066cbb"},{"constant":false,"inputs":[{"name":"ilk","type":"bytes32"},{"name":"src","type":"bytes32"},{"name":"dst","type":"bytes32"},{"name":"rad","type":"int256"}],"name":"flux","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0xa6e41821"},{"constant":false,"inputs":[{"name":"src","type":"bytes32"},{"name":"dst","type":"bytes32"},{"name":"rad","type":"int256"}],"name":"move","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x78f19470"},{"constant":false,"inputs":[{"name":"i","type":"bytes32"},{"name":"u","type":"bytes32"},{"name":"v","type":"bytes32"},{"name":"w","type":"bytes32"},{"name":"dink","type":"int256"},{"name":"dart","type":"int256"}],"name":"tune","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x5dd6471a"},{"constant":false,"inputs":[{"name":"i","type":"bytes32"},{"name":"u","type":"bytes32"},{"name":"v","type":"bytes32"},{"name":"w","type":"bytes32"},{"name":"dink","type":"int256"},{"name":"dart","type":"int256"}],"name":"grab","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x3690ae4c"},{"constant":false,"inputs":[{"name":"u","type":"bytes32"},{"name":"v","type":"bytes32"},{"name":"rad","type":"int256"}],"name":"heal","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x990a5f63"},{"constant":false,"inputs":[{"name":"i","type":"bytes32"},{"name":"u","type":"bytes32"},{"name":"rate","type":"int256"}],"name":"fold","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0xe6a6a64d"},{"constant":false,"inputs":[{"name":"i","type":"bytes32"},{"name":"u","type":"bytes32"},{"name":"take","type":"int256"}],"name":"toll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x09b7a0b5"}]`
VowABI = `[{"constant":true,"inputs":[],"name":"Awe","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"Joy","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"flap","outputs":[{"name":"id","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"hump","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"wad","type":"uint256"}],"name":"kiss","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"what","type":"bytes32"},{"name":"data","type":"uint256"}],"name":"file","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"Ash","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"era","type":"uint48"}],"name":"flog","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"vat","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"Woe","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"wait","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"guy","type":"address"}],"name":"rely","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"bump","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"tab","type":"uint256"}],"name":"fess","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"row","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint48"}],"name":"sin","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"guy","type":"address"}],"name":"deny","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"flop","outputs":[{"name":"id","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"wards","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"sump","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"Sin","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"what","type":"bytes32"},{"name":"addr","type":"address"}],"name":"file","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"cow","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"wad","type":"uint256"}],"name":"heal","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":true,"inputs":[{"indexed":true,"name":"sig","type":"bytes4"},{"indexed":true,"name":"guy","type":"address"},{"indexed":true,"name":"foo","type":"bytes32"},{"indexed":true,"name":"bar","type":"bytes32"},{"indexed":false,"name":"wad","type":"uint256"},{"indexed":false,"name":"fax","type":"bytes"}],"name":"LogNote","type":"event"}]`
)

View File

@ -1,26 +0,0 @@
package constants
import "github.com/spf13/viper"
func getContractValue(key string, fallback string) string {
value := viper.GetString(key)
if value == "" {
return fallback
}
return value
}
var (
// temporary addresses from Kovan deployment
CatContractAddress = getContractValue("contract.cat", "0x2f34f22a00ee4b7a8f8bbc4eaee1658774c624e0")
DripContractAddress = getContractValue("contract.drip", "0x891c04639a5edcae088e546fa125b5d7fb6a2b9d")
FlapperContractAddress = getContractValue("contract.mcd_flap", "0x8868BAd8e74FcA4505676D1B5B21EcC23328d132") // MCD FLAP Contract
FlipperContractAddress = getContractValue("contract.eth_flip", "0x32D496Ad866D110060866B7125981C73642cc509") // ETH FLIP Contract
FlopperContractAddress = getContractValue("contract.mcd_flop", "0x6191C9b0086c2eBF92300cC507009b53996FbFFa") // MCD FLOP Contract
PepContractAddress = getContractValue("contract.pep", "0xB1997239Cfc3d15578A3a09730f7f84A90BB4975")
PipContractAddress = getContractValue("contract.pip", "0x9FfFE440258B79c5d6604001674A4722FfC0f7Bc")
PitContractAddress = getContractValue("contract.pit", "0xe7cf3198787c9a4daac73371a38f29aaeeced87e")
RepContractAddress = getContractValue("contract.rep", "0xf88bBDc1E2718F8857F30A180076ec38d53cf296")
VatContractAddress = getContractValue("contract.vat", "0xcd726790550afcd77e9a7a47e86a3f9010af126b")
VowContractAddress = getContractValue("contract.vow", "0x3728e9777B2a0a611ee0F89e00E01044ce4736d1")
)

View File

@ -18,6 +18,7 @@ import (
. "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo"
. "github.com/onsi/gomega" . "github.com/onsi/gomega"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/pkg/transformers/test_data"
) )
var _ = Describe("Event signature generator", func() { var _ = Describe("Event signature generator", func() {
@ -93,7 +94,7 @@ var _ = Describe("Event signature generator", func() {
Describe("from the cat contract", func() { Describe("from the cat contract", func() {
It("gets the file method signature", func() { It("gets the file method signature", func() {
expected := "file(bytes32,bytes32,address)" expected := "file(bytes32,bytes32,address)"
actual := constants.GetSolidityMethodSignature(constants.CatABI, "file") actual := constants.GetSolidityMethodSignature(test_data.KovanCatABI, "file")
Expect(expected).To(Equal(actual)) Expect(expected).To(Equal(actual))
}) })
@ -102,14 +103,14 @@ var _ = Describe("Event signature generator", func() {
Describe("from the drip contract", func() { Describe("from the drip contract", func() {
It("gets the drip method signature", func() { It("gets the drip method signature", func() {
expected := "drip(bytes32)" expected := "drip(bytes32)"
actual := constants.GetSolidityMethodSignature(constants.DripABI, "drip") actual := constants.GetSolidityMethodSignature(test_data.KovanDripABI, "drip")
Expect(expected).To(Equal(actual)) Expect(expected).To(Equal(actual))
}) })
It("gets the file method signature", func() { It("gets the file method signature", func() {
expected := "file(bytes32,uint256)" expected := "file(bytes32,uint256)"
actual := constants.GetSolidityMethodSignature(constants.DripABI, "file") actual := constants.GetSolidityMethodSignature(test_data.KovanDripABI, "file")
Expect(expected).To(Equal(actual)) Expect(expected).To(Equal(actual))
}) })
@ -118,21 +119,21 @@ var _ = Describe("Event signature generator", func() {
Describe("from the flipper contract", func() { Describe("from the flipper contract", func() {
It("gets the deal method signature", func() { It("gets the deal method signature", func() {
expected := "deal(uint256)" expected := "deal(uint256)"
actual := constants.GetSolidityMethodSignature(constants.FlipperABI, "deal") actual := constants.GetSolidityMethodSignature(test_data.KovanFlipperABI, "deal")
Expect(expected).To(Equal(actual)) Expect(expected).To(Equal(actual))
}) })
It("gets the dent method signature", func() { It("gets the dent method signature", func() {
expected := "dent(uint256,uint256,uint256)" expected := "dent(uint256,uint256,uint256)"
actual := constants.GetSolidityMethodSignature(constants.FlipperABI, "dent") actual := constants.GetSolidityMethodSignature(test_data.KovanFlipperABI, "dent")
Expect(expected).To(Equal(actual)) Expect(expected).To(Equal(actual))
}) })
It("gets the tend method signature", func() { It("gets the tend method signature", func() {
expected := "tend(uint256,uint256,uint256)" expected := "tend(uint256,uint256,uint256)"
actual := constants.GetSolidityMethodSignature(constants.FlipperABI, "tend") actual := constants.GetSolidityMethodSignature(test_data.KovanFlipperABI, "tend")
Expect(expected).To(Equal(actual)) Expect(expected).To(Equal(actual))
}) })
@ -141,7 +142,7 @@ var _ = Describe("Event signature generator", func() {
Describe("from the pit contract", func() { Describe("from the pit contract", func() {
It("gets the file method signature", func() { It("gets the file method signature", func() {
expected := "file(bytes32,address)" expected := "file(bytes32,address)"
actual := constants.GetSolidityMethodSignature(constants.PitABI, "file") actual := constants.GetSolidityMethodSignature(test_data.KovanPitABI, "file")
Expect(expected).To(Equal(actual)) Expect(expected).To(Equal(actual))
}) })
@ -150,63 +151,63 @@ var _ = Describe("Event signature generator", func() {
Describe("from the vat contract", func() { Describe("from the vat contract", func() {
It("gets the init method signature", func() { It("gets the init method signature", func() {
expected := "init(bytes32)" expected := "init(bytes32)"
actual := constants.GetSolidityMethodSignature(constants.VatABI, "init") actual := constants.GetSolidityMethodSignature(test_data.KovanVatABI, "init")
Expect(expected).To(Equal(actual)) Expect(expected).To(Equal(actual))
}) })
It("gets the heal method signature", func() { It("gets the heal method signature", func() {
expected := "heal(bytes32,bytes32,int256)" expected := "heal(bytes32,bytes32,int256)"
actual := constants.GetSolidityMethodSignature(constants.VatABI, "heal") actual := constants.GetSolidityMethodSignature(test_data.KovanVatABI, "heal")
Expect(expected).To(Equal(actual)) Expect(expected).To(Equal(actual))
}) })
It("gets the fold method signature", func() { It("gets the fold method signature", func() {
expected := "fold(bytes32,bytes32,int256)" expected := "fold(bytes32,bytes32,int256)"
actual := constants.GetSolidityMethodSignature(constants.VatABI, "fold") actual := constants.GetSolidityMethodSignature(test_data.KovanVatABI, "fold")
Expect(expected).To(Equal(actual)) Expect(expected).To(Equal(actual))
}) })
It("gets the flux method signature", func() { It("gets the flux method signature", func() {
expected := "flux(bytes32,bytes32,bytes32,int256)" expected := "flux(bytes32,bytes32,bytes32,int256)"
actual := constants.GetSolidityMethodSignature(constants.VatABI, "flux") actual := constants.GetSolidityMethodSignature(test_data.KovanVatABI, "flux")
Expect(expected).To(Equal(actual)) Expect(expected).To(Equal(actual))
}) })
It("gets the grab method signature", func() { It("gets the grab method signature", func() {
expected := "grab(bytes32,bytes32,bytes32,bytes32,int256,int256)" expected := "grab(bytes32,bytes32,bytes32,bytes32,int256,int256)"
actual := constants.GetSolidityMethodSignature(constants.VatABI, "grab") actual := constants.GetSolidityMethodSignature(test_data.KovanVatABI, "grab")
Expect(expected).To(Equal(actual)) Expect(expected).To(Equal(actual))
}) })
It("gets the move method signature", func() { It("gets the move method signature", func() {
expected := "move(bytes32,bytes32,int256)" expected := "move(bytes32,bytes32,int256)"
actual := constants.GetSolidityMethodSignature(constants.VatABI, "move") actual := constants.GetSolidityMethodSignature(test_data.KovanVatABI, "move")
Expect(expected).To(Equal(actual)) Expect(expected).To(Equal(actual))
}) })
It("gets the slip method signature", func() { It("gets the slip method signature", func() {
expected := "slip(bytes32,bytes32,int256)" expected := "slip(bytes32,bytes32,int256)"
actual := constants.GetSolidityMethodSignature(constants.VatABI, "slip") actual := constants.GetSolidityMethodSignature(test_data.KovanVatABI, "slip")
Expect(expected).To(Equal(actual)) Expect(expected).To(Equal(actual))
}) })
It("gets the toll method signature", func() { It("gets the toll method signature", func() {
expected := "toll(bytes32,bytes32,int256)" expected := "toll(bytes32,bytes32,int256)"
actual := constants.GetSolidityMethodSignature(constants.VatABI, "toll") actual := constants.GetSolidityMethodSignature(test_data.KovanVatABI, "toll")
Expect(expected).To(Equal(actual)) Expect(expected).To(Equal(actual))
}) })
It("gets the tune method signature", func() { It("gets the tune method signature", func() {
expected := "tune(bytes32,bytes32,bytes32,bytes32,int256,int256)" expected := "tune(bytes32,bytes32,bytes32,bytes32,int256,int256)"
actual := constants.GetSolidityMethodSignature(constants.VatABI, "tune") actual := constants.GetSolidityMethodSignature(test_data.KovanVatABI, "tune")
Expect(expected).To(Equal(actual)) Expect(expected).To(Equal(actual))
}) })
@ -215,7 +216,7 @@ var _ = Describe("Event signature generator", func() {
Describe("from the vow contract", func() { Describe("from the vow contract", func() {
It("gets the flog method signature", func() { It("gets the flog method signature", func() {
expected := "flog(uint48)" expected := "flog(uint48)"
actual := constants.GetSolidityMethodSignature(constants.VowABI, "flog") actual := constants.GetSolidityMethodSignature(test_data.KovanVowABI, "flog")
Expect(expected).To(Equal(actual)) Expect(expected).To(Equal(actual))
}) })
@ -225,42 +226,42 @@ var _ = Describe("Event signature generator", func() {
Describe("it handles events", func() { Describe("it handles events", func() {
It("gets the Bite event signature", func() { It("gets the Bite event signature", func() {
expected := "Bite(bytes32,bytes32,uint256,uint256,uint256,uint256,uint256)" expected := "Bite(bytes32,bytes32,uint256,uint256,uint256,uint256,uint256)"
actual := constants.GetSolidityMethodSignature(constants.CatABI, "Bite") actual := constants.GetSolidityMethodSignature(test_data.KovanCatABI, "Bite")
Expect(expected).To(Equal(actual)) Expect(expected).To(Equal(actual))
}) })
It("gets the flap Kick event signature", func() { It("gets the flap Kick event signature", func() {
expected := "Kick(uint256,uint256,uint256,address,uint48)" expected := "Kick(uint256,uint256,uint256,address,uint48)"
actual := constants.GetSolidityMethodSignature(constants.FlapperABI, "Kick") actual := constants.GetSolidityMethodSignature(test_data.KovanFlapperABI, "Kick")
Expect(expected).To(Equal(actual)) Expect(expected).To(Equal(actual))
}) })
It("gets the flip Kick event signature", func() { It("gets the flip Kick event signature", func() {
expected := "Kick(uint256,uint256,uint256,address,uint48,bytes32,uint256)" expected := "Kick(uint256,uint256,uint256,address,uint48,bytes32,uint256)"
actual := constants.GetSolidityMethodSignature(constants.FlipperABI, "Kick") actual := constants.GetSolidityMethodSignature(test_data.KovanFlipperABI, "Kick")
Expect(expected).To(Equal(actual)) Expect(expected).To(Equal(actual))
}) })
It("gets the flop Kick event signature", func() { It("gets the flop Kick event signature", func() {
expected := "Kick(uint256,uint256,uint256,address,uint48)" expected := "Kick(uint256,uint256,uint256,address,uint48)"
actual := constants.GetSolidityMethodSignature(constants.FlopperABI, "Kick") actual := constants.GetSolidityMethodSignature(test_data.KovanFlopperABI, "Kick")
Expect(expected).To(Equal(actual)) Expect(expected).To(Equal(actual))
}) })
It("gets the pit frob event signature", func() { It("gets the pit frob event signature", func() {
expected := "Frob(bytes32,bytes32,uint256,uint256,int256,int256,uint256)" expected := "Frob(bytes32,bytes32,uint256,uint256,int256,int256,uint256)"
actual := constants.GetSolidityMethodSignature(constants.PitABI, "Frob") actual := constants.GetSolidityMethodSignature(test_data.KovanPitABI, "Frob")
Expect(expected).To(Equal(actual)) Expect(expected).To(Equal(actual))
}) })
It("gets the log value method signature", func() { It("gets the log value method signature", func() {
expected := "LogValue(bytes32)" expected := "LogValue(bytes32)"
actual := constants.GetSolidityMethodSignature(constants.MedianizerABI, "LogValue") actual := constants.GetSolidityMethodSignature(test_data.KovanMedianizerABI, "LogValue")
Expect(expected).To(Equal(actual)) Expect(expected).To(Equal(actual))
}) })

View File

@ -0,0 +1,78 @@
package constants
import (
"fmt"
"github.com/spf13/viper"
)
var initialized = false
func initConfig() {
if initialized {
return
}
if err := viper.ReadInConfig(); err == nil {
fmt.Printf("Using config file: %s\n\n", viper.ConfigFileUsed())
} else {
panic(fmt.Sprintf("Could not find environment file: %v", err))
}
initialized = true
}
func getEnvironmentString(key string) string {
initConfig()
value := viper.GetString(key)
if value == "" {
panic(fmt.Sprintf("No environment configuration variable set for key: \"%v\"", key))
}
return value
}
func getEnvironmentInt64(key string) int64 {
initConfig()
value := viper.GetInt64(key)
if value == -1 {
panic(fmt.Sprintf("No environment configuration variable set for key: \"%v\"", key))
}
return value
}
// Getters for contract addresses from environment files
func CatContractAddress() string { return getEnvironmentString("contract.address.cat") }
func DripContractAddress() string { return getEnvironmentString("contract.address.drip") }
func FlapperContractAddress() string { return getEnvironmentString("contract.address.mcd_flap") }
func FlipperContractAddress() string { return getEnvironmentString("contract.address.eth_flip") }
func FlopperContractAddress() string { return getEnvironmentString("contract.address.mcd_flop") }
func PepContractAddress() string { return getEnvironmentString("contract.address.pep") }
func PipContractAddress() string { return getEnvironmentString("contract.address.pip") }
func PitContractAddress() string { return getEnvironmentString("contract.address.pit") }
func RepContractAddress() string { return getEnvironmentString("contract.address.rep") }
func VatContractAddress() string { return getEnvironmentString("contract.address.vat") }
func VowContractAddress() string { return getEnvironmentString("contract.address.vow") }
func CatABI() string { return getEnvironmentString("contract.abi.cat") }
func DripABI() string { return getEnvironmentString("contract.abi.drip") }
func FlapperABI() string { return getEnvironmentString("contract.abi.mcd_flap") }
func FlipperABI() string { return getEnvironmentString("contract.abi.eth_flip") }
func FlopperABI() string { return getEnvironmentString("contract.abi.mcd_flop") }
func MedianizerABI() string { return getEnvironmentString("contract.abi.medianizer") }
func PitABI() string { return getEnvironmentString("contract.abi.pit") }
func VatABI() string { return getEnvironmentString("contract.abi.vat") }
func VowABI() string { return getEnvironmentString("contract.abi.vow") }
func CatDeploymentBlock() int64 { return getEnvironmentInt64("contract.deployment-block.cat") }
func DripDeploymentBlock() int64 { return getEnvironmentInt64("contract.deployment-block.drip") }
func FlapperDeploymentBlock() int64 { return getEnvironmentInt64("contract.deployment-block.mcd_flap") }
func FlipperDeploymentBlock() int64 { return getEnvironmentInt64("contract.deployment-block.eth_flip") }
func FlopperDeploymentBlock() int64 { return getEnvironmentInt64("contract.deployment-block.mcd_flop") }
func PepDeploymentBlock() int64 { return getEnvironmentInt64("contract.deployment-block.pep") }
func PipDeploymentBlock() int64 { return getEnvironmentInt64("contract.deployment-block.pip") }
func PitDeploymentBlock() int64 { return getEnvironmentInt64("contract.deployment-block.pit") }
func RepDeploymentBlock() int64 { return getEnvironmentInt64("contract.deployment-block.rep") }
func VatDeploymentBlock() int64 { return getEnvironmentInt64("contract.deployment-block.vat") }
func VowDeploymentBlock() int64 { return getEnvironmentInt64("contract.deployment-block.vow") }
func MedianizerDeploymentBlock() int64 {
return getEnvironmentInt64("contract.deployment-block.medianizer")
}

View File

@ -1,6 +1,6 @@
package constants package constants
var ( const (
BiteLabel = "bite" BiteLabel = "bite"
CatFileChopLumpLabel = "catFileChopLump" CatFileChopLumpLabel = "catFileChopLump"
CatFileFlipLabel = "catFileFlip" CatFileFlipLabel = "catFileFlip"

View File

@ -1,33 +1,31 @@
package constants package constants
var ( //TODO: get cat, pit, and drip file method signatures directly from the ABI
//TODO: get cat, pit, and drip file method signatures directly from the ABI func biteMethod() string { return GetSolidityMethodSignature(CatABI(), "Bite") }
biteMethod = GetSolidityMethodSignature(CatABI, "Bite") func catFileChopLumpMethod() string { return "file(bytes32,bytes32,uint256)" }
catFileChopLumpMethod = "file(bytes32,bytes32,uint256)" func catFileFlipMethod() string { return GetSolidityMethodSignature(CatABI(), "file") }
catFileFlipMethod = GetSolidityMethodSignature(CatABI, "file") func catFilePitVowMethod() string { return "file(bytes32,address)" }
catFilePitVowMethod = "file(bytes32,address)" func dealMethod() string { return GetSolidityMethodSignature(FlipperABI(), "deal") }
dealMethod = GetSolidityMethodSignature(FlipperABI, "deal") func dentMethod() string { return GetSolidityMethodSignature(FlipperABI(), "dent") }
dentMethod = GetSolidityMethodSignature(FlipperABI, "dent") func dripDripMethod() string { return GetSolidityMethodSignature(DripABI(), "drip") }
dripDripMethod = GetSolidityMethodSignature(DripABI, "drip") func dripFileIlkMethod() string { return "file(bytes32,bytes32,uint256)" }
dripFileIlkMethod = "file(bytes32,bytes32,uint256)" func dripFileRepoMethod() string { return GetSolidityMethodSignature(DripABI(), "file") }
dripFileRepoMethod = GetSolidityMethodSignature(DripABI, "file") func dripFileVowMethod() string { return "file(bytes32,bytes32)" }
dripFileVowMethod = "file(bytes32,bytes32)" func flapKickMethod() string { return GetSolidityMethodSignature(FlapperABI(), "Kick") }
flapKickMethod = GetSolidityMethodSignature(FlapperABI, "Kick") func flipKickMethod() string { return GetSolidityMethodSignature(FlipperABI(), "Kick") }
flipKickMethod = GetSolidityMethodSignature(FlipperABI, "Kick") func flopKickMethod() string { return GetSolidityMethodSignature(FlopperABI(), "Kick") }
flopKickMethod = GetSolidityMethodSignature(FlopperABI, "Kick") func frobMethod() string { return GetSolidityMethodSignature(PitABI(), "Frob") }
frobMethod = GetSolidityMethodSignature(PitABI, "Frob") func logValueMethod() string { return GetSolidityMethodSignature(MedianizerABI(), "LogValue") }
logValueMethod = GetSolidityMethodSignature(MedianizerABI, "LogValue") func pitFileDebtCeilingMethod() string { return "file(bytes32,uint256)" }
pitFileDebtCeilingMethod = "file(bytes32,uint256)" func pitFileIlkMethod() string { return "file(bytes32,bytes32,uint256)" }
pitFileIlkMethod = "file(bytes32,bytes32,uint256)" func tendMethod() string { return GetSolidityMethodSignature(FlipperABI(), "tend") }
tendMethod = GetSolidityMethodSignature(FlipperABI, "tend") func vatFluxMethod() string { return GetSolidityMethodSignature(VatABI(), "flux") }
vatFluxMethod = GetSolidityMethodSignature(VatABI, "flux") func vatFoldMethod() string { return GetSolidityMethodSignature(VatABI(), "fold") }
vatFoldMethod = GetSolidityMethodSignature(VatABI, "fold") func vatGrabMethod() string { return GetSolidityMethodSignature(VatABI(), "grab") }
vatGrabMethod = GetSolidityMethodSignature(VatABI, "grab") func vatHealMethod() string { return GetSolidityMethodSignature(VatABI(), "heal") }
vatHealMethod = GetSolidityMethodSignature(VatABI, "heal") func vatInitMethod() string { return GetSolidityMethodSignature(VatABI(), "init") }
vatInitMethod = GetSolidityMethodSignature(VatABI, "init") func vatMoveMethod() string { return GetSolidityMethodSignature(VatABI(), "move") }
vatMoveMethod = GetSolidityMethodSignature(VatABI, "move") func vatSlipMethod() string { return GetSolidityMethodSignature(VatABI(), "slip") }
vatSlipMethod = GetSolidityMethodSignature(VatABI, "slip") func vatTollMethod() string { return GetSolidityMethodSignature(VatABI(), "toll") }
vatTollMethod = GetSolidityMethodSignature(VatABI, "toll") func vatTuneMethod() string { return GetSolidityMethodSignature(VatABI(), "tune") }
vatTuneMethod = GetSolidityMethodSignature(VatABI, "tune") func vowFlogMethod() string { return GetSolidityMethodSignature(VowABI(), "flog") }
vowFlogMethod = GetSolidityMethodSignature(VowABI, "flog")
)

View File

@ -1,32 +1,30 @@
package constants package constants
var ( func GetBiteSignature() string { return GetEventSignature(biteMethod()) }
BiteSignature = GetEventSignature(biteMethod) func GetCatFileChopLumpSignature() string { return GetLogNoteSignature(catFileChopLumpMethod()) }
CatFileChopLumpSignature = GetLogNoteSignature(catFileChopLumpMethod) func GetCatFileFlipSignature() string { return GetLogNoteSignature(catFileFlipMethod()) }
CatFileFlipSignature = GetLogNoteSignature(catFileFlipMethod) func GetCatFilePitVowSignature() string { return GetLogNoteSignature(catFilePitVowMethod()) }
CatFilePitVowSignature = GetLogNoteSignature(catFilePitVowMethod) func GetDealSignature() string { return GetLogNoteSignature(dealMethod()) }
DealSignature = GetLogNoteSignature(dealMethod) func GetDentFunctionSignature() string { return GetLogNoteSignature(dentMethod()) }
DentFunctionSignature = GetLogNoteSignature(dentMethod) func GetDripDripSignature() string { return GetLogNoteSignature(dripDripMethod()) }
DripDripSignature = GetLogNoteSignature(dripDripMethod) func GetDripFileIlkSignature() string { return GetLogNoteSignature(dripFileIlkMethod()) }
DripFileIlkSignature = GetLogNoteSignature(dripFileIlkMethod) func GetDripFileRepoSignature() string { return GetLogNoteSignature(dripFileRepoMethod()) }
DripFileRepoSignature = GetLogNoteSignature(dripFileRepoMethod) func GetDripFileVowSignature() string { return GetLogNoteSignature(dripFileVowMethod()) }
DripFileVowSignature = GetLogNoteSignature(dripFileVowMethod) func GetFlapKickSignature() string { return GetEventSignature(flapKickMethod()) }
FlapKickSignature = GetEventSignature(flapKickMethod) func GetFlipKickSignature() string { return GetEventSignature(flipKickMethod()) }
FlipKickSignature = GetEventSignature(flipKickMethod) func GetFlopKickSignature() string { return GetEventSignature(flopKickMethod()) }
FlopKickSignature = GetEventSignature(flopKickMethod) func GetFrobSignature() string { return GetEventSignature(frobMethod()) }
FrobSignature = GetEventSignature(frobMethod) func GetLogValueSignature() string { return GetEventSignature(logValueMethod()) }
LogValueSignature = GetEventSignature(logValueMethod) func GetPitFileDebtCeilingSignature() string { return GetLogNoteSignature(pitFileDebtCeilingMethod()) }
PitFileDebtCeilingSignature = GetLogNoteSignature(pitFileDebtCeilingMethod) func GetPitFileIlkSignature() string { return GetLogNoteSignature(pitFileIlkMethod()) }
PitFileIlkSignature = GetLogNoteSignature(pitFileIlkMethod) func GetTendFunctionSignature() string { return GetLogNoteSignature(tendMethod()) }
TendFunctionSignature = GetLogNoteSignature(tendMethod) func GetVatFluxSignature() string { return GetLogNoteSignature(vatFluxMethod()) }
VatFluxSignature = GetLogNoteSignature(vatFluxMethod) func GetVatFoldSignature() string { return GetLogNoteSignature(vatFoldMethod()) }
VatFoldSignature = GetLogNoteSignature(vatFoldMethod) func GetVatGrabSignature() string { return GetLogNoteSignature(vatGrabMethod()) }
VatGrabSignature = GetLogNoteSignature(vatGrabMethod) func GetVatHealSignature() string { return GetLogNoteSignature(vatHealMethod()) }
VatHealSignature = GetLogNoteSignature(vatHealMethod) func GetVatInitSignature() string { return GetLogNoteSignature(vatInitMethod()) }
VatInitSignature = GetLogNoteSignature(vatInitMethod) func GetVatMoveSignature() string { return GetLogNoteSignature(vatMoveMethod()) }
VatMoveSignature = GetLogNoteSignature(vatMoveMethod) func GetVatSlipSignature() string { return GetLogNoteSignature(vatSlipMethod()) }
VatSlipSignature = GetLogNoteSignature(vatSlipMethod) func GetVatTollSignature() string { return GetLogNoteSignature(vatTollMethod()) }
VatTollSignature = GetLogNoteSignature(vatTollMethod) func GetVatTuneSignature() string { return GetLogNoteSignature(vatTuneMethod()) }
VatTuneSignature = GetLogNoteSignature(vatTuneMethod) func GetVowFlogSignature() string { return GetLogNoteSignature(vowFlogMethod()) }
VowFlogSignature = GetLogNoteSignature(vowFlogMethod)
)

View File

@ -78,3 +78,16 @@ func convert(conversion string, value string, precision int) string {
} }
return result.Text('f', precision) return result.Text('f', precision)
} }
func MinInt64(ints []int64) (min int64) {
if len(ints) == 0 {
return 0
}
min = ints[0]
for _, i := range ints {
if i < min {
min = i
}
}
return
}

View File

@ -19,11 +19,13 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
) )
var TendConfig = shared.TransformerConfig{ func GetTendConfig() shared.TransformerConfig {
TransformerName: constants.TendLabel, return shared.TransformerConfig{
ContractAddresses: []string{constants.FlapperContractAddress, constants.FlipperContractAddress}, TransformerName: constants.TendLabel,
ContractAbi: constants.FlipperABI, ContractAddresses: []string{constants.FlapperContractAddress(), constants.FlipperContractAddress()},
Topic: constants.TendFunctionSignature, ContractAbi: constants.FlipperABI(),
StartingBlockNumber: 0, Topic: constants.GetTendFunctionSignature(),
EndingBlockNumber: -1, StartingBlockNumber: shared.MinInt64([]int64{constants.FlapperDeploymentBlock(), constants.FlipperDeploymentBlock()}),
EndingBlockNumber: -1,
}
} }

View File

@ -0,0 +1,14 @@
package test_data
const (
KovanCatABI = `[{"constant":true,"inputs":[],"name":"vat","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x36569e77"},{"constant":true,"inputs":[],"name":"vow","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x626cb3c5"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"flips","outputs":[{"name":"ilk","type":"bytes32"},{"name":"urn","type":"bytes32"},{"name":"ink","type":"uint256"},{"name":"tab","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x70d9235a"},{"constant":true,"inputs":[],"name":"nflip","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x76181a51"},{"constant":true,"inputs":[],"name":"live","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x957aa58c"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"wards","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xbf353dbb"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"ilks","outputs":[{"name":"flip","type":"address"},{"name":"chop","type":"uint256"},{"name":"lump","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xd9638d36"},{"constant":true,"inputs":[],"name":"pit","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xf03c7c6e"},{"inputs":[{"name":"vat_","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor","signature":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"ilk","type":"bytes32"},{"indexed":true,"name":"urn","type":"bytes32"},{"indexed":false,"name":"ink","type":"uint256"},{"indexed":false,"name":"art","type":"uint256"},{"indexed":false,"name":"tab","type":"uint256"},{"indexed":false,"name":"flip","type":"uint256"},{"indexed":false,"name":"iArt","type":"uint256"}],"name":"Bite","type":"event","signature":"0x99b5620489b6ef926d4518936cfec15d305452712b88bd59da2d9c10fb0953e8"},{"anonymous":true,"inputs":[{"indexed":true,"name":"sig","type":"bytes4"},{"indexed":true,"name":"guy","type":"address"},{"indexed":true,"name":"foo","type":"bytes32"},{"indexed":true,"name":"bar","type":"bytes32"},{"indexed":false,"name":"wad","type":"uint256"},{"indexed":false,"name":"fax","type":"bytes"}],"name":"LogNote","type":"event","signature":"0x644843f351d3fba4abcd60109eaff9f54bac8fb8ccf0bab941009c21df21cf31"},{"constant":false,"inputs":[{"name":"guy","type":"address"}],"name":"rely","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x65fae35e"},{"constant":false,"inputs":[{"name":"guy","type":"address"}],"name":"deny","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x9c52a7f1"},{"constant":false,"inputs":[{"name":"ilk","type":"bytes32"},{"name":"what","type":"bytes32"},{"name":"data","type":"uint256"}],"name":"file","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x1a0b287e"},{"constant":false,"inputs":[{"name":"what","type":"bytes32"},{"name":"data","type":"address"}],"name":"file","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0xd4e8be83"},{"constant":false,"inputs":[{"name":"ilk","type":"bytes32"},{"name":"what","type":"bytes32"},{"name":"flip","type":"address"}],"name":"file","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0xebecb39d"},{"constant":false,"inputs":[{"name":"ilk","type":"bytes32"},{"name":"urn","type":"bytes32"}],"name":"bite","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x72f7b593"},{"constant":false,"inputs":[{"name":"n","type":"uint256"},{"name":"wad","type":"uint256"}],"name":"flip","outputs":[{"name":"id","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0xe6f95917"}]`
KovanDripABI = `[{"constant":true,"inputs":[],"name":"vat","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x36569e77"},{"constant":true,"inputs":[],"name":"repo","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x56ff3122"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"wards","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xbf353dbb"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"ilks","outputs":[{"name":"vow","type":"bytes32"},{"name":"tax","type":"uint256"},{"name":"rho","type":"uint48"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xd9638d36"},{"inputs":[{"name":"vat_","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor","signature":"constructor"},{"anonymous":true,"inputs":[{"indexed":true,"name":"sig","type":"bytes4"},{"indexed":true,"name":"guy","type":"address"},{"indexed":true,"name":"foo","type":"bytes32"},{"indexed":true,"name":"bar","type":"bytes32"},{"indexed":false,"name":"wad","type":"uint256"},{"indexed":false,"name":"fax","type":"bytes"}],"name":"LogNote","type":"event","signature":"0x644843f351d3fba4abcd60109eaff9f54bac8fb8ccf0bab941009c21df21cf31"},{"constant":false,"inputs":[{"name":"guy","type":"address"}],"name":"rely","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x65fae35e"},{"constant":false,"inputs":[{"name":"guy","type":"address"}],"name":"deny","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x9c52a7f1"},{"constant":true,"inputs":[],"name":"era","outputs":[{"name":"","type":"uint48"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x143e55e0"},{"constant":false,"inputs":[{"name":"ilk","type":"bytes32"},{"name":"vow","type":"bytes32"},{"name":"tax","type":"uint256"}],"name":"file","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x1a0b287e"},{"constant":false,"inputs":[{"name":"what","type":"bytes32"},{"name":"data","type":"uint256"}],"name":"file","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x29ae8114"},{"constant":false,"inputs":[{"name":"ilk","type":"bytes32"}],"name":"drip","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x44e2a5a8"}]`
KovanFlapperABI = `[{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"bids","outputs":[{"name":"bid","type":"uint256"},{"name":"lot","type":"uint256"},{"name":"guy","type":"address"},{"name":"tic","type":"uint48"},{"name":"end","type":"uint48"},{"name":"gal","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ttl","outputs":[{"name":"","type":"uint48"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"gem","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"beg","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tau","outputs":[{"name":"","type":"uint48"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"kicks","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"dai","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"dai_","type":"address"},{"name":"gem_","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"id","type":"uint256"},{"indexed":false,"name":"lot","type":"uint256"},{"indexed":false,"name":"bid","type":"uint256"},{"indexed":false,"name":"gal","type":"address"},{"indexed":false,"name":"end","type":"uint48"}],"name":"Kick","type":"event"},{"anonymous":true,"inputs":[{"indexed":true,"name":"sig","type":"bytes4"},{"indexed":true,"name":"guy","type":"address"},{"indexed":true,"name":"foo","type":"bytes32"},{"indexed":true,"name":"bar","type":"bytes32"},{"indexed":false,"name":"wad","type":"uint256"},{"indexed":false,"name":"fax","type":"bytes"}],"name":"LogNote","type":"event"},{"constant":false,"inputs":[{"name":"gal","type":"address"},{"name":"lot","type":"uint256"},{"name":"bid","type":"uint256"}],"name":"kick","outputs":[{"name":"id","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"},{"name":"lot","type":"uint256"},{"name":"bid","type":"uint256"}],"name":"tend","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"}],"name":"deal","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]`
KovanFlipperABI = `[{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"bids","outputs":[{"name":"bid","type":"uint256"},{"name":"lot","type":"uint256"},{"name":"guy","type":"address"},{"name":"tic","type":"uint48"},{"name":"end","type":"uint48"},{"name":"urn","type":"bytes32"},{"name":"gal","type":"address"},{"name":"tab","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x4423c5f1"},{"constant":true,"inputs":[],"name":"ttl","outputs":[{"name":"","type":"uint48"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x4e8b1dd5"},{"constant":true,"inputs":[],"name":"gem","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x7bd2bea7"},{"constant":true,"inputs":[],"name":"beg","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x7d780d82"},{"constant":true,"inputs":[],"name":"tau","outputs":[{"name":"","type":"uint48"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xcfc4af55"},{"constant":true,"inputs":[],"name":"kicks","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xcfdd3302"},{"constant":true,"inputs":[],"name":"dai","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xf4b9fa75"},{"inputs":[{"name":"dai_","type":"address"},{"name":"gem_","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor","signature":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"id","type":"uint256"},{"indexed":false,"name":"lot","type":"uint256"},{"indexed":false,"name":"bid","type":"uint256"},{"indexed":false,"name":"gal","type":"address"},{"indexed":false,"name":"end","type":"uint48"},{"indexed":true,"name":"urn","type":"bytes32"},{"indexed":false,"name":"tab","type":"uint256"}],"name":"Kick","type":"event","signature":"0xbac86238bdba81d21995024470425ecb370078fa62b7271b90cf28cbd1e3e87e"},{"anonymous":true,"inputs":[{"indexed":true,"name":"sig","type":"bytes4"},{"indexed":true,"name":"guy","type":"address"},{"indexed":true,"name":"foo","type":"bytes32"},{"indexed":true,"name":"bar","type":"bytes32"},{"indexed":false,"name":"wad","type":"uint256"},{"indexed":false,"name":"fax","type":"bytes"}],"name":"LogNote","type":"event","signature":"0x644843f351d3fba4abcd60109eaff9f54bac8fb8ccf0bab941009c21df21cf31"},{"constant":true,"inputs":[],"name":"era","outputs":[{"name":"","type":"uint48"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x143e55e0"},{"constant":false,"inputs":[{"name":"urn","type":"bytes32"},{"name":"gal","type":"address"},{"name":"tab","type":"uint256"},{"name":"lot","type":"uint256"},{"name":"bid","type":"uint256"}],"name":"kick","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0xeae19d9e"},{"constant":false,"inputs":[{"name":"id","type":"uint256"}],"name":"tick","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0xfc7b6aee"},{"constant":false,"inputs":[{"name":"id","type":"uint256"},{"name":"lot","type":"uint256"},{"name":"bid","type":"uint256"}],"name":"tend","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x4b43ed12"},{"constant":false,"inputs":[{"name":"id","type":"uint256"},{"name":"lot","type":"uint256"},{"name":"bid","type":"uint256"}],"name":"dent","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x5ff3a382"},{"constant":false,"inputs":[{"name":"id","type":"uint256"}],"name":"deal","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0xc959c42b"}]`
KovanFlopperABI = `[{"constant":true,"inputs":[],"name":"era","outputs":[{"name":"","type":"uint48"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"bids","outputs":[{"name":"bid","type":"uint256"},{"name":"lot","type":"uint256"},{"name":"guy","type":"address"},{"name":"tic","type":"uint48"},{"name":"end","type":"uint48"},{"name":"vow","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ttl","outputs":[{"name":"","type":"uint48"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"},{"name":"lot","type":"uint256"},{"name":"bid","type":"uint256"}],"name":"dent","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"guy","type":"address"}],"name":"rely","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"gem","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"beg","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"guy","type":"address"}],"name":"deny","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"gal","type":"address"},{"name":"lot","type":"uint256"},{"name":"bid","type":"uint256"}],"name":"kick","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"wards","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"}],"name":"deal","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"tau","outputs":[{"name":"","type":"uint48"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"kicks","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"dai","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"dai_","type":"address"},{"name":"gem_","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"id","type":"uint256"},{"indexed":false,"name":"lot","type":"uint256"},{"indexed":false,"name":"bid","type":"uint256"},{"indexed":false,"name":"gal","type":"address"},{"indexed":false,"name":"end","type":"uint48"}],"name":"Kick","type":"event"},{"anonymous":true,"inputs":[{"indexed":true,"name":"sig","type":"bytes4"},{"indexed":true,"name":"guy","type":"address"},{"indexed":true,"name":"foo","type":"bytes32"},{"indexed":true,"name":"bar","type":"bytes32"},{"indexed":false,"name":"wad","type":"uint256"},{"indexed":false,"name":"fax","type":"bytes"}],"name":"LogNote","type":"event"}]`
KovanMedianizerABI = `[{"constant":false,"inputs":[{"name":"owner_","type":"address"}],"name":"setOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"","type":"bytes32"}],"name":"poke","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"poke","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"compute","outputs":[{"name":"","type":"bytes32"},{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"wat","type":"address"}],"name":"set","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"wat","type":"address"}],"name":"unset","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"indexes","outputs":[{"name":"","type":"bytes12"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"next","outputs":[{"name":"","type":"bytes12"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"read","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"peek","outputs":[{"name":"","type":"bytes32"},{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes12"}],"name":"values","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"min_","type":"uint96"}],"name":"setMin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"authority_","type":"address"}],"name":"setAuthority","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"void","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"pos","type":"bytes12"},{"name":"wat","type":"address"}],"name":"set","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"authority","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"pos","type":"bytes12"}],"name":"unset","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"next_","type":"bytes12"}],"name":"setNext","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"min","outputs":[{"name":"","type":"uint96"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"val","type":"bytes32"}],"name":"LogValue","type":"event"},{"anonymous":true,"inputs":[{"indexed":true,"name":"sig","type":"bytes4"},{"indexed":true,"name":"guy","type":"address"},{"indexed":true,"name":"foo","type":"bytes32"},{"indexed":true,"name":"bar","type":"bytes32"},{"indexed":false,"name":"wad","type":"uint256"},{"indexed":false,"name":"fax","type":"bytes"}],"name":"LogNote","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"authority","type":"address"}],"name":"LogSetAuthority","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"}],"name":"LogSetOwner","type":"event"}]]`
// TODO: replace with updated ABI when contract is deployed (with no pit file stability fee method + modified Frob event)
KovanPitABI = `[{"constant":true,"inputs":[],"name":"vat","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x36569e77"},{"constant":true,"inputs":[],"name":"live","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x957aa58c"},{"constant":true,"inputs":[],"name":"drip","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x9f678cca"},{"constant":true,"inputs":[],"name":"Line","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xbabe8a3f"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"wards","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xbf353dbb"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"ilks","outputs":[{"name":"spot","type":"uint256"},{"name":"line","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xd9638d36"},{"inputs":[{"name":"vat_","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor","signature":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"ilk","type":"bytes32"},{"indexed":true,"name":"urn","type":"bytes32"},{"indexed":false,"name":"ink","type":"uint256"},{"indexed":false,"name":"art","type":"uint256"},{"indexed":false,"name":"dink","type":"int256"},{"indexed":false,"name":"dart","type":"int256"},{"indexed":false,"name":"iArt","type":"uint256"}],"name":"Frob","type":"event","signature":"0xb2afa28318bcc689926b52835d844de174ef8de97e982a85c0199d584920791b"},{"anonymous":true,"inputs":[{"indexed":true,"name":"sig","type":"bytes4"},{"indexed":true,"name":"guy","type":"address"},{"indexed":true,"name":"foo","type":"bytes32"},{"indexed":true,"name":"bar","type":"bytes32"},{"indexed":false,"name":"wad","type":"uint256"},{"indexed":false,"name":"fax","type":"bytes"}],"name":"LogNote","type":"event","signature":"0x644843f351d3fba4abcd60109eaff9f54bac8fb8ccf0bab941009c21df21cf31"},{"constant":false,"inputs":[{"name":"guy","type":"address"}],"name":"rely","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x65fae35e"},{"constant":false,"inputs":[{"name":"guy","type":"address"}],"name":"deny","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x9c52a7f1"},{"constant":false,"inputs":[{"name":"ilk","type":"bytes32"},{"name":"what","type":"bytes32"},{"name":"data","type":"uint256"}],"name":"file","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x1a0b287e"},{"constant":false,"inputs":[{"name":"what","type":"bytes32"},{"name":"data","type":"uint256"}],"name":"file","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x29ae8114"},{"constant":false,"inputs":[{"name":"what","type":"bytes32"},{"name":"data","type":"address"}],"name":"file","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0xd4e8be83"},{"constant":false,"inputs":[{"name":"ilk","type":"bytes32"},{"name":"dink","type":"int256"},{"name":"dart","type":"int256"}],"name":"frob","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x5a984ded"}]`
KovanVatABI = `[{"constant":true,"inputs":[],"name":"debt","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x0dca59c1"},{"constant":true,"inputs":[{"name":"","type":"bytes32"},{"name":"","type":"bytes32"}],"name":"urns","outputs":[{"name":"ink","type":"uint256"},{"name":"art","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x26e27482"},{"constant":true,"inputs":[],"name":"vice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0x2d61a355"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"sin","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xa60f1d3e"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"wards","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xbf353dbb"},{"constant":true,"inputs":[{"name":"","type":"bytes32"},{"name":"","type":"bytes32"}],"name":"gem","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xc0912683"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"ilks","outputs":[{"name":"take","type":"uint256"},{"name":"rate","type":"uint256"},{"name":"Ink","type":"uint256"},{"name":"Art","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xd9638d36"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"dai","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function","signature":"0xf53e4e69"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor","signature":"constructor"},{"anonymous":true,"inputs":[{"indexed":true,"name":"sig","type":"bytes4"},{"indexed":true,"name":"foo","type":"bytes32"},{"indexed":true,"name":"bar","type":"bytes32"},{"indexed":true,"name":"too","type":"bytes32"},{"indexed":false,"name":"fax","type":"bytes"}],"name":"Note","type":"event","signature":"0x8c2dbbc2b33ffaa77c104b777e574a8a4ff79829dfee8b66f4dc63e3f8067152"},{"constant":false,"inputs":[{"name":"guy","type":"address"}],"name":"rely","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x65fae35e"},{"constant":false,"inputs":[{"name":"guy","type":"address"}],"name":"deny","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x9c52a7f1"},{"constant":false,"inputs":[{"name":"ilk","type":"bytes32"}],"name":"init","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x3b663195"},{"constant":false,"inputs":[{"name":"ilk","type":"bytes32"},{"name":"guy","type":"bytes32"},{"name":"rad","type":"int256"}],"name":"slip","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x42066cbb"},{"constant":false,"inputs":[{"name":"ilk","type":"bytes32"},{"name":"src","type":"bytes32"},{"name":"dst","type":"bytes32"},{"name":"rad","type":"int256"}],"name":"flux","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0xa6e41821"},{"constant":false,"inputs":[{"name":"src","type":"bytes32"},{"name":"dst","type":"bytes32"},{"name":"rad","type":"int256"}],"name":"move","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x78f19470"},{"constant":false,"inputs":[{"name":"i","type":"bytes32"},{"name":"u","type":"bytes32"},{"name":"v","type":"bytes32"},{"name":"w","type":"bytes32"},{"name":"dink","type":"int256"},{"name":"dart","type":"int256"}],"name":"tune","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x5dd6471a"},{"constant":false,"inputs":[{"name":"i","type":"bytes32"},{"name":"u","type":"bytes32"},{"name":"v","type":"bytes32"},{"name":"w","type":"bytes32"},{"name":"dink","type":"int256"},{"name":"dart","type":"int256"}],"name":"grab","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x3690ae4c"},{"constant":false,"inputs":[{"name":"u","type":"bytes32"},{"name":"v","type":"bytes32"},{"name":"rad","type":"int256"}],"name":"heal","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x990a5f63"},{"constant":false,"inputs":[{"name":"i","type":"bytes32"},{"name":"u","type":"bytes32"},{"name":"rate","type":"int256"}],"name":"fold","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0xe6a6a64d"},{"constant":false,"inputs":[{"name":"i","type":"bytes32"},{"name":"u","type":"bytes32"},{"name":"take","type":"int256"}],"name":"toll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","signature":"0x09b7a0b5"}]`
KovanVowABI = `[{"constant":true,"inputs":[],"name":"Awe","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"Joy","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"flap","outputs":[{"name":"id","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"hump","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"wad","type":"uint256"}],"name":"kiss","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"what","type":"bytes32"},{"name":"data","type":"uint256"}],"name":"file","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"Ash","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"era","type":"uint48"}],"name":"flog","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"vat","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"Woe","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"wait","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"guy","type":"address"}],"name":"rely","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"bump","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"tab","type":"uint256"}],"name":"fess","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"row","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint48"}],"name":"sin","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"guy","type":"address"}],"name":"deny","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"flop","outputs":[{"name":"id","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"wards","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"sump","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"Sin","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"what","type":"bytes32"},{"name":"addr","type":"address"}],"name":"file","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"cow","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"wad","type":"uint256"}],"name":"heal","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":true,"inputs":[{"indexed":true,"name":"sig","type":"bytes4"},{"indexed":true,"name":"guy","type":"address"},{"indexed":true,"name":"foo","type":"bytes32"},{"indexed":true,"name":"bar","type":"bytes32"},{"indexed":false,"name":"wad","type":"uint256"},{"indexed":false,"name":"fax","type":"bytes"}],"name":"LogNote","type":"event"}]`
)

View File

@ -0,0 +1,15 @@
package test_data
const (
KovanCatContractAddress = "0x2f34f22a00ee4b7a8f8bbc4eaee1658774c624e0"
KovanDripContractAddress = "0x891c04639a5edcae088e546fa125b5d7fb6a2b9d"
KovanFlapperContractAddress = "0x8868BAd8e74FcA4505676D1B5B21EcC23328d132"
KovanFlipperContractAddress = "0x32D496Ad866D110060866B7125981C73642cc509"
KovanFlopperContractAddress = "0x6191C9b0086c2eBF92300cC507009b53996FbFFa"
KovanPepContractAddress = "0xB1997239Cfc3d15578A3a09730f7f84A90BB4975"
KovanPipContractAddress = "0x9FfFE440258B79c5d6604001674A4722FfC0f7Bc"
KovanPitContractAddress = "0xe7cf3198787c9a4daac73371a38f29aaeeced87e"
KovanRepContractAddress = "0xf88bBDc1E2718F8857F30A180076ec38d53cf296"
KovanVatContractAddress = "0xcd726790550afcd77e9a7a47e86a3f9010af126b"
KovanVowContractAddress = "0x3728e9777B2a0a611ee0F89e00E01044ce4736d1"
)

View File

@ -21,11 +21,10 @@ import (
"github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types"
"github.com/vulcanize/vulcanizedb/pkg/fakes" "github.com/vulcanize/vulcanizedb/pkg/fakes"
"github.com/vulcanize/vulcanizedb/pkg/transformers/bite" "github.com/vulcanize/vulcanizedb/pkg/transformers/bite"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"math/big" "math/big"
) )
var ( const (
TemporaryBiteBlockNumber = int64(26) TemporaryBiteBlockNumber = int64(26)
TemporaryBiteData = "0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000005" TemporaryBiteData = "0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000005"
TemporaryBiteTransaction = "0x5c698f13940a2153440c6d19660878bc90219d9298fdcf37365aa8d88d40fc42" TemporaryBiteTransaction = "0x5c698f13940a2153440c6d19660878bc90219d9298fdcf37365aa8d88d40fc42"
@ -45,7 +44,7 @@ var (
) )
var EthBiteLog = types.Log{ var EthBiteLog = types.Log{
Address: common.HexToAddress(constants.CatContractAddress), Address: common.HexToAddress("0x2f34f22a00ee4b7a8f8bbc4eaee1658774c624e0"),
Topics: []common.Hash{ Topics: []common.Hash{
common.HexToHash("0x99b5620489b6ef926d4518936cfec15d305452712b88bd59da2d9c10fb0953e8"), common.HexToHash("0x99b5620489b6ef926d4518936cfec15d305452712b88bd59da2d9c10fb0953e8"),
common.HexToHash("0x4554480000000000000000000000000000000000000000000000000000000000"), common.HexToHash("0x4554480000000000000000000000000000000000000000000000000000000000"),

View File

@ -23,11 +23,10 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/transformers/cat_file/chop_lump" "github.com/vulcanize/vulcanizedb/pkg/transformers/cat_file/chop_lump"
"github.com/vulcanize/vulcanizedb/pkg/transformers/cat_file/flip" "github.com/vulcanize/vulcanizedb/pkg/transformers/cat_file/flip"
"github.com/vulcanize/vulcanizedb/pkg/transformers/cat_file/pit_vow" "github.com/vulcanize/vulcanizedb/pkg/transformers/cat_file/pit_vow"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
) )
var EthCatFileChopLog = types.Log{ var EthCatFileChopLog = types.Log{
Address: common.HexToAddress(constants.CatContractAddress), Address: common.HexToAddress(KovanCatContractAddress),
Topics: []common.Hash{ Topics: []common.Hash{
common.HexToHash("0x1a0b287e00000000000000000000000000000000000000000000000000000000"), common.HexToHash("0x1a0b287e00000000000000000000000000000000000000000000000000000000"),
common.HexToHash("0x00000000000000000000000064d922894153be9eef7b7218dc565d1d0ce2a092"), common.HexToHash("0x00000000000000000000000064d922894153be9eef7b7218dc565d1d0ce2a092"),
@ -53,7 +52,7 @@ var CatFileChopModel = chop_lump.CatFileChopLumpModel{
} }
var EthCatFileLumpLog = types.Log{ var EthCatFileLumpLog = types.Log{
Address: common.HexToAddress(constants.CatContractAddress), Address: common.HexToAddress(KovanCatContractAddress),
Topics: []common.Hash{ Topics: []common.Hash{
common.HexToHash("0x1a0b287e00000000000000000000000000000000000000000000000000000000"), common.HexToHash("0x1a0b287e00000000000000000000000000000000000000000000000000000000"),
common.HexToHash("0x00000000000000000000000064d922894153be9eef7b7218dc565d1d0ce2a092"), common.HexToHash("0x00000000000000000000000064d922894153be9eef7b7218dc565d1d0ce2a092"),
@ -79,7 +78,7 @@ var CatFileLumpModel = chop_lump.CatFileChopLumpModel{
} }
var EthCatFileFlipLog = types.Log{ var EthCatFileFlipLog = types.Log{
Address: common.HexToAddress(constants.CatContractAddress), Address: common.HexToAddress(KovanCatContractAddress),
Topics: []common.Hash{ Topics: []common.Hash{
common.HexToHash("0xebecb39d00000000000000000000000000000000000000000000000000000000"), common.HexToHash("0xebecb39d00000000000000000000000000000000000000000000000000000000"),
common.HexToHash("0x00000000000000000000000064d922894153be9eef7b7218dc565d1d0ce2a092"), common.HexToHash("0x00000000000000000000000064d922894153be9eef7b7218dc565d1d0ce2a092"),
@ -106,7 +105,7 @@ var CatFileFlipModel = flip.CatFileFlipModel{
} }
var EthCatFilePitVowLog = types.Log{ var EthCatFilePitVowLog = types.Log{
Address: common.HexToAddress(constants.CatContractAddress), Address: common.HexToAddress(KovanCatContractAddress),
Topics: []common.Hash{ Topics: []common.Hash{
common.HexToHash("0xd4e8be8300000000000000000000000000000000000000000000000000000000"), common.HexToHash("0xd4e8be8300000000000000000000000000000000000000000000000000000000"),
common.HexToHash("0x00000000000000000000000064d922894153be9eef7b7218dc565d1d0ce2a092"), common.HexToHash("0x00000000000000000000000064d922894153be9eef7b7218dc565d1d0ce2a092"),

View File

@ -21,11 +21,10 @@ import (
"github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types"
"github.com/vulcanize/vulcanizedb/pkg/fakes" "github.com/vulcanize/vulcanizedb/pkg/fakes"
"github.com/vulcanize/vulcanizedb/pkg/transformers/deal" "github.com/vulcanize/vulcanizedb/pkg/transformers/deal"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
) )
var DealLogNote = types.Log{ var DealLogNote = types.Log{
Address: common.HexToAddress(constants.FlipperContractAddress), Address: common.HexToAddress(KovanFlipperContractAddress),
Topics: []common.Hash{ Topics: []common.Hash{
common.HexToHash("0xc959c42b00000000000000000000000000000000000000000000000000000000"), common.HexToHash("0xc959c42b00000000000000000000000000000000000000000000000000000000"),
common.HexToHash("0x00000000000000000000000064d922894153be9eef7b7218dc565d1d0ce2a092"), common.HexToHash("0x00000000000000000000000064d922894153be9eef7b7218dc565d1d0ce2a092"),
@ -44,7 +43,7 @@ var dealRawJson, _ = json.Marshal(DealLogNote)
var DealModel = deal.DealModel{ var DealModel = deal.DealModel{
BidId: "123", BidId: "123",
ContractAddress: constants.FlipperContractAddress, ContractAddress: KovanFlipperContractAddress,
LogIndex: DealLogNote.Index, LogIndex: DealLogNote.Index,
TransactionIndex: DealLogNote.TxIndex, TransactionIndex: DealLogNote.TxIndex,
Raw: dealRawJson, Raw: dealRawJson,

View File

@ -21,7 +21,6 @@ import (
"github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types"
"github.com/vulcanize/vulcanizedb/pkg/fakes" "github.com/vulcanize/vulcanizedb/pkg/fakes"
"github.com/vulcanize/vulcanizedb/pkg/transformers/dent" "github.com/vulcanize/vulcanizedb/pkg/transformers/dent"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"strconv" "strconv"
) )
@ -36,7 +35,7 @@ var (
) )
var DentLog = types.Log{ var DentLog = types.Log{
Address: common.HexToAddress(constants.FlipperContractAddress), Address: common.HexToAddress(KovanFlipperContractAddress),
Topics: []common.Hash{ Topics: []common.Hash{
common.HexToHash("0x5ff3a38200000000000000000000000000000000000000000000000000000000"), common.HexToHash("0x5ff3a38200000000000000000000000000000000000000000000000000000000"),
common.HexToHash("0x00000000000000000000000064d922894153be9eef7b7218dc565d1d0ce2a092"), common.HexToHash("0x00000000000000000000000064d922894153be9eef7b7218dc565d1d0ce2a092"),

View File

@ -21,11 +21,10 @@ import (
"github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types"
"github.com/vulcanize/vulcanizedb/pkg/fakes" "github.com/vulcanize/vulcanizedb/pkg/fakes"
"github.com/vulcanize/vulcanizedb/pkg/transformers/drip_drip" "github.com/vulcanize/vulcanizedb/pkg/transformers/drip_drip"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
) )
var EthDripDripLog = types.Log{ var EthDripDripLog = types.Log{
Address: common.HexToAddress(constants.DripContractAddress), Address: common.HexToAddress(KovanDripContractAddress),
Topics: []common.Hash{ Topics: []common.Hash{
common.HexToHash("0x44e2a5a800000000000000000000000000000000000000000000000000000000"), common.HexToHash("0x44e2a5a800000000000000000000000000000000000000000000000000000000"),
common.HexToHash("0x00000000000000000000000064d922894153be9eef7b7218dc565d1d0ce2a092"), common.HexToHash("0x00000000000000000000000064d922894153be9eef7b7218dc565d1d0ce2a092"),

View File

@ -23,12 +23,11 @@ import (
ilk2 "github.com/vulcanize/vulcanizedb/pkg/transformers/drip_file/ilk" ilk2 "github.com/vulcanize/vulcanizedb/pkg/transformers/drip_file/ilk"
"github.com/vulcanize/vulcanizedb/pkg/transformers/drip_file/repo" "github.com/vulcanize/vulcanizedb/pkg/transformers/drip_file/repo"
"github.com/vulcanize/vulcanizedb/pkg/transformers/drip_file/vow" "github.com/vulcanize/vulcanizedb/pkg/transformers/drip_file/vow"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"math/big" "math/big"
) )
var EthDripFileIlkLog = types.Log{ var EthDripFileIlkLog = types.Log{
Address: common.HexToAddress(constants.DripContractAddress), Address: common.HexToAddress(KovanDripContractAddress),
Topics: []common.Hash{ Topics: []common.Hash{
common.HexToHash("0x1a0b287e00000000000000000000000000000000000000000000000000000000"), common.HexToHash("0x1a0b287e00000000000000000000000000000000000000000000000000000000"),
common.HexToHash("0x00000000000000000000000064d922894153be9eef7b7218dc565d1d0ce2a092"), common.HexToHash("0x00000000000000000000000064d922894153be9eef7b7218dc565d1d0ce2a092"),
@ -55,7 +54,7 @@ var DripFileIlkModel = ilk2.DripFileIlkModel{
} }
var EthDripFileRepoLog = types.Log{ var EthDripFileRepoLog = types.Log{
Address: common.HexToAddress(constants.DripContractAddress), Address: common.HexToAddress(KovanDripContractAddress),
Topics: []common.Hash{ Topics: []common.Hash{
common.HexToHash("0x29ae811400000000000000000000000000000000000000000000000000000000"), common.HexToHash("0x29ae811400000000000000000000000000000000000000000000000000000000"),
common.HexToHash("0x00000000000000000000000064d922894153be9eef7b7218dc565d1d0ce2a092"), common.HexToHash("0x00000000000000000000000064d922894153be9eef7b7218dc565d1d0ce2a092"),
@ -81,7 +80,7 @@ var DripFileRepoModel = repo.DripFileRepoModel{
} }
var EthDripFileVowLog = types.Log{ var EthDripFileVowLog = types.Log{
Address: common.HexToAddress(constants.DripContractAddress), Address: common.HexToAddress(KovanDripContractAddress),
Topics: []common.Hash{ Topics: []common.Hash{
common.HexToHash("0xe9b674b900000000000000000000000000000000000000000000000000000000"), common.HexToHash("0xe9b674b900000000000000000000000000000000000000000000000000000000"),
common.HexToHash("0x00000000000000000000000064d922894153be9eef7b7218dc565d1d0ce2a092"), common.HexToHash("0x00000000000000000000000064d922894153be9eef7b7218dc565d1d0ce2a092"),

View File

@ -7,13 +7,12 @@ import (
"github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types"
"github.com/vulcanize/vulcanizedb/pkg/fakes" "github.com/vulcanize/vulcanizedb/pkg/fakes"
"github.com/vulcanize/vulcanizedb/pkg/transformers/flap_kick" "github.com/vulcanize/vulcanizedb/pkg/transformers/flap_kick"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"math/big" "math/big"
"time" "time"
) )
var EthFlapKickLog = types.Log{ var EthFlapKickLog = types.Log{
Address: common.HexToAddress(constants.FlapperContractAddress), Address: common.HexToAddress(KovanFlapperContractAddress),
Topics: []common.Hash{ Topics: []common.Hash{
common.HexToHash("0xefa52d9342a199cb30efd2692463f2c2bef63cd7186b50382d4fb94ad207880e"), common.HexToHash("0xefa52d9342a199cb30efd2692463f2c2bef63cd7186b50382d4fb94ad207880e"),
common.HexToHash("0x00000000000000000000000000000000000000000000000000000000069f6bc7"), common.HexToHash("0x00000000000000000000000000000000000000000000000000000000069f6bc7"),

View File

@ -25,7 +25,6 @@ import (
"github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types"
"github.com/vulcanize/vulcanizedb/pkg/transformers/flip_kick" "github.com/vulcanize/vulcanizedb/pkg/transformers/flip_kick"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
) )
var ( var (
@ -51,9 +50,9 @@ var (
) )
var EthFlipKickLog = types.Log{ var EthFlipKickLog = types.Log{
Address: common.HexToAddress(constants.FlipperContractAddress), Address: common.HexToAddress(KovanFlipperContractAddress),
Topics: []common.Hash{ Topics: []common.Hash{
common.HexToHash(constants.FlipKickSignature), common.HexToHash("0xbac86238bdba81d21995024470425ecb370078fa62b7271b90cf28cbd1e3e87e"),
common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000001"), common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000001"),
common.HexToHash("0x7340e006f4135ba6970d43bf43d88dcad4e7a8ca000000000000000000000000"), common.HexToHash("0x7340e006f4135ba6970d43bf43d88dcad4e7a8ca000000000000000000000000"),
}, },

View File

@ -21,7 +21,6 @@ import (
"github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types"
"github.com/vulcanize/vulcanizedb/pkg/fakes" "github.com/vulcanize/vulcanizedb/pkg/fakes"
"github.com/vulcanize/vulcanizedb/pkg/transformers/flop_kick" "github.com/vulcanize/vulcanizedb/pkg/transformers/flop_kick"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"math/big" "math/big"
"strconv" "strconv"
"time" "time"
@ -29,7 +28,7 @@ import (
var ( var (
FlopKickLog = types.Log{ FlopKickLog = types.Log{
Address: common.HexToAddress(constants.FlopperContractAddress), Address: common.HexToAddress(KovanFlopperContractAddress),
Topics: []common.Hash{ Topics: []common.Hash{
common.HexToHash("0xefa52d9342a199cb30efd2692463f2c2bef63cd7186b50382d4fb94ad207880e"), common.HexToHash("0xefa52d9342a199cb30efd2692463f2c2bef63cd7186b50382d4fb94ad207880e"),
common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000005"), common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000005"),

View File

@ -21,7 +21,6 @@ import (
"github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types"
"github.com/vulcanize/vulcanizedb/pkg/fakes" "github.com/vulcanize/vulcanizedb/pkg/fakes"
"github.com/vulcanize/vulcanizedb/pkg/transformers/frob" "github.com/vulcanize/vulcanizedb/pkg/transformers/frob"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"math/big" "math/big"
) )
@ -45,7 +44,7 @@ var (
) )
var EthFrobLog = types.Log{ var EthFrobLog = types.Log{
Address: common.HexToAddress(constants.PitContractAddress), Address: common.HexToAddress(KovanPitContractAddress),
Topics: []common.Hash{ Topics: []common.Hash{
common.HexToHash("0xb2afa28318bcc689926b52835d844de174ef8de97e982a85c0199d584920791b"), common.HexToHash("0xb2afa28318bcc689926b52835d844de174ef8de97e982a85c0199d584920791b"),
common.HexToHash("0x66616b6520696c6b000000000000000000000000000000000000000000000000"), common.HexToHash("0x66616b6520696c6b000000000000000000000000000000000000000000000000"),

View File

@ -26,11 +26,10 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/transformers/pit_file/debt_ceiling" "github.com/vulcanize/vulcanizedb/pkg/transformers/pit_file/debt_ceiling"
ilk2 "github.com/vulcanize/vulcanizedb/pkg/transformers/pit_file/ilk" ilk2 "github.com/vulcanize/vulcanizedb/pkg/transformers/pit_file/ilk"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
) )
var EthPitFileDebtCeilingLog = types.Log{ var EthPitFileDebtCeilingLog = types.Log{
Address: common.HexToAddress(constants.PitContractAddress), Address: common.HexToAddress(KovanPitContractAddress),
Topics: []common.Hash{ Topics: []common.Hash{
common.HexToHash("0x29ae811400000000000000000000000000000000000000000000000000000000"), common.HexToHash("0x29ae811400000000000000000000000000000000000000000000000000000000"),
common.HexToHash("0x00000000000000000000000064d922894153be9eef7b7218dc565d1d0ce2a092"), common.HexToHash("0x00000000000000000000000064d922894153be9eef7b7218dc565d1d0ce2a092"),
@ -56,7 +55,7 @@ var PitFileDebtCeilingModel = debt_ceiling.PitFileDebtCeilingModel{
} }
var EthPitFileIlkLineLog = types.Log{ var EthPitFileIlkLineLog = types.Log{
Address: common.HexToAddress(constants.PitContractAddress), Address: common.HexToAddress(KovanPitContractAddress),
Topics: []common.Hash{ Topics: []common.Hash{
common.HexToHash("0x1a0b287e00000000000000000000000000000000000000000000000000000000"), common.HexToHash("0x1a0b287e00000000000000000000000000000000000000000000000000000000"),
common.HexToHash("0x00000000000000000000000064d922894153be9eef7b7218dc565d1d0ce2a092"), common.HexToHash("0x00000000000000000000000064d922894153be9eef7b7218dc565d1d0ce2a092"),
@ -83,7 +82,7 @@ var PitFileIlkLineModel = ilk2.PitFileIlkModel{
} }
var EthPitFileIlkSpotLog = types.Log{ var EthPitFileIlkSpotLog = types.Log{
Address: common.HexToAddress(constants.PitContractAddress), Address: common.HexToAddress(KovanPitContractAddress),
Topics: []common.Hash{ Topics: []common.Hash{
common.HexToHash("0x1a0b287e00000000000000000000000000000000000000000000000000000000"), common.HexToHash("0x1a0b287e00000000000000000000000000000000000000000000000000000000"),
common.HexToHash("0x00000000000000000000000064d922894153be9eef7b7218dc565d1d0ce2a092"), common.HexToHash("0x00000000000000000000000064d922894153be9eef7b7218dc565d1d0ce2a092"),

View File

@ -20,7 +20,6 @@ import (
"github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types"
"github.com/vulcanize/vulcanizedb/pkg/fakes" "github.com/vulcanize/vulcanizedb/pkg/fakes"
"github.com/vulcanize/vulcanizedb/pkg/transformers/price_feeds" "github.com/vulcanize/vulcanizedb/pkg/transformers/price_feeds"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
) )
var ( var (
@ -32,7 +31,7 @@ var (
// https://etherscan.io/tx/0xa51a50a2adbfba4e2ab3d72dfd67a21c769f1bc8d2b180663a15500a56cde58f // https://etherscan.io/tx/0xa51a50a2adbfba4e2ab3d72dfd67a21c769f1bc8d2b180663a15500a56cde58f
var EthPriceFeedLog = types.Log{ var EthPriceFeedLog = types.Log{
Address: medianizerAddress, Address: medianizerAddress,
Topics: []common.Hash{common.HexToHash(constants.LogValueSignature)}, Topics: []common.Hash{common.HexToHash("0x296ba4ca62c6c21c95e828080cb8aec7481b71390585605300a8a76f9e95b527")},
Data: common.FromHex("00000000000000000000000000000000000000000000001486f658319fb0c100"), Data: common.FromHex("00000000000000000000000000000000000000000000001486f658319fb0c100"),
BlockNumber: blockNumber, BlockNumber: blockNumber,
TxHash: common.HexToHash("0xa51a50a2adbfba4e2ab3d72dfd67a21c769f1bc8d2b180663a15500a56cde58f"), TxHash: common.HexToHash("0xa51a50a2adbfba4e2ab3d72dfd67a21c769f1bc8d2b180663a15500a56cde58f"),

View File

@ -0,0 +1,32 @@
package test_data
const (
KovanVatSlipSignature = "0x42066cbb00000000000000000000000000000000000000000000000000000000"
KovanVatTuneSignature = "0x5dd6471a00000000000000000000000000000000000000000000000000000000"
KovanBiteSignature = "0x99b5620489b6ef926d4518936cfec15d305452712b88bd59da2d9c10fb0953e8"
KovanCatFileFlipSignature = "0xebecb39d00000000000000000000000000000000000000000000000000000000"
KovanDripFileRepoSignature = "0x29ae811400000000000000000000000000000000000000000000000000000000"
KovanPitFileDebtCeilingSignature = "0x29ae811400000000000000000000000000000000000000000000000000000000"
KovanDentFunctionSignature = "0x5ff3a38200000000000000000000000000000000000000000000000000000000"
KovanFlopKickSignature = "0xefa52d9342a199cb30efd2692463f2c2bef63cd7186b50382d4fb94ad207880e"
KovanTendFunctionSignature = "0x4b43ed1200000000000000000000000000000000000000000000000000000000"
KovanVatGrabSignature = "0x3690ae4c00000000000000000000000000000000000000000000000000000000"
KovanPitFileIlkSignature = "0x1a0b287e00000000000000000000000000000000000000000000000000000000"
KovanVatFluxSignature = "0xa6e4182100000000000000000000000000000000000000000000000000000000"
KovanVatMoveSignature = "0x78f1947000000000000000000000000000000000000000000000000000000000"
KovanDripFileIlkSignature = "0x1a0b287e00000000000000000000000000000000000000000000000000000000"
KovanFlapKickSignature = "0xefa52d9342a199cb30efd2692463f2c2bef63cd7186b50382d4fb94ad207880e"
KovanDealSignature = "0xc959c42b00000000000000000000000000000000000000000000000000000000"
KovanVatFoldSignature = "0xe6a6a64d00000000000000000000000000000000000000000000000000000000"
KovanVatHealSignature = "0x990a5f6300000000000000000000000000000000000000000000000000000000"
KovanCatFileChopLumpSignature = "0x1a0b287e00000000000000000000000000000000000000000000000000000000"
KovanFlipKickSignature = "0xbac86238bdba81d21995024470425ecb370078fa62b7271b90cf28cbd1e3e87e"
KovanVatInitSignature = "0x3b66319500000000000000000000000000000000000000000000000000000000"
KovanCatFilePitVowSignature = "0xd4e8be8300000000000000000000000000000000000000000000000000000000"
KovanDripDripSignature = "0x44e2a5a800000000000000000000000000000000000000000000000000000000"
KovanDripFileVowSignature = "0xe9b674b900000000000000000000000000000000000000000000000000000000"
KovanFrobSignature = "0xb2afa28318bcc689926b52835d844de174ef8de97e982a85c0199d584920791b"
KovanLogValueSignature = "0x296ba4ca62c6c21c95e828080cb8aec7481b71390585605300a8a76f9e95b527"
KovanVatTollSignature = "0x09b7a0b500000000000000000000000000000000000000000000000000000000"
KovanVowFlogSignature = "0x35aee16f00000000000000000000000000000000000000000000000000000000"
)

View File

@ -23,7 +23,6 @@ import (
"github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types"
"github.com/vulcanize/vulcanizedb/pkg/fakes" "github.com/vulcanize/vulcanizedb/pkg/fakes"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/pkg/transformers/tend" "github.com/vulcanize/vulcanizedb/pkg/transformers/tend"
) )
@ -38,7 +37,7 @@ var (
) )
var TendLogNote = types.Log{ var TendLogNote = types.Log{
Address: common.HexToAddress(constants.FlipperContractAddress), Address: common.HexToAddress(KovanFlipperContractAddress),
Topics: []common.Hash{ Topics: []common.Hash{
common.HexToHash("0x4b43ed1200000000000000000000000000000000000000000000000000000000"), //abbreviated tend function signature common.HexToHash("0x4b43ed1200000000000000000000000000000000000000000000000000000000"), //abbreviated tend function signature
common.HexToHash("0x0000000000000000000000007d7bee5fcfd8028cf7b00876c5b1421c800561a6"), //msg caller address common.HexToHash("0x0000000000000000000000007d7bee5fcfd8028cf7b00876c5b1421c800561a6"), //msg caller address

View File

@ -22,12 +22,11 @@ import (
"github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types"
"github.com/vulcanize/vulcanizedb/pkg/fakes" "github.com/vulcanize/vulcanizedb/pkg/fakes"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/pkg/transformers/vat_flux" "github.com/vulcanize/vulcanizedb/pkg/transformers/vat_flux"
) )
var VatFluxLog = types.Log{ var VatFluxLog = types.Log{
Address: common.HexToAddress(constants.VatContractAddress), Address: common.HexToAddress(KovanVatContractAddress),
Topics: []common.Hash{ Topics: []common.Hash{
common.HexToHash("0xa6e4182100000000000000000000000000000000000000000000000000000000"), common.HexToHash("0xa6e4182100000000000000000000000000000000000000000000000000000000"),
common.HexToHash("0x5245500000000000000000000000000000000000000000000000000000000000"), common.HexToHash("0x5245500000000000000000000000000000000000000000000000000000000000"),

View File

@ -22,12 +22,11 @@ import (
"github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types"
"github.com/vulcanize/vulcanizedb/pkg/fakes" "github.com/vulcanize/vulcanizedb/pkg/fakes"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/pkg/transformers/vat_fold" "github.com/vulcanize/vulcanizedb/pkg/transformers/vat_fold"
) )
var EthVatFoldLog = types.Log{ var EthVatFoldLog = types.Log{
Address: common.HexToAddress(constants.VatContractAddress), Address: common.HexToAddress(KovanVatContractAddress),
Topics: []common.Hash{ Topics: []common.Hash{
common.HexToHash("0xe6a6a64d00000000000000000000000000000000000000000000000000000000"), common.HexToHash("0xe6a6a64d00000000000000000000000000000000000000000000000000000000"),
common.HexToHash("0x5245500000000000000000000000000000000000000000000000000000000000"), common.HexToHash("0x5245500000000000000000000000000000000000000000000000000000000000"),

View File

@ -6,12 +6,11 @@ import (
"github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types"
"github.com/vulcanize/vulcanizedb/pkg/fakes" "github.com/vulcanize/vulcanizedb/pkg/fakes"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/pkg/transformers/vat_grab" "github.com/vulcanize/vulcanizedb/pkg/transformers/vat_grab"
) )
var EthVatGrabLog = types.Log{ var EthVatGrabLog = types.Log{
Address: common.HexToAddress(constants.VatContractAddress), Address: common.HexToAddress(KovanVatContractAddress),
Topics: []common.Hash{ Topics: []common.Hash{
common.HexToHash("0x3690ae4c00000000000000000000000000000000000000000000000000000000"), common.HexToHash("0x3690ae4c00000000000000000000000000000000000000000000000000000000"),
common.HexToHash("0x5245500000000000000000000000000000000000000000000000000000000000"), common.HexToHash("0x5245500000000000000000000000000000000000000000000000000000000000"),

View File

@ -20,12 +20,11 @@ import (
"github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types"
"github.com/vulcanize/vulcanizedb/pkg/fakes" "github.com/vulcanize/vulcanizedb/pkg/fakes"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/pkg/transformers/vat_heal" "github.com/vulcanize/vulcanizedb/pkg/transformers/vat_heal"
) )
var VatHealLog = types.Log{ var VatHealLog = types.Log{
Address: common.HexToAddress(constants.VatContractAddress), Address: common.HexToAddress(KovanVatContractAddress),
Topics: []common.Hash{ Topics: []common.Hash{
common.HexToHash("0x990a5f6300000000000000000000000000000000000000000000000000000000"), common.HexToHash("0x990a5f6300000000000000000000000000000000000000000000000000000000"),
common.HexToHash("0x0000000000000000000000007d7bee5fcfd8028cf7b00876c5b1421c800561a6"), common.HexToHash("0x0000000000000000000000007d7bee5fcfd8028cf7b00876c5b1421c800561a6"),

View File

@ -22,12 +22,11 @@ import (
"github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types"
"github.com/vulcanize/vulcanizedb/pkg/fakes" "github.com/vulcanize/vulcanizedb/pkg/fakes"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/pkg/transformers/vat_init" "github.com/vulcanize/vulcanizedb/pkg/transformers/vat_init"
) )
var EthVatInitLog = types.Log{ var EthVatInitLog = types.Log{
Address: common.HexToAddress(constants.VatContractAddress), Address: common.HexToAddress(KovanVatContractAddress),
Topics: []common.Hash{ Topics: []common.Hash{
common.HexToHash("0x3b66319500000000000000000000000000000000000000000000000000000000"), common.HexToHash("0x3b66319500000000000000000000000000000000000000000000000000000000"),
common.HexToHash("0x66616b6520696c6b000000000000000000000000000000000000000000000000"), common.HexToHash("0x66616b6520696c6b000000000000000000000000000000000000000000000000"),

View File

@ -22,12 +22,11 @@ import (
"github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types"
"github.com/vulcanize/vulcanizedb/pkg/fakes" "github.com/vulcanize/vulcanizedb/pkg/fakes"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/pkg/transformers/vat_move" "github.com/vulcanize/vulcanizedb/pkg/transformers/vat_move"
) )
var EthVatMoveLog = types.Log{ var EthVatMoveLog = types.Log{
Address: common.HexToAddress(constants.VatContractAddress), Address: common.HexToAddress(KovanVatContractAddress),
Topics: []common.Hash{ Topics: []common.Hash{
common.HexToHash("0x78f1947000000000000000000000000000000000000000000000000000000000"), common.HexToHash("0x78f1947000000000000000000000000000000000000000000000000000000000"),
common.HexToHash("0x000000000000000000000000a730d1ff8b6bc74a26d54c20a9dda539909bab0e"), common.HexToHash("0x000000000000000000000000a730d1ff8b6bc74a26d54c20a9dda539909bab0e"),

View File

@ -22,12 +22,11 @@ import (
"github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types"
"github.com/vulcanize/vulcanizedb/pkg/fakes" "github.com/vulcanize/vulcanizedb/pkg/fakes"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/pkg/transformers/vat_slip" "github.com/vulcanize/vulcanizedb/pkg/transformers/vat_slip"
) )
var EthVatSlipLog = types.Log{ var EthVatSlipLog = types.Log{
Address: common.HexToAddress(constants.VatContractAddress), Address: common.HexToAddress(KovanVatContractAddress),
Topics: []common.Hash{ Topics: []common.Hash{
common.HexToHash("0x42066cbb00000000000000000000000000000000000000000000000000000000"), common.HexToHash("0x42066cbb00000000000000000000000000000000000000000000000000000000"),
common.HexToHash("0x66616b6520696c6b000000000000000000000000000000000000000000000000"), common.HexToHash("0x66616b6520696c6b000000000000000000000000000000000000000000000000"),

View File

@ -6,13 +6,12 @@ import (
"github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types"
"github.com/vulcanize/vulcanizedb/pkg/fakes" "github.com/vulcanize/vulcanizedb/pkg/fakes"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/pkg/transformers/vat_toll" "github.com/vulcanize/vulcanizedb/pkg/transformers/vat_toll"
"math/big" "math/big"
) )
var EthVatTollLog = types.Log{ var EthVatTollLog = types.Log{
Address: common.HexToAddress(constants.VatContractAddress), Address: common.HexToAddress(KovanVatContractAddress),
Topics: []common.Hash{ Topics: []common.Hash{
common.HexToHash("0x09b7a0b500000000000000000000000000000000000000000000000000000000"), common.HexToHash("0x09b7a0b500000000000000000000000000000000000000000000000000000000"),
common.HexToHash("0x66616b6520696c6b000000000000000000000000000000000000000000000000"), common.HexToHash("0x66616b6520696c6b000000000000000000000000000000000000000000000000"),

View File

@ -9,12 +9,11 @@ import (
"github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types"
"github.com/vulcanize/vulcanizedb/pkg/fakes" "github.com/vulcanize/vulcanizedb/pkg/fakes"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/pkg/transformers/vat_tune" "github.com/vulcanize/vulcanizedb/pkg/transformers/vat_tune"
) )
var EthVatTuneLog = types.Log{ var EthVatTuneLog = types.Log{
Address: common.HexToAddress(constants.VatContractAddress), Address: common.HexToAddress(KovanVatContractAddress),
Topics: []common.Hash{ Topics: []common.Hash{
common.HexToHash("0x5dd6471a00000000000000000000000000000000000000000000000000000000"), common.HexToHash("0x5dd6471a00000000000000000000000000000000000000000000000000000000"),
common.HexToHash("0x4554480000000000000000000000000000000000000000000000000000000000"), common.HexToHash("0x4554480000000000000000000000000000000000000000000000000000000000"),

View File

@ -20,12 +20,11 @@ import (
"github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types"
"github.com/vulcanize/vulcanizedb/pkg/fakes" "github.com/vulcanize/vulcanizedb/pkg/fakes"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/pkg/transformers/vow_flog" "github.com/vulcanize/vulcanizedb/pkg/transformers/vow_flog"
) )
var EthVowFlogLog = types.Log{ var EthVowFlogLog = types.Log{
Address: common.HexToAddress(constants.VowContractAddress), Address: common.HexToAddress(KovanVowContractAddress),
Topics: []common.Hash{ Topics: []common.Hash{
common.HexToHash("0x35aee16f00000000000000000000000000000000000000000000000000000000"), common.HexToHash("0x35aee16f00000000000000000000000000000000000000000000000000000000"),
common.HexToHash("0x0000000000000000000000008e84a1e068d77059cbe263c43ad0cdc130863313"), common.HexToHash("0x0000000000000000000000008e84a1e068d77059cbe263c43ad0cdc130863313"),

View File

@ -48,221 +48,277 @@ import (
) )
// Custom event transformers // Custom event transformers
var ( func GetBiteTransformer() factories.Transformer {
BiteTransformer = factories.Transformer{ return factories.Transformer{
Config: bite.BiteConfig, Config: bite.GetBiteConfig(),
Converter: &bite.BiteConverter{}, Converter: &bite.BiteConverter{},
Repository: &bite.BiteRepository{}, Repository: &bite.BiteRepository{},
} }
}
FlapKickTransformer = factories.Transformer{ func GetFlapKickTransformer() factories.Transformer {
Config: flap_kick.FlapKickConfig, return factories.Transformer{
Config: flap_kick.GetFlapKickConfig(),
Converter: &flap_kick.FlapKickConverter{}, Converter: &flap_kick.FlapKickConverter{},
Repository: &flap_kick.FlapKickRepository{}, Repository: &flap_kick.FlapKickRepository{},
} }
}
FlipKickTransformer = factories.Transformer{ func GetFlipKickTransformer() factories.Transformer {
Config: flip_kick.FlipKickConfig, return factories.Transformer{
Config: flip_kick.GetFlipKickConfig(),
Converter: &flip_kick.FlipKickConverter{}, Converter: &flip_kick.FlipKickConverter{},
Repository: &flip_kick.FlipKickRepository{}, Repository: &flip_kick.FlipKickRepository{},
} }
}
FrobTransformer = factories.Transformer{ func GetFrobTransformer() factories.Transformer {
Config: frob.FrobConfig, return factories.Transformer{
Config: frob.GetFrobConfig(),
Converter: &frob.FrobConverter{}, Converter: &frob.FrobConverter{},
Repository: &frob.FrobRepository{}, Repository: &frob.FrobRepository{},
} }
}
FlopKickTransformer = factories.Transformer{ func GetFlopKickTransformer() factories.Transformer {
Config: flop_kick.Config, return factories.Transformer{
Config: flop_kick.GetFlopKickConfig(),
Converter: &flop_kick.FlopKickConverter{}, Converter: &flop_kick.FlopKickConverter{},
Repository: &flop_kick.FlopKickRepository{}, Repository: &flop_kick.FlopKickRepository{},
} }
}
customEventTransformers = []factories.Transformer{ func getCustomEventTransformers() []factories.Transformer {
BiteTransformer, return []factories.Transformer{
FlapKickTransformer, GetBiteTransformer(),
FlipKickTransformer, GetFlapKickTransformer(),
FrobTransformer, GetFlipKickTransformer(),
FlopKickTransformer, GetFrobTransformer(),
GetFlopKickTransformer(),
} }
) }
// LogNote transformers // LogNote transformers
var ( func GetCatFileChopLumpTransformer() factories.LogNoteTransformer {
CatFileChopLumpTransformer = factories.LogNoteTransformer{ return factories.LogNoteTransformer{
Config: chop_lump.CatFileChopLumpConfig, Config: chop_lump.GetCatFileChopLumpConfig(),
Converter: &chop_lump.CatFileChopLumpConverter{}, Converter: &chop_lump.CatFileChopLumpConverter{},
Repository: &chop_lump.CatFileChopLumpRepository{}, Repository: &chop_lump.CatFileChopLumpRepository{},
} }
}
CatFileFlipTransformer = factories.LogNoteTransformer{ func GetCatFileFlipTransformer() factories.LogNoteTransformer {
Config: flip.CatFileFlipConfig, return factories.LogNoteTransformer{
Config: flip.GetCatFileFlipConfig(),
Converter: &flip.CatFileFlipConverter{}, Converter: &flip.CatFileFlipConverter{},
Repository: &flip.CatFileFlipRepository{}, Repository: &flip.CatFileFlipRepository{},
} }
}
CatFilePitVowTransformer = factories.LogNoteTransformer{ func GetCatFilePitVowTransformer() factories.LogNoteTransformer {
Config: pit_vow.CatFilePitVowConfig, return factories.LogNoteTransformer{
Config: pit_vow.GetCatFilePitVowConfig(),
Converter: &pit_vow.CatFilePitVowConverter{}, Converter: &pit_vow.CatFilePitVowConverter{},
Repository: &pit_vow.CatFilePitVowRepository{}, Repository: &pit_vow.CatFilePitVowRepository{},
} }
}
DealTransformer = factories.LogNoteTransformer{ func GetDealTransformer() factories.LogNoteTransformer {
Config: deal.DealConfig, return factories.LogNoteTransformer{
Config: deal.GetDealConfig(),
Converter: &deal.DealConverter{}, Converter: &deal.DealConverter{},
Repository: &deal.DealRepository{}, Repository: &deal.DealRepository{},
} }
}
DentTransformer = factories.LogNoteTransformer{ func GetDentTransformer() factories.LogNoteTransformer {
Config: dent.DentConfig, return factories.LogNoteTransformer{
Config: dent.GetDentConfig(),
Converter: &dent.DentConverter{}, Converter: &dent.DentConverter{},
Repository: &dent.DentRepository{}, Repository: &dent.DentRepository{},
} }
}
DripDripTransformer = factories.LogNoteTransformer{ func GetDripDripTransformer() factories.LogNoteTransformer {
Config: drip_drip.DripDripConfig, return factories.LogNoteTransformer{
Config: drip_drip.GetDripDripConfig(),
Converter: &drip_drip.DripDripConverter{}, Converter: &drip_drip.DripDripConverter{},
Repository: &drip_drip.DripDripRepository{}, Repository: &drip_drip.DripDripRepository{},
} }
}
DripFileIlkTransformer = factories.LogNoteTransformer{ func GetDripFileIlkTransformer() factories.LogNoteTransformer {
Config: ilk2.DripFileIlkConfig, return factories.LogNoteTransformer{
Config: ilk2.GetDripFileIlkConfig(),
Converter: &ilk2.DripFileIlkConverter{}, Converter: &ilk2.DripFileIlkConverter{},
Repository: &ilk2.DripFileIlkRepository{}, Repository: &ilk2.DripFileIlkRepository{},
} }
}
DripFileRepoTransformer = factories.LogNoteTransformer{ func GetDripFileRepoTransformer() factories.LogNoteTransformer {
Config: repo.DripFileRepoConfig, return factories.LogNoteTransformer{
Config: repo.GetDripFileRepoConfig(),
Converter: &repo.DripFileRepoConverter{}, Converter: &repo.DripFileRepoConverter{},
Repository: &repo.DripFileRepoRepository{}, Repository: &repo.DripFileRepoRepository{},
} }
}
DripFileVowTransfromer = factories.LogNoteTransformer{ func GetDripFileVowTransformer() factories.LogNoteTransformer {
Config: vow.DripFileVowConfig, return factories.LogNoteTransformer{
Config: vow.GetDripFileVowConfig(),
Converter: &vow.DripFileVowConverter{}, Converter: &vow.DripFileVowConverter{},
Repository: &vow.DripFileVowRepository{}, Repository: &vow.DripFileVowRepository{},
} }
}
FlogTransformer = factories.LogNoteTransformer{ func GetFlogTransformer() factories.LogNoteTransformer {
Config: vow_flog.VowFlogConfig, return factories.LogNoteTransformer{
Config: vow_flog.GetVowFlogConfig(),
Converter: &vow_flog.VowFlogConverter{}, Converter: &vow_flog.VowFlogConverter{},
Repository: &vow_flog.VowFlogRepository{}, Repository: &vow_flog.VowFlogRepository{},
} }
}
PitFileDebtCeilingTransformer = factories.LogNoteTransformer{ func GetPitFileDebtCeilingTransformer() factories.LogNoteTransformer {
Config: debt_ceiling.DebtCeilingFileConfig, return factories.LogNoteTransformer{
Config: debt_ceiling.GetDebtCeilingFileConfig(),
Converter: &debt_ceiling.PitFileDebtCeilingConverter{}, Converter: &debt_ceiling.PitFileDebtCeilingConverter{},
Repository: &debt_ceiling.PitFileDebtCeilingRepository{}, Repository: &debt_ceiling.PitFileDebtCeilingRepository{},
} }
}
PitFileIlkTransformer = factories.LogNoteTransformer{ func GetPitFileIlkTransformer() factories.LogNoteTransformer {
Config: ilk.IlkFileConfig, return factories.LogNoteTransformer{
Config: ilk.GetIlkFileConfig(),
Converter: &ilk.PitFileIlkConverter{}, Converter: &ilk.PitFileIlkConverter{},
Repository: &ilk.PitFileIlkRepository{}, Repository: &ilk.PitFileIlkRepository{},
} }
}
PriceFeedTransformer = factories.LogNoteTransformer{ func GetPriceFeedTransformer() factories.LogNoteTransformer {
Config: price_feeds.PriceFeedConfig, return factories.LogNoteTransformer{
Config: price_feeds.GetPriceFeedConfig(),
Converter: &price_feeds.PriceFeedConverter{}, Converter: &price_feeds.PriceFeedConverter{},
Repository: &price_feeds.PriceFeedRepository{}, Repository: &price_feeds.PriceFeedRepository{},
} }
}
TendTransformer = factories.LogNoteTransformer{ func GetTendTransformer() factories.LogNoteTransformer {
Config: tend.TendConfig, return factories.LogNoteTransformer{
Config: tend.GetTendConfig(),
Converter: &tend.TendConverter{}, Converter: &tend.TendConverter{},
Repository: &tend.TendRepository{}, Repository: &tend.TendRepository{},
} }
}
VatInitTransformer = factories.LogNoteTransformer{ func GetVatInitTransformer() factories.LogNoteTransformer {
Config: vat_init.VatInitConfig, return factories.LogNoteTransformer{
Config: vat_init.GetVatInitConfig(),
Converter: &vat_init.VatInitConverter{}, Converter: &vat_init.VatInitConverter{},
Repository: &vat_init.VatInitRepository{}, Repository: &vat_init.VatInitRepository{},
} }
}
VatGrabTransformer = factories.LogNoteTransformer{ func GetVatGrabTransformer() factories.LogNoteTransformer {
Config: vat_grab.VatGrabConfig, return factories.LogNoteTransformer{
Config: vat_grab.GetVatGrabConfig(),
Converter: &vat_grab.VatGrabConverter{}, Converter: &vat_grab.VatGrabConverter{},
Repository: &vat_grab.VatGrabRepository{}, Repository: &vat_grab.VatGrabRepository{},
} }
}
VatFoldTransformer = factories.LogNoteTransformer{ func GetVatFoldTransformer() factories.LogNoteTransformer {
Config: vat_fold.VatFoldConfig, return factories.LogNoteTransformer{
Config: vat_fold.GetVatFoldConfig(),
Converter: &vat_fold.VatFoldConverter{}, Converter: &vat_fold.VatFoldConverter{},
Repository: &vat_fold.VatFoldRepository{}, Repository: &vat_fold.VatFoldRepository{},
} }
}
VatHealTransformer = factories.LogNoteTransformer{ func GetVatHealTransformer() factories.LogNoteTransformer {
Config: vat_heal.VatHealConfig, return factories.LogNoteTransformer{
Config: vat_heal.GetVatHealConfig(),
Converter: &vat_heal.VatHealConverter{}, Converter: &vat_heal.VatHealConverter{},
Repository: &vat_heal.VatHealRepository{}, Repository: &vat_heal.VatHealRepository{},
} }
}
VatMoveTransformer = factories.LogNoteTransformer{ func GetVatMoveTransformer() factories.LogNoteTransformer {
Config: vat_move.VatMoveConfig, return factories.LogNoteTransformer{
Config: vat_move.GetVatMoveConfig(),
Converter: &vat_move.VatMoveConverter{}, Converter: &vat_move.VatMoveConverter{},
Repository: &vat_move.VatMoveRepository{}, Repository: &vat_move.VatMoveRepository{},
} }
}
VatSlipTransformer = factories.LogNoteTransformer{ func GetVatSlipTransformer() factories.LogNoteTransformer {
Config: vat_slip.VatSlipConfig, return factories.LogNoteTransformer{
Config: vat_slip.GetVatSlipConfig(),
Converter: &vat_slip.VatSlipConverter{}, Converter: &vat_slip.VatSlipConverter{},
Repository: &vat_slip.VatSlipRepository{}, Repository: &vat_slip.VatSlipRepository{},
} }
}
VatTollTransformer = factories.LogNoteTransformer{ func GetVatTollTransformer() factories.LogNoteTransformer {
Config: vat_toll.VatTollConfig, return factories.LogNoteTransformer{
Config: vat_toll.GetVatTollConfig(),
Converter: &vat_toll.VatTollConverter{}, Converter: &vat_toll.VatTollConverter{},
Repository: &vat_toll.VatTollRepository{}, Repository: &vat_toll.VatTollRepository{},
} }
}
VatTuneTransformer = factories.LogNoteTransformer{ func GetVatTuneTransformer() factories.LogNoteTransformer {
Config: vat_tune.VatTuneConfig, return factories.LogNoteTransformer{
Config: vat_tune.GetVatTuneConfig(),
Converter: &vat_tune.VatTuneConverter{}, Converter: &vat_tune.VatTuneConverter{},
Repository: &vat_tune.VatTuneRepository{}, Repository: &vat_tune.VatTuneRepository{},
} }
}
VatFluxTransformer = factories.LogNoteTransformer{ func GetVatFluxTransformer() factories.LogNoteTransformer {
Config: vat_flux.VatFluxConfig, return factories.LogNoteTransformer{
Config: vat_flux.GetVatFluxConfig(),
Converter: &vat_flux.VatFluxConverter{}, Converter: &vat_flux.VatFluxConverter{},
Repository: &vat_flux.VatFluxRepository{}, Repository: &vat_flux.VatFluxRepository{},
} }
}
logNoteTransformers = []factories.LogNoteTransformer{ func getLogNoteTransformers() []factories.LogNoteTransformer {
CatFileChopLumpTransformer, return []factories.LogNoteTransformer{
CatFileFlipTransformer, GetCatFileChopLumpTransformer(),
CatFilePitVowTransformer, GetCatFileFlipTransformer(),
DealTransformer, GetCatFilePitVowTransformer(),
DentTransformer, GetDealTransformer(),
DripDripTransformer, GetDentTransformer(),
DripFileIlkTransformer, GetDripDripTransformer(),
DripFileRepoTransformer, GetDripFileIlkTransformer(),
DripFileVowTransfromer, GetDripFileRepoTransformer(),
FlogTransformer, GetDripFileVowTransformer(),
PitFileDebtCeilingTransformer, GetFlogTransformer(),
PitFileIlkTransformer, GetPitFileDebtCeilingTransformer(),
PriceFeedTransformer, GetPitFileIlkTransformer(),
TendTransformer, GetPriceFeedTransformer(),
VatInitTransformer, GetTendTransformer(),
VatGrabTransformer, GetVatInitTransformer(),
VatFoldTransformer, GetVatGrabTransformer(),
VatHealTransformer, GetVatFoldTransformer(),
VatMoveTransformer, GetVatHealTransformer(),
VatSlipTransformer, GetVatMoveTransformer(),
VatTollTransformer, GetVatSlipTransformer(),
VatTuneTransformer, GetVatTollTransformer(),
VatFluxTransformer, GetVatTuneTransformer(),
GetVatFluxTransformer(),
} }
) }
// `TransformerInitializers` returns a list of functions, that given a db pointer // `TransformerInitializers` returns a list of functions, that given a db pointer
// will return a `shared.Transformer` // will return a `shared.Transformer`
func TransformerInitializers() (initializers []shared.TransformerInitializer) { func TransformerInitializers() (initializers []shared.TransformerInitializer) {
for _, transformer := range logNoteTransformers { for _, transformer := range getLogNoteTransformers() {
initializers = append(initializers, transformer.NewLogNoteTransformer) initializers = append(initializers, transformer.NewLogNoteTransformer)
} }
for _, transformer := range customEventTransformers { for _, transformer := range getCustomEventTransformers() {
initializers = append(initializers, transformer.NewTransformer) initializers = append(initializers, transformer.NewTransformer)
} }
return return

View File

@ -5,11 +5,13 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
) )
var VatFluxConfig = shared.TransformerConfig{ func GetVatFluxConfig() shared.TransformerConfig {
TransformerName: constants.VatFluxLabel, return shared.TransformerConfig{
ContractAddresses: []string{constants.VatContractAddress}, TransformerName: constants.VatFluxLabel,
ContractAbi: constants.VatABI, ContractAddresses: []string{constants.VatContractAddress()},
Topic: constants.VatFluxSignature, ContractAbi: constants.VatABI(),
StartingBlockNumber: 0, Topic: constants.GetVatFluxSignature(),
EndingBlockNumber: -1, StartingBlockNumber: constants.VatDeploymentBlock(),
EndingBlockNumber: -1,
}
} }

View File

@ -19,11 +19,13 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
) )
var VatFoldConfig = shared.TransformerConfig{ func GetVatFoldConfig() shared.TransformerConfig {
TransformerName: constants.VatFoldLabel, return shared.TransformerConfig{
ContractAddresses: []string{constants.VatContractAddress}, TransformerName: constants.VatFoldLabel,
ContractAbi: constants.VatABI, ContractAddresses: []string{constants.VatContractAddress()},
Topic: constants.VatFoldSignature, ContractAbi: constants.VatABI(),
StartingBlockNumber: 0, Topic: constants.GetVatFoldSignature(),
EndingBlockNumber: -1, StartingBlockNumber: constants.VatDeploymentBlock(),
EndingBlockNumber: -1,
}
} }

View File

@ -21,7 +21,6 @@ import (
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
) )
type VatFoldConverter struct{} type VatFoldConverter struct{}
@ -61,11 +60,5 @@ func verifyLog(log types.Log) error {
if len(log.Topics) < 4 { if len(log.Topics) < 4 {
return errors.New("log missing topics") return errors.New("log missing topics")
} }
sig := log.Topics[0].String()
if sig != constants.VatFoldSignature {
return errors.New("log is not a Vat.fold event")
}
return nil return nil
} }

View File

@ -5,11 +5,13 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
) )
var VatGrabConfig = shared.TransformerConfig{ func GetVatGrabConfig() shared.TransformerConfig {
TransformerName: constants.VatGrabLabel, return shared.TransformerConfig{
ContractAddresses: []string{constants.VatContractAddress}, TransformerName: constants.VatGrabLabel,
ContractAbi: constants.VatABI, ContractAddresses: []string{constants.VatContractAddress()},
Topic: constants.VatGrabSignature, ContractAbi: constants.VatABI(),
StartingBlockNumber: 0, Topic: constants.GetVatGrabSignature(),
EndingBlockNumber: -1, StartingBlockNumber: constants.VatDeploymentBlock(),
EndingBlockNumber: -1,
}
} }

View File

@ -19,11 +19,13 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
) )
var VatHealConfig = shared.TransformerConfig{ func GetVatHealConfig() shared.TransformerConfig {
TransformerName: constants.VatHealLabel, return shared.TransformerConfig{
ContractAddresses: []string{constants.VatContractAddress}, TransformerName: constants.VatHealLabel,
ContractAbi: constants.VatABI, ContractAddresses: []string{constants.VatContractAddress()},
Topic: constants.VatHealSignature, ContractAbi: constants.VatABI(),
StartingBlockNumber: 0, Topic: constants.GetVatHealSignature(),
EndingBlockNumber: -1, StartingBlockNumber: constants.VatDeploymentBlock(),
EndingBlockNumber: -1,
}
} }

View File

@ -19,11 +19,13 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
) )
var VatInitConfig = shared.TransformerConfig{ func GetVatInitConfig() shared.TransformerConfig {
TransformerName: constants.VatInitLabel, return shared.TransformerConfig{
ContractAddresses: []string{constants.VatContractAddress}, TransformerName: constants.VatInitLabel,
ContractAbi: constants.VatABI, ContractAddresses: []string{constants.VatContractAddress()},
Topic: constants.VatInitSignature, ContractAbi: constants.VatABI(),
StartingBlockNumber: 0, Topic: constants.GetVatInitSignature(),
EndingBlockNumber: -1, StartingBlockNumber: constants.VatDeploymentBlock(),
EndingBlockNumber: -1,
}
} }

View File

@ -19,11 +19,13 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
) )
var VatMoveConfig = shared.TransformerConfig{ func GetVatMoveConfig() shared.TransformerConfig {
TransformerName: constants.VatMoveLabel, return shared.TransformerConfig{
ContractAddresses: []string{constants.VatContractAddress}, TransformerName: constants.VatMoveLabel,
ContractAbi: constants.VatABI, ContractAddresses: []string{constants.VatContractAddress()},
Topic: constants.VatMoveSignature, ContractAbi: constants.VatABI(),
StartingBlockNumber: 0, Topic: constants.GetVatMoveSignature(),
EndingBlockNumber: -1, StartingBlockNumber: constants.VatDeploymentBlock(),
EndingBlockNumber: -1,
}
} }

View File

@ -5,11 +5,13 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
) )
var VatSlipConfig = shared.TransformerConfig{ func GetVatSlipConfig() shared.TransformerConfig {
TransformerName: constants.VatSlipLabel, return shared.TransformerConfig{
ContractAddresses: []string{constants.VatContractAddress}, TransformerName: constants.VatSlipLabel,
ContractAbi: constants.VatABI, ContractAddresses: []string{constants.VatContractAddress()},
Topic: constants.VatSlipSignature, ContractAbi: constants.VatABI(),
StartingBlockNumber: 0, Topic: constants.GetVatSlipSignature(),
EndingBlockNumber: -1, StartingBlockNumber: constants.VatDeploymentBlock(),
EndingBlockNumber: -1,
}
} }

View File

@ -5,11 +5,13 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
) )
var VatTollConfig = shared.TransformerConfig{ func GetVatTollConfig() shared.TransformerConfig {
TransformerName: constants.VatTollLabel, return shared.TransformerConfig{
ContractAddresses: []string{constants.VatContractAddress}, TransformerName: constants.VatTollLabel,
ContractAbi: constants.VatABI, ContractAddresses: []string{constants.VatContractAddress()},
Topic: constants.VatTollSignature, ContractAbi: constants.VatABI(),
StartingBlockNumber: 0, Topic: constants.GetVatTollSignature(),
EndingBlockNumber: -1, StartingBlockNumber: constants.VatDeploymentBlock(),
EndingBlockNumber: -1,
}
} }

View File

@ -5,11 +5,13 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
) )
var VatTuneConfig = shared.TransformerConfig{ func GetVatTuneConfig() shared.TransformerConfig {
TransformerName: constants.VatTuneLabel, return shared.TransformerConfig{
ContractAddresses: []string{constants.VatContractAddress}, TransformerName: constants.VatTuneLabel,
ContractAbi: constants.VatABI, ContractAddresses: []string{constants.VatContractAddress()},
Topic: constants.VatTuneSignature, ContractAbi: constants.VatABI(),
StartingBlockNumber: 0, Topic: constants.GetVatTuneSignature(),
EndingBlockNumber: -1, StartingBlockNumber: constants.VatDeploymentBlock(),
EndingBlockNumber: -1,
}
} }

View File

@ -19,11 +19,13 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants" "github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
) )
var VowFlogConfig = shared.TransformerConfig{ func GetVowFlogConfig() shared.TransformerConfig {
TransformerName: constants.VowFlogLabel, return shared.TransformerConfig{
ContractAddresses: []string{constants.VowContractAddress}, TransformerName: constants.VowFlogLabel,
ContractAbi: constants.VowABI, ContractAddresses: []string{constants.VowContractAddress()},
Topic: constants.VowFlogSignature, ContractAbi: constants.VowABI(),
StartingBlockNumber: 0, Topic: constants.GetVowFlogSignature(),
EndingBlockNumber: -1, StartingBlockNumber: constants.VowDeploymentBlock(),
EndingBlockNumber: -1,
}
} }

View File

@ -1,6 +1,7 @@
package test_config package test_config
import ( import (
"fmt"
log "github.com/sirupsen/logrus" log "github.com/sirupsen/logrus"
"os" "os"
@ -68,7 +69,10 @@ func setABIPath() {
} }
func NewTestDB(node core.Node) *postgres.DB { func NewTestDB(node core.Node) *postgres.DB {
db, _ := postgres.NewDB(DBConfig, node) db, err := postgres.NewDB(DBConfig, node)
if err != nil {
panic(fmt.Sprintf("Could not create new test db: %v", err))
}
return db return db
} }