-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathhardhat.config.ts
78 lines (73 loc) · 1.54 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
require('dotenv').config();
import {HardhatUserConfig} from 'hardhat/config';
import '@nomicfoundation/hardhat-toolbox';
import 'hardhat-contract-sizer';
import 'hardhat-deploy';
const chainIds = {
mainnet: 1,
goerli: 5,
hardhat: 31337,
};
const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY || '';
const ALCHEMY_GOERLI = process.env.ALCHEMY_API_KEY_GOERLI || '';
const ALCHEMY_MAINNET = process.env.ALCHEMY_API_KEY_MAINET || '';
const config: HardhatUserConfig = {
solidity: {
version: '0.8.17',
},
defaultNetwork: 'hardhat',
networks: {
hardhat: {
chainId: chainIds.hardhat,
},
localhost: {
chainId: chainIds.hardhat,
},
// mainnet: {
// url: ALCHEMY_MAINNET,
// accounts: [process.env.PRIVATE_KEY || ''],
// chainId: chainIds.mainnet,
// },
goerli: {
url: ALCHEMY_GOERLI,
accounts: [process.env.PRIVATE_KEY || ''],
chainId: chainIds.goerli,
},
},
typechain: {
outDir: 'typechain',
target: 'ethers-v5',
},
contractSizer: {
alphaSort: false,
runOnCompile: false,
disambiguatePaths: false,
strict: true,
only: [':TrustMe$', ':SecurityFunctions$', ':Validation$'],
},
gasReporter: {
enabled: process.env.REPORT_GAS == 'true' ?? false,
currency: 'USD',
outputFile: 'gas-report.txt',
noColors: false,
coinmarketcap: process.env.COINMARKETCAP_API_KEY,
},
namedAccounts: {
deployer: {
default: 0,
},
seller: {
default: 1,
},
buyer: {
default: 2,
},
},
mocha: {
timeout: 200000,
},
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY,
},
};
export default config;