So I have gotten to the point in my NFT project where I am testing the minting from the website that I setup to mint from. I deployed to Rinkeby, and when I go to mint NFTs on my website, I get the error "Contract Execution reverted." Then when I go to Etherscan it tells me that Value transfer did not complete from a contract execution reverted
I will attach my mint function here.
function whitelistMint(
uint256 amount,
bytes32[] calldata merkleProof
) public payable nonReentrant {
address sender = _msgSender();
require(wlIsActive, "Whitelist sale is not open");
require(_verify(merkleProof, sender, maxWhitelistMint), "You are not whitelisted");
require(amount <= maxWhitelistMint - _alreadyMinted[sender], "Insufficient mints left");
require(msg.value == mintPrice * amount, "Incorrect payable amount");
_alreadyMinted[sender] += amount;
_internalMint(sender, amount);
}
Could this be an issue with gas estimation? Or is there a problem with my mint function? The weird part is that I can mint directly from Etherscan.