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 982 forks source link

Invalid number of parameters for "mint". Got 1 expected 2 #74

Open bcwdesign opened 2 years ago

bcwdesign commented 2 years ago

Hi team,

I am redirected to the following error when trying perform the Buy step after connecting. Any thoughts to the reason? It obviously states that it is expecting 2 arguments in the mint but I didn't change the code. Was it stored incorrectly in the repository or did the mint function change?

Thanks! Joe

× Error: Invalid number of parameters for "mint". Got 1 expected 2! ▼ 2 stack frames were expanded. InvalidNumberOfParams node_modules/web3-core-helpers/lib/errors.js:33 _createTxObject node_modules/web3-eth-contract/lib/index.js:669 ▲ 2 stack frames were expanded. claimNFTs 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 src/App.js:359 356 | disabled={claimingNft ? 1 : 0} 357 | onClick={(e) => { 358 | e.preventDefault(); 359 | claimNFTs(); | ^ 360 | getData(); 361 | }} 362 | >

pixobits commented 2 years ago

Have the same issue on polygon & my dapps become useless. trying to find out how to fix. on bsc everything ok.

franko-c commented 2 years ago

Have you tried updating the ABI? I had this same issue and doing that resolved it.

You can see how Daniel does this at around 1h43m in the Ultimate Guide video.

pixobits commented 2 years ago

Everything works just fine. But today one of users told that its not minitng, I've checked and yes, no minting. That was deployed like in instruction and as I mentioned above averything works 2 weeks or even more. For the second one it was works from November till now. BSC is works, and polygon stops. Idk can I leave links here, but you can check you yourself: sc4mr-matic - not works sc4mr-bsc - works after this ^ just add .digiart.city to address. https is works fine too.

pixobits commented 2 years ago

tried to use minting_dapp_card and it works fine. as a quick fix for now.

yograjmeena commented 2 years ago

Screenshot (104) I am getting this error when i try to mint some nfts TypeError: blockchain.smartcontract.methods.mint is not a fuction