When to wait for block confirmations #4592
-
Hello, Scratching my head... I am still confused and some things are not clear to me after watching the tutorial: 1/ when do we have to wait for block confirmations and why: describe("Mint NFT", () => {
beforeEach(async () => {
const txResponse = await basicNft.mintNft()
await txResponse.wait(1)
}) I usually just go straight to what I need from the contract, and it doesn't work. 2/ where this is coming from: await deployments.fixture(["basicnft"]) why do this and what is does? fixture, where is that coming from beforeEach(async () => {
accounts = await ethers.getSigners()
deployer = accounts[0]
await deployments.fixture(["basicnft"])
basicNft = await ethers.getContract("BasicNft")
}) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Hi @amineprogmine , Using Practically, in a The Cheers 😄 |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
@amineprogmine
fixture
is just a function provided by thehardhat-deploy
plugin which deploys contracts before starting tests. It takes a list of tags contained inside the deploy scripts. In order to use contracts in our test we need to deploy them.