{"action":"created","comment":{"url":"https://api.github.com/repos/ethereum/evmc/pulls/comments/215720739","pull_request_review_id":153049947,"id":215720739,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNTcyMDczOQ==","diff_hunk":"@@ -52,15 +52,19 @@ static bool account_exists(evmc_context* context, const evmc_address* address)\n     return host->accounts.find(*address) != host->accounts.end();\n }\n \n-static void get_storage(evmc_uint256be* result,\n+static bool get_storage(evmc_uint256be* result,\n                         evmc_context* context,\n                         const evmc_address* address,\n                         const evmc_uint256be* key)\n {\n-    (void)result;\n-    (void)context;\n-    (void)address;\n-    (void)key;\n+    example_host_context* host = static_cast<example_host_context*>(context);\n+    auto it = host->accounts.find(*address);\n+    if (it != host->accounts.end())\n+    {\n+        *result = it->second.storage[*key];","path":"examples/example_host.cpp","position":30,"original_position":18,"commit_id":"f6969e3bf5e8c8d698c47215ed6a2a2912ea1776","original_commit_id":"f6969e3bf5e8c8d698c47215ed6a2a2912ea1776","user":{"login":"chfast","id":573380,"node_id":"MDQ6VXNlcjU3MzM4MA==","avatar_url":"https://avatars1.githubusercontent.com/u/573380?v=4","gravatar_id":"","url":"https://api.github.com/users/chfast","html_url":"https://github.com/chfast","followers_url":"https://api.github.com/users/chfast/followers","following_url":"https://api.github.com/users/chfast/following{/other_user}","gists_url":"https://api.github.com/users/chfast/gists{/gist_id}","starred_url":"https://api.github.com/users/chfast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chfast/subscriptions","organizations_url":"https://api.github.com/users/chfast/orgs","repos_url":"https://api.github.com/users/chfast/repos","events_url":"https://api.github.com/users/chfast/events{/privacy}","received_events_url":"https://api.github.com/users/chfast/received_events","type":"User","site_admin":false},"body":"I think this is mostly to allow insertion in form of `m[\"hello\"] = \"world\"`.","created_at":"2018-09-06T17:55:38Z","updated_at":"2018-09-06T17:55:38Z","html_url":"https://github.com/ethereum/evmc/pull/151#discussion_r215720739","pull_request_url":"https://api.github.com/repos/ethereum/evmc/pulls/151","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/ethereum/evmc/pulls/comments/215720739"},"html":{"href":"https://github.com/ethereum/evmc/pull/151#discussion_r215720739"},"pull_request":{"href":"https://api.github.com/repos/ethereum/evmc/pulls/151"}},"in_reply_to_id":215714445},"pull_request":{"url":"https://api.github.com/repos/ethereum/evmc/pulls/151","id":213679576,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEzNjc5NTc2","html_url":"https://github.com/ethereum/evmc/pull/151","diff_url":"https://github.com/ethereum/evmc/pull/151.diff","patch_url":"https://github.com/ethereum/evmc/pull/151.patch","issue_url":"https://api.github.com/repos/ethereum/evmc/issues/151","number":151,"state":"open","locked":false,"title":"Update storage methods","user":{"login":"chfast","id":573380,"node_id":"MDQ6VXNlcjU3MzM4MA==","avatar_url":"https://avatars1.githubusercontent.com/u/573380?v=4","gravatar_id":"","url":"https://api.github.com/users/chfast","html_url":"https://github.com/chfast","followers_url":"https://api.github.com/users/chfast/followers","following_url":"https://api.github.com/users/chfast/following{/other_user}","gists_url":"https://api.github.com/users/chfast/gists{/gist_id}","starred_url":"https://api.github.com/users/chfast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chfast/subscriptions","organizations_url":"https://api.github.com/users/chfast/orgs","repos_url":"https://api.github.com/users/chfast/repos","events_url":"https://api.github.com/users/chfast/events{/privacy}","received_events_url":"https://api.github.com/users/chfast/received_events","type":"User","site_admin":false},"body":"Closes #146 ","created_at":"2018-09-06T16:33:57Z","updated_at":"2018-09-06T17:55:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"870f1ee6ea7a93bdea37c167f21c6f1effaa55fe","assignee":null,"assignees":[],"requested_reviewers":[{"login":"gumb0","id":1863135,"node_id":"MDQ6VXNlcjE4NjMxMzU=","avatar_url":"https://avatars0.githubusercontent.com/u/1863135?v=4","gravatar_id":"","url":"https://api.github.com/users/gumb0","html_url":"https://github.com/gumb0","followers_url":"https://api.github.com/users/gumb0/followers","following_url":"https://api.github.com/users/gumb0/following{/other_user}","gists_url":"https://api.github.com/users/gumb0/gists{/gist_id}","starred_url":"https://api.github.com/users/gumb0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gumb0/subscriptions","organizations_url":"https://api.github.com/users/gumb0/orgs","repos_url":"https://api.github.com/users/gumb0/repos","events_url":"https://api.github.com/users/gumb0/events{/privacy}","received_events_url":"https://api.github.com/users/gumb0/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ethereum/evmc/pulls/151/commits","review_comments_url":"https://api.github.com/repos/ethereum/evmc/pulls/151/comments","review_comment_url":"https://api.github.com/repos/ethereum/evmc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ethereum/evmc/issues/151/comments","statuses_url":"https://api.github.com/repos/ethereum/evmc/statuses/f6969e3bf5e8c8d698c47215ed6a2a2912ea1776","head":{"label":"ethereum:set-storage","ref":"set-storage","sha":"f6969e3bf5e8c8d698c47215ed6a2a2912ea1776","user":{"login":"ethereum","id":6250754,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyNTA3NTQ=","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":66214407,"node_id":"MDEwOlJlcG9zaXRvcnk2NjIxNDQwNw==","name":"evmc","full_name":"ethereum/evmc","owner":{"login":"ethereum","id":6250754,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyNTA3NTQ=","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/evmc","description":"EVMC – Ethereum Client-VM Connector API","fork":false,"url":"https://api.github.com/repos/ethereum/evmc","forks_url":"https://api.github.com/repos/ethereum/evmc/forks","keys_url":"https://api.github.com/repos/ethereum/evmc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethereum/evmc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethereum/evmc/teams","hooks_url":"https://api.github.com/repos/ethereum/evmc/hooks","issue_events_url":"https://api.github.com/repos/ethereum/evmc/issues/events{/number}","events_url":"https://api.github.com/repos/ethereum/evmc/events","assignees_url":"https://api.github.com/repos/ethereum/evmc/assignees{/user}","branches_url":"https://api.github.com/repos/ethereum/evmc/branches{/branch}","tags_url":"https://api.github.com/repos/ethereum/evmc/tags","blobs_url":"https://api.github.com/repos/ethereum/evmc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethereum/evmc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethereum/evmc/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethereum/evmc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethereum/evmc/statuses/{sha}","languages_url":"https://api.github.com/repos/ethereum/evmc/languages","stargazers_url":"https://api.github.com/repos/ethereum/evmc/stargazers","contributors_url":"https://api.github.com/repos/ethereum/evmc/contributors","subscribers_url":"https://api.github.com/repos/ethereum/evmc/subscribers","subscription_url":"https://api.github.com/repos/ethereum/evmc/subscription","commits_url":"https://api.github.com/repos/ethereum/evmc/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethereum/evmc/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethereum/evmc/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethereum/evmc/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethereum/evmc/contents/{+path}","compare_url":"https://api.github.com/repos/ethereum/evmc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethereum/evmc/merges","archive_url":"https://api.github.com/repos/ethereum/evmc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethereum/evmc/downloads","issues_url":"https://api.github.com/repos/ethereum/evmc/issues{/number}","pulls_url":"https://api.github.com/repos/ethereum/evmc/pulls{/number}","milestones_url":"https://api.github.com/repos/ethereum/evmc/milestones{/number}","notifications_url":"https://api.github.com/repos/ethereum/evmc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethereum/evmc/labels{/name}","releases_url":"https://api.github.com/repos/ethereum/evmc/releases{/id}","deployments_url":"https://api.github.com/repos/ethereum/evmc/deployments","created_at":"2016-08-21T18:35:02Z","updated_at":"2018-09-06T16:38:34Z","pushed_at":"2018-09-06T17:10:55Z","git_url":"git://github.com/ethereum/evmc.git","ssh_url":"git@github.com:ethereum/evmc.git","clone_url":"https://github.com/ethereum/evmc.git","svn_url":"https://github.com/ethereum/evmc","homepage":"https://ethereum.github.io/evmc","size":773,"stargazers_count":30,"watchers_count":30,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":21,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":13,"open_issues":21,"watchers":30,"default_branch":"master"}},"base":{"label":"ethereum:master","ref":"master","sha":"bebedc638a1b7888316432931feff443e38859ed","user":{"login":"ethereum","id":6250754,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyNTA3NTQ=","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":66214407,"node_id":"MDEwOlJlcG9zaXRvcnk2NjIxNDQwNw==","name":"evmc","full_name":"ethereum/evmc","owner":{"login":"ethereum","id":6250754,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyNTA3NTQ=","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/evmc","description":"EVMC – Ethereum Client-VM Connector API","fork":false,"url":"https://api.github.com/repos/ethereum/evmc","forks_url":"https://api.github.com/repos/ethereum/evmc/forks","keys_url":"https://api.github.com/repos/ethereum/evmc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethereum/evmc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethereum/evmc/teams","hooks_url":"https://api.github.com/repos/ethereum/evmc/hooks","issue_events_url":"https://api.github.com/repos/ethereum/evmc/issues/events{/number}","events_url":"https://api.github.com/repos/ethereum/evmc/events","assignees_url":"https://api.github.com/repos/ethereum/evmc/assignees{/user}","branches_url":"https://api.github.com/repos/ethereum/evmc/branches{/branch}","tags_url":"https://api.github.com/repos/ethereum/evmc/tags","blobs_url":"https://api.github.com/repos/ethereum/evmc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethereum/evmc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethereum/evmc/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethereum/evmc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethereum/evmc/statuses/{sha}","languages_url":"https://api.github.com/repos/ethereum/evmc/languages","stargazers_url":"https://api.github.com/repos/ethereum/evmc/stargazers","contributors_url":"https://api.github.com/repos/ethereum/evmc/contributors","subscribers_url":"https://api.github.com/repos/ethereum/evmc/subscribers","subscription_url":"https://api.github.com/repos/ethereum/evmc/subscription","commits_url":"https://api.github.com/repos/ethereum/evmc/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethereum/evmc/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethereum/evmc/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethereum/evmc/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethereum/evmc/contents/{+path}","compare_url":"https://api.github.com/repos/ethereum/evmc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethereum/evmc/merges","archive_url":"https://api.github.com/repos/ethereum/evmc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethereum/evmc/downloads","issues_url":"https://api.github.com/repos/ethereum/evmc/issues{/number}","pulls_url":"https://api.github.com/repos/ethereum/evmc/pulls{/number}","milestones_url":"https://api.github.com/repos/ethereum/evmc/milestones{/number}","notifications_url":"https://api.github.com/repos/ethereum/evmc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethereum/evmc/labels{/name}","releases_url":"https://api.github.com/repos/ethereum/evmc/releases{/id}","deployments_url":"https://api.github.com/repos/ethereum/evmc/deployments","created_at":"2016-08-21T18:35:02Z","updated_at":"2018-09-06T16:38:34Z","pushed_at":"2018-09-06T17:10:55Z","git_url":"git://github.com/ethereum/evmc.git","ssh_url":"git@github.com:ethereum/evmc.git","clone_url":"https://github.com/ethereum/evmc.git","svn_url":"https://github.com/ethereum/evmc","homepage":"https://ethereum.github.io/evmc","size":773,"stargazers_count":30,"watchers_count":30,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":21,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":13,"open_issues":21,"watchers":30,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ethereum/evmc/pulls/151"},"html":{"href":"https://github.com/ethereum/evmc/pull/151"},"issue":{"href":"https://api.github.com/repos/ethereum/evmc/issues/151"},"comments":{"href":"https://api.github.com/repos/ethereum/evmc/issues/151/comments"},"review_comments":{"href":"https://api.github.com/repos/ethereum/evmc/pulls/151/comments"},"review_comment":{"href":"https://api.github.com/repos/ethereum/evmc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ethereum/evmc/pulls/151/commits"},"statuses":{"href":"https://api.github.com/repos/ethereum/evmc/statuses/f6969e3bf5e8c8d698c47215ed6a2a2912ea1776"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"chfast"}}