Hello Community,
please bear with me this might be a dump question but i can’t wrap my head around that:
User should be able to deposit an uint amount between 1 and 10 (integer 1,2,3,4,5,6,7,8,9 or 10) to take part in a raffle. I have a function taking users amount:
function takePartInRaffle(uint _amount) external activeContract {
require(_amount > 0, “amount is 0”);
require(_amount <= maxRaffleVouchers, “max vouchers limit”);
…
…
as the user is able to deposit any uint like 1.5 ETH or 1.22 ETH i am stuck and don’t know how to write a require precondition here. Also not sure if i am completely on a wrong path with my idea to prevent / force the user to deposit a whole / integer number.
Would be awesome to get some answers on that.
Kind regards
esodot