-
Notifications
You must be signed in to change notification settings - Fork 6
/
hardhat.config.ts
89 lines (82 loc) · 1.7 KB
/
hardhat.config.ts
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
import * as dotenv from 'dotenv';
import '@typechain/hardhat';
import '@nomiclabs/hardhat-ethers';
import '@nomiclabs/hardhat-waffle';
import '@openzeppelin/hardhat-upgrades';
import 'hardhat-deploy';
import 'solidity-coverage';
import 'hardhat-docgen';
import "@nomiclabs/hardhat-etherscan";
import "hardhat-contract-sizer";
dotenv.config();
const {
INFURA_KEY,
MNEMONIC,
ETHERSCAN_API_KEY,
PRIVATE_KEY,
AURORA_API_KEY,
} = process.env;
const accountsTestnet = PRIVATE_KEY
? [PRIVATE_KEY]
: { mnemonic: MNEMONIC };
const accountsMainnet = PRIVATE_KEY
? [PRIVATE_KEY]
: { mnemonic: MNEMONIC };
module.exports = {
defaultNetwork: 'hardhat',
solidity: {
version: "0.8.10",
settings: {
optimizer: {
enabled: true,
runs: 1
},
outputSelection: {
"*": {
"*": ["storageLayout"],
},
}
}
},
contractSizer: {
disambiguatePaths: false,
runOnCompile: true,
strict: false,
},
namedAccounts: {
owner: {
default: 0,
},
},
mocha: {
timeout: 300000,
},
networks: {
hardhat: {},
goerli: {
url: `https://goerli.infura.io/v3/${INFURA_KEY}`,
accounts: accountsTestnet,
},
auroraTestnet: {
url: `https://testnet.aurora.dev/${AURORA_API_KEY}`,
accounts: accountsTestnet
},
aurora: {
url: `https://mainnet.aurora.dev/${AURORA_API_KEY}`,
accounts: accountsMainnet
}
},
etherscan: {
// Your API key for Aurorascan
// Obtain one at https://aurorascan.dev/
apiKey: {
aurora: ETHERSCAN_API_KEY
},
},
docgen: {
path: './docs/contracts',
clear: true,
runOnCompile: true,
},
allowUnlimitedContractSize: true,
};