Skip to content
Permalink
Browse files

Update Configuration Code

  • Loading branch information...
piavgh committed Feb 22, 2019
1 parent 4f5ec33 commit a72af75eb34e3dec654d41f8d60f8fcf9716ec28
Showing with 33 additions and 17 deletions.
  1. +21 −5 config/index.js
  2. +12 −12 truffle.js
@@ -89,11 +89,27 @@ module.exports = {
tomochainTestnet: 'https://testnet.tomochain.com',
},
constants: {
DEFAULT_GAS: 4.5 * 10 ** 6,
MAX_GAS: 20 * 10 ** 6,
DEFAULT_LOW_GAS_PRICE: 0.1 * 10 ** 9,
DEFAULT_GAS_PRICE: 10 ** 14,
DEFAULT_HIGH_GAS_PRICE: 9 * 10 ** 9,
development: {
DEFAULT_GAS: 4.5 * 10 ** 6,
MAX_GAS: 6.0 * 10 ** 6,
DEFAULT_LOW_GAS_PRICE: 0.1 * 10 ** 9,
DEFAULT_GAS_PRICE: 15 * 10 ** 9,
DEFAULT_HIGH_GAS_PRICE: 9 * 10 ** 9,
},
tomochain: {
DEFAULT_GAS: 4.5 * 10 ** 6,
MAX_GAS: 20 * 10 ** 6,
DEFAULT_LOW_GAS_PRICE: 0.1 * 10 ** 9,
DEFAULT_GAS_PRICE: 10 ** 14,
DEFAULT_HIGH_GAS_PRICE: 9 * 10 ** 9,
},
tomochainTestnet: {
DEFAULT_GAS: 4.5 * 10 ** 6,
MAX_GAS: 20 * 10 ** 6,
DEFAULT_LOW_GAS_PRICE: 0.1 * 10 ** 9,
DEFAULT_GAS_PRICE: 10 ** 14,
DEFAULT_HIGH_GAS_PRICE: 9 * 10 ** 9,
},
},
accounts: {
marketMaker: [
@@ -17,39 +17,39 @@ module.exports = {
host: 'localhost',
port: 8545,
network_id: config.NETWORK_ID.DEVELOPMENT,
gas: config.constants.MAX_GAS,
gasPrice: config.constants.DEFAULT_GAS_PRICE,
gas: config.constants.development.MAX_GAS,
gasPrice: config.constants.development.DEFAULT_GAS_PRICE,
from: '0xF9D87abd60435b70415CcC1FAAcA4F8B91786eDb', // testprc main account here
},
ethereum: {
provider: () => new HDWalletProvider(secret.ethereum.mnemonic, config.rpcEndpoints.ethereum),
network_id: config.NETWORK_ID.ETHEREUM,
gas: config.constants.MAX_GAS,
gasPrice: config.constants.DEFAULT_GAS_PRICE,
gas: config.constants.development.MAX_GAS,
gasPrice: config.constants.development.DEFAULT_GAS_PRICE,
},
ropsten: {
provider: () => new HDWalletProvider(secret.ropsten.mnemonic, config.rpcEndpoints.ropsten),
network_id: config.NETWORK_ID.ROPSTEN,
gas: config.constants.MAX_GAS,
gasPrice: config.constants.DEFAULT_GAS_PRICE,
gas: config.constants.development.MAX_GAS,
gasPrice: config.constants.development.DEFAULT_GAS_PRICE,
},
rinkeby: {
provider: () => new HDWalletProvider(secret.rinkeby.mnemonic, config.rpcEndpoints.rinkeby),
network_id: config.NETWORK_ID.RINKEBY,
gas: config.constants.MAX_GAS,
gasPrice: config.constants.DEFAULT_GAS_PRICE,
gas: config.constants.development.MAX_GAS,
gasPrice: config.constants.development.DEFAULT_GAS_PRICE,
},
tomochain: {
provider: () => new HDWalletProvider(secret.tomochain.mnemonic, config.rpcEndpoints.tomochain),
network_id: config.NETWORK_ID.TOMOCHAIN,
gas: config.constants.MAX_GAS,
gasPrice: config.constants.DEFAULT_GAS_PRICE,
gas: config.constants.tomochain.MAX_GAS,
gasPrice: config.constants.tomochain.DEFAULT_GAS_PRICE,
},
tomochainTestnet: {
provider: () => new HDWalletProvider(secret.tomochainTestnet.mnemonic, config.rpcEndpoints.tomochainTestnet),
network_id: config.NETWORK_ID.TOMOCHAIN_TESTNET,
gas: config.constants.MAX_GAS,
gasPrice: config.constants.DEFAULT_GAS_PRICE,
gas: config.constants.tomochainTestnet.MAX_GAS,
gasPrice: config.constants.tomochainTestnet.DEFAULT_GAS_PRICE,
},
},
}

0 comments on commit a72af75

Please sign in to comment.
You can’t perform that action at this time.