Hi,
I was trying to create a new smart contract with Remix.
It should be something like a lottery.
I made a simple function to enter the lottery:
function enter() public payable {
require(msg.value == ticketPrice, "Incorrect ETH amount sent");
players.push(msg.sender);
}
Remix was showing gas fee of around 50000.
Now after deploying the contract and using the function on etherscan, I get the message of MetaMask, that the gas fee cant be calculated and MM sets the gas fee to $300.
I know that with increasing the array size, the gas fee will get higher, but $300 for the first entry?
Any idea how to fix this?