I am trying to implement crossmint-pay-button using javascript. I am using cdn link: https://unpkg.com/@crossmint/[email protected]/lib/index.global.js
<crossmint-pay-button
collectionTitle="Gaia comic"
collectionDescription="Gaia comic collection "
collectionPhoto=""
clientId="8d77450f.....ad497f612"
mintConfig='{"type":"erc-721","price":"0.1","_count":"1"}'
environment="staging"
/>
When I click Pay button below error gets. "Missing required argument count for minting. Please provide the argument in the mintParams"
The error message is misleading. Where it says
mintParams
, it should saymintConfig
.With that in mind: what error is saying is that your contract abi is expecting a
count
argument to mint, and this argument should be passed in themintConfig
object.In your case, you are passing the argument
_count
. If you rename it tocount
, that should work.See below:
Reach out to the crossmint team on discord if this doesn't work for you!