File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -210,7 +210,7 @@ contract CommonsToken is BondingCurveToken {
210210 uint256 lockedInternal = initialContributions[msg .sender ].lockedInternal;
211211
212212 // The total amount of INTERNAL tokens that should have been unlocked.
213- uint256 shouldHaveUnlockedInternal = (paidExternal / initialRaise) * unlockedInternal ;
213+ uint256 shouldHaveUnlockedInternal = (paidExternal * unlockedInternal) / initialRaise ;
214214 // The amount of INTERNAL tokens that was already unlocked.
215215 uint256 previouslyUnlockedInternal = (paidExternal / p0) - lockedInternal;
216216 // The amount that can be unlocked.
Original file line number Diff line number Diff line change 11pragma solidity ^ 0.5.0 ;
22
33import "./CommonsToken.sol " ;
4+ import "./vendor/ERC20/IERC20.sol " ;
45
56contract FundingPoolMock {
67
@@ -10,8 +11,9 @@ contract FundingPoolMock {
1011 commonsToken = CommonsToken (_commonsToken);
1112 }
1213
14+ // Note: function not secure => via this function all fundingPool tokens can be withdrawn
1315 function allocateFunds (address to , uint256 value ) public {
1416 commonsToken.fundsAllocated (value);
15- commonsToken.transfer (to, value);
17+ IERC20 ( commonsToken. externalToken ()) .transfer (to, value);
1618 }
1719}
You can’t perform that action at this time.
0 commit comments