You are viewing a single comment's thread from:

RE: The EOS Crowdsale contract explained

in #eos7 years ago

You should note that in buyWithLimit, the dailyTotals will be calculated at the moment of contract execution. So if you're contributing to a future period where only 100 ETH have been contributed so far, your transaction specifying a limit of 101 ETH would process normally and you would still buy EOS tokens, even if the day ends up collecting 20000 ETH.

I'm talking about this code in particular:

    userBuys[day][msg.sender] += msg.value;
    dailyTotals[day] += msg.value;

    if (limit != 0) {
        assert(dailyTotals[day] <= limit);
    }

    LogBuy(day, msg.sender, msg.value);
Sort:  

This was the info that I came for. Thanks for pointing that out as it's not explicitly obvious when the limit is determined.

Coin Marketplace

STEEM 0.20
TRX 0.13
JST 0.030
BTC 64916.21
ETH 3483.89
USDT 1.00
SBD 2.45