You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the Smart contract day22-ICO/ICO.sol is a critical logic error.
the modifier tokensReleased and tokensNotReleased depend on the booleanreleased.
This boolean never gets set to true in the release() function.
Therefore the withdraw function can never be called after deployment of the current implementation.
I will open a PR addressing this simple fix.
My proposed change would be the following:
function release() external onlyAdmin icoEnded tokensNotReleased {
released =true;
DoneToken tokenInstance =DoneToken(token);
for (uint256 i =0; i < sales.length; i) {
Sale storage sale = sales[i];
tokenInstance.transfer(sale.investor, sale.quantity);
}
}
The text was updated successfully, but these errors were encountered:
In the Smart contract
day22-ICO/ICO.sol
is a critical logic error.the modifier
tokensReleased
andtokensNotReleased
depend on the booleanreleased
.This boolean never gets set to true in the
release()
function.Therefore the withdraw function can never be called after deployment of the current implementation.
I will open a PR addressing this simple fix.
My proposed change would be the following:
The text was updated successfully, but these errors were encountered: