-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhardhat.config.ts
82 lines (78 loc) · 1.89 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
import '@nomiclabs/hardhat-etherscan';
import '@nomiclabs/hardhat-ethers';
import '@typechain/hardhat';
import 'dotenv/config';
import { HardhatUserConfig } from 'hardhat/types';
const test_mnemonic = 'test test test test test test test test test test test junk';
const config: HardhatUserConfig = {
/**
* @note Before version 0.8.6 omitting the 'enabled' key was not equivalent to setting
* it to false and would actually disable all the optimizations.
* @see: {@link https://docs.soliditylang.org/en/latest/using-the-compiler.html#compiler-input-and-output-json-description}
*/
solidity: {
version: '0.6.12',
settings: {
metadata: {
bytecodeHash: 'none',
},
optimizer: {
enabled: true,
runs: 1_000,
details: {
yul: false,
},
},
outputSelection: {
'*': {
'*': [
'abi',
'evm.bytecode',
'evm.deployedBytecode',
'evm.methodIdentifiers',
'metadata',
],
'': ['ast'],
},
},
},
},
networks: {
hardhat: {
allowUnlimitedContractSize: false,
},
mainnet: {
url: `https://mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
},
rinkeby: {
url: `https://rinkeby.infura.io/v3/${process.env.INFURA_API_KEY}`,
},
goerli: {
url: `https://goerli.infura.io/v3/${process.env.GOERLI_RPC}`,
},
},
paths: {
sources: './contracts',
tests: './test',
cache: './cache',
artifacts: './artifacts',
},
typechain: {
outDir: 'types/',
target: 'ethers-v5',
},
};
/** @note Compiler output configuration for verifying on Sourceify */
export const defaultSolcOutputSelection = {
'*': {
'*': [
'abi',
'evm.bytecode',
'evm.deployedBytecode',
'evm.methodIdentifiers',
'metadata',
],
'': ['ast'],
},
};
export default config;