forked from yieldyak/smart-contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.js
95 lines (87 loc) · 1.94 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
require("@nomiclabs/hardhat-waffle");
require("@nomiclabs/hardhat-ethers");
require("hardhat-deploy");
require("hardhat-deploy-ethers");
require('hardhat-abi-exporter');
require('hardhat-contract-sizer');
const dotenv = require("dotenv");
dotenv.config();
const AVALANCHE_MAINNET_URL = process.env.AVALANCHE_MAINNET_URL;
const AVALANCHE_FUJI_URL = process.env.AVALANCHE_FUJI_URL;
const PK_USER = process.env.PK_USER;
const PK_OWNER = process.env.PK_OWNER;
const PK_TEST = process.env.PK_TEST;
// require scripts
const farmData = require("./scripts/farm-data");
// tasks
task("checkFarmState", "Gives a nice output of the state of the farm")
.addParam("farm", "Farm to check the state of")
.setAction(async ({ farm }) => farmData(farm));
// 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 = {
mocha: {
timeout: 1e10,
},
solidity: {
version: "0.7.3",
settings: {
optimizer: {
enabled: true,
runs: 999
}
}
},
defaultNetwork: "mainnet",
namedAccounts: {
deployer: {
default: 1,
}
},
contractSizer: {
alphaSort: false,
runOnCompile: false,
disambiguatePaths: false,
},
paths: {
deploy: 'deploy',
deployments: 'deployments'
},
abiExporter: {
path: './abis',
clear: true,
flat: true
},
networks: {
hardhat: {
chainId: 43114,
gasPrice: 225000000000,
throwOnTransactionFailures: false,
loggingEnabled: true,
forking: {
url: AVALANCHE_MAINNET_URL,
enabled: true,
},
},
mainnet: {
chainId: 43114,
gasPrice: 225000000000,
url: AVALANCHE_MAINNET_URL,
seeds: [
PK_USER,
PK_OWNER
]
},
fuji: {
chainId: 43113,
gasPrice: 225000000000,
url: AVALANCHE_FUJI_URL,
seeds: [
PK_TEST
]
},
},
};