forked from Unslashed/unslashed-governance
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.js
71 lines (65 loc) · 1.8 KB
/
hardhat.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
63
64
65
66
67
68
69
70
require("@nomiclabs/hardhat-ethers");
require('dotenv').config();
const Secrets = {
mnemonic: process.env.MNEMONIC,
infuraProjectId: process.env.INFURA_PROJECT_ID,
};
task("deploy", "Deploys a COMPound style governance system")
.addParam("gasprice", "gas price of the transactions in GWEI")
.addOptionalParam("index", "account index of the mnemonic to be used").setAction(async taskArgs => {
console.log("=== CONTRACT DEPLOYMENTS ===")
const { deploy } = require("./scripts/DeployMainnet");
await deploy(taskArgs.index, taskArgs.gasprice);
console.log("=== TOKEN DISTRIBUTION ===")
const { distributeTokens } = require("./scripts/DistributeTokensMainnet");
await distributeTokens(taskArgs.index, taskArgs.gasprice);
})
// You need to export an object to set up your config
// Go to https://hardhat.org/config/ to learn more
/**
* @type import('hardhat/config').HardhatUserConfig
*/
module.exports = {
defaultNetwork: "ganache",
networks: {
hardhat: {
},
ganache: {
url: "http://127.0.0.1:9545",
accounts: {
mnemonic: Secrets.mnemonic,
initialIndex: 0,
count: 10,
}
},
ropsten: {
url: `https://ropsten.infura.io/v3/${Secrets.infuraProjectId}`,
accounts: {
mnemonic: Secrets.mnemonic,
initialIndex: 0,
count: 10,
}
},
goerli: {
url: `https://goerli.infura.io/v3/${Secrets.infuraProjectId}`,
accounts: {
mnemonic: Secrets.mnemonic,
initialIndex: 0,
count: 10,
}
},
mainnet: {
url: `https://mainnet.infura.io/v3/${Secrets.infuraProjectId}`,
accounts: {
mnemonic: Secrets.mnemonic,
initialIndex: 0,
count: 10,
}
}
},
solidity: {
compilers: [
{ version: "0.5.16" },
],
},
};