Skip to content

Lesson 7: Hardhat Fund Me : explain namedAccounts #613

Discussion options

You must be logged in to vote
  • How hardhat-deploy will use this namedAccounts?

getNamedAccounts() is a part of the Hardhat Runtime Environment or in short hre, which makes every configuration you write in the hardhat.config file globally available throughout that particular Hardhat project. So whenever you call the getNamedAccounts() in any of your deploy or test scripts, that specific namedAccounts object and all of its children's become available to that script, and you would be then assigning the deploy script to your desired account. Such as an example -

await deploy('MockV3Aggregator', {
      contract: 'MockV3Aggregator',
      from: deployer,
    });

Here, in the from section, I've passed the deployer account,…

Replies: 1 comment

Comment options

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