From 0b281eab47da3841c48c2feeb813f0df0be28992 Mon Sep 17 00:00:00 2001 From: Konstantin Zolotarev Date: Fri, 12 Oct 2018 11:11:31 +0300 Subject: [PATCH] Added default addresses to config & rename fallback var --- environments/infura.toml | 11 +++++++++++ environments/local.toml.example | 11 +++++++++++ environments/private.toml | 11 +++++++++++ environments/prod.toml | 11 +++++++++++ environments/public.toml.example | 11 +++++++++++ environments/staging.toml | 11 +++++++++++ pkg/transformers/shared/constants.go | 4 ++-- 7 files changed, 68 insertions(+), 2 deletions(-) diff --git a/environments/infura.toml b/environments/infura.toml index e1539f3d..e906e85d 100644 --- a/environments/infura.toml +++ b/environments/infura.toml @@ -5,3 +5,14 @@ port = 5432 [client] ipcPath = "https://mainnet.infura.io/J5Vd2fRtGsw0zZ0Ov3BL" + +[contract] +cat = "0x2f34f22a00ee4b7a8f8bbc4eaee1658774c624e0" +drip = "0x891c04639a5edcae088e546fa125b5d7fb6a2b9d" +eth_flip = "0x32D496Ad866D110060866B7125981C73642cc509" +mcd_flop = "0x6191C9b0086c2eBF92300cC507009b53996FbFFa" +pep = "0xB1997239Cfc3d15578A3a09730f7f84A90BB4975" +pip = "0x9FfFE440258B79c5d6604001674A4722FfC0f7Bc" +pit = "0xe7cf3198787c9a4daac73371a38f29aaeeced87e" +rep = "0xf88bbdc1e2718f8857f30a180076ec38d53cf296" +vat = "0xcd726790550afcd77e9a7a47e86a3f9010af126b" \ No newline at end of file diff --git a/environments/local.toml.example b/environments/local.toml.example index cca881aa..ffe4c461 100644 --- a/environments/local.toml.example +++ b/environments/local.toml.example @@ -5,3 +5,14 @@ port = 5432 [client] ipcPath = "http://127.0.0.1:7545" + +[contract] +cat = "0x2f34f22a00ee4b7a8f8bbc4eaee1658774c624e0" +drip = "0x891c04639a5edcae088e546fa125b5d7fb6a2b9d" +eth_flip = "0x32D496Ad866D110060866B7125981C73642cc509" +mcd_flop = "0x6191C9b0086c2eBF92300cC507009b53996FbFFa" +pep = "0xB1997239Cfc3d15578A3a09730f7f84A90BB4975" +pip = "0x9FfFE440258B79c5d6604001674A4722FfC0f7Bc" +pit = "0xe7cf3198787c9a4daac73371a38f29aaeeced87e" +rep = "0xf88bbdc1e2718f8857f30a180076ec38d53cf296" +vat = "0xcd726790550afcd77e9a7a47e86a3f9010af126b" \ No newline at end of file diff --git a/environments/private.toml b/environments/private.toml index 344b7a94..c4c20bcf 100644 --- a/environments/private.toml +++ b/environments/private.toml @@ -5,3 +5,14 @@ port = 5432 [client] ipcPath = "http://127.0.0.1:7545" + +[contract] +cat = "0x2f34f22a00ee4b7a8f8bbc4eaee1658774c624e0" +drip = "0x891c04639a5edcae088e546fa125b5d7fb6a2b9d" +eth_flip = "0x32D496Ad866D110060866B7125981C73642cc509" +mcd_flop = "0x6191C9b0086c2eBF92300cC507009b53996FbFFa" +pep = "0xB1997239Cfc3d15578A3a09730f7f84A90BB4975" +pip = "0x9FfFE440258B79c5d6604001674A4722FfC0f7Bc" +pit = "0xe7cf3198787c9a4daac73371a38f29aaeeced87e" +rep = "0xf88bbdc1e2718f8857f30a180076ec38d53cf296" +vat = "0xcd726790550afcd77e9a7a47e86a3f9010af126b" \ No newline at end of file diff --git a/environments/prod.toml b/environments/prod.toml index 50904224..bbcbb11b 100644 --- a/environments/prod.toml +++ b/environments/prod.toml @@ -10,3 +10,14 @@ ipcPath = "https://kovan.infura.io/J5Vd2fRtGsw0zZ0Ov3BL" [datadog] name = "maker_vdb_prod" + +[contract] +cat = "0x2f34f22a00ee4b7a8f8bbc4eaee1658774c624e0" +drip = "0x891c04639a5edcae088e546fa125b5d7fb6a2b9d" +eth_flip = "0x32D496Ad866D110060866B7125981C73642cc509" +mcd_flop = "0x6191C9b0086c2eBF92300cC507009b53996FbFFa" +pep = "0xB1997239Cfc3d15578A3a09730f7f84A90BB4975" +pip = "0x9FfFE440258B79c5d6604001674A4722FfC0f7Bc" +pit = "0xe7cf3198787c9a4daac73371a38f29aaeeced87e" +rep = "0xf88bbdc1e2718f8857f30a180076ec38d53cf296" +vat = "0xcd726790550afcd77e9a7a47e86a3f9010af126b" \ No newline at end of file diff --git a/environments/public.toml.example b/environments/public.toml.example index ac9dbf85..0423e990 100644 --- a/environments/public.toml.example +++ b/environments/public.toml.example @@ -6,3 +6,14 @@ port = 5432 [client] ipcPath = levelDbPath = + +[contract] +cat = "0x2f34f22a00ee4b7a8f8bbc4eaee1658774c624e0" +drip = "0x891c04639a5edcae088e546fa125b5d7fb6a2b9d" +eth_flip = "0x32D496Ad866D110060866B7125981C73642cc509" +mcd_flop = "0x6191C9b0086c2eBF92300cC507009b53996FbFFa" +pep = "0xB1997239Cfc3d15578A3a09730f7f84A90BB4975" +pip = "0x9FfFE440258B79c5d6604001674A4722FfC0f7Bc" +pit = "0xe7cf3198787c9a4daac73371a38f29aaeeced87e" +rep = "0xf88bbdc1e2718f8857f30a180076ec38d53cf296" +vat = "0xcd726790550afcd77e9a7a47e86a3f9010af126b" \ No newline at end of file diff --git a/environments/staging.toml b/environments/staging.toml index 1dbca002..90896ae9 100644 --- a/environments/staging.toml +++ b/environments/staging.toml @@ -10,3 +10,14 @@ ipcPath = "https://kovan.infura.io/J5Vd2fRtGsw0zZ0Ov3BL" [datadog] name = "maker_vdb_staging" + +[contract] +cat = "0x2f34f22a00ee4b7a8f8bbc4eaee1658774c624e0" +drip = "0x891c04639a5edcae088e546fa125b5d7fb6a2b9d" +eth_flip = "0x32D496Ad866D110060866B7125981C73642cc509" +mcd_flop = "0x6191C9b0086c2eBF92300cC507009b53996FbFFa" +pep = "0xB1997239Cfc3d15578A3a09730f7f84A90BB4975" +pip = "0x9FfFE440258B79c5d6604001674A4722FfC0f7Bc" +pit = "0xe7cf3198787c9a4daac73371a38f29aaeeced87e" +rep = "0xf88bbdc1e2718f8857f30a180076ec38d53cf296" +vat = "0xcd726790550afcd77e9a7a47e86a3f9010af126b" \ No newline at end of file diff --git a/pkg/transformers/shared/constants.go b/pkg/transformers/shared/constants.go index 02df74f9..3203c067 100644 --- a/pkg/transformers/shared/constants.go +++ b/pkg/transformers/shared/constants.go @@ -16,10 +16,10 @@ package shared import "github.com/spf13/viper" -func getContractValue(key string, val string) string { +func getContractValue(key string, fallback string) string { value := viper.GetString(key) if value == "" { - return val + return fallback } return value }