-
Notifications
You must be signed in to change notification settings - Fork 117
/
Copy pathhardhat.config.ts
62 lines (57 loc) · 1.68 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
import {HardhatUserConfig, configVariable} from 'hardhat/config';
import HardhatNodeTestRunner from '@nomicfoundation/hardhat-node-test-runner';
import HardhatViem from '@nomicfoundation/hardhat-viem';
import HardhatNetworkHelpers from '@nomicfoundation/hardhat-network-helpers';
import HardhatKeystore from '@nomicfoundation/hardhat-keystore';
import HardhatDeploy from 'hardhat-deploy';
import {addForkConfiguration, addNetworksFromEnv} from 'hardhat-deploy/helpers';
const config: HardhatUserConfig = {
plugins: [HardhatNodeTestRunner, HardhatViem, HardhatNetworkHelpers, HardhatKeystore, HardhatDeploy],
solidity: {
profiles: {
default: {
version: '0.8.28',
},
production: {
version: '0.8.28',
settings: {
optimizer: {
enabled: true,
runs: 999999,
},
},
},
},
remappings: [
/*
* This remapping is added to the example because most people import
* forge-std/Test.sol, not forge-std/src/Test.sol.
*
* Note: The config currently leaks internal IDs, but this will be fixed
* in the future.
*/
'forge-std/=npm/[email protected]/src/',
],
},
networks: addForkConfiguration(
// this add network for each respective env var found (ETH_NODE_URI_<network>)
// it will also read MNEMONIC_<network> to populate the accounts
// Note that if you set these env to be "SECRET" it will be like using:
// configVariable('SECRET_ETH_NODE_URI_<network>')
// configVariable('SECRET_MNEMONIC_<network>')
addNetworksFromEnv({
hardhatMainnet: {
type: 'edr',
chainType: 'l1',
},
hardhatOp: {
type: 'edr',
chainType: 'optimism',
},
}),
),
paths: {
sources: ['src'],
},
};
export default config;