-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhardhat.config.js
More file actions
34 lines (30 loc) · 862 Bytes
/
hardhat.config.js
File metadata and controls
34 lines (30 loc) · 862 Bytes
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
const { task } = require("hardhat/config");
// require("@nomicfoundation/hardhat-toolbox");
require("@nomiclabs/hardhat-ethers");
require("@nomiclabs/hardhat-waffle");
require('dotenv').config()
const PRIVATE_KEY = process.env.PRIVATE_KEY;
const ALCHEMY_API_KEY = process.env.ALCHEMY_API_KEY;
task("cocoa", "Printes the list of accounts", async (taskArg, hre) => {
const accounts = await hre.ethers.getSigners();
for (const account of accounts) {
console.log(account.address);
}
});
/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
solidity: "0.8.17",
paths: {
artifacts: './src/artifacts',
},
defaultNetwork: 'hardhat',
networks: {
hardhat: {
chainId: 1337
},
goerli: {
url: `https://eth-goerli.g.alchemy.com/v2/${ALCHEMY_API_KEY}`,
accounts: [`0x${PRIVATE_KEY}`]
}
}
};