1

I’ve deployed an NFT Collection contract on Polygon using thirdweb. The contract address is: 0xb853a16bfb7561ED1bf33B080726cb487bdD9006

What works:

The contract and minted NFT are visible in the thirdweb dashboard. Minting NFTs works and I can see them in the dashboard.

What doesn’t work:

My frontend (Next.js + React) uses useContract(NFT_COLLECTION_ADDRESS, "nft-collection") and useNFTs(contract) from @thirdweb-dev/react. The social feed and recently minted NFTs panel do not show any live data. The browser console logs a call revert exception for nextTokenIdToMint() (which is an NFT Drop method, not NFT Collection). The thirdweb API returns a 404 for contract metadata: GET https://contract.thirdweb.com/metadata/1/0xb853a16bfb7561ED1bf33B080726cb487bdD9006

What I’ve tried:

Cleared build cache (.next folder). Updated all thirdweb dependencies. Searched my codebase for any NFT Drop-specific hooks/components (none found). Only using NFT Collection hooks and methods. Confirmed contract and NFTs are visible in the dashboard.

Code Snippet:

const { contract } = useContract(NFT_COLLECTION_ADDRESS, "nft-collection");
const { data: nfts, isLoading: nftsLoading, error: nftsError } = useNFTs(contract);

useEffect(() => {
    if (nftsError) {
        console.error("Error from useNFTs:", nftsError);
    }
    if (nfts) {
        console.log("NFTs from useNFTs:", nfts);
    }
}, [nfts, nftsError]);

Question: Why is useNFTs(contract) not returning my minted NFTs, and why am I seeing a nextTokenIdToMint() error for an NFT Collection contract? Is this a thirdweb SDK or backend issue, or am I missing something in my setup?

1
  • Dashboard works = direct connection. Frontend broken = backend thinks your contract is the wrong type. Fix = remove the forced "nft-collection" type or resync your contract in dashboard. Commented Aug 20 at 12:44

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.