accomodate maximum supply in DIGG shares
@@ -70,10 +70,10 @@ contract UFragments is ERC20Detailed, Ownable {
uint256 private constant INITIAL_FRAGMENTS_SUPPLY = 4000 * 10**DECIMALS;
uint256 private constant MAX_FRAGMENTS_SUPPLY = 21000000 * 10**DECIMALS;
- // TOTAL_SHARES is a multiple of INITIAL_FRAGMENTS_SUPPLY so that _sharesPerFragment is an integer.
+ // TOTAL_SHARES is a multiple of MAX_FRAGMENTS_SUPPLY so that _sharesPerFragment is an integer.
// Use the highest value that fits in a uint128 for sufficient granularity.
- uint256 private constant TOTAL_SHARES = MAX_UINT256 - (MAX_UINT256 % INITIAL_FRAGMENTS_SUPPLY);
- // uint256 private constant TOTAL_SHARES = MAX_UINT128 - (MAX_UINT128 % INITIAL_FRAGMENTS_SUPPLY);
+ uint256 private constant TOTAL_SHARES = MAX_UINT256 - (MAX_UINT256 % MAX_FRAGMENTS_SUPPLY);
+ // uint256 private constant TOTAL_SHARES = MAX_UINT128 - (MAX_UINT128 % MAX_FRAGMENTS_SUPPLY);
// MAX_SUPPLY = maximum integer < (sqrt(4*TOTAL_SHARES + 1) - 1) / 2
uint256 private constant MAX_SUPPLY = MAX_UINT128;
