Skip to content

Lesson 14: BasicNft Unit test #2121

Answered by RoboCrypter
ManuWeb3 asked this question in Q&A
Discussion options

You must be logged in to vote

@ManuWeb3 : Yes both instances will work just fine, If you are only using the deployer,
but the good practice what I do is to connect the deployer or whatever user is when getting contract.

Sometimes you have more than one Users so you have to deploy with by connecting them to the contract.
This usually we have to do when we are testing our contract.
For Example:
basicNft = await ethers.getContract("BasicNft", deployer)
basicNft = await ethers.getContract("BasicNft", user)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ManuWeb3
Comment options

Answer selected by ManuWeb3
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