-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.ts
35 lines (30 loc) · 991 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
import { task, type HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox-viem";
import * as dotenv from "dotenv";
dotenv.config();
const providerApiKey = process.env.ALCHEMY_API_KEY || "";
const deployerPrivateKey = process.env.PRIVATE_KEY || "";
task("accounts", "Prints the list of accounts", async (taskArgs, hre) => {
const accounts = await hre.viem.getWalletClients();
for (const account of accounts) {
console.log(account.account.address);
}
});
const config: HardhatUserConfig = {
solidity: "0.8.24",
networks: {
sepolia: {
url: `https://eth-sepolia.g.alchemy.com/v2/${providerApiKey}`,
accounts: [deployerPrivateKey],
},
amoy: {
url: `https://polygon-amoy.g.alchemy.com/v2/${providerApiKey}`,
accounts: [deployerPrivateKey],
},
baseSepolia: {
url: `https://base-sepolia.g.alchemy.com/v2/${providerApiKey}`,
accounts: [deployerPrivateKey],
},
},
};
export default config;