I am trying to use my contracts in my next application via thirdweb . However I am getting the error "Error: Contract is not a nft-drop". When I go to the thirdweb dashboard and copy and paste the exact same code, I still receive the error. How can I fix this?
code
import { useContract } from '@thirdweb-dev/react'
export default function Component() {
const { contract } = useContract("<My contract address>", "nft-drop")
// Now you can use the nft drop contract in the rest of the component
}
I an using the useContract hook from thirdweb react docs https://portal.thirdweb.com/sdk/interacting-with-contracts/nft-drop#getting-the-contract-in-your-application
however I still receive the error, how do I solve this?
If your smart contract is an NFT Drop deployed via the thirdweb dashboard, you might have configured the wrong chain ID in your ThirdwebProvider
.
Your chain ID needs to be set to the network you deployed your smart contract to.