HashLips / hashlips_nft_minting_dapp

HashLips minting dapp is a quick and easy way to connect your smart contract and start minting NFTs.
MIT License
1.02k stars 981 forks source link

Error: Invalid number of parameters for "mint". Got 1 expected 2! #30

Open bkhoward2001 opened 2 years ago

bkhoward2001 commented 2 years ago

▶ 2 stack frames were collapsed. claimNFTs C:/NFTs/DoodleCats/hashlips_nft_minting_dapp-1.0.1/src/App.js:132 129 | console.log("Gas limit: ", totalGasLimit); 130 | setFeedback(Minting your ${CONFIG.NFT_NAME}...); 131 | setClaimingNft(true);

132 | blockchain.smartContract.methods | ^ 133 | .mint(mintAmount) 134 | .send({ 135 | gasLimit: String(totalGasLimit), View compiled onClick C:/NFTs/DoodleCats/hashlips_nft_minting_dapp-1.0.1/src/App.js:357 354 | disabled={claimingNft ? 1 : 0} 355 | onClick={(e) => { 356 | e.preventDefault(); 357 | claimNFTs(); | ^ 358 | getData(); 359 | }} 360 | > View compiled ▶ 19 stack frames were collapsed.

How do I fix this?

YanesIsHere commented 2 years ago

Make sure to replace your ABI from the one you compiled in Remix.

brandhorse commented 2 years ago

Where do we need to replace the ABI?

rcpilotp51 commented 2 years ago

Make sure to replace your ABI from the one you compiled in Remix.

Where do you get the abi information if you created a contract through NFTport

rcpilotp51 commented 2 years ago

@brandhorse I cant get the abi info from a contract generated by nftport because the contract source code isnt verified and the etherscan api only retrieves this information from verified source code: is there a workaround for this, to get the DAPP working without ABI information abi.json?

MindpowerLLC commented 2 years ago

If you still need this or for others trying to figure it out. Try changing line 133 to .mint(blockchain.account, mintAmount) Make sure to save before you give it a go. Hope that helps.