{"action":"created","comment":{"url":"https://api.github.com/repos/aragon/aragon-apps/pulls/comments/201576759","pull_request_review_id":136104088,"id":201576759,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMTU3Njc1OQ==","diff_hunk":"@@ -212,34 +217,79 @@ contract Payroll is AragonApp { //, IForwarder { // makes coverage crash (remove\n      * @notice Set employee #`employeeId` annual salary to `denominationSalary` per second.\n      * @param employeeId Employee's identifier\n      * @param denominationSalary Employee's new salary, per second in denomintation Token\n+     * @param changeDate New salary effective date\n      */\n     function setEmployeeSalary(\n         uint128 employeeId,\n-        uint256 denominationSalary\n+        uint256 denominationSalary,\n+        uint64 changeDate\n     )\n         isInitialized\n         employeeExists(employeeId)\n         external\n         authP(ADD_EMPLOYEE_ROLE, arr(employees[employeeId].accountAddress, denominationSalary, 0))\n     {\n+        // forbid to change salary in the past\n+        require(changeDate >= getTimestamp());\n+\n+        // Add owed salary to employee's accrued value\n+        uint256 owed = _getOwedSalary(employeeId, changeDate);\n+\n+        employees[employeeId].lastPayroll = changeDate;\n+        _addAccruedValue(employeeId, owed);","path":"future-apps/payroll/contracts/Payroll.sol","position":83,"original_position":83,"commit_id":"65a4ff494fdd1c29f059937e224119efeb01d467","original_commit_id":"65a4ff494fdd1c29f059937e224119efeb01d467","user":{"login":"bingen","id":701095,"node_id":"MDQ6VXNlcjcwMTA5NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/701095?v=4","gravatar_id":"","url":"https://api.github.com/users/bingen","html_url":"https://github.com/bingen","followers_url":"https://api.github.com/users/bingen/followers","following_url":"https://api.github.com/users/bingen/following{/other_user}","gists_url":"https://api.github.com/users/bingen/gists{/gist_id}","starred_url":"https://api.github.com/users/bingen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bingen/subscriptions","organizations_url":"https://api.github.com/users/bingen/orgs","repos_url":"https://api.github.com/users/bingen/repos","events_url":"https://api.github.com/users/bingen/events{/privacy}","received_events_url":"https://api.github.com/users/bingen/received_events","type":"User","site_admin":false},"body":"Another option could be to store last salary change date and not to allow another change if employee hasn't called `payday` after the last one. I guess in regular use cases payday should happen way more often than salary changes. But maybe it's still too much complexity.","created_at":"2018-07-11T06:29:17Z","updated_at":"2018-07-11T06:29:17Z","html_url":"https://github.com/aragon/aragon-apps/pull/394#discussion_r201576759","pull_request_url":"https://api.github.com/repos/aragon/aragon-apps/pulls/394","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/aragon/aragon-apps/pulls/comments/201576759"},"html":{"href":"https://github.com/aragon/aragon-apps/pull/394#discussion_r201576759"},"pull_request":{"href":"https://api.github.com/repos/aragon/aragon-apps/pulls/394"}},"in_reply_to_id":201425585},"pull_request":{"url":"https://api.github.com/repos/aragon/aragon-apps/pulls/394","id":200172299,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwMTcyMjk5","html_url":"https://github.com/aragon/aragon-apps/pull/394","diff_url":"https://github.com/aragon/aragon-apps/pull/394.diff","patch_url":"https://github.com/aragon/aragon-apps/pull/394.patch","issue_url":"https://api.github.com/repos/aragon/aragon-apps/issues/394","number":394,"state":"open","locked":false,"title":"Payroll accrued value","user":{"login":"bingen","id":701095,"node_id":"MDQ6VXNlcjcwMTA5NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/701095?v=4","gravatar_id":"","url":"https://api.github.com/users/bingen","html_url":"https://github.com/bingen","followers_url":"https://api.github.com/users/bingen/followers","following_url":"https://api.github.com/users/bingen/following{/other_user}","gists_url":"https://api.github.com/users/bingen/gists{/gist_id}","starred_url":"https://api.github.com/users/bingen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bingen/subscriptions","organizations_url":"https://api.github.com/users/bingen/orgs","repos_url":"https://api.github.com/users/bingen/repos","events_url":"https://api.github.com/users/bingen/events{/privacy}","received_events_url":"https://api.github.com/users/bingen/received_events","type":"User","site_admin":false},"body":"Closes #389 and #390 ","created_at":"2018-07-09T17:44:16Z","updated_at":"2018-07-11T06:29:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a910bf2b901b2d7d86b87a6954a02d6d0950131d","assignee":{"login":"bingen","id":701095,"node_id":"MDQ6VXNlcjcwMTA5NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/701095?v=4","gravatar_id":"","url":"https://api.github.com/users/bingen","html_url":"https://github.com/bingen","followers_url":"https://api.github.com/users/bingen/followers","following_url":"https://api.github.com/users/bingen/following{/other_user}","gists_url":"https://api.github.com/users/bingen/gists{/gist_id}","starred_url":"https://api.github.com/users/bingen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bingen/subscriptions","organizations_url":"https://api.github.com/users/bingen/orgs","repos_url":"https://api.github.com/users/bingen/repos","events_url":"https://api.github.com/users/bingen/events{/privacy}","received_events_url":"https://api.github.com/users/bingen/received_events","type":"User","site_admin":false},"assignees":[{"login":"bingen","id":701095,"node_id":"MDQ6VXNlcjcwMTA5NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/701095?v=4","gravatar_id":"","url":"https://api.github.com/users/bingen","html_url":"https://github.com/bingen","followers_url":"https://api.github.com/users/bingen/followers","following_url":"https://api.github.com/users/bingen/following{/other_user}","gists_url":"https://api.github.com/users/bingen/gists{/gist_id}","starred_url":"https://api.github.com/users/bingen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bingen/subscriptions","organizations_url":"https://api.github.com/users/bingen/orgs","repos_url":"https://api.github.com/users/bingen/repos","events_url":"https://api.github.com/users/bingen/events{/privacy}","received_events_url":"https://api.github.com/users/bingen/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"sohkai","id":4166642,"node_id":"MDQ6VXNlcjQxNjY2NDI=","avatar_url":"https://avatars2.githubusercontent.com/u/4166642?v=4","gravatar_id":"","url":"https://api.github.com/users/sohkai","html_url":"https://github.com/sohkai","followers_url":"https://api.github.com/users/sohkai/followers","following_url":"https://api.github.com/users/sohkai/following{/other_user}","gists_url":"https://api.github.com/users/sohkai/gists{/gist_id}","starred_url":"https://api.github.com/users/sohkai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sohkai/subscriptions","organizations_url":"https://api.github.com/users/sohkai/orgs","repos_url":"https://api.github.com/users/sohkai/repos","events_url":"https://api.github.com/users/sohkai/events{/privacy}","received_events_url":"https://api.github.com/users/sohkai/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":958196596,"node_id":"MDU6TGFiZWw5NTgxOTY1OTY=","url":"https://api.github.com/repos/aragon/aragon-apps/labels/epic:%20Payroll","name":"epic: Payroll","color":"446cb3","default":false},{"id":959272867,"node_id":"MDU6TGFiZWw5NTkyNzI4Njc=","url":"https://api.github.com/repos/aragon/aragon-apps/labels/sprint:%200.5.2","name":"sprint: 0.5.2","color":"b5f23c","default":false},{"id":722001762,"node_id":"MDU6TGFiZWw3MjIwMDE3NjI=","url":"https://api.github.com/repos/aragon/aragon-apps/labels/type:%20bug","name":"type: bug","color":"d91e18","default":false},{"id":722002044,"node_id":"MDU6TGFiZWw3MjIwMDIwNDQ=","url":"https://api.github.com/repos/aragon/aragon-apps/labels/type:%20enhancement","name":"type: enhancement","color":"d2527f","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/aragon/aragon-apps/pulls/394/commits","review_comments_url":"https://api.github.com/repos/aragon/aragon-apps/pulls/394/comments","review_comment_url":"https://api.github.com/repos/aragon/aragon-apps/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aragon/aragon-apps/issues/394/comments","statuses_url":"https://api.github.com/repos/aragon/aragon-apps/statuses/65a4ff494fdd1c29f059937e224119efeb01d467","head":{"label":"aragon:payroll_accrued_value","ref":"payroll_accrued_value","sha":"65a4ff494fdd1c29f059937e224119efeb01d467","user":{"login":"aragon","id":24612534,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0NjEyNTM0","avatar_url":"https://avatars1.githubusercontent.com/u/24612534?v=4","gravatar_id":"","url":"https://api.github.com/users/aragon","html_url":"https://github.com/aragon","followers_url":"https://api.github.com/users/aragon/followers","following_url":"https://api.github.com/users/aragon/following{/other_user}","gists_url":"https://api.github.com/users/aragon/gists{/gist_id}","starred_url":"https://api.github.com/users/aragon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aragon/subscriptions","organizations_url":"https://api.github.com/users/aragon/orgs","repos_url":"https://api.github.com/users/aragon/repos","events_url":"https://api.github.com/users/aragon/events{/privacy}","received_events_url":"https://api.github.com/users/aragon/received_events","type":"Organization","site_admin":false},"repo":{"id":107204572,"node_id":"MDEwOlJlcG9zaXRvcnkxMDcyMDQ1NzI=","name":"aragon-apps","full_name":"aragon/aragon-apps","owner":{"login":"aragon","id":24612534,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0NjEyNTM0","avatar_url":"https://avatars1.githubusercontent.com/u/24612534?v=4","gravatar_id":"","url":"https://api.github.com/users/aragon","html_url":"https://github.com/aragon","followers_url":"https://api.github.com/users/aragon/followers","following_url":"https://api.github.com/users/aragon/following{/other_user}","gists_url":"https://api.github.com/users/aragon/gists{/gist_id}","starred_url":"https://api.github.com/users/aragon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aragon/subscriptions","organizations_url":"https://api.github.com/users/aragon/orgs","repos_url":"https://api.github.com/users/aragon/repos","events_url":"https://api.github.com/users/aragon/events{/privacy}","received_events_url":"https://api.github.com/users/aragon/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aragon/aragon-apps","description":"Aragon core team developed Aragon apps (smart contracts + webapps)","fork":false,"url":"https://api.github.com/repos/aragon/aragon-apps","forks_url":"https://api.github.com/repos/aragon/aragon-apps/forks","keys_url":"https://api.github.com/repos/aragon/aragon-apps/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aragon/aragon-apps/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aragon/aragon-apps/teams","hooks_url":"https://api.github.com/repos/aragon/aragon-apps/hooks","issue_events_url":"https://api.github.com/repos/aragon/aragon-apps/issues/events{/number}","events_url":"https://api.github.com/repos/aragon/aragon-apps/events","assignees_url":"https://api.github.com/repos/aragon/aragon-apps/assignees{/user}","branches_url":"https://api.github.com/repos/aragon/aragon-apps/branches{/branch}","tags_url":"https://api.github.com/repos/aragon/aragon-apps/tags","blobs_url":"https://api.github.com/repos/aragon/aragon-apps/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aragon/aragon-apps/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aragon/aragon-apps/git/refs{/sha}","trees_url":"https://api.github.com/repos/aragon/aragon-apps/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aragon/aragon-apps/statuses/{sha}","languages_url":"https://api.github.com/repos/aragon/aragon-apps/languages","stargazers_url":"https://api.github.com/repos/aragon/aragon-apps/stargazers","contributors_url":"https://api.github.com/repos/aragon/aragon-apps/contributors","subscribers_url":"https://api.github.com/repos/aragon/aragon-apps/subscribers","subscription_url":"https://api.github.com/repos/aragon/aragon-apps/subscription","commits_url":"https://api.github.com/repos/aragon/aragon-apps/commits{/sha}","git_commits_url":"https://api.github.com/repos/aragon/aragon-apps/git/commits{/sha}","comments_url":"https://api.github.com/repos/aragon/aragon-apps/comments{/number}","issue_comment_url":"https://api.github.com/repos/aragon/aragon-apps/issues/comments{/number}","contents_url":"https://api.github.com/repos/aragon/aragon-apps/contents/{+path}","compare_url":"https://api.github.com/repos/aragon/aragon-apps/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aragon/aragon-apps/merges","archive_url":"https://api.github.com/repos/aragon/aragon-apps/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aragon/aragon-apps/downloads","issues_url":"https://api.github.com/repos/aragon/aragon-apps/issues{/number}","pulls_url":"https://api.github.com/repos/aragon/aragon-apps/pulls{/number}","milestones_url":"https://api.github.com/repos/aragon/aragon-apps/milestones{/number}","notifications_url":"https://api.github.com/repos/aragon/aragon-apps/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aragon/aragon-apps/labels{/name}","releases_url":"https://api.github.com/repos/aragon/aragon-apps/releases{/id}","deployments_url":"https://api.github.com/repos/aragon/aragon-apps/deployments","created_at":"2017-10-17T01:54:19Z","updated_at":"2018-07-09T20:15:42Z","pushed_at":"2018-07-09T20:15:42Z","git_url":"git://github.com/aragon/aragon-apps.git","ssh_url":"git@github.com:aragon/aragon-apps.git","clone_url":"https://github.com/aragon/aragon-apps.git","svn_url":"https://github.com/aragon/aragon-apps","homepage":"https://aragon.one/core","size":5321,"stargazers_count":90,"watchers_count":90,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":43,"mirror_url":null,"archived":false,"open_issues_count":80,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":43,"open_issues":80,"watchers":90,"default_branch":"master"}},"base":{"label":"aragon:payroll_review","ref":"payroll_review","sha":"b444ccf634b0683bcadaf5c04cef64e488a51590","user":{"login":"aragon","id":24612534,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0NjEyNTM0","avatar_url":"https://avatars1.githubusercontent.com/u/24612534?v=4","gravatar_id":"","url":"https://api.github.com/users/aragon","html_url":"https://github.com/aragon","followers_url":"https://api.github.com/users/aragon/followers","following_url":"https://api.github.com/users/aragon/following{/other_user}","gists_url":"https://api.github.com/users/aragon/gists{/gist_id}","starred_url":"https://api.github.com/users/aragon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aragon/subscriptions","organizations_url":"https://api.github.com/users/aragon/orgs","repos_url":"https://api.github.com/users/aragon/repos","events_url":"https://api.github.com/users/aragon/events{/privacy}","received_events_url":"https://api.github.com/users/aragon/received_events","type":"Organization","site_admin":false},"repo":{"id":107204572,"node_id":"MDEwOlJlcG9zaXRvcnkxMDcyMDQ1NzI=","name":"aragon-apps","full_name":"aragon/aragon-apps","owner":{"login":"aragon","id":24612534,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0NjEyNTM0","avatar_url":"https://avatars1.githubusercontent.com/u/24612534?v=4","gravatar_id":"","url":"https://api.github.com/users/aragon","html_url":"https://github.com/aragon","followers_url":"https://api.github.com/users/aragon/followers","following_url":"https://api.github.com/users/aragon/following{/other_user}","gists_url":"https://api.github.com/users/aragon/gists{/gist_id}","starred_url":"https://api.github.com/users/aragon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aragon/subscriptions","organizations_url":"https://api.github.com/users/aragon/orgs","repos_url":"https://api.github.com/users/aragon/repos","events_url":"https://api.github.com/users/aragon/events{/privacy}","received_events_url":"https://api.github.com/users/aragon/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aragon/aragon-apps","description":"Aragon core team developed Aragon apps (smart contracts + webapps)","fork":false,"url":"https://api.github.com/repos/aragon/aragon-apps","forks_url":"https://api.github.com/repos/aragon/aragon-apps/forks","keys_url":"https://api.github.com/repos/aragon/aragon-apps/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aragon/aragon-apps/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aragon/aragon-apps/teams","hooks_url":"https://api.github.com/repos/aragon/aragon-apps/hooks","issue_events_url":"https://api.github.com/repos/aragon/aragon-apps/issues/events{/number}","events_url":"https://api.github.com/repos/aragon/aragon-apps/events","assignees_url":"https://api.github.com/repos/aragon/aragon-apps/assignees{/user}","branches_url":"https://api.github.com/repos/aragon/aragon-apps/branches{/branch}","tags_url":"https://api.github.com/repos/aragon/aragon-apps/tags","blobs_url":"https://api.github.com/repos/aragon/aragon-apps/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aragon/aragon-apps/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aragon/aragon-apps/git/refs{/sha}","trees_url":"https://api.github.com/repos/aragon/aragon-apps/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aragon/aragon-apps/statuses/{sha}","languages_url":"https://api.github.com/repos/aragon/aragon-apps/languages","stargazers_url":"https://api.github.com/repos/aragon/aragon-apps/stargazers","contributors_url":"https://api.github.com/repos/aragon/aragon-apps/contributors","subscribers_url":"https://api.github.com/repos/aragon/aragon-apps/subscribers","subscription_url":"https://api.github.com/repos/aragon/aragon-apps/subscription","commits_url":"https://api.github.com/repos/aragon/aragon-apps/commits{/sha}","git_commits_url":"https://api.github.com/repos/aragon/aragon-apps/git/commits{/sha}","comments_url":"https://api.github.com/repos/aragon/aragon-apps/comments{/number}","issue_comment_url":"https://api.github.com/repos/aragon/aragon-apps/issues/comments{/number}","contents_url":"https://api.github.com/repos/aragon/aragon-apps/contents/{+path}","compare_url":"https://api.github.com/repos/aragon/aragon-apps/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aragon/aragon-apps/merges","archive_url":"https://api.github.com/repos/aragon/aragon-apps/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aragon/aragon-apps/downloads","issues_url":"https://api.github.com/repos/aragon/aragon-apps/issues{/number}","pulls_url":"https://api.github.com/repos/aragon/aragon-apps/pulls{/number}","milestones_url":"https://api.github.com/repos/aragon/aragon-apps/milestones{/number}","notifications_url":"https://api.github.com/repos/aragon/aragon-apps/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aragon/aragon-apps/labels{/name}","releases_url":"https://api.github.com/repos/aragon/aragon-apps/releases{/id}","deployments_url":"https://api.github.com/repos/aragon/aragon-apps/deployments","created_at":"2017-10-17T01:54:19Z","updated_at":"2018-07-09T20:15:42Z","pushed_at":"2018-07-09T20:15:42Z","git_url":"git://github.com/aragon/aragon-apps.git","ssh_url":"git@github.com:aragon/aragon-apps.git","clone_url":"https://github.com/aragon/aragon-apps.git","svn_url":"https://github.com/aragon/aragon-apps","homepage":"https://aragon.one/core","size":5321,"stargazers_count":90,"watchers_count":90,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":43,"mirror_url":null,"archived":false,"open_issues_count":80,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":43,"open_issues":80,"watchers":90,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aragon/aragon-apps/pulls/394"},"html":{"href":"https://github.com/aragon/aragon-apps/pull/394"},"issue":{"href":"https://api.github.com/repos/aragon/aragon-apps/issues/394"},"comments":{"href":"https://api.github.com/repos/aragon/aragon-apps/issues/394/comments"},"review_comments":{"href":"https://api.github.com/repos/aragon/aragon-apps/pulls/394/comments"},"review_comment":{"href":"https://api.github.com/repos/aragon/aragon-apps/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aragon/aragon-apps/pulls/394/commits"},"statuses":{"href":"https://api.github.com/repos/aragon/aragon-apps/statuses/65a4ff494fdd1c29f059937e224119efeb01d467"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"bingen"}}