Skip to content

LESSON 15: runContractFunction from useWeb3Contract returns undefined #1624

Answered by ljrahn
ljrahn asked this question in Q&A
Discussion options

You must be logged in to vote

Was accidentally pushing the nftMarketplace abi as the nft abi in the deploy script (99-update-front-end.js):

async function updateAbi() {
  const nftMarketplace = await ethers.getContract("NftMarketplace")
  fs.writeFileSync(
    `${frontEndAbiLocation}NftMarketplace.json`,
    nftMarketplace.interface.format(ethers.utils.FormatTypes.json)
  )
  const basicNft = await ethers.getContract("BasicNft")
  fs.writeFileSync(
    `${frontEndAbiLocation}BasicNft.json`,
    nftMarketplace.interface.format(ethers.utils.FormatTypes.json)
  )
}

silly me.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by ljrahn
Comment options

You must be logged in to vote
0 replies
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