forked from PavanAnanthSharma/aave-v3-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.ts
103 lines (98 loc) · 2.61 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
import path from 'path';
import {HardhatUserConfig} from 'hardhat/types';
// @ts-ignore
import {accounts} from './test-wallets.js';
import {COVERAGE_CHAINID, HARDHAT_CHAINID} from './helpers/constants';
import {buildForkConfig} from './helper-hardhat-config';
require('dotenv').config();
import '@nomiclabs/hardhat-ethers';
import '@nomiclabs/hardhat-etherscan';
import 'hardhat-gas-reporter';
import '@typechain/hardhat';
import '@typechain/ethers-v5';
import 'hardhat-deploy';
import '@tenderly/hardhat-tenderly';
import 'solidity-coverage';
import 'hardhat-contract-sizer';
import 'hardhat-dependency-compiler';
import {DEFAULT_NAMED_ACCOUNTS} from '@aave/deploy-v3';
const DEFAULT_BLOCK_GAS_LIMIT = 12450000;
const HARDFORK = 'london';
const hardhatConfig: HardhatUserConfig = {
gasReporter: {
enabled: true,
},
contractSizer: {
alphaSort: true,
runOnCompile: false,
disambiguatePaths: false,
},
solidity: {
// Docs for the compiler https://docs.soliditylang.org/en/v0.8.10/using-the-compiler.html
version: '0.8.10',
settings: {
optimizer: {
enabled: true,
runs: 100000,
},
evmVersion: 'london',
},
},
typechain: {
outDir: 'types',
target: 'ethers-v5',
},
mocha: {
timeout: 0,
bail: true,
},
tenderly: {
project: process.env.TENDERLY_PROJECT || '',
username: process.env.TENDERLY_USERNAME || '',
forkNetwork: '1', //Network id of the network we want to fork
},
networks: {
coverage: {
url: 'http://localhost:8555',
chainId: COVERAGE_CHAINID,
throwOnTransactionFailures: true,
throwOnCallFailures: true,
},
hardhat: {
hardfork: HARDFORK,
blockGasLimit: DEFAULT_BLOCK_GAS_LIMIT,
gas: DEFAULT_BLOCK_GAS_LIMIT,
gasPrice: 8000000000,
chainId: HARDHAT_CHAINID,
throwOnTransactionFailures: true,
throwOnCallFailures: true,
forking: buildForkConfig(),
allowUnlimitedContractSize: true,
accounts: accounts.map(({secretKey, balance}: {secretKey: string; balance: string}) => ({
privateKey: secretKey,
balance,
})),
},
ganache: {
url: 'http://ganache:8545',
accounts: {
mnemonic: 'fox sight canyon orphan hotel grow hedgehog build bless august weather swarm',
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
},
},
},
namedAccounts: {
...DEFAULT_NAMED_ACCOUNTS,
},
external: {
contracts: [
{
artifacts: './temp-artifacts',
deploy: 'node_modules/@aave/deploy-v3/dist/deploy',
},
],
},
};
export default hardhatConfig;