forked from witnet/witnet-price-router
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtruffle-config.js
39 lines (37 loc) · 1.17 KB
/
truffle-config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// In order to load environment variables (e.g. API keys)
require("dotenv").config()
const { merge } = require("lodash")
const settings = require("./migrations/settings")
const rn = require("./scripts/utils").getRealmNetworkFromArgs()
const realm = rn[0]; const network = rn[1]
if (!settings.networks[realm] || !settings.networks[realm][network]) {
if (network !== "development" && network !== "test") {
console.error(
`Fatal: network "${realm}:${network}"`,
"configuration not found in \"./migrations/settings.js#networks\""
)
process.exit(1)
}
}
console.info(`
Targetting "${realm.toUpperCase()}" realm
===================${"=".repeat(realm.length)}`
)
module.exports = {
build_directory: `./build/${realm}/`,
contracts_directory: "./contracts/",
migrations_directory: "./migrations/scripts/",
networks: settings.networks[realm],
compilers: merge(settings.compilers.default, settings.compilers[realm]),
mocha: {
reporter: "eth-gas-reporter",
reporterOptions: {
coinmarketcap: process.env.COINMARKETCAP_API_KEY,
currency: "USD",
gasPrice: 100,
src: "contracts",
},
timeout: 100000,
useColors: true,
},
}