From 6aaa585e4be9eb64326508cd7fae105948939fd0 Mon Sep 17 00:00:00 2001 From: Apostolof Date: Sat, 21 Nov 2020 19:13:50 +0200 Subject: [PATCH] Split contracts env vars to develop and test --- packages/concordia-contracts/README.md | 16 ++++++++-------- packages/concordia-contracts/truffle-config.js | 13 +++++++------ 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/packages/concordia-contracts/README.md b/packages/concordia-contracts/README.md index 79a0b0c..8a02bfb 100644 --- a/packages/concordia-contracts/README.md +++ b/packages/concordia-contracts/README.md @@ -23,14 +23,14 @@ Default values are: Linux: ```shell script -export CHAIN_HOST="127.0.0.1" -export CHAIN_PORT="7545" +export DEVELOP_CHAIN_HOST="127.0.0.1" +export DEVELOP_CHAIN_PORT="7545" ``` Windows: ```shell script -SET CHAIN_HOST="127.0.0.1" -SET CHAIN_PORT="7545" +SET DEVELOP_CHAIN_HOST="127.0.0.1" +SET DEVELOP_CHAIN_PORT="7545" ``` Migrate (using the development network here, change if necessary): @@ -48,14 +48,14 @@ Default values are: Linux: ```shell script -CHAIN_HOST="127.0.0.1" -CHAIN_PORT="7545" +TEST_CHAIN_HOST="127.0.0.1" +TEST_CHAIN_PORT="7545" ``` Windows: ```shell script -SET CHAIN_HOST="127.0.0.1" -SET CHAIN_PORT="7545" +SET TEST_CHAIN_HOST="127.0.0.1" +SET TEST_CHAIN_PORT="7545" ``` Test: diff --git a/packages/concordia-contracts/truffle-config.js b/packages/concordia-contracts/truffle-config.js index 669e9b9..73f30b2 100644 --- a/packages/concordia-contracts/truffle-config.js +++ b/packages/concordia-contracts/truffle-config.js @@ -1,8 +1,9 @@ const path = require('path'); const defaults = require('./constants/config/defaults'); -const { CHAIN_HOST } = process.env; -const { CHAIN_PORT } = process.env; +const { + DEVELOP_CHAIN_HOST, DEVELOP_CHAIN_PORT, TEST_CHAIN_HOST, TEST_CHAIN_PORT, +} = process.env; module.exports = { // See @@ -15,13 +16,13 @@ module.exports = { contracts_build_directory: path.join(__dirname, 'build/'), networks: { develop: { - host: CHAIN_HOST || defaults.develop.chainHost, - port: CHAIN_PORT || defaults.develop.chainPort, + host: DEVELOP_CHAIN_HOST || defaults.develop.chainHost, + port: DEVELOP_CHAIN_PORT || defaults.develop.chainPort, network_id: '*', }, test: { - host: CHAIN_HOST || defaults.test.chainHost, - port: CHAIN_PORT || defaults.test.chainPort, + host: TEST_CHAIN_HOST || defaults.test.chainHost, + port: TEST_CHAIN_PORT || defaults.test.chainPort, network_id: '*', }, },