Categories
Cryptocurrency Ethereum Mastering Development

How to calc to 0.000025

values[i].mul(100*100*100 * (now.sub(invest.lastDepositTime).div(RATE_DIVIDER[0])));

I got like that: 0.000025, but in contract return 0.

I have added:

uint256[] memory
uint256[] memory calcWithdraw = new uint256[](invests.length);

Error:
Type rational_const 1 / 4000000 is not implicitly convertible to expected type uint256. Try converting to type ufixed8x8 or use an explicit conversion.
calcWithdraw[i] = 0.00000025;

I have tried also add for test 0.00000025 like you see.

How can I retrieve calculate like you see with solidity?

Leave a Reply

Your email address will not be published. Required fields are marked *