Skip to content

getSigners() #2579

Answered by othaime-en
Naveed-Jameel asked this question in Q&A
Sep 14, 2022 · 2 comments · 10 replies
Discussion options

You must be logged in to vote

Hey @Naveed-Jameel just like ganache, hardhat comes with a list of accounts for your local development needs. Hardhat gives you 10 accounts/signers that you can work with. If you remember correctly, we normally add an accounts section under networks in our hardhat.config.js file. In this section, we can add as many accounts for eithers rinkeby, polygon, goerli, mainnet, or whatever chain we want to. However, for hardhat, we don't need to because hardhat adds these accounts for us in the background and we use getSigners() method to retrieve them. If you want to see these accounts, just run yarn hardhat node or npx hardhat node and you'll see them along with their private keys.

Replies: 2 comments 10 replies

Comment options

You must be logged in to vote
10 replies
@othaime-en
Comment options

@Naveed-Jameel
Comment options

@Naveed-Jameel
Comment options

@othaime-en
Comment options

@othaime-en
Comment options

Answer selected by Naveed-Jameel
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants