-
Notifications
You must be signed in to change notification settings - Fork 1
/
hardhat.config.ts
53 lines (45 loc) · 1.17 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
import { HardhatUserConfig, task } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
//import '@nomiclabs/hardhat-ethers';
//import '@nomiclabs/hardhat-waffle';
//import '@nomiclabs/hardhat-etherscan';
//import 'hardhat-gas-reporter';
const config: HardhatUserConfig = {
solidity: {
compilers: [
{
version: '0.8.17',
settings: {
optimizer: {
enabled: true,
runs: 2000,
details: {
yul: true,
cse: true,
deduplicate: true,
orderLiterals: true,
constantOptimizer: true,
}
},
viaIR: true,
}
},
],
},
};
//if (mnemonics && infuraKey) {
config.networks = {
localhost: {
accounts: "remote",
url: `http://127.0.0.1:4444`,
chainId: 33,
}
};
// npx hardhat account --network localhost
task('accounts', 'Prints all accounts', async (_, hre) => {
const accounts = await hre.ethers.getSigners();
for (let i = 0; i < accounts.length; i += 1) {
console.log(`${i + 1}: ${await accounts[i].getAddress()}`);
}
});
export default config;