Lesson 6 : yarn hardhat accounts #1312
Answered
by
krakxn
mazen-sleem
asked this question in
Q&A
-
i have tried to write yarn hardhat accounts I am using WSL:ubuntu |
Beta Was this translation helpful? Give feedback.
Answered by
krakxn
Jul 25, 2022
Replies: 1 comment 4 replies
-
The problem is that they removed it as a pre-defined sample task in the new Hardhat update, I have still listed it below if you want to use that sample task: Put this in your hardhat.config.js file to be able to use it: task("accounts", "Prints the list of accounts", async (taskArgs, hre) => {
const accounts = await hre.ethers.getSigners()
for (const account of accounts) {
console.log(account.address)
}
}) Hope this helped! |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
mazen-sleem
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The problem is that they removed it as a pre-defined sample task in the new Hardhat update, I have still listed it below if you want to use that sample task:
Put this in your hardhat.config.js file to be able to use it:
Hope this helped!