contract.getListingPrice() Not woking it throws a Error always.
NaitikDartexon opened this issue · comments
const price = ethers.utils.parseUnits(formInput.price, 'ether')
let contract = new ethers.Contract(marketplaceAddress, NFTMarketplace.abi, signer)
let listingPrice = await contract.getListingPrice()
in that above code when i try to log the listing price i got the error
Can anyone please help me in that how to resolve it.
I had the same problem, and I solved it by making sure that you're Metamask wallet should be connected to the same network where you deployed your smart contract. If you deployed your smart contract locally make sure that your metamask wallet is connected to Localhost8545 when Interacting when the smart contract.