-
Notifications
You must be signed in to change notification settings - Fork 1
/
hardhat.config.ts
39 lines (35 loc) · 896 Bytes
/
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
import { task, HardhatUserConfig } from "hardhat/config";
import "@nomiclabs/hardhat-waffle";
import "hardhat-watcher";
task("accounts", "Prints the list of accounts", async (taskArgs, bre) => {
const accounts = await bre.ethers.getSigners();
for (const account of accounts) {
const address = await account.getAddress();
const tx = await account.getTransactionCount();
const balance = await account.getBalance();
console.log(
`${address} | ${tx} transactions | ${bre.ethers.utils.formatEther(
balance
)} ETH`
);
}
});
const config: HardhatUserConfig = {
defaultNetwork: "localhost",
solidity: {
version: "0.8.7",
settings: {
optimizer: {
enabled: true,
runs: 1000,
},
},
},
watcher: {
test: {
tasks: ["test"],
files: ["./contracts", "./test"],
},
},
};
export default config;