How do I find the `__allowlistProof` when implementing Crossmint with Thirdweb's NFT Drop Contract

260 views Asked by At

I'm implementing Crossmint on my React front-end to let users mint NFTs from my smart contract created using thirdweb.com.

The contract is a NFT Drop smart contract. The address is: 0xaE2150AdE811471609f6a556C38e55c2D3D7C712 and it lives on the Mumbai testnet & anyone can claim the NFTs but is limited to 9 NFTs per wallet. enter image description here

Here's how the front-end code looks like:

    <CrossmintPayButton
        clientId="1924aa21-2dbb-45a9-8c74-b0536d40780a"
        mintConfig={{
        type: 'erc-721',
        totalPrice: '0.01',
        _quantity: String(mintQty),
        _currency: 'matic',
        _pricePerToken: '0.001',
        _allowlistProof: '<_ALLOWLISTPROOF>',
        _data: '<_DATA>',
       }}
       environment="staging"
       mintTo={address} // the user's public address (from metamask)
  />

I'm getting issues because I don't know how to get the correct (format?) value for the _allowlistProof props. I have tried {"quantityLimitPerWallet": "1"} but I get the following issue: enter image description here

I also tried to search for the keyword in Crossmint's docs but didn't find anything. Can someone show me how to get said value from my smart contract and pass that value (in the proper format) into the Crossmint payment button?

EDIT! I found a way to get the current claim condition using Thirdweb SDK: const { data: activeClaimCondition, error } = useActiveClaimCondition(contract); which returns the following value:

enter image description here

And I passed is to _allowlistProof using JSON.stringify(). But still get the same error

1

There are 1 answers

0
Nebson On BEST ANSWER

To use thirdweb with Crossmint you need to register your contract type as thirdweb in the developer console.