{"action":"created","comment":{"url":"https://api.github.com/repos/ethereum/go-ethereum/pulls/comments/158511695","pull_request_review_id":85338627,"id":158511695,"diff_hunk":"@@ -141,3 +134,14 @@ func (abi *ABI) UnmarshalJSON(data []byte) error {\n \n \treturn nil\n }\n+\n+// MethodById looks up a method by the 4-byte id\n+// returns nil if none found\n+func (abi *ABI) MethodById(sigdata []byte) *Method {\n+\tfor _, method := range abi.Methods {","path":"accounts/abi/abi.go","position":87,"original_position":87,"commit_id":"ee8c716a9027942a98b38078835274e5b8ddae57","original_commit_id":"ee8c716a9027942a98b38078835274e5b8ddae57","user":{"login":"gballet","id":3272758,"avatar_url":"https://avatars3.githubusercontent.com/u/3272758?v=4","gravatar_id":"","url":"https://api.github.com/users/gballet","html_url":"https://github.com/gballet","followers_url":"https://api.github.com/users/gballet/followers","following_url":"https://api.github.com/users/gballet/following{/other_user}","gists_url":"https://api.github.com/users/gballet/gists{/gist_id}","starred_url":"https://api.github.com/users/gballet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gballet/subscriptions","organizations_url":"https://api.github.com/users/gballet/orgs","repos_url":"https://api.github.com/users/gballet/repos","events_url":"https://api.github.com/users/gballet/events{/privacy}","received_events_url":"https://api.github.com/users/gballet/received_events","type":"User","site_admin":false},"body":"Couldn't there be a lookup table for method.Id() <=> method ?","created_at":"2017-12-22T15:33:05Z","updated_at":"2017-12-22T16:02:50Z","html_url":"https://github.com/ethereum/go-ethereum/pull/15731#discussion_r158511695","pull_request_url":"https://api.github.com/repos/ethereum/go-ethereum/pulls/15731","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ethereum/go-ethereum/pulls/comments/158511695"},"html":{"href":"https://github.com/ethereum/go-ethereum/pull/15731#discussion_r158511695"},"pull_request":{"href":"https://api.github.com/repos/ethereum/go-ethereum/pulls/15731"}}},"pull_request":{"url":"https://api.github.com/repos/ethereum/go-ethereum/pulls/15731","id":159684543,"html_url":"https://github.com/ethereum/go-ethereum/pull/15731","diff_url":"https://github.com/ethereum/go-ethereum/pull/15731.diff","patch_url":"https://github.com/ethereum/go-ethereum/pull/15731.patch","issue_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/15731","number":15731,"state":"open","locked":false,"title":"accounts/abi refactor","user":{"login":"holiman","id":142290,"avatar_url":"https://avatars1.githubusercontent.com/u/142290?v=4","gravatar_id":"","url":"https://api.github.com/users/holiman","html_url":"https://github.com/holiman","followers_url":"https://api.github.com/users/holiman/followers","following_url":"https://api.github.com/users/holiman/following{/other_user}","gists_url":"https://api.github.com/users/holiman/gists{/gist_id}","starred_url":"https://api.github.com/users/holiman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/holiman/subscriptions","organizations_url":"https://api.github.com/users/holiman/orgs","repos_url":"https://api.github.com/users/holiman/repos","events_url":"https://api.github.com/users/holiman/events{/privacy}","received_events_url":"https://api.github.com/users/holiman/received_events","type":"User","site_admin":false},"body":"This PR changes the ABI-model, since ABI is an encoding of arguments, the unpack logic has been moved away from `Method`/ `Event`, and on to the new type `Arguments` (alias for `[]Argument`). \r\n\r\nThis PR removes a lot of duplicated code and also makes it easier to unpack method inputs as well as outputs, and also simplifies the logic in the abi-package. \r\n\r\nThis PR also incorporates (and supersedes) https://github.com/ethereum/go-ethereum/pull/15452 , with some extra testcases taken from https://github.com/ethereum/go-ethereum/pull/15568 . \r\n\r\nThis is a large PR, but I believe the abi-package to be fairly well covered by testcases at this point.  ","created_at":"2017-12-21T15:30:55Z","updated_at":"2017-12-22T16:02:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7b1b1a75524bc15438157b91190d4dae77154bde","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/ethereum/go-ethereum/pulls/15731/commits","review_comments_url":"https://api.github.com/repos/ethereum/go-ethereum/pulls/15731/comments","review_comment_url":"https://api.github.com/repos/ethereum/go-ethereum/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/15731/comments","statuses_url":"https://api.github.com/repos/ethereum/go-ethereum/statuses/ee8c716a9027942a98b38078835274e5b8ddae57","head":{"label":"holiman:revamp_abi","ref":"revamp_abi","sha":"ee8c716a9027942a98b38078835274e5b8ddae57","user":{"login":"holiman","id":142290,"avatar_url":"https://avatars1.githubusercontent.com/u/142290?v=4","gravatar_id":"","url":"https://api.github.com/users/holiman","html_url":"https://github.com/holiman","followers_url":"https://api.github.com/users/holiman/followers","following_url":"https://api.github.com/users/holiman/following{/other_user}","gists_url":"https://api.github.com/users/holiman/gists{/gist_id}","starred_url":"https://api.github.com/users/holiman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/holiman/subscriptions","organizations_url":"https://api.github.com/users/holiman/orgs","repos_url":"https://api.github.com/users/holiman/repos","events_url":"https://api.github.com/users/holiman/events{/privacy}","received_events_url":"https://api.github.com/users/holiman/received_events","type":"User","site_admin":false},"repo":{"id":75061513,"name":"go-ethereum","full_name":"holiman/go-ethereum","owner":{"login":"holiman","id":142290,"avatar_url":"https://avatars1.githubusercontent.com/u/142290?v=4","gravatar_id":"","url":"https://api.github.com/users/holiman","html_url":"https://github.com/holiman","followers_url":"https://api.github.com/users/holiman/followers","following_url":"https://api.github.com/users/holiman/following{/other_user}","gists_url":"https://api.github.com/users/holiman/gists{/gist_id}","starred_url":"https://api.github.com/users/holiman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/holiman/subscriptions","organizations_url":"https://api.github.com/users/holiman/orgs","repos_url":"https://api.github.com/users/holiman/repos","events_url":"https://api.github.com/users/holiman/events{/privacy}","received_events_url":"https://api.github.com/users/holiman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/holiman/go-ethereum","description":"Official Go implementation of the Ethereum protocol","fork":true,"url":"https://api.github.com/repos/holiman/go-ethereum","forks_url":"https://api.github.com/repos/holiman/go-ethereum/forks","keys_url":"https://api.github.com/repos/holiman/go-ethereum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/holiman/go-ethereum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/holiman/go-ethereum/teams","hooks_url":"https://api.github.com/repos/holiman/go-ethereum/hooks","issue_events_url":"https://api.github.com/repos/holiman/go-ethereum/issues/events{/number}","events_url":"https://api.github.com/repos/holiman/go-ethereum/events","assignees_url":"https://api.github.com/repos/holiman/go-ethereum/assignees{/user}","branches_url":"https://api.github.com/repos/holiman/go-ethereum/branches{/branch}","tags_url":"https://api.github.com/repos/holiman/go-ethereum/tags","blobs_url":"https://api.github.com/repos/holiman/go-ethereum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/holiman/go-ethereum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/holiman/go-ethereum/git/refs{/sha}","trees_url":"https://api.github.com/repos/holiman/go-ethereum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/holiman/go-ethereum/statuses/{sha}","languages_url":"https://api.github.com/repos/holiman/go-ethereum/languages","stargazers_url":"https://api.github.com/repos/holiman/go-ethereum/stargazers","contributors_url":"https://api.github.com/repos/holiman/go-ethereum/contributors","subscribers_url":"https://api.github.com/repos/holiman/go-ethereum/subscribers","subscription_url":"https://api.github.com/repos/holiman/go-ethereum/subscription","commits_url":"https://api.github.com/repos/holiman/go-ethereum/commits{/sha}","git_commits_url":"https://api.github.com/repos/holiman/go-ethereum/git/commits{/sha}","comments_url":"https://api.github.com/repos/holiman/go-ethereum/comments{/number}","issue_comment_url":"https://api.github.com/repos/holiman/go-ethereum/issues/comments{/number}","contents_url":"https://api.github.com/repos/holiman/go-ethereum/contents/{+path}","compare_url":"https://api.github.com/repos/holiman/go-ethereum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/holiman/go-ethereum/merges","archive_url":"https://api.github.com/repos/holiman/go-ethereum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/holiman/go-ethereum/downloads","issues_url":"https://api.github.com/repos/holiman/go-ethereum/issues{/number}","pulls_url":"https://api.github.com/repos/holiman/go-ethereum/pulls{/number}","milestones_url":"https://api.github.com/repos/holiman/go-ethereum/milestones{/number}","notifications_url":"https://api.github.com/repos/holiman/go-ethereum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/holiman/go-ethereum/labels{/name}","releases_url":"https://api.github.com/repos/holiman/go-ethereum/releases{/id}","deployments_url":"https://api.github.com/repos/holiman/go-ethereum/deployments","created_at":"2016-11-29T08:48:37Z","updated_at":"2016-11-29T08:48:45Z","pushed_at":"2017-12-22T09:27:38Z","git_url":"git://github.com/holiman/go-ethereum.git","ssh_url":"git@github.com:holiman/go-ethereum.git","clone_url":"https://github.com/holiman/go-ethereum.git","svn_url":"https://github.com/holiman/go-ethereum","homepage":"https://geth.ethereum.org","size":92535,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ethereum:master","ref":"master","sha":"38b1e8ee207da636d95bea760f577eca462307a6","user":{"login":"ethereum","id":6250754,"avatar_url":"https://avatars3.githubusercontent.com/u/6250754?v=4","gravatar_id":"","url":"https://api.github.com/users/ethereum","html_url":"https://github.com/ethereum","followers_url":"https://api.github.com/users/ethereum/followers","following_url":"https://api.github.com/users/ethereum/following{/other_user}","gists_url":"https://api.github.com/users/ethereum/gists{/gist_id}","starred_url":"https://api.github.com/users/ethereum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethereum/subscriptions","organizations_url":"https://api.github.com/users/ethereum/orgs","repos_url":"https://api.github.com/users/ethereum/repos","events_url":"https://api.github.com/users/ethereum/events{/privacy}","received_events_url":"https://api.github.com/users/ethereum/received_events","type":"Organization","site_admin":false},"repo":{"id":15452919,"name":"go-ethereum","full_name":"ethereum/go-ethereum","owner":{"login":"ethereum","id":6250754,"avatar_url":"https://avatars3.githubusercontent.com/u/6250754?v=4","gravatar_id":"","url":"https://api.github.com/users/ethereum","html_url":"https://github.com/ethereum","followers_url":"https://api.github.com/users/ethereum/followers","following_url":"https://api.github.com/users/ethereum/following{/other_user}","gists_url":"https://api.github.com/users/ethereum/gists{/gist_id}","starred_url":"https://api.github.com/users/ethereum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethereum/subscriptions","organizations_url":"https://api.github.com/users/ethereum/orgs","repos_url":"https://api.github.com/users/ethereum/repos","events_url":"https://api.github.com/users/ethereum/events{/privacy}","received_events_url":"https://api.github.com/users/ethereum/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ethereum/go-ethereum","description":"Official Go implementation of the Ethereum protocol","fork":false,"url":"https://api.github.com/repos/ethereum/go-ethereum","forks_url":"https://api.github.com/repos/ethereum/go-ethereum/forks","keys_url":"https://api.github.com/repos/ethereum/go-ethereum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethereum/go-ethereum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethereum/go-ethereum/teams","hooks_url":"https://api.github.com/repos/ethereum/go-ethereum/hooks","issue_events_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/events{/number}","events_url":"https://api.github.com/repos/ethereum/go-ethereum/events","assignees_url":"https://api.github.com/repos/ethereum/go-ethereum/assignees{/user}","branches_url":"https://api.github.com/repos/ethereum/go-ethereum/branches{/branch}","tags_url":"https://api.github.com/repos/ethereum/go-ethereum/tags","blobs_url":"https://api.github.com/repos/ethereum/go-ethereum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethereum/go-ethereum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethereum/go-ethereum/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethereum/go-ethereum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethereum/go-ethereum/statuses/{sha}","languages_url":"https://api.github.com/repos/ethereum/go-ethereum/languages","stargazers_url":"https://api.github.com/repos/ethereum/go-ethereum/stargazers","contributors_url":"https://api.github.com/repos/ethereum/go-ethereum/contributors","subscribers_url":"https://api.github.com/repos/ethereum/go-ethereum/subscribers","subscription_url":"https://api.github.com/repos/ethereum/go-ethereum/subscription","commits_url":"https://api.github.com/repos/ethereum/go-ethereum/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethereum/go-ethereum/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethereum/go-ethereum/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethereum/go-ethereum/contents/{+path}","compare_url":"https://api.github.com/repos/ethereum/go-ethereum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethereum/go-ethereum/merges","archive_url":"https://api.github.com/repos/ethereum/go-ethereum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethereum/go-ethereum/downloads","issues_url":"https://api.github.com/repos/ethereum/go-ethereum/issues{/number}","pulls_url":"https://api.github.com/repos/ethereum/go-ethereum/pulls{/number}","milestones_url":"https://api.github.com/repos/ethereum/go-ethereum/milestones{/number}","notifications_url":"https://api.github.com/repos/ethereum/go-ethereum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethereum/go-ethereum/labels{/name}","releases_url":"https://api.github.com/repos/ethereum/go-ethereum/releases{/id}","deployments_url":"https://api.github.com/repos/ethereum/go-ethereum/deployments","created_at":"2013-12-26T13:05:46Z","updated_at":"2017-12-22T16:02:01Z","pushed_at":"2017-12-22T14:14:25Z","git_url":"git://github.com/ethereum/go-ethereum.git","ssh_url":"git@github.com:ethereum/go-ethereum.git","clone_url":"https://github.com/ethereum/go-ethereum.git","svn_url":"https://github.com/ethereum/go-ethereum","homepage":"https://geth.ethereum.org","size":92958,"stargazers_count":10537,"watchers_count":10537,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3196,"mirror_url":null,"archived":false,"open_issues_count":695,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0"},"forks":3196,"open_issues":695,"watchers":10537,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ethereum/go-ethereum/pulls/15731"},"html":{"href":"https://github.com/ethereum/go-ethereum/pull/15731"},"issue":{"href":"https://api.github.com/repos/ethereum/go-ethereum/issues/15731"},"comments":{"href":"https://api.github.com/repos/ethereum/go-ethereum/issues/15731/comments"},"review_comments":{"href":"https://api.github.com/repos/ethereum/go-ethereum/pulls/15731/comments"},"review_comment":{"href":"https://api.github.com/repos/ethereum/go-ethereum/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ethereum/go-ethereum/pulls/15731/commits"},"statuses":{"href":"https://api.github.com/repos/ethereum/go-ethereum/statuses/ee8c716a9027942a98b38078835274e5b8ddae57"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"gballet"}}