{"action":"created","comment":{"url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/pulls/comments/89406468","pull_request_review_id":9952252,"id":89406468,"diff_hunk":"@@ -6,19 +6,43 @@ pragma solidity ^0.4.4;\n  * The winner of the pot is decided by reverse auction (lowest Bid wins).\n  *\n  * Things still missing/needs fixing:\n- * in withdraw() , add fee related logic\n- * checkingContribution, check whether or not a member as contributed as least contributionSize at the end of Round\n+ * in withdraw() , add fee related logic (done, Sol should still be discussed)\n+ *   Sol: will keep deduct a fee, and keep it in contract untill the end?\n+ * if there are contribution than what is required, put them in pendingWithdrawal (done)\n+ *   Sol: in contribute , check if contributed is enough to last the whole ROSCA, if it is put the excess in pendingWithdrawal\n+ * when the rosca ends all the money should go out to the account user (done, still needs to work out sending fees to wetrust address)\n+ *   Sol: added endOfROSCA, cleanUp and sendFUND function\n+ * checkingContribution, check whether or not a member as contributed as least contributionSize at the end of Round (goodStanding var takes care of this i think)\n+ *  -startRound should check?\n+ * if user doesnt contribute , dont allow bidding EVER! have to be in good standing to bid/win the Pot (done)\n+ *   Sol: used goodStanding variable to keep track of how many round a person can bet\n+ * contribute and withdraw doesnt check if round has started (done)\n+ *\n+ * Product Decision to think about:\n+ *   - biding when not everyone had contributed, total contributed is less than the bid amount\n+ *     Possible Solution:\n+ *       - owed variable? before paying the next round winner, owed is paid first?\n+ *       - startRound Check ? if balance is less than lowest Bid ? if it is, what to do?\n+ *       - in withdraw, check balance of contract first and if its less than pending withdrawal, subtract that amount only (I think this is the simplest option) (implement for now)\n+ *\n+ * Things brought up that needs considering:\n+ *   - allowing constructor to have initial list of members specified by foreman on ROSCA deployment\n+ *   - using a better unit than wei to represent ether i.e finney (we shouldn't be dealing with any value less than finney anyways)\n+ *   - getters for necessary variables (making variables public would work)\n+ *   - optimizing , contract deployment currently cost over 20 cents on test-net\n+ *   - someway to kill the contract when ROSCA is ended? (currently cleanUp functions includes selfdestruct)\n+ *   - frontend should try a call function and if it throws, warns user of possible throw before allowing transaction.\n  */\n contract ROSCA {\n-  uint32 constant MIN_CONTRIBUTION_SIZE = uint32(1000000000000);  // 1e12\n-  uint32 constant MAX_CONTRIBUTION_SIZE = uint32(10000000000000000000); // 10 ether in Wei\n-  uint32 constant MAX_FEE_IN_THOUSANDTHS = 200;\n-  address constant WETRUST_FEE_ADDRESS = 0x0;           // TODO: needs to be updated\n+  uint64 constant MIN_CONTRIBUTION_SIZE = 1 finney;  // 1e12\n+  uint64 constant MAX_CONTRIBUTION_SIZE = 10 ether;//uint64(10000000000000000000); // 10 ether in Wei\n+  uint16 constant MAX_FEE_IN_THOUSANDTHS = 200;\n   uint32 constant MINIMUM_TIME_BEFORE_ROSCA_START = 1 days;   // startTime of the ROSCA must be at least 1 day away from when the ROSCA is created\n-  uint32 constant MINIMUM_PARTICIPANTS = 2;           // minimum participants for the ROSCA to start\n-  uint32 constant MIN_ROUND_PERIOD_IN_DAYS = 1;\n-  uint32 constant MAX_ROUND_PERIOD_IN_DAYS = 30;\n-  uint32 constant MIN_DISTRIBUTION_RATIO = 65;  // the winning bid must be at least 65% of the Pot value\n+  uint8 constant MINIMUM_PARTICIPANTS = 2;           // minimum participants for the ROSCA to start\n+  uint8 constant MIN_ROUND_PERIOD_IN_DAYS = 1;\n+  uint8 constant MAX_ROUND_PERIOD_IN_DAYS = 30;\n+  uint8 constant MIN_DISTRIBUTION_RATIO = 65;  // the winning bid must be at least 65% of the Pot value","path":"contracts/ROSCA.sol","position":49,"original_position":49,"commit_id":"4c8cfd1d8de2932ae0fca6d5489297776dbbfd48","original_commit_id":"4c8cfd1d8de2932ae0fca6d5489297776dbbfd48","user":{"login":"shine2lay","id":5243508,"avatar_url":"https://avatars.githubusercontent.com/u/5243508?v=3","gravatar_id":"","url":"https://api.github.com/users/shine2lay","html_url":"https://github.com/shine2lay","followers_url":"https://api.github.com/users/shine2lay/followers","following_url":"https://api.github.com/users/shine2lay/following{/other_user}","gists_url":"https://api.github.com/users/shine2lay/gists{/gist_id}","starred_url":"https://api.github.com/users/shine2lay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shine2lay/subscriptions","organizations_url":"https://api.github.com/users/shine2lay/orgs","repos_url":"https://api.github.com/users/shine2lay/repos","events_url":"https://api.github.com/users/shine2lay/events{/privacy}","received_events_url":"https://api.github.com/users/shine2lay/received_events","type":"User","site_admin":false},"body":"done","created_at":"2016-11-23T22:03:45Z","updated_at":"2016-11-23T22:03:45Z","html_url":"https://github.com/WeTrustPlatform/rosca-contracts/pull/7#discussion_r89406468","pull_request_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/pulls/comments/89406468"},"html":{"href":"https://github.com/WeTrustPlatform/rosca-contracts/pull/7#discussion_r89406468"},"pull_request":{"href":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/pulls/7","id":94952285,"html_url":"https://github.com/WeTrustPlatform/rosca-contracts/pull/7","diff_url":"https://github.com/WeTrustPlatform/rosca-contracts/pull/7.diff","patch_url":"https://github.com/WeTrustPlatform/rosca-contracts/pull/7.patch","issue_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/issues/7","number":7,"state":"open","locked":false,"title":"latest ROSCA.sol","user":{"login":"shine2lay","id":5243508,"avatar_url":"https://avatars.githubusercontent.com/u/5243508?v=3","gravatar_id":"","url":"https://api.github.com/users/shine2lay","html_url":"https://github.com/shine2lay","followers_url":"https://api.github.com/users/shine2lay/followers","following_url":"https://api.github.com/users/shine2lay/following{/other_user}","gists_url":"https://api.github.com/users/shine2lay/gists{/gist_id}","starred_url":"https://api.github.com/users/shine2lay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shine2lay/subscriptions","organizations_url":"https://api.github.com/users/shine2lay/orgs","repos_url":"https://api.github.com/users/shine2lay/repos","events_url":"https://api.github.com/users/shine2lay/events{/privacy}","received_events_url":"https://api.github.com/users/shine2lay/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-23T06:50:33Z","updated_at":"2016-11-23T22:03:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1ad50f5ecc5a7de98b19c65bb97e5f56a4d4205e","assignee":{"login":"rmerom","id":650968,"avatar_url":"https://avatars.githubusercontent.com/u/650968?v=3","gravatar_id":"","url":"https://api.github.com/users/rmerom","html_url":"https://github.com/rmerom","followers_url":"https://api.github.com/users/rmerom/followers","following_url":"https://api.github.com/users/rmerom/following{/other_user}","gists_url":"https://api.github.com/users/rmerom/gists{/gist_id}","starred_url":"https://api.github.com/users/rmerom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmerom/subscriptions","organizations_url":"https://api.github.com/users/rmerom/orgs","repos_url":"https://api.github.com/users/rmerom/repos","events_url":"https://api.github.com/users/rmerom/events{/privacy}","received_events_url":"https://api.github.com/users/rmerom/received_events","type":"User","site_admin":false},"assignees":[{"login":"rmerom","id":650968,"avatar_url":"https://avatars.githubusercontent.com/u/650968?v=3","gravatar_id":"","url":"https://api.github.com/users/rmerom","html_url":"https://github.com/rmerom","followers_url":"https://api.github.com/users/rmerom/followers","following_url":"https://api.github.com/users/rmerom/following{/other_user}","gists_url":"https://api.github.com/users/rmerom/gists{/gist_id}","starred_url":"https://api.github.com/users/rmerom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmerom/subscriptions","organizations_url":"https://api.github.com/users/rmerom/orgs","repos_url":"https://api.github.com/users/rmerom/repos","events_url":"https://api.github.com/users/rmerom/events{/privacy}","received_events_url":"https://api.github.com/users/rmerom/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/pulls/7/commits","review_comments_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/pulls/7/comments","review_comment_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/pulls/comments{/number}","comments_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/issues/7/comments","statuses_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/statuses/4c8cfd1d8de2932ae0fca6d5489297776dbbfd48","head":{"label":"shine2lay:last_reviewed_ROSCA.sol","ref":"last_reviewed_ROSCA.sol","sha":"4c8cfd1d8de2932ae0fca6d5489297776dbbfd48","user":{"login":"shine2lay","id":5243508,"avatar_url":"https://avatars.githubusercontent.com/u/5243508?v=3","gravatar_id":"","url":"https://api.github.com/users/shine2lay","html_url":"https://github.com/shine2lay","followers_url":"https://api.github.com/users/shine2lay/followers","following_url":"https://api.github.com/users/shine2lay/following{/other_user}","gists_url":"https://api.github.com/users/shine2lay/gists{/gist_id}","starred_url":"https://api.github.com/users/shine2lay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shine2lay/subscriptions","organizations_url":"https://api.github.com/users/shine2lay/orgs","repos_url":"https://api.github.com/users/shine2lay/repos","events_url":"https://api.github.com/users/shine2lay/events{/privacy}","received_events_url":"https://api.github.com/users/shine2lay/received_events","type":"User","site_admin":false},"repo":{"id":73576739,"name":"rosca-contracts","full_name":"shine2lay/rosca-contracts","owner":{"login":"shine2lay","id":5243508,"avatar_url":"https://avatars.githubusercontent.com/u/5243508?v=3","gravatar_id":"","url":"https://api.github.com/users/shine2lay","html_url":"https://github.com/shine2lay","followers_url":"https://api.github.com/users/shine2lay/followers","following_url":"https://api.github.com/users/shine2lay/following{/other_user}","gists_url":"https://api.github.com/users/shine2lay/gists{/gist_id}","starred_url":"https://api.github.com/users/shine2lay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shine2lay/subscriptions","organizations_url":"https://api.github.com/users/shine2lay/orgs","repos_url":"https://api.github.com/users/shine2lay/repos","events_url":"https://api.github.com/users/shine2lay/events{/privacy}","received_events_url":"https://api.github.com/users/shine2lay/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shine2lay/rosca-contracts","description":"Ethereum Contracts for WeTrust ROSCA","fork":true,"url":"https://api.github.com/repos/shine2lay/rosca-contracts","forks_url":"https://api.github.com/repos/shine2lay/rosca-contracts/forks","keys_url":"https://api.github.com/repos/shine2lay/rosca-contracts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shine2lay/rosca-contracts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shine2lay/rosca-contracts/teams","hooks_url":"https://api.github.com/repos/shine2lay/rosca-contracts/hooks","issue_events_url":"https://api.github.com/repos/shine2lay/rosca-contracts/issues/events{/number}","events_url":"https://api.github.com/repos/shine2lay/rosca-contracts/events","assignees_url":"https://api.github.com/repos/shine2lay/rosca-contracts/assignees{/user}","branches_url":"https://api.github.com/repos/shine2lay/rosca-contracts/branches{/branch}","tags_url":"https://api.github.com/repos/shine2lay/rosca-contracts/tags","blobs_url":"https://api.github.com/repos/shine2lay/rosca-contracts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shine2lay/rosca-contracts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shine2lay/rosca-contracts/git/refs{/sha}","trees_url":"https://api.github.com/repos/shine2lay/rosca-contracts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shine2lay/rosca-contracts/statuses/{sha}","languages_url":"https://api.github.com/repos/shine2lay/rosca-contracts/languages","stargazers_url":"https://api.github.com/repos/shine2lay/rosca-contracts/stargazers","contributors_url":"https://api.github.com/repos/shine2lay/rosca-contracts/contributors","subscribers_url":"https://api.github.com/repos/shine2lay/rosca-contracts/subscribers","subscription_url":"https://api.github.com/repos/shine2lay/rosca-contracts/subscription","commits_url":"https://api.github.com/repos/shine2lay/rosca-contracts/commits{/sha}","git_commits_url":"https://api.github.com/repos/shine2lay/rosca-contracts/git/commits{/sha}","comments_url":"https://api.github.com/repos/shine2lay/rosca-contracts/comments{/number}","issue_comment_url":"https://api.github.com/repos/shine2lay/rosca-contracts/issues/comments{/number}","contents_url":"https://api.github.com/repos/shine2lay/rosca-contracts/contents/{+path}","compare_url":"https://api.github.com/repos/shine2lay/rosca-contracts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shine2lay/rosca-contracts/merges","archive_url":"https://api.github.com/repos/shine2lay/rosca-contracts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shine2lay/rosca-contracts/downloads","issues_url":"https://api.github.com/repos/shine2lay/rosca-contracts/issues{/number}","pulls_url":"https://api.github.com/repos/shine2lay/rosca-contracts/pulls{/number}","milestones_url":"https://api.github.com/repos/shine2lay/rosca-contracts/milestones{/number}","notifications_url":"https://api.github.com/repos/shine2lay/rosca-contracts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shine2lay/rosca-contracts/labels{/name}","releases_url":"https://api.github.com/repos/shine2lay/rosca-contracts/releases{/id}","deployments_url":"https://api.github.com/repos/shine2lay/rosca-contracts/deployments","created_at":"2016-11-12T20:29:28Z","updated_at":"2016-11-12T20:29:30Z","pushed_at":"2016-11-23T07:04:38Z","git_url":"git://github.com/shine2lay/rosca-contracts.git","ssh_url":"git@github.com:shine2lay/rosca-contracts.git","clone_url":"https://github.com/shine2lay/rosca-contracts.git","svn_url":"https://github.com/shine2lay/rosca-contracts","homepage":null,"size":424,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"WeTrustPlatform:develop","ref":"develop","sha":"f51d067e734d698c9e11398a69d148103ef34b80","user":{"login":"WeTrustPlatform","id":22733080,"avatar_url":"https://avatars.githubusercontent.com/u/22733080?v=3","gravatar_id":"","url":"https://api.github.com/users/WeTrustPlatform","html_url":"https://github.com/WeTrustPlatform","followers_url":"https://api.github.com/users/WeTrustPlatform/followers","following_url":"https://api.github.com/users/WeTrustPlatform/following{/other_user}","gists_url":"https://api.github.com/users/WeTrustPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/WeTrustPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WeTrustPlatform/subscriptions","organizations_url":"https://api.github.com/users/WeTrustPlatform/orgs","repos_url":"https://api.github.com/users/WeTrustPlatform/repos","events_url":"https://api.github.com/users/WeTrustPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/WeTrustPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":73515004,"name":"rosca-contracts","full_name":"WeTrustPlatform/rosca-contracts","owner":{"login":"WeTrustPlatform","id":22733080,"avatar_url":"https://avatars.githubusercontent.com/u/22733080?v=3","gravatar_id":"","url":"https://api.github.com/users/WeTrustPlatform","html_url":"https://github.com/WeTrustPlatform","followers_url":"https://api.github.com/users/WeTrustPlatform/followers","following_url":"https://api.github.com/users/WeTrustPlatform/following{/other_user}","gists_url":"https://api.github.com/users/WeTrustPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/WeTrustPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WeTrustPlatform/subscriptions","organizations_url":"https://api.github.com/users/WeTrustPlatform/orgs","repos_url":"https://api.github.com/users/WeTrustPlatform/repos","events_url":"https://api.github.com/users/WeTrustPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/WeTrustPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WeTrustPlatform/rosca-contracts","description":"Ethereum Contracts for WeTrust ROSCA","fork":false,"url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts","forks_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/forks","keys_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/teams","hooks_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/hooks","issue_events_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/issues/events{/number}","events_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/events","assignees_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/assignees{/user}","branches_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/branches{/branch}","tags_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/tags","blobs_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/git/refs{/sha}","trees_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/statuses/{sha}","languages_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/languages","stargazers_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/stargazers","contributors_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/contributors","subscribers_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/subscribers","subscription_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/subscription","commits_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/commits{/sha}","git_commits_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/git/commits{/sha}","comments_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/comments{/number}","issue_comment_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/issues/comments{/number}","contents_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/contents/{+path}","compare_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/merges","archive_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/downloads","issues_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/issues{/number}","pulls_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/pulls{/number}","milestones_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/milestones{/number}","notifications_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/labels{/name}","releases_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/releases{/id}","deployments_url":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/deployments","created_at":"2016-11-11T22:05:15Z","updated_at":"2016-11-21T23:17:31Z","pushed_at":"2016-11-23T17:53:26Z","git_url":"git://github.com/WeTrustPlatform/rosca-contracts.git","ssh_url":"git@github.com:WeTrustPlatform/rosca-contracts.git","clone_url":"https://github.com/WeTrustPlatform/rosca-contracts.git","svn_url":"https://github.com/WeTrustPlatform/rosca-contracts","homepage":null,"size":502,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":2,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/pulls/7"},"html":{"href":"https://github.com/WeTrustPlatform/rosca-contracts/pull/7"},"issue":{"href":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/issues/7"},"comments":{"href":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/WeTrustPlatform/rosca-contracts/statuses/4c8cfd1d8de2932ae0fca6d5489297776dbbfd48"}}}}
{"actor":{"display_login":"shine2lay"}}