Closed ChuckSRQ closed 7 years ago
i'm surprised you were even able to submit that, because decimals get encoded as negative numbers :b
So here's the thing -- TokenPrice is actually submitted in wei (so .0000000001 ETC actually gets converted to 100000000 wei). But Funding Goal is submitted in ether, because we assumed that no one would ever bother crowdfunding less than $20. We can update the contract to set the funding goal in wei, if that seems like a reasonable use case. @realcodywburns do you know if this affects gas costs?
It shouldnt effect the gas. You could add a test that throws if the fund goal > 100 million or something. That would fix the roll over. Solidity really needs floating point operations
browser-side validation added before tx submission
I created an ICO with Fundraising Goal of .00001000 ETC and got this.
Funding Goal: 288230376018821608 ETC ($6676856660476002549.32)