Lesson 15. Error: No deployment found for: NftMarketplace #6364
-
I came back to coding from a long pause and I can't understand why i receive this error:
When I try to run:
I use hardhat-toolbox, so my code is a bit different from waffle, and thus, I use different method to get my deployment const { ethers, network, getNamedAccounts, deployments } = require("hardhat")
const { moveBlocks } = require("../utils/move-blocks")
const PRICE = ethers.parseEther("0.1")
let NftMarketplace, NftMarketplaceAddress, NftMarketplaceInstance
let BasicNft, BasicNftAddress, BasicNftInstance
async function mintAndList() {
const { deployer } = await getNamedAccounts()
const signer = await ethers.getSigner(deployer)
// const nftMarketplace = await ethers.getContract("NftMarketplace")
NftMarketplace = await deployments.get("NftMarketplace")
NftMarketplaceAddress = NftMarketplace.address
NftMarketplaceInstance = await ethers.getContractAt(
"NftMarketplace",
NftMarketplaceAddress,
signer,
)
...
.....
........ I already deployed on localhost, hardhat, sepolia networks. I have the folder with abi and address. please help <3 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
NVM, I needed to deploy with specifying localhost network after I launch the node first, and then try to run a script. |
Beta Was this translation helpful? Give feedback.
NVM, I needed to deploy with specifying localhost network after I launch the node first, and then try to run a script.
I thought if I already had a folder named localhost in my deployments then I am ready to go, but no