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