I have been testing out my NFT smart contract on Rinkeby to test out interaction on the front end. I have done many testnet mints with this same function, but the last two times that I have tried the function, it fails with this Fail with error 'Incorrect payable amount'. This error makes sense as etherscan shows the sender sending .6000000000000001 ether. The transaction will fail because of this line of code in my main mint function require(msg.value == mintPrice * amount, "Incorrect payable amount");. This error only seems to occur when I change the price and use the public mint function after I use my whitelist mint function. I am just wondering if there is a bug in my code somewhere or if this is definitely an error coming from the frontend. Another thought is should I change that require line to msg.value >= mintPrice * amount? Or could that create problems for potential buyers when minting? Here is the link to the smart contract code if you would like to look into it.

1 Answer 1


It seemed to be a bug with the frontend code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.