Invalid number of parameters for "mint". Got 1 expected 2
See original GitHub issueHi 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 | >
Issue Analytics
- State:
- Created 2 years ago
- Comments:5

Top Related StackOverflow Question
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.