{"action":"created","comment":{"url":"https://api.github.com/repos/0xProject/0x-monorepo/pulls/comments/190079764","pull_request_review_id":122375544,"id":190079764,"diff_hunk":"@@ -115,29 +118,52 @@ export class CoverageSubprovider extends Subprovider {\n     private async _recordTxTraceAsync(address: string, data: string | undefined, txHash: string): Promise<void> {\n         let payload = {\n             method: 'debug_traceTransaction',\n-            params: [txHash, { disableMemory: true, disableStack: true, disableStorage: true }], // TODO For now testrpc just ignores those parameters https://github.com/trufflesuite/ganache-cli/issues/489\n+            params: [txHash, { disableMemory: true, disableStack: false, disableStorage: true }],\n         };\n         const jsonRPCResponsePayload = await this.emitPayloadAsync(payload);\n         const trace: TransactionTrace = jsonRPCResponsePayload.result;\n-        const coveredPcs = _.map(trace.structLogs, log => log.pc);\n         if (address === constants.NEW_CONTRACT) {\n-            const traceInfo: TraceInfoNewContract = {\n-                coveredPcs,\n-                txHash,\n-                address: address as 'NEW_CONTRACT',\n-                bytecode: data as string,\n-            };\n-            this._coverageManager.appendTraceInfo(traceInfo);\n+            const tracesByContractAddress = getTracesByContractAddress(trace.structLogs, address);\n+            for (const subcallAddress of _.keys(tracesByContractAddress)) {\n+                let traceInfo: TraceInfoNewContract | TraceInfoExistingContract;\n+                if (subcallAddress === 'NEW_CONTRACT') {\n+                    const traceForThatSubcall = tracesByContractAddress[subcallAddress];\n+                    const coveredPcs = _.map(traceForThatSubcall, log => log.pc);\n+                    traceInfo = {\n+                        coveredPcs,\n+                        txHash,\n+                        address: address as 'NEW_CONTRACT',\n+                        bytecode: data as string,\n+                    };\n+                } else {\n+                    payload = { method: 'eth_getCode', params: [subcallAddress, BlockParamLiteral.Latest] };\n+                    const runtimeBytecode = (await this.emitPayloadAsync(payload)).result;","path":"packages/sol-cov/src/coverage_subprovider.ts","position":77,"original_position":77,"commit_id":"f7560036b8697ce9797b00c67f8310017625e393","original_commit_id":"f7560036b8697ce9797b00c67f8310017625e393","user":{"login":"fabioberger","id":2151492,"avatar_url":"https://avatars2.githubusercontent.com/u/2151492?v=4","gravatar_id":"","url":"https://api.github.com/users/fabioberger","html_url":"https://github.com/fabioberger","followers_url":"https://api.github.com/users/fabioberger/followers","following_url":"https://api.github.com/users/fabioberger/following{/other_user}","gists_url":"https://api.github.com/users/fabioberger/gists{/gist_id}","starred_url":"https://api.github.com/users/fabioberger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabioberger/subscriptions","organizations_url":"https://api.github.com/users/fabioberger/orgs","repos_url":"https://api.github.com/users/fabioberger/repos","events_url":"https://api.github.com/users/fabioberger/events{/privacy}","received_events_url":"https://api.github.com/users/fabioberger/received_events","type":"User","site_admin":false},"body":"Split into two lines please.\r\n\r\nAlso, any chance this doesn't return the `runtimeBytecode`? If so, what is returned? ","created_at":"2018-05-22T23:03:35Z","updated_at":"2018-05-22T23:17:21Z","html_url":"https://github.com/0xProject/0x-monorepo/pull/589#discussion_r190079764","pull_request_url":"https://api.github.com/repos/0xProject/0x-monorepo/pulls/589","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/0xProject/0x-monorepo/pulls/comments/190079764"},"html":{"href":"https://github.com/0xProject/0x-monorepo/pull/589#discussion_r190079764"},"pull_request":{"href":"https://api.github.com/repos/0xProject/0x-monorepo/pulls/589"}}},"pull_request":{"url":"https://api.github.com/repos/0xProject/0x-monorepo/pulls/589","id":187909595,"html_url":"https://github.com/0xProject/0x-monorepo/pull/589","diff_url":"https://github.com/0xProject/0x-monorepo/pull/589.diff","patch_url":"https://github.com/0xProject/0x-monorepo/pull/589.patch","issue_url":"https://api.github.com/repos/0xProject/0x-monorepo/issues/589","number":589,"state":"open","locked":false,"title":"Sol-cov artifact Adapters (truffle)","user":{"login":"LogvinovLeon","id":6204356,"avatar_url":"https://avatars1.githubusercontent.com/u/6204356?v=4","gravatar_id":"","url":"https://api.github.com/users/LogvinovLeon","html_url":"https://github.com/LogvinovLeon","followers_url":"https://api.github.com/users/LogvinovLeon/followers","following_url":"https://api.github.com/users/LogvinovLeon/following{/other_user}","gists_url":"https://api.github.com/users/LogvinovLeon/gists{/gist_id}","starred_url":"https://api.github.com/users/LogvinovLeon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LogvinovLeon/subscriptions","organizations_url":"https://api.github.com/users/LogvinovLeon/orgs","repos_url":"https://api.github.com/users/LogvinovLeon/repos","events_url":"https://api.github.com/users/LogvinovLeon/events{/privacy}","received_events_url":"https://api.github.com/users/LogvinovLeon/received_events","type":"User","site_admin":false},"body":"## Description\r\n\r\n* Adds artifact adapters and implements ZeroEx and Truffle one.\r\n* Exports an Abstract one for other frameworks/tools\r\n* Support multi-level stack traces (CALL's, RETURN's, DELEGATECALL's)\r\n* Fix bugs in resolvers\r\n* Fix bugs in binary lookups\r\n* Add support for libraries\r\n\r\n## Motivation and Context\r\n\r\nAfter this PR - sol-cov works for truffle metacoin project.\r\nIs able to support other artifacts formats like giveth one.\r\n\r\n## How Has This Been Tested?\r\n\r\ntests & manually\r\n\r\n## Types of changes\r\n\r\n<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n\r\n*   [x] Bug fix (non-breaking change which fixes an issue)\r\n*   [x] New feature (non-breaking change which adds functionality)\r\n*   [x] Breaking change (fix or feature that would cause existing functionality to change)\r\n\r\n## Checklist:\r\n\r\n<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n\r\n<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->\r\n\r\n*   [x] Change requires a change to the documentation.\r\n*   [x] Added tests to cover my changes.\r\n*   [x] Added new entries to the relevant CHANGELOG.jsons.\r\n*   [x] Labeled this PR with the 'WIP' label if it is a work in progress.\r\n*   [x] Labeled this PR with the labels corresponding to the changed package.\r\n","created_at":"2018-05-14T18:17:43Z","updated_at":"2018-05-22T23:17:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1f74482228c1133ac99a226163bfadabf8cd0e48","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":882608369,"url":"https://api.github.com/repos/0xProject/0x-monorepo/labels/metacoin","name":"metacoin","color":"d6c9ff","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/0xProject/0x-monorepo/pulls/589/commits","review_comments_url":"https://api.github.com/repos/0xProject/0x-monorepo/pulls/589/comments","review_comment_url":"https://api.github.com/repos/0xProject/0x-monorepo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/0xProject/0x-monorepo/issues/589/comments","statuses_url":"https://api.github.com/repos/0xProject/0x-monorepo/statuses/f7560036b8697ce9797b00c67f8310017625e393","head":{"label":"0xProject:feature/truffle-sol-cov","ref":"feature/truffle-sol-cov","sha":"f7560036b8697ce9797b00c67f8310017625e393","user":{"login":"0xProject","id":24832717,"avatar_url":"https://avatars2.githubusercontent.com/u/24832717?v=4","gravatar_id":"","url":"https://api.github.com/users/0xProject","html_url":"https://github.com/0xProject","followers_url":"https://api.github.com/users/0xProject/followers","following_url":"https://api.github.com/users/0xProject/following{/other_user}","gists_url":"https://api.github.com/users/0xProject/gists{/gist_id}","starred_url":"https://api.github.com/users/0xProject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0xProject/subscriptions","organizations_url":"https://api.github.com/users/0xProject/orgs","repos_url":"https://api.github.com/users/0xProject/repos","events_url":"https://api.github.com/users/0xProject/events{/privacy}","received_events_url":"https://api.github.com/users/0xProject/received_events","type":"Organization","site_admin":false},"repo":{"id":92181371,"name":"0x-monorepo","full_name":"0xProject/0x-monorepo","owner":{"login":"0xProject","id":24832717,"avatar_url":"https://avatars2.githubusercontent.com/u/24832717?v=4","gravatar_id":"","url":"https://api.github.com/users/0xProject","html_url":"https://github.com/0xProject","followers_url":"https://api.github.com/users/0xProject/followers","following_url":"https://api.github.com/users/0xProject/following{/other_user}","gists_url":"https://api.github.com/users/0xProject/gists{/gist_id}","starred_url":"https://api.github.com/users/0xProject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0xProject/subscriptions","organizations_url":"https://api.github.com/users/0xProject/orgs","repos_url":"https://api.github.com/users/0xProject/repos","events_url":"https://api.github.com/users/0xProject/events{/privacy}","received_events_url":"https://api.github.com/users/0xProject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/0xProject/0x-monorepo","description":"0x protocol monorepo - includes our smart contracts and many developer tools","fork":false,"url":"https://api.github.com/repos/0xProject/0x-monorepo","forks_url":"https://api.github.com/repos/0xProject/0x-monorepo/forks","keys_url":"https://api.github.com/repos/0xProject/0x-monorepo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/0xProject/0x-monorepo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/0xProject/0x-monorepo/teams","hooks_url":"https://api.github.com/repos/0xProject/0x-monorepo/hooks","issue_events_url":"https://api.github.com/repos/0xProject/0x-monorepo/issues/events{/number}","events_url":"https://api.github.com/repos/0xProject/0x-monorepo/events","assignees_url":"https://api.github.com/repos/0xProject/0x-monorepo/assignees{/user}","branches_url":"https://api.github.com/repos/0xProject/0x-monorepo/branches{/branch}","tags_url":"https://api.github.com/repos/0xProject/0x-monorepo/tags","blobs_url":"https://api.github.com/repos/0xProject/0x-monorepo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/0xProject/0x-monorepo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/0xProject/0x-monorepo/git/refs{/sha}","trees_url":"https://api.github.com/repos/0xProject/0x-monorepo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/0xProject/0x-monorepo/statuses/{sha}","languages_url":"https://api.github.com/repos/0xProject/0x-monorepo/languages","stargazers_url":"https://api.github.com/repos/0xProject/0x-monorepo/stargazers","contributors_url":"https://api.github.com/repos/0xProject/0x-monorepo/contributors","subscribers_url":"https://api.github.com/repos/0xProject/0x-monorepo/subscribers","subscription_url":"https://api.github.com/repos/0xProject/0x-monorepo/subscription","commits_url":"https://api.github.com/repos/0xProject/0x-monorepo/commits{/sha}","git_commits_url":"https://api.github.com/repos/0xProject/0x-monorepo/git/commits{/sha}","comments_url":"https://api.github.com/repos/0xProject/0x-monorepo/comments{/number}","issue_comment_url":"https://api.github.com/repos/0xProject/0x-monorepo/issues/comments{/number}","contents_url":"https://api.github.com/repos/0xProject/0x-monorepo/contents/{+path}","compare_url":"https://api.github.com/repos/0xProject/0x-monorepo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/0xProject/0x-monorepo/merges","archive_url":"https://api.github.com/repos/0xProject/0x-monorepo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/0xProject/0x-monorepo/downloads","issues_url":"https://api.github.com/repos/0xProject/0x-monorepo/issues{/number}","pulls_url":"https://api.github.com/repos/0xProject/0x-monorepo/pulls{/number}","milestones_url":"https://api.github.com/repos/0xProject/0x-monorepo/milestones{/number}","notifications_url":"https://api.github.com/repos/0xProject/0x-monorepo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/0xProject/0x-monorepo/labels{/name}","releases_url":"https://api.github.com/repos/0xProject/0x-monorepo/releases{/id}","deployments_url":"https://api.github.com/repos/0xProject/0x-monorepo/deployments","created_at":"2017-05-23T14:17:33Z","updated_at":"2018-05-22T22:38:31Z","pushed_at":"2018-05-22T23:08:34Z","git_url":"git://github.com/0xProject/0x-monorepo.git","ssh_url":"git@github.com:0xProject/0x-monorepo.git","clone_url":"https://github.com/0xProject/0x-monorepo.git","svn_url":"https://github.com/0xProject/0x-monorepo","homepage":"","size":45713,"stargazers_count":604,"watchers_count":604,"language":"TypeScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":149,"mirror_url":null,"archived":false,"open_issues_count":34,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":149,"open_issues":34,"watchers":604,"default_branch":"development"}},"base":{"label":"0xProject:v2-prototype","ref":"v2-prototype","sha":"fc87caa34800393c1c0d4e507146de081fcb212e","user":{"login":"0xProject","id":24832717,"avatar_url":"https://avatars2.githubusercontent.com/u/24832717?v=4","gravatar_id":"","url":"https://api.github.com/users/0xProject","html_url":"https://github.com/0xProject","followers_url":"https://api.github.com/users/0xProject/followers","following_url":"https://api.github.com/users/0xProject/following{/other_user}","gists_url":"https://api.github.com/users/0xProject/gists{/gist_id}","starred_url":"https://api.github.com/users/0xProject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0xProject/subscriptions","organizations_url":"https://api.github.com/users/0xProject/orgs","repos_url":"https://api.github.com/users/0xProject/repos","events_url":"https://api.github.com/users/0xProject/events{/privacy}","received_events_url":"https://api.github.com/users/0xProject/received_events","type":"Organization","site_admin":false},"repo":{"id":92181371,"name":"0x-monorepo","full_name":"0xProject/0x-monorepo","owner":{"login":"0xProject","id":24832717,"avatar_url":"https://avatars2.githubusercontent.com/u/24832717?v=4","gravatar_id":"","url":"https://api.github.com/users/0xProject","html_url":"https://github.com/0xProject","followers_url":"https://api.github.com/users/0xProject/followers","following_url":"https://api.github.com/users/0xProject/following{/other_user}","gists_url":"https://api.github.com/users/0xProject/gists{/gist_id}","starred_url":"https://api.github.com/users/0xProject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0xProject/subscriptions","organizations_url":"https://api.github.com/users/0xProject/orgs","repos_url":"https://api.github.com/users/0xProject/repos","events_url":"https://api.github.com/users/0xProject/events{/privacy}","received_events_url":"https://api.github.com/users/0xProject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/0xProject/0x-monorepo","description":"0x protocol monorepo - includes our smart contracts and many developer tools","fork":false,"url":"https://api.github.com/repos/0xProject/0x-monorepo","forks_url":"https://api.github.com/repos/0xProject/0x-monorepo/forks","keys_url":"https://api.github.com/repos/0xProject/0x-monorepo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/0xProject/0x-monorepo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/0xProject/0x-monorepo/teams","hooks_url":"https://api.github.com/repos/0xProject/0x-monorepo/hooks","issue_events_url":"https://api.github.com/repos/0xProject/0x-monorepo/issues/events{/number}","events_url":"https://api.github.com/repos/0xProject/0x-monorepo/events","assignees_url":"https://api.github.com/repos/0xProject/0x-monorepo/assignees{/user}","branches_url":"https://api.github.com/repos/0xProject/0x-monorepo/branches{/branch}","tags_url":"https://api.github.com/repos/0xProject/0x-monorepo/tags","blobs_url":"https://api.github.com/repos/0xProject/0x-monorepo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/0xProject/0x-monorepo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/0xProject/0x-monorepo/git/refs{/sha}","trees_url":"https://api.github.com/repos/0xProject/0x-monorepo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/0xProject/0x-monorepo/statuses/{sha}","languages_url":"https://api.github.com/repos/0xProject/0x-monorepo/languages","stargazers_url":"https://api.github.com/repos/0xProject/0x-monorepo/stargazers","contributors_url":"https://api.github.com/repos/0xProject/0x-monorepo/contributors","subscribers_url":"https://api.github.com/repos/0xProject/0x-monorepo/subscribers","subscription_url":"https://api.github.com/repos/0xProject/0x-monorepo/subscription","commits_url":"https://api.github.com/repos/0xProject/0x-monorepo/commits{/sha}","git_commits_url":"https://api.github.com/repos/0xProject/0x-monorepo/git/commits{/sha}","comments_url":"https://api.github.com/repos/0xProject/0x-monorepo/comments{/number}","issue_comment_url":"https://api.github.com/repos/0xProject/0x-monorepo/issues/comments{/number}","contents_url":"https://api.github.com/repos/0xProject/0x-monorepo/contents/{+path}","compare_url":"https://api.github.com/repos/0xProject/0x-monorepo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/0xProject/0x-monorepo/merges","archive_url":"https://api.github.com/repos/0xProject/0x-monorepo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/0xProject/0x-monorepo/downloads","issues_url":"https://api.github.com/repos/0xProject/0x-monorepo/issues{/number}","pulls_url":"https://api.github.com/repos/0xProject/0x-monorepo/pulls{/number}","milestones_url":"https://api.github.com/repos/0xProject/0x-monorepo/milestones{/number}","notifications_url":"https://api.github.com/repos/0xProject/0x-monorepo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/0xProject/0x-monorepo/labels{/name}","releases_url":"https://api.github.com/repos/0xProject/0x-monorepo/releases{/id}","deployments_url":"https://api.github.com/repos/0xProject/0x-monorepo/deployments","created_at":"2017-05-23T14:17:33Z","updated_at":"2018-05-22T22:38:31Z","pushed_at":"2018-05-22T23:08:34Z","git_url":"git://github.com/0xProject/0x-monorepo.git","ssh_url":"git@github.com:0xProject/0x-monorepo.git","clone_url":"https://github.com/0xProject/0x-monorepo.git","svn_url":"https://github.com/0xProject/0x-monorepo","homepage":"","size":45713,"stargazers_count":604,"watchers_count":604,"language":"TypeScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":149,"mirror_url":null,"archived":false,"open_issues_count":34,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":149,"open_issues":34,"watchers":604,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/0xProject/0x-monorepo/pulls/589"},"html":{"href":"https://github.com/0xProject/0x-monorepo/pull/589"},"issue":{"href":"https://api.github.com/repos/0xProject/0x-monorepo/issues/589"},"comments":{"href":"https://api.github.com/repos/0xProject/0x-monorepo/issues/589/comments"},"review_comments":{"href":"https://api.github.com/repos/0xProject/0x-monorepo/pulls/589/comments"},"review_comment":{"href":"https://api.github.com/repos/0xProject/0x-monorepo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/0xProject/0x-monorepo/pulls/589/commits"},"statuses":{"href":"https://api.github.com/repos/0xProject/0x-monorepo/statuses/f7560036b8697ce9797b00c67f8310017625e393"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"fabioberger"}}