-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add whitelist/blacklist tests #56
Open
brudaswen
wants to merge
108
commits into
master
Choose a base branch
from
tests/whitelist
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…, participant avaliable actions, participant commit and validation, whitelister
* Added latest ganache-core and ganache-cli to project * Added nvm instructions and upgraded to node 8.17.0 * Added websocket into dependencies to fix install
* Refacator init() * Addresses Fabian's comments * Fix stages' start/end blocks as discussed * Rename 'newStageEndBlock' to 'lastStageEndBlock' * Make test initialization consistent with the rICO * Fix bug stageId return bug in getStageAtBlock() and update tests * Modify init so stageCount is indicating the precise number of stages * Use safeMath and minor fixes * Rename lastStageEndBlock to previousStageEndBlock as per Micky's suggestion * Fix compiler error and warning
* Refacator init() * Use safeMath and minor fixes * Turn msg.sender/value into parameters in commit() + minor fixes * Fix compiler error and warning * Fix test (now 1st participant has id 0) * Make recordNewContribution() internal for making it extenndable * Make commit() public
…t-state-after-cancellation Fix: Inconsistent contract state after cancellation
Cancellation adds the returned amount to the global `returnedETH`. However, for the `aggregatedState` and the `byStageState` the amount is added to `withdrawnETH`. This leads to an inconcistent state and miscalculations during accept.
Accepting tokens calculations wrong pending ETH amount (`newAcceptedValue`). The `returnedETH` amount is not taken into account which leads to delivery of too many tokens.
… whitelisted, is accepted automatically.` Test case used old array key names.
…(value), account has 2 contributions` Test used old old `ParticipantStageDetails` name.
…tract` Calculation of `tokensInStage` in helpers.utils.getAvailableEthAndTokensForWithdraw() was wrong
Cleanup comments and fix some typos
Simplify stageID calculation
…contract-state-after-cancellation Check global state after cancelled contribution
…vered Cancelling before white-listing should not deliver too many tokens later
Fix test `new contribution from the TestAcceptParticipant that is now whitelisted, is accepted automatically.`
Fix cancellation test `value < rico.minContribution results in cancel(value), account has 2 contributions`
Fix Flow test `participant can withdraw by sending tokens back to contract`
Fix all failing tests
…ter-cancel Fix `returnedETH` calculation on cancel
…y of too many tokens
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix invalid calculation of
byStage.returnedETH
that lead to delivery of too many tokens.