Skip to content
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
wants to merge 108 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
0a69e86
added sol-merger for contract flattening / etherscan validation
mickys Nov 18, 2019
6ed5674
added base classes for fuzz testing
frozeman Nov 18, 2019
8839d06
added fuzz example direction
frozeman Nov 18, 2019
81682cb
Fuzz Tests support added, deployment implemented, npm run fuzz
mickys Nov 25, 2019
6334f2e
Reworked deployer to return addresses and instances to test runner
mickys Nov 25, 2019
9027a66
Fuzzy tests, added initial participant initialization
mickys Nov 30, 2019
09adb22
isRunning modifier, getUnlockedBalance update, participant tx balance…
mickys Dec 1, 2019
ff70d90
Add comments for storage variables
i-stam Nov 27, 2019
f6e5a6a
Add comments for constructor + init
i-stam Nov 28, 2019
58f136e
Add comments for modifiers
i-stam Nov 28, 2019
d87793d
Review and add comments for wihtdraw()
i-stam Nov 29, 2019
a8a3136
Review and add comments for 'cancel' fucntions
i-stam Nov 29, 2019
09d353c
Review and add comments for projectWithdraw() + getProjectAvailableEth()
i-stam Nov 29, 2019
4421f1e
Review and add comments for whitelist() & whitelist()
i-stam Nov 30, 2019
eff7ee9
Add comments to remaining view functions
i-stam Dec 1, 2019
435a8dc
Use Ethereum NatSpec format for comments
i-stam Dec 1, 2019
9498456
Added missing 'to' in comment
i-stam Dec 2, 2019
5311c8d
Remove duplicate statements (already removed in dev branch)
i-stam Dec 2, 2019
aed9994
reworked comments
frozeman Dec 4, 2019
d7dd361
Merge pull request #18 from lukso-network/comments
frozeman Dec 4, 2019
7cd68c6
Use only tokenContractAddress (#20)
i-stam Dec 6, 2019
839ec30
Remove unused variables and modifier (#26)
i-stam Dec 12, 2019
cc959ee
ranamed committedETH > totalReceivedEth and acceptedETh > committedEt…
frozeman Dec 12, 2019
2bb2c05
fixed comments
frozeman Dec 12, 2019
4a8ca6d
renamed canCancelByEth and moved msg value from cancel inner function
frozeman Dec 12, 2019
da4bd63
Upgrade Ganache-CLI and tested on Node 8.17.0 on Catalina (#30)
mickys Dec 20, 2019
000d454
Tests refactoring, new js validator base
mickys Dec 27, 2019
0f26442
Init() refactoring (#29)
i-stam Dec 27, 2019
7ec9320
Commit refactoring (#32)
i-stam Dec 27, 2019
b212faa
Use safeMath and minor fixes
i-stam Dec 22, 2019
b60e0c7
Fix compiler error and warning
i-stam Dec 27, 2019
84a2f4d
Turn msg.sender/value into parameters in commit() + minor fixes
i-stam Dec 23, 2019
ae98315
Fix test (now 1st participant has id 0)
i-stam Dec 27, 2019
391b7a3
Whitelist() now receives a list of participant addresses
i-stam Dec 27, 2019
4aaacb0
Change memory argument to calldata for external whitelist()
i-stam Dec 27, 2019
315ae5f
Fix broken tests due to altered whitelist()
i-stam Dec 28, 2019
6aee18f
Merge pull request #33 from lukso-network/whitelist-refactor
i-stam Dec 30, 2019
4d7d3ee
Merge branch 'master' into develop
frozeman Dec 30, 2019
f4f9b48
New split up tests
mickys Jan 3, 2020
53b7e3f
Commit/Cancel wrapper (#36)
i-stam Jan 8, 2020
d654cef
work in progress
mickys Jan 10, 2020
3fcd110
acceptContributionsForAddress() refactor (#39)
i-stam Jan 10, 2020
8ac92e0
Minimized participant struct (#38)
MariusVanDerWijden Jan 11, 2020
51cf781
Merge branch 'master' into develop
frozeman Jan 20, 2020
f71f310
removed node 12
frozeman Jan 20, 2020
244770b
simplified travis
frozeman Jan 21, 2020
7b5a2ea
added compliter to travis
frozeman Jan 21, 2020
d076875
pipe error travis
frozeman Jan 21, 2020
63dc27c
throw errors for travis
frozeman Jan 21, 2020
44e7802
throw errors for travis
frozeman Jan 21, 2020
e7cda4e
throw errors for travis
frozeman Jan 21, 2020
2f2047a
throw errors for travis
frozeman Jan 21, 2020
b1e8c11
throw errors for travis
frozeman Jan 21, 2020
70e62e8
throw errors for travis
frozeman Jan 21, 2020
b5f3fbb
throw errors for travis
frozeman Jan 21, 2020
da42207
throw errors for travis
frozeman Jan 21, 2020
22cb5ad
throw errors for travis
frozeman Jan 21, 2020
18d48fb
throw errors for travis
frozeman Jan 21, 2020
f60c617
throw errors for travis
frozeman Jan 21, 2020
22774d2
throw errors for travis
frozeman Jan 21, 2020
a651bfe
throw errors for travis
frozeman Jan 21, 2020
817d4fb
Random testing
mickys Jan 22, 2020
0418b2e
fixed travis
frozeman Jan 23, 2020
fe49290
added solidity highlighting
frozeman Jan 23, 2020
2e5073e
added travis
frozeman Jan 23, 2020
24974c3
Project Withdraw solc tests only - wip
mickys Jan 23, 2020
b6286b4
Merge
mickys Jan 23, 2020
809690b
Project Withdraw + token withdraws
mickys Jan 23, 2020
88bb0c0
Project withdraw, new contribution after, tests
mickys Jan 23, 2020
01a6879
Fix compilation error (#40)
i-stam Jan 27, 2020
441d8ae
Project withdraw calculation working
mickys Jan 31, 2020
679837f
Solc Cleanup, random-tests updates
mickys Feb 3, 2020
9ce9c1e
New Fixed tests, contract updates, merge preparations
mickys Feb 7, 2020
cb31b2c
Merging develop into tests-refactor testing
mickys Feb 7, 2020
ee43a6b
Merge fixes
mickys Feb 7, 2020
78425bf
Cleanup comments and fix some typos
Feb 11, 2020
891a684
Simplify stageID calculation
Feb 10, 2020
d9c0558
Fix: Inconsistent contract state after cancellation
Feb 11, 2020
a744f06
Merge pull request #45 from lukso-network/bugfix/inconsistent-contrac…
mickys Feb 14, 2020
4d93edf
Check global state after cancelled contribution
Feb 14, 2020
e5364ea
Cancelling before white-listing should not deliver too many tokens later
Feb 14, 2020
7de83b1
Fix test `new contribution from the TestAcceptParticipant that is now…
Feb 14, 2020
351ff9d
Fix cancellation test `value < rico.minContribution results in cancel…
Feb 14, 2020
e48d50f
Fix Flow test `participant can withdraw by sending tokens back to con…
Feb 19, 2020
1298c5e
Merge branch 'bugfix/flow-withdraw-test' into bugfix/failing-tests
Feb 19, 2020
95b612d
Merge branch 'bugfix/cancellation-test' into bugfix/failing-tests
Feb 19, 2020
481db28
Merge branch 'bugfix/rico-contribution-test' into bugfix/failing-tests
Feb 19, 2020
2735f4d
Merge pull request #43 from lukso-network/cleanup/comments
mickys Feb 20, 2020
38cf089
Merge pull request #44 from lukso-network/cleanup/stage-id
mickys Feb 20, 2020
ac8fc13
Merge pull request #46 from lukso-network/bugfix/inconsistent-global-…
mickys Feb 20, 2020
4839fed
Merge pull request #47 from lukso-network/bugfix/too-many-tokens-deli…
mickys Feb 20, 2020
6ab4961
Merge pull request #48 from lukso-network/bugfix/rico-contribution-test
mickys Feb 20, 2020
a8568b1
Merge pull request #49 from lukso-network/bugfix/cancellation-test
mickys Feb 20, 2020
dab37f1
Merge pull request #50 from lukso-network/bugfix/flow-withdraw-test
mickys Feb 20, 2020
dd73dfc
Merge pull request #51 from lukso-network/bugfix/failing-tests
mickys Feb 20, 2020
6efc719
validator updates and fixes
mickys Feb 20, 2020
2017bb0
validator updates and fixes
mickys Feb 20, 2020
5187e77
PR changes
mickys Feb 20, 2020
e5b81d4
solc tests rework with js validator
mickys Feb 21, 2020
51538c4
Fix `returnedETH` calculation on cancel
Feb 24, 2020
20e5bba
validator updates, solc token method tests
mickys Feb 25, 2020
7011c48
Merge pull request #52 from lukso-network/bugfix/invalid-returnETH-af…
mickys Feb 25, 2020
b62f256
Tests reworked to include token view methods
mickys Feb 25, 2020
122680a
Random testing now working
mickys Feb 25, 2020
29ff936
Random tests now output fixed flow test, withdraw allocation needs so…
mickys Feb 26, 2020
f6951d3
Fixing solc tests, withdraw() needs some work
mickys Feb 26, 2020
6d24def
Add Whitelist tests
Feb 24, 2020
e2d17e4
Fix invalid calculation of `byStage.returnedETH` that lead to deliver…
Mar 2, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 8 additions & 40 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,24 @@
services:
- xvfb
language: node_js
git:
depth: false
matrix:
fast_finish: true
include:
- node_js: 8
env: TEST=unit
- node_js: 11
env: TEST=unit
- node_js: 12
env: TEST=unit
- node_js: 10
env: TEST=build_and_lint
- node_js: 10
env: TEST=unit_and_e2e_clients
- node_js: 10
env: TEST=e2e_ganache
- node_js: 10
env: TEST=e2e_mosaic
- node_js: 10
env: TEST=e2e_browsers
addons:
chrome: stable
firefox: latest
allow_failures:
- node_js: 10
env: TEST=e2e_ganache
- node_js: 10
env: TEST=e2e_mosaic

- node_js: 9
- node_js: 8
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-5
- g++-5

- gcc-6
- g++-6
before_install:
- if [ $TRAVIS_OS_NAME == "linux" ]; then
export CC="gcc-5";
export CXX="g++-5";
export LINK="gcc-5";
export LINKXX="g++-5";
fi
- export DISPLAY=:99.0
- export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
install:
- if [[ $TEST != "e2e_ganache" ]] && [[ $TEST != "e2e_mosaic" ]]; then
npm install;
export CC="gcc-6";
export CXX="g++-6";
export LINK="gcc-6";
export LINKXX="g++-6";
fi
script:
- npm run test
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,27 @@ sudo apt-get install nodejs
sudo apt-get install npm
```

### Recommended

- [nvm](https://github.com/nvm-sh/nvm)

```bash
nvm install v8.17.0
nvm use v8.17.0
npm install
npm run test
```

### Running Tests

```bash
npm test
```

### Merging contracts for deployment

```bash
npm run merge-contracts
```

Outputs the merged contracts in `./contracts-merged`
2 changes: 1 addition & 1 deletion build/deployments.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"stage_0_before_allocation":{"name":"stage_0_before_allocation","rico_address":"0x6b4FfCA103EB517BEF1734cbe42A0581255d744e","token_address":"0x9B847956292e355ee7C74106e60E1155B9540056"},"stage_0_at_allocation":{"name":"stage_0_at_allocation","rico_address":"0x1B5377EA425f241D668D99f197E401182C098F3e","token_address":"0x509F12467384734E405D5E6Cc5ED524BA9c715BA"},"stage_0_at_allocation_one_contribution_whitelist_no":{"name":"stage_0_at_allocation_one_contribution_whitelist_no","rico_address":"0xcbbED7CbFd0FB8a9222224fE71FAb46f0C69De15","token_address":"0x198d46E74eF75eCa2b75802a097d049ba40CE97f"},"stage_0_at_allocation_one_contribution_whitelist_yes":{"name":"stage_0_at_allocation_one_contribution_whitelist_yes","rico_address":"0x282Db946EAdF5059D90AeAdA76F66aa112d2e5C5","token_address":"0x05c01caB30416F7D19e8C948cF5169d9050Acf13"}}
{"before_allocation":{"name":"before_allocation","rico_address":"0x2C1DE44AEd10792665507EBcf8f3C8584B5C23Fd","token_address":"0x509F12467384734E405D5E6Cc5ED524BA9c715BA"},"stage_0_at_allocation":{"name":"stage_0_at_allocation","rico_address":"0x282Db946EAdF5059D90AeAdA76F66aa112d2e5C5","token_address":"0x198d46E74eF75eCa2b75802a097d049ba40CE97f"},"stage_0_at_allocation_one_contribution_whitelist_no":{"name":"stage_0_at_allocation_one_contribution_whitelist_no","rico_address":"0x8345d7C203522B081f77712c55Cf19286AD440aF","token_address":"0x05c01caB30416F7D19e8C948cF5169d9050Acf13"},"stage_0_at_allocation_one_contribution_whitelist_yes":{"name":"stage_0_at_allocation_one_contribution_whitelist_yes","rico_address":"0xA4cF040c80cf036583d331e7259a03BdA0e26Fa7","token_address":"0xA5973312Ca99bAB7FC2EA53bA2d9dAB66C3B4A93"}}
Loading