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

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

Open KrazyNZ opened 2 years ago

KrazyNZ commented 2 years ago

Hi all i have this issue when going to mint from the dapp, how do i fix this. I am pretty new to coding so if anyone can post a resolution i would deeply be grateful

image

bkjadeja commented 1 year ago

i am getting same error. is there any solution ?

bkjadeja commented 1 year ago

Hi all i have this issue when going to mint from the dapp, how do i fix this. I am pretty new to coding so if anyone can post a resolution i would deeply be grateful

image

Try changing line 133 in App.js to .mint(blockchain.account, mintAmount) Make sure to save before you give it a go. The smart contract which is explained int the Hashlips video takes 2 parameters (Blockchain account and mint amount). If you have copy/paste his code directly you can see that he is taking the minting amount only. He mentions this in the readme file. In order to work you have to either edit your smart contract to take only 1 parameter or add the blockchain account as I told you. I assume it will be easier to add the address inside.