-
Notifications
You must be signed in to change notification settings - Fork 9
/
buidler.config.js
52 lines (47 loc) · 1.03 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
const homedir = require('homedir')
const path = require('path')
usePlugin("@nomiclabs/buidler-truffle5")
const settingsForNetwork = (network) => {
try {
const keyFilePath = path.join(homedir(), `.aragon/${network}_key.json`)
return require(keyFilePath)
} catch (e) {
return { }
}
}
const key = (network) => {
let { keys } = settingsForNetwork(network)
if (!keys) {
return ''
}
return keys[0]
}
module.exports = {
defaultNetwork: 'buidlerevm',
networks: {
buidlerevm: {
gasPrice: 1000000000 // 1 Gwei
},
localhost: {
url: 'http://localhost:8545',
gasPrice: 1000000000 // 1 Gwei
},
rinkeby: {
url: "https://rinkeby.infura.io/v3/8e0a671dca444df9ad47246e07aac303",
accounts: ["0x" + key("rinkeby")]
},
xdai: {
url: "https://xdai.poanetwork.dev",
chainId: 100,
accounts: ["0x" + key("xdai")],
gasPrice: 1000000000 // 1 Gwei
}
},
solc: {
version: '0.6.11',
optimizer: {
enabled: true,
runs: 10000,
},
}
}