I'm testing a smart contract on REMIX, everything works but the mint function provided throws an insufficient amount error even though I have enough ether in my account.
It seems like theirs no ether being sent out.
Any idea why this might be happening ?
uint256 public cost = 0.02 ether;
function mint(uint256 _mintAmount) public payable {
require(!paused, "The contract is paused!");
require(msg.value >= cost * _mintAmount, "Need to send 0.02 ether");
_mintLoop(msg.sender, _mintAmount);
}
the provider does not ask you, one as a developer when creating the function with web3.js, has to pass the value as a parameter, if in value you put the amount of ether and it has to change from Gwi to ether