{"action":"created","comment":{"url":"https://api.github.com/repos/PolymathNetwork/polymath-core/pulls/comments/225879478","pull_request_review_id":165556632,"id":225879478,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNTg3OTQ3OA==","diff_hunk":"@@ -0,0 +1,290 @@\n+pragma solidity ^0.4.24;\n+\n+import \"./ITransferManager.sol\";\n+import \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\n+\n+/**\n+ * @title Transfer Manager module for capping the amount of token transfers within a period\n+ */\n+contract MaximumVolumeTransferManager is ITransferManager {\n+\t\n+\tusing SafeMath for uint256;\n+\n+    bytes32 public constant ADMIN = \"ADMIN\";\n+\n+    enum RollingIntervals { Daily, Weekly, Quarterly, Biannually, Annually }\n+\n+    struct MaximumVolumeRestriction{\n+        uint256 maximumVolumeAllowed;\n+        uint256 startTime;\n+        uint256 endTime;\n+        RollingIntervals rollingPeriodInterval;\n+    }\n+\n+    MaximumVolumeRestriction[] public maximumVolumeRestrictions;\n+\n+    // mapping from address to RollingIntervals to periodIds to tokens transfered \n+    mapping(address => mapping(uint256 => mapping(uint256 => uint256))) volumeTally;\n+\n+    // Emit whenever a new maximum volume restriction gets added\n+    event MaximumVolumeRestrictionAdded(\n+        address indexed from,","path":"contracts/modules/TransferManager/MaximumVolumeTransferManager.sol","position":31,"original_position":31,"commit_id":"b391fd6f589fb7989760f277ca982b8f49bf7254","original_commit_id":"b391fd6f589fb7989760f277ca982b8f49bf7254","user":{"login":"satyamakgec","id":14581509,"node_id":"MDQ6VXNlcjE0NTgxNTA5","avatar_url":"https://avatars1.githubusercontent.com/u/14581509?v=4","gravatar_id":"","url":"https://api.github.com/users/satyamakgec","html_url":"https://github.com/satyamakgec","followers_url":"https://api.github.com/users/satyamakgec/followers","following_url":"https://api.github.com/users/satyamakgec/following{/other_user}","gists_url":"https://api.github.com/users/satyamakgec/gists{/gist_id}","starred_url":"https://api.github.com/users/satyamakgec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/satyamakgec/subscriptions","organizations_url":"https://api.github.com/users/satyamakgec/orgs","repos_url":"https://api.github.com/users/satyamakgec/repos","events_url":"https://api.github.com/users/satyamakgec/events{/privacy}","received_events_url":"https://api.github.com/users/satyamakgec/received_events","type":"User","site_admin":false},"body":"no need of `from` address. it always be owner or a delegate","created_at":"2018-10-17T11:08:18Z","updated_at":"2018-10-17T11:37:12Z","html_url":"https://github.com/PolymathNetwork/polymath-core/pull/320#discussion_r225879478","pull_request_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/pulls/320","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/PolymathNetwork/polymath-core/pulls/comments/225879478"},"html":{"href":"https://github.com/PolymathNetwork/polymath-core/pull/320#discussion_r225879478"},"pull_request":{"href":"https://api.github.com/repos/PolymathNetwork/polymath-core/pulls/320"}}},"pull_request":{"url":"https://api.github.com/repos/PolymathNetwork/polymath-core/pulls/320","id":220700080,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIwNzAwMDgw","html_url":"https://github.com/PolymathNetwork/polymath-core/pull/320","diff_url":"https://github.com/PolymathNetwork/polymath-core/pull/320.diff","patch_url":"https://github.com/PolymathNetwork/polymath-core/pull/320.patch","issue_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/issues/320","number":320,"state":"open","locked":false,"title":"Maximum Volume Restrictions Manager","user":{"login":"vyomshm","id":20184946,"node_id":"MDQ6VXNlcjIwMTg0OTQ2","avatar_url":"https://avatars2.githubusercontent.com/u/20184946?v=4","gravatar_id":"","url":"https://api.github.com/users/vyomshm","html_url":"https://github.com/vyomshm","followers_url":"https://api.github.com/users/vyomshm/followers","following_url":"https://api.github.com/users/vyomshm/following{/other_user}","gists_url":"https://api.github.com/users/vyomshm/gists{/gist_id}","starred_url":"https://api.github.com/users/vyomshm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vyomshm/subscriptions","organizations_url":"https://api.github.com/users/vyomshm/orgs","repos_url":"https://api.github.com/users/vyomshm/repos","events_url":"https://api.github.com/users/vyomshm/events{/privacy}","received_events_url":"https://api.github.com/users/vyomshm/received_events","type":"User","site_admin":false},"body":"### Please check if the PR fulfills these requirements\r\n- [x] The commit message follows our Submission guidelines\r\n- [x] Tests for the changes have been added (for bug fixes / features)\r\n\r\n### What kind of change does this PR introduce? \r\nfeature - ref #267 \r\n\r\n### What is the current behavior? \r\n#267 \r\nNo way to add global token volume transfer restrictions\r\n\r\n### What is the new behavior?\r\nFeature added - A new Transfer Manager module\r\nIssuers can now create(as well as remove and modify) multiple maximum volume transfer restrictions which will be applied globally to every transfer\r\n\r\n### Does this PR introduce a breaking change?\r\n(What changes might users need to make in their application due to this PR?)\r\nNo\r\n\r\n### Any Other information:\r\n","created_at":"2018-10-05T13:22:32Z","updated_at":"2018-10-17T11:37:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3832d153218e5d752854ffbfe7b4367c00e54b18","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/pulls/320/commits","review_comments_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/pulls/320/comments","review_comment_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/issues/320/comments","statuses_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/statuses/b391fd6f589fb7989760f277ca982b8f49bf7254","head":{"label":"vyomshm:vol-restriction-module","ref":"vol-restriction-module","sha":"b391fd6f589fb7989760f277ca982b8f49bf7254","user":{"login":"vyomshm","id":20184946,"node_id":"MDQ6VXNlcjIwMTg0OTQ2","avatar_url":"https://avatars2.githubusercontent.com/u/20184946?v=4","gravatar_id":"","url":"https://api.github.com/users/vyomshm","html_url":"https://github.com/vyomshm","followers_url":"https://api.github.com/users/vyomshm/followers","following_url":"https://api.github.com/users/vyomshm/following{/other_user}","gists_url":"https://api.github.com/users/vyomshm/gists{/gist_id}","starred_url":"https://api.github.com/users/vyomshm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vyomshm/subscriptions","organizations_url":"https://api.github.com/users/vyomshm/orgs","repos_url":"https://api.github.com/users/vyomshm/repos","events_url":"https://api.github.com/users/vyomshm/events{/privacy}","received_events_url":"https://api.github.com/users/vyomshm/received_events","type":"User","site_admin":false},"repo":{"id":150302049,"node_id":"MDEwOlJlcG9zaXRvcnkxNTAzMDIwNDk=","name":"polymath-core","full_name":"vyomshm/polymath-core","private":false,"owner":{"login":"vyomshm","id":20184946,"node_id":"MDQ6VXNlcjIwMTg0OTQ2","avatar_url":"https://avatars2.githubusercontent.com/u/20184946?v=4","gravatar_id":"","url":"https://api.github.com/users/vyomshm","html_url":"https://github.com/vyomshm","followers_url":"https://api.github.com/users/vyomshm/followers","following_url":"https://api.github.com/users/vyomshm/following{/other_user}","gists_url":"https://api.github.com/users/vyomshm/gists{/gist_id}","starred_url":"https://api.github.com/users/vyomshm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vyomshm/subscriptions","organizations_url":"https://api.github.com/users/vyomshm/orgs","repos_url":"https://api.github.com/users/vyomshm/repos","events_url":"https://api.github.com/users/vyomshm/events{/privacy}","received_events_url":"https://api.github.com/users/vyomshm/received_events","type":"User","site_admin":false},"html_url":"https://github.com/vyomshm/polymath-core","description":"Core Ethereum Smart Contracts for Polymath - The Securities Token Platform","fork":true,"url":"https://api.github.com/repos/vyomshm/polymath-core","forks_url":"https://api.github.com/repos/vyomshm/polymath-core/forks","keys_url":"https://api.github.com/repos/vyomshm/polymath-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vyomshm/polymath-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vyomshm/polymath-core/teams","hooks_url":"https://api.github.com/repos/vyomshm/polymath-core/hooks","issue_events_url":"https://api.github.com/repos/vyomshm/polymath-core/issues/events{/number}","events_url":"https://api.github.com/repos/vyomshm/polymath-core/events","assignees_url":"https://api.github.com/repos/vyomshm/polymath-core/assignees{/user}","branches_url":"https://api.github.com/repos/vyomshm/polymath-core/branches{/branch}","tags_url":"https://api.github.com/repos/vyomshm/polymath-core/tags","blobs_url":"https://api.github.com/repos/vyomshm/polymath-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vyomshm/polymath-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vyomshm/polymath-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/vyomshm/polymath-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vyomshm/polymath-core/statuses/{sha}","languages_url":"https://api.github.com/repos/vyomshm/polymath-core/languages","stargazers_url":"https://api.github.com/repos/vyomshm/polymath-core/stargazers","contributors_url":"https://api.github.com/repos/vyomshm/polymath-core/contributors","subscribers_url":"https://api.github.com/repos/vyomshm/polymath-core/subscribers","subscription_url":"https://api.github.com/repos/vyomshm/polymath-core/subscription","commits_url":"https://api.github.com/repos/vyomshm/polymath-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/vyomshm/polymath-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/vyomshm/polymath-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/vyomshm/polymath-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/vyomshm/polymath-core/contents/{+path}","compare_url":"https://api.github.com/repos/vyomshm/polymath-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vyomshm/polymath-core/merges","archive_url":"https://api.github.com/repos/vyomshm/polymath-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vyomshm/polymath-core/downloads","issues_url":"https://api.github.com/repos/vyomshm/polymath-core/issues{/number}","pulls_url":"https://api.github.com/repos/vyomshm/polymath-core/pulls{/number}","milestones_url":"https://api.github.com/repos/vyomshm/polymath-core/milestones{/number}","notifications_url":"https://api.github.com/repos/vyomshm/polymath-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vyomshm/polymath-core/labels{/name}","releases_url":"https://api.github.com/repos/vyomshm/polymath-core/releases{/id}","deployments_url":"https://api.github.com/repos/vyomshm/polymath-core/deployments","created_at":"2018-09-25T17:14:06Z","updated_at":"2018-10-15T11:53:38Z","pushed_at":"2018-10-15T18:31:27Z","git_url":"git://github.com/vyomshm/polymath-core.git","ssh_url":"git@github.com:vyomshm/polymath-core.git","clone_url":"https://github.com/vyomshm/polymath-core.git","svn_url":"https://github.com/vyomshm/polymath-core","homepage":"http://polymath.network","size":5167,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"development-1.5.0"}},"base":{"label":"PolymathNetwork:development-1.5.0","ref":"development-1.5.0","sha":"468b04772ecd1a395e19ed91f3a0c9cd87638ab3","user":{"login":"PolymathNetwork","id":30353617,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwMzUzNjE3","avatar_url":"https://avatars0.githubusercontent.com/u/30353617?v=4","gravatar_id":"","url":"https://api.github.com/users/PolymathNetwork","html_url":"https://github.com/PolymathNetwork","followers_url":"https://api.github.com/users/PolymathNetwork/followers","following_url":"https://api.github.com/users/PolymathNetwork/following{/other_user}","gists_url":"https://api.github.com/users/PolymathNetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/PolymathNetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PolymathNetwork/subscriptions","organizations_url":"https://api.github.com/users/PolymathNetwork/orgs","repos_url":"https://api.github.com/users/PolymathNetwork/repos","events_url":"https://api.github.com/users/PolymathNetwork/events{/privacy}","received_events_url":"https://api.github.com/users/PolymathNetwork/received_events","type":"Organization","site_admin":false},"repo":{"id":124091457,"node_id":"MDEwOlJlcG9zaXRvcnkxMjQwOTE0NTc=","name":"polymath-core","full_name":"PolymathNetwork/polymath-core","private":false,"owner":{"login":"PolymathNetwork","id":30353617,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwMzUzNjE3","avatar_url":"https://avatars0.githubusercontent.com/u/30353617?v=4","gravatar_id":"","url":"https://api.github.com/users/PolymathNetwork","html_url":"https://github.com/PolymathNetwork","followers_url":"https://api.github.com/users/PolymathNetwork/followers","following_url":"https://api.github.com/users/PolymathNetwork/following{/other_user}","gists_url":"https://api.github.com/users/PolymathNetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/PolymathNetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PolymathNetwork/subscriptions","organizations_url":"https://api.github.com/users/PolymathNetwork/orgs","repos_url":"https://api.github.com/users/PolymathNetwork/repos","events_url":"https://api.github.com/users/PolymathNetwork/events{/privacy}","received_events_url":"https://api.github.com/users/PolymathNetwork/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/PolymathNetwork/polymath-core","description":"Core Ethereum Smart Contracts for Polymath - The Securities Token Platform","fork":false,"url":"https://api.github.com/repos/PolymathNetwork/polymath-core","forks_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/forks","keys_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/teams","hooks_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/hooks","issue_events_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/issues/events{/number}","events_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/events","assignees_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/assignees{/user}","branches_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/branches{/branch}","tags_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/tags","blobs_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/statuses/{sha}","languages_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/languages","stargazers_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/stargazers","contributors_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/contributors","subscribers_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/subscribers","subscription_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/subscription","commits_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/contents/{+path}","compare_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/merges","archive_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/downloads","issues_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/issues{/number}","pulls_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/pulls{/number}","milestones_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/milestones{/number}","notifications_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/labels{/name}","releases_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/releases{/id}","deployments_url":"https://api.github.com/repos/PolymathNetwork/polymath-core/deployments","created_at":"2018-03-06T14:37:11Z","updated_at":"2018-10-17T08:59:43Z","pushed_at":"2018-10-17T09:11:19Z","git_url":"git://github.com/PolymathNetwork/polymath-core.git","ssh_url":"git@github.com:PolymathNetwork/polymath-core.git","clone_url":"https://github.com/PolymathNetwork/polymath-core.git","svn_url":"https://github.com/PolymathNetwork/polymath-core","homepage":"http://polymath.network","size":5497,"stargazers_count":143,"watchers_count":143,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":52,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":52,"open_issues":18,"watchers":143,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PolymathNetwork/polymath-core/pulls/320"},"html":{"href":"https://github.com/PolymathNetwork/polymath-core/pull/320"},"issue":{"href":"https://api.github.com/repos/PolymathNetwork/polymath-core/issues/320"},"comments":{"href":"https://api.github.com/repos/PolymathNetwork/polymath-core/issues/320/comments"},"review_comments":{"href":"https://api.github.com/repos/PolymathNetwork/polymath-core/pulls/320/comments"},"review_comment":{"href":"https://api.github.com/repos/PolymathNetwork/polymath-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PolymathNetwork/polymath-core/pulls/320/commits"},"statuses":{"href":"https://api.github.com/repos/PolymathNetwork/polymath-core/statuses/b391fd6f589fb7989760f277ca982b8f49bf7254"}},"author_association":"NONE"}}
{"actor":{"display_login":"satyamakgec"}}