Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contract.getListingPrice() Not woking it throws a Error always. #67

Open
NaitikDartexon opened this issue Nov 24, 2022 · 1 comment
Open

Comments

@NaitikDartexon
Copy link

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

image

Can anyone please help me in that how to resolve it.

@OuailT
Copy link

OuailT commented Apr 24, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@OuailT @NaitikDartexon and others