{"action":"created","comment":{"url":"https://api.github.com/repos/embark-framework/embark/pulls/comments/239826541","pull_request_review_id":182717366,"id":239826541,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzOTgyNjU0MQ==","diff_hunk":"@@ -0,0 +1,11 @@\n+export function encrypt(contractId: number, injectionPointId: number, locationIdx?: number) {\n+  return contractId * 100000000 + injectionPointId * 10000 + (locationIdx || 0);\n+}\n+\n+export function decrypt(value: number) {\n+  const contractId = Math.floor(value / 100000000);\n+  const injectionPointId = Math.floor(value / 10000) - contractId * 10000;\n+  const locationIdx = value - contractId * 100000000 - injectionPointId * 10000;","path":"src/lib/modules/coverage/eventId.ts","position":8,"original_position":8,"commit_id":"cfbeb131083240385143924981437d05c97eff05","original_commit_id":"1590620949235223c078d1d8d23ff7282b3a5692","user":{"login":"alaibe","id":491074,"node_id":"MDQ6VXNlcjQ5MTA3NA==","avatar_url":"https://avatars0.githubusercontent.com/u/491074?v=4","gravatar_id":"","url":"https://api.github.com/users/alaibe","html_url":"https://github.com/alaibe","followers_url":"https://api.github.com/users/alaibe/followers","following_url":"https://api.github.com/users/alaibe/following{/other_user}","gists_url":"https://api.github.com/users/alaibe/gists{/gist_id}","starred_url":"https://api.github.com/users/alaibe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alaibe/subscriptions","organizations_url":"https://api.github.com/users/alaibe/orgs","repos_url":"https://api.github.com/users/alaibe/repos","events_url":"https://api.github.com/users/alaibe/events{/privacy}","received_events_url":"https://api.github.com/users/alaibe/received_events","type":"User","site_admin":false},"body":"I will add documentation also as I feel it might be obscure of why","created_at":"2018-12-07T14:33:18Z","updated_at":"2018-12-07T14:33:19Z","html_url":"https://github.com/embark-framework/embark/pull/1167#discussion_r239826541","pull_request_url":"https://api.github.com/repos/embark-framework/embark/pulls/1167","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/embark-framework/embark/pulls/comments/239826541"},"html":{"href":"https://github.com/embark-framework/embark/pull/1167#discussion_r239826541"},"pull_request":{"href":"https://api.github.com/repos/embark-framework/embark/pulls/1167"}},"in_reply_to_id":239821343},"pull_request":{"url":"https://api.github.com/repos/embark-framework/embark/pulls/1167","id":236877566,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM2ODc3NTY2","html_url":"https://github.com/embark-framework/embark/pull/1167","diff_url":"https://github.com/embark-framework/embark/pull/1167.diff","patch_url":"https://github.com/embark-framework/embark/pull/1167.patch","issue_url":"https://api.github.com/repos/embark-framework/embark/issues/1167","number":1167,"state":"open","locked":false,"title":"Add coverage events","user":{"login":"alaibe","id":491074,"node_id":"MDQ6VXNlcjQ5MTA3NA==","avatar_url":"https://avatars0.githubusercontent.com/u/491074?v=4","gravatar_id":"","url":"https://api.github.com/users/alaibe","html_url":"https://github.com/alaibe","followers_url":"https://api.github.com/users/alaibe/followers","following_url":"https://api.github.com/users/alaibe/following{/other_user}","gists_url":"https://api.github.com/users/alaibe/gists{/gist_id}","starred_url":"https://api.github.com/users/alaibe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alaibe/subscriptions","organizations_url":"https://api.github.com/users/alaibe/orgs","repos_url":"https://api.github.com/users/alaibe/repos","events_url":"https://api.github.com/users/alaibe/events{/privacy}","received_events_url":"https://api.github.com/users/alaibe/received_events","type":"User","site_admin":false},"body":"New strategy for code coverage:\r\n\r\nIt requires solidity with emit keyword for event (0.4.21 or higher)\r\nInstead of using the trace from the vm, use events that we inject into the contract.\r\n\r\nChange required if you deploy your contract manually, instead of doing:\r\n`MyContract.deploy(deployArgs).send(sendArgs)` do: `embark.deploy(MyContract, deployArgs, sendArgs`)\r\n\r\nOtherwise we cannot fetch the events associated to this contract\r\n\r\nPros:\r\n- 100% accurate on line count\r\n- Support library\r\n- Support all cases\r\n\r\nCons:\r\n- Consume more gas\r\n- You cannot extend a function from an external contract that is pure or view until we find a solution for: https://github.com/ethereum/solc-js/issues/313\r\n\r\nPossible improvements:\r\n- Do not emit event for function and branch, in theory the statement are enough, so gas consumption would be reduced","created_at":"2018-12-07T14:02:37Z","updated_at":"2018-12-07T14:33:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/embark-framework/embark/pulls/1167/commits","review_comments_url":"https://api.github.com/repos/embark-framework/embark/pulls/1167/comments","review_comment_url":"https://api.github.com/repos/embark-framework/embark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/embark-framework/embark/issues/1167/comments","statuses_url":"https://api.github.com/repos/embark-framework/embark/statuses/cfbeb131083240385143924981437d05c97eff05","head":{"label":"embark-framework:feat/coverage-events","ref":"feat/coverage-events","sha":"cfbeb131083240385143924981437d05c97eff05","user":{"login":"embark-framework","id":12584440,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNTg0NDQw","avatar_url":"https://avatars1.githubusercontent.com/u/12584440?v=4","gravatar_id":"","url":"https://api.github.com/users/embark-framework","html_url":"https://github.com/embark-framework","followers_url":"https://api.github.com/users/embark-framework/followers","following_url":"https://api.github.com/users/embark-framework/following{/other_user}","gists_url":"https://api.github.com/users/embark-framework/gists{/gist_id}","starred_url":"https://api.github.com/users/embark-framework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/embark-framework/subscriptions","organizations_url":"https://api.github.com/users/embark-framework/orgs","repos_url":"https://api.github.com/users/embark-framework/repos","events_url":"https://api.github.com/users/embark-framework/events{/privacy}","received_events_url":"https://api.github.com/users/embark-framework/received_events","type":"Organization","site_admin":false},"repo":{"id":36172821,"node_id":"MDEwOlJlcG9zaXRvcnkzNjE3MjgyMQ==","name":"embark","full_name":"embark-framework/embark","private":false,"owner":{"login":"embark-framework","id":12584440,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNTg0NDQw","avatar_url":"https://avatars1.githubusercontent.com/u/12584440?v=4","gravatar_id":"","url":"https://api.github.com/users/embark-framework","html_url":"https://github.com/embark-framework","followers_url":"https://api.github.com/users/embark-framework/followers","following_url":"https://api.github.com/users/embark-framework/following{/other_user}","gists_url":"https://api.github.com/users/embark-framework/gists{/gist_id}","starred_url":"https://api.github.com/users/embark-framework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/embark-framework/subscriptions","organizations_url":"https://api.github.com/users/embark-framework/orgs","repos_url":"https://api.github.com/users/embark-framework/repos","events_url":"https://api.github.com/users/embark-framework/events{/privacy}","received_events_url":"https://api.github.com/users/embark-framework/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/embark-framework/embark","description":"Framework for serverless Decentralized Applications using Ethereum, IPFS and other platforms","fork":false,"url":"https://api.github.com/repos/embark-framework/embark","forks_url":"https://api.github.com/repos/embark-framework/embark/forks","keys_url":"https://api.github.com/repos/embark-framework/embark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/embark-framework/embark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/embark-framework/embark/teams","hooks_url":"https://api.github.com/repos/embark-framework/embark/hooks","issue_events_url":"https://api.github.com/repos/embark-framework/embark/issues/events{/number}","events_url":"https://api.github.com/repos/embark-framework/embark/events","assignees_url":"https://api.github.com/repos/embark-framework/embark/assignees{/user}","branches_url":"https://api.github.com/repos/embark-framework/embark/branches{/branch}","tags_url":"https://api.github.com/repos/embark-framework/embark/tags","blobs_url":"https://api.github.com/repos/embark-framework/embark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/embark-framework/embark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/embark-framework/embark/git/refs{/sha}","trees_url":"https://api.github.com/repos/embark-framework/embark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/embark-framework/embark/statuses/{sha}","languages_url":"https://api.github.com/repos/embark-framework/embark/languages","stargazers_url":"https://api.github.com/repos/embark-framework/embark/stargazers","contributors_url":"https://api.github.com/repos/embark-framework/embark/contributors","subscribers_url":"https://api.github.com/repos/embark-framework/embark/subscribers","subscription_url":"https://api.github.com/repos/embark-framework/embark/subscription","commits_url":"https://api.github.com/repos/embark-framework/embark/commits{/sha}","git_commits_url":"https://api.github.com/repos/embark-framework/embark/git/commits{/sha}","comments_url":"https://api.github.com/repos/embark-framework/embark/comments{/number}","issue_comment_url":"https://api.github.com/repos/embark-framework/embark/issues/comments{/number}","contents_url":"https://api.github.com/repos/embark-framework/embark/contents/{+path}","compare_url":"https://api.github.com/repos/embark-framework/embark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/embark-framework/embark/merges","archive_url":"https://api.github.com/repos/embark-framework/embark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/embark-framework/embark/downloads","issues_url":"https://api.github.com/repos/embark-framework/embark/issues{/number}","pulls_url":"https://api.github.com/repos/embark-framework/embark/pulls{/number}","milestones_url":"https://api.github.com/repos/embark-framework/embark/milestones{/number}","notifications_url":"https://api.github.com/repos/embark-framework/embark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/embark-framework/embark/labels{/name}","releases_url":"https://api.github.com/repos/embark-framework/embark/releases{/id}","deployments_url":"https://api.github.com/repos/embark-framework/embark/deployments","created_at":"2015-05-24T13:10:10Z","updated_at":"2018-12-07T14:30:36Z","pushed_at":"2018-12-07T14:30:31Z","git_url":"git://github.com/embark-framework/embark.git","ssh_url":"git@github.com:embark-framework/embark.git","clone_url":"https://github.com/embark-framework/embark.git","svn_url":"https://github.com/embark-framework/embark","homepage":"https://embark.status.im/","size":20850,"stargazers_count":2577,"watchers_count":2577,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":373,"mirror_url":null,"archived":false,"open_issues_count":51,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":373,"open_issues":51,"watchers":2577,"default_branch":"master"}},"base":{"label":"embark-framework:master","ref":"master","sha":"72f87012a9903d803563c1c217e925155115e43e","user":{"login":"embark-framework","id":12584440,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNTg0NDQw","avatar_url":"https://avatars1.githubusercontent.com/u/12584440?v=4","gravatar_id":"","url":"https://api.github.com/users/embark-framework","html_url":"https://github.com/embark-framework","followers_url":"https://api.github.com/users/embark-framework/followers","following_url":"https://api.github.com/users/embark-framework/following{/other_user}","gists_url":"https://api.github.com/users/embark-framework/gists{/gist_id}","starred_url":"https://api.github.com/users/embark-framework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/embark-framework/subscriptions","organizations_url":"https://api.github.com/users/embark-framework/orgs","repos_url":"https://api.github.com/users/embark-framework/repos","events_url":"https://api.github.com/users/embark-framework/events{/privacy}","received_events_url":"https://api.github.com/users/embark-framework/received_events","type":"Organization","site_admin":false},"repo":{"id":36172821,"node_id":"MDEwOlJlcG9zaXRvcnkzNjE3MjgyMQ==","name":"embark","full_name":"embark-framework/embark","private":false,"owner":{"login":"embark-framework","id":12584440,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNTg0NDQw","avatar_url":"https://avatars1.githubusercontent.com/u/12584440?v=4","gravatar_id":"","url":"https://api.github.com/users/embark-framework","html_url":"https://github.com/embark-framework","followers_url":"https://api.github.com/users/embark-framework/followers","following_url":"https://api.github.com/users/embark-framework/following{/other_user}","gists_url":"https://api.github.com/users/embark-framework/gists{/gist_id}","starred_url":"https://api.github.com/users/embark-framework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/embark-framework/subscriptions","organizations_url":"https://api.github.com/users/embark-framework/orgs","repos_url":"https://api.github.com/users/embark-framework/repos","events_url":"https://api.github.com/users/embark-framework/events{/privacy}","received_events_url":"https://api.github.com/users/embark-framework/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/embark-framework/embark","description":"Framework for serverless Decentralized Applications using Ethereum, IPFS and other platforms","fork":false,"url":"https://api.github.com/repos/embark-framework/embark","forks_url":"https://api.github.com/repos/embark-framework/embark/forks","keys_url":"https://api.github.com/repos/embark-framework/embark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/embark-framework/embark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/embark-framework/embark/teams","hooks_url":"https://api.github.com/repos/embark-framework/embark/hooks","issue_events_url":"https://api.github.com/repos/embark-framework/embark/issues/events{/number}","events_url":"https://api.github.com/repos/embark-framework/embark/events","assignees_url":"https://api.github.com/repos/embark-framework/embark/assignees{/user}","branches_url":"https://api.github.com/repos/embark-framework/embark/branches{/branch}","tags_url":"https://api.github.com/repos/embark-framework/embark/tags","blobs_url":"https://api.github.com/repos/embark-framework/embark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/embark-framework/embark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/embark-framework/embark/git/refs{/sha}","trees_url":"https://api.github.com/repos/embark-framework/embark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/embark-framework/embark/statuses/{sha}","languages_url":"https://api.github.com/repos/embark-framework/embark/languages","stargazers_url":"https://api.github.com/repos/embark-framework/embark/stargazers","contributors_url":"https://api.github.com/repos/embark-framework/embark/contributors","subscribers_url":"https://api.github.com/repos/embark-framework/embark/subscribers","subscription_url":"https://api.github.com/repos/embark-framework/embark/subscription","commits_url":"https://api.github.com/repos/embark-framework/embark/commits{/sha}","git_commits_url":"https://api.github.com/repos/embark-framework/embark/git/commits{/sha}","comments_url":"https://api.github.com/repos/embark-framework/embark/comments{/number}","issue_comment_url":"https://api.github.com/repos/embark-framework/embark/issues/comments{/number}","contents_url":"https://api.github.com/repos/embark-framework/embark/contents/{+path}","compare_url":"https://api.github.com/repos/embark-framework/embark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/embark-framework/embark/merges","archive_url":"https://api.github.com/repos/embark-framework/embark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/embark-framework/embark/downloads","issues_url":"https://api.github.com/repos/embark-framework/embark/issues{/number}","pulls_url":"https://api.github.com/repos/embark-framework/embark/pulls{/number}","milestones_url":"https://api.github.com/repos/embark-framework/embark/milestones{/number}","notifications_url":"https://api.github.com/repos/embark-framework/embark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/embark-framework/embark/labels{/name}","releases_url":"https://api.github.com/repos/embark-framework/embark/releases{/id}","deployments_url":"https://api.github.com/repos/embark-framework/embark/deployments","created_at":"2015-05-24T13:10:10Z","updated_at":"2018-12-07T14:30:36Z","pushed_at":"2018-12-07T14:30:31Z","git_url":"git://github.com/embark-framework/embark.git","ssh_url":"git@github.com:embark-framework/embark.git","clone_url":"https://github.com/embark-framework/embark.git","svn_url":"https://github.com/embark-framework/embark","homepage":"https://embark.status.im/","size":20850,"stargazers_count":2577,"watchers_count":2577,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":373,"mirror_url":null,"archived":false,"open_issues_count":51,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":373,"open_issues":51,"watchers":2577,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/embark-framework/embark/pulls/1167"},"html":{"href":"https://github.com/embark-framework/embark/pull/1167"},"issue":{"href":"https://api.github.com/repos/embark-framework/embark/issues/1167"},"comments":{"href":"https://api.github.com/repos/embark-framework/embark/issues/1167/comments"},"review_comments":{"href":"https://api.github.com/repos/embark-framework/embark/pulls/1167/comments"},"review_comment":{"href":"https://api.github.com/repos/embark-framework/embark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/embark-framework/embark/pulls/1167/commits"},"statuses":{"href":"https://api.github.com/repos/embark-framework/embark/statuses/cfbeb131083240385143924981437d05c97eff05"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"alaibe"}}