-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathhardhat.config.ts
More file actions
83 lines (76 loc) · 1.83 KB
/
hardhat.config.ts
File metadata and controls
83 lines (76 loc) · 1.83 KB
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
import { HardhatUserConfig } from 'hardhat/config';
import { networkConfig } from './utils/config-loader';
import * as dotenv from 'dotenv';
import '@nomiclabs/hardhat-truffle5';
import '@nomiclabs/hardhat-ethers';
import '@nomiclabs/hardhat-web3';
import '@nomiclabs/hardhat-etherscan';
import '@nomicfoundation/hardhat-chai-matchers';
import "@nomicfoundation/hardhat-foundry";
import 'hardhat-gas-reporter';
import 'solidity-coverage';
import "hardhat-contract-sizer";
dotenv.config();
loadAndValidateEnvironment();
const config: HardhatUserConfig = {
solidity: {
compilers: [{
version: '0.8.27',
settings: {
evmVersion: 'cancun',
optimizer: {
enabled: true,
runs: 20,
details: {
yul: true
}
}
}
}],
},
paths: {
sources: 'src/contracts',
tests: 'tests'
},
networks: {
// Define here to easily specify private keys
localhost: {
url: 'http://127.0.0.1:8545',
chainId: 31337
},
devnet: {
url: 'https://rpc.dev.immutable.com',
accounts: []
},
testnet: {
url: 'https://rpc.testnet.immutable.com',
accounts: []
},
mainnet: {
url: 'https://rpc.immutable.com',
accounts: []
},
base: {
url: process.env.BASE_MAINNET_ENDPOINT,
accounts: []
},
arbitrum: {
url: process.env.ARBITRUM_MAINNET_ENDPOINT,
accounts: []
},
base_sepolia: {
url: process.env.BASE_SEPOLIA_ENDPOINT,
accounts: [],
chainId: 84532
}
},
mocha: {
timeout: process.env.COVERAGE ? 15 * 60 * 1000 : 30 * 1000
},
};
export default config;
function loadAndValidateEnvironment(): boolean {
return !!process.env.DEPLOYER_PRIV_KEY &&
!!process.env.WALLET_IMPL_CHANGER_PRIV_KEY &&
!!process.env.DEPLOYER_CONTRACT_ADDRESS;
}