Skip to content
This repository has been archived by the owner on Apr 18, 2021. It is now read-only.

Apply Configs #97

Merged
merged 11 commits into from
Feb 27, 2019
Merged

Apply Configs #97

merged 11 commits into from
Feb 27, 2019

Conversation

JhChoy
Copy link
Contributor

@JhChoy JhChoy commented Feb 25, 2019

PR Checklist

Please check if your PR fulfills the following requirements:

#96 should be merged first

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Issue Number: #91
test/
*-config.js
contractApis/
are excluded for coverage

Issue Number: #24

What is the new behavior?

Now vvisp-config.js will be used instead of .env.
You can define those properties:

  • networks: Define some network settings
  • network: Define one of networks to use. Default: 'development'
  • verboseRpc: Define verbosity of Rpc call
  • from: Define private key or mnemonic words to use
  • compilers: Define compiler setting to use

Example config file:

module.exports = {
  networks: {
    development: {
      host: 'localhost',
      port: 8545,
      network_id: '*', // eslint-disable-line camelcase
      gasLimit: 123123,
      gasPrice: 10000000000
    },
    coverage: {
      host: 'localhost',
      port: 8545,
      network_id: '*' // eslint-disable-line camelcase
    }
  },
  compilers: {
    solc: {
      version: '0.4.25', // Fetch exact version from solc-bin
      settings: {
        // See the solidity docs for advice about optimization and evmVersion
        optimizer: {
          enabled: false,
          runs: 200
        },
        evmVersion: 'byzantium'
      }
    }
  },
  from: { // or from: '0x9741fa712a6912b862c9043f8752ffae513cb01895985998c61620da5aaf2d2d'
    mnemonic: 'hello',
    index: 0
  }
}

vvisp-config.js can be compatible with truffle-config.js
You can use like below:

module.exports = {
  ...require('./truffle-config.js'),
  from: '0x9741fa712a6912b862c9043f8752ffae513cb01895985998c61620da5aaf2d2d'
}

or input option custom file name like:

vvisp deploy-service --configFile custom-config.js

Does this PR introduce a breaking change?

  • Yes
  • No

@JhChoy JhChoy added enhancement New feature or request config About config files(service.vvisp.json, state.vvisp.json, .env etc) labels Feb 25, 2019
@JhChoy JhChoy added this to the vvisp v1.0.0 milestone Feb 25, 2019
@JhChoy JhChoy self-assigned this Feb 25, 2019
@coveralls
Copy link

coveralls commented Feb 25, 2019

Pull Request Test Coverage Report for Build 395

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 4 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-24.2%) to 62.89%

Files with Coverage Reduction New Missed Lines %
src/sendTx.js 1 91.18%
src/printOrSilent.js 1 75.0%
src/getPrivateKey.js 2 84.62%
Totals Coverage Status
Change from base Build 366: -24.2%
Covered Lines: 393
Relevant Lines: 603

💛 - Coveralls

@JhChoy JhChoy force-pushed the jay/apply-configs branch 2 times, most recently from 030388b to bc53b96 Compare February 25, 2019 10:09
@JhChoy JhChoy mentioned this pull request Feb 26, 2019
14 tasks
@zero1ne zero1ne requested a review from Nipol February 27, 2019 04:53
@JhChoy JhChoy merged commit a373e45 into dev Feb 27, 2019
@JhChoy JhChoy deleted the jay/apply-configs branch February 27, 2019 15:25
@JhChoy JhChoy restored the jay/apply-configs branch February 27, 2019 15:27
@JhChoy JhChoy deleted the jay/apply-configs branch February 27, 2019 15:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
config About config files(service.vvisp.json, state.vvisp.json, .env etc) enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants