-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhardhat.config.ts
More file actions
46 lines (42 loc) · 1.09 KB
/
Copy pathhardhat.config.ts
File metadata and controls
46 lines (42 loc) · 1.09 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
import { HardhatUserConfig, task } from "hardhat/config"
import "@nomicfoundation/hardhat-toolbox"
import "hardhat-deploy"
import "hardhat-deploy-ethers"
import "dotenv/config"
task("accounts", "Prints the list of accounts", async (taskArgs, hre) => {
const accounts = await hre.ethers.getSigners()
for (const account of accounts) {
const balance = await hre.ethers.provider.getBalance(account)
console.log(`${account.address} | balance: ${balance}`)
}
})
const SEPOLIA_RPC_URL = process.env.SEPOLIA_RPC_URL
const SEPOLIA_PRIVATE_KEY = process.env.SEPOLIA_PRIVATE_KEY as string
const config: HardhatUserConfig = {
solidity: {
compilers: [{ version: "0.8.19" }, { version: "0.8.24" }],
},
defaultNetwork: "hardhat",
networks: {
sepolia: {
url: SEPOLIA_RPC_URL,
accounts: [SEPOLIA_PRIVATE_KEY],
chainId: 11155111,
},
},
gasReporter: {
enabled: false,
outputFile: "gas-report.txt",
},
namedAccounts: {
deployer: {
default: 1,
31337: 1,
11155111: 0,
},
users: {
default: 2,
},
},
}
export default config