Replies: 1 comment
-
It is to use them in the logic of our code, which we cannot elsewise (i.e. destructing) (Note: Unless there is a way to use them specifically even w/o destructing, but this is unlikely as I have not noticed this.) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It is often stated that we need to destruct/import hardhat object into its components like
const { deployments, ethers, getNamedAccounts } = require("hardhat");
what I realized is that this is mostly already there, for example in tests or scripts I run. When I comment out these lines all still works. I used ethers, network, getNamesAccounts, deployments... all without stating them. Its not a big problem to have them, just I often wonder what is already there and I dont need to have a const for it and how could I know that?
Beta Was this translation helpful? Give feedback.
All reactions