-
Notifications
You must be signed in to change notification settings - Fork 2
/
buidler.config.js
62 lines (59 loc) · 1.85 KB
/
buidler.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
require('dotenv').config()
const { usePlugin } = require('@nomiclabs/buidler/config')
const hooks = require('./scripts/buidler-hooks')
usePlugin('@aragon/buidler-aragon')
usePlugin('@nomiclabs/buidler-etherscan')
const getEnvironmentVariable = _envVar =>
process.env[_envVar]
? process.env[_envVar]
: (
console.error(
'✘ Cannot migrate!',
'✘ Please provide an infura api key as and an',
'✘ account private key as environment variables:',
'✘ MAINNET_PRIVATE_KEY',
'✘ RINKEBY_PRIVATE_KEY',
'✘ INFURA_KEY',
'✘ ETHERSCAN_API_KEY',
),
process.exit(1)
)
module.exports = {
// Default Buidler configurations. Read more about it at https://buidler.dev/config/
defaultNetwork: 'localhost',
networks: {
localhost: {
url: 'http://localhost:8545',
},
rinkeby: {
url: `https://rinkeby.infura.io/v3/${getEnvironmentVariable('INFURA_KEY')}`,
accounts: [getEnvironmentVariable('RINKEBY_PRIVATE_KEY')]
},
mainnet: {
url: `https://mainnet.infura.io/v3/${getEnvironmentVariable('INFURA_KEY')}`,
accounts: [getEnvironmentVariable('MAINNET_PRIVATE_KEY')],
gasPrice: 60e9
}
},
solc: {
version: '0.4.24',
optimizer: {
enabled: true,
runs: 10000,
},
},
// Etherscan plugin configuration. Learn more at https://github.com/nomiclabs/buidler/tree/master/packages/buidler-etherscan
etherscan: {
apiKey: `${getEnvironmentVariable('ETHERSCAN_API_KEY')}`, // API Key for smart contract verification. Get yours at https://etherscan.io/apis,
url: 'https://api.etherscan.io/api'
},
// Aragon plugin configuration
aragon: {
appServePort: 8001,
clientServePort: 3000,
appSrcPath: 'app/',
appBuildOutputPath: 'dist/',
appName: 'staking-manager',
hooks, // Path to script hooks
},
}