{"action":"created","comment":{"url":"https://api.github.com/repos/ethereum/EIPs/pulls/comments/238505786","pull_request_review_id":181062809,"id":238505786,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzODUwNTc4Ng==","diff_hunk":"@@ -0,0 +1,52 @@\n+## Preamble\n+\n+    EIP: 214\n+    Title: New opcode STATICCALL\n+    Author: Vitalik Buterin <vitalik@ethereum.org>, Christian Reitwiessner <chris@ethereum.org>;\n+    Type: Standard Track\n+    Category: Core\n+    Status: Final\n+    Created: 2017-02-13\n+\n+## Simple Summary\n+\n+To increase smart contract security, this proposal adds a new opcode that can be used to call another contract (or itself) while disallowing any modifications to the state during the call (and its subcalls, if present).\n+\n+## Abstract\n+\n+This proposal adds a new opcode that can be used to call another contract (or itself) while disallowing any modifications to the state during the call (and its subcalls, if present). Any opcode that attempts to perform such a modification (see below for details) will result in an exception instead of performing the modification.\n+\n+## Motivation\n+\n+Currently, there is no restriction about what a called contract can do, as long as the computation can be performed with the amount of gas provided. This poses certain difficulties about smart contract engineers; after a regular call, unless you know the called contract, you cannot make any assumptions about the state of the contracts. Furthermore, because you cannot know the order of transactions before they are confirmed by miners, not even an outside observer can be sure about that in all cases.\n+\n+This EIP adds a way to call other contracts and restrict what they can do in the simplest way. It can be safely assumed that the state of all accounts is the same before and after a static call.\n+\n+## Specification\n+\n+Introduce a new `STATIC` flag to the virtual machine. This flag is set to `false` initially. Its value is always copied to sub-calls with an exception for the new opcode below.\n+\n+Opcode: `0xfa`.\n+\n+`STATICCALL` functions equivalently to a `CALL`, except it takes only 6 arguments (the \"value\" argument is not included and taken to be zero), and calls the child with the `STATIC` flag set to `true` for the execution of the child. Once this call returns, the flag is reset to its value before the call.\n+\n+Any attempts to make state-changing operations inside an execution instance with `STATIC` set to `true` will instead throw an exception. These operations include `CREATE`, `CREATE2`, `LOG0`, `LOG1`, `LOG2`, `LOG3`, `LOG4`, `SSTORE`, and `SELFDESTRUCT`. They also include `CALL` with a non-zero value. As an exception, `CALLCODE` is not considered state-changing, even with a non-zero value.","path":"EIPS/eip-214.md","position":33,"original_position":33,"commit_id":"b1623c2f5f3b6350d74d7bf54115c8657aaab602","original_commit_id":"b1623c2f5f3b6350d74d7bf54115c8657aaab602","user":{"login":"lithp","id":466333,"node_id":"MDQ6VXNlcjQ2NjMzMw==","avatar_url":"https://avatars3.githubusercontent.com/u/466333?v=4","gravatar_id":"","url":"https://api.github.com/users/lithp","html_url":"https://github.com/lithp","followers_url":"https://api.github.com/users/lithp/followers","following_url":"https://api.github.com/users/lithp/following{/other_user}","gists_url":"https://api.github.com/users/lithp/gists{/gist_id}","starred_url":"https://api.github.com/users/lithp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lithp/subscriptions","organizations_url":"https://api.github.com/users/lithp/orgs","repos_url":"https://api.github.com/users/lithp/repos","events_url":"https://api.github.com/users/lithp/events{/privacy}","received_events_url":"https://api.github.com/users/lithp/received_events","type":"User","site_admin":false},"body":"Why does the exception for `CALLCODE` exist?","created_at":"2018-12-04T01:53:49Z","updated_at":"2018-12-04T01:53:49Z","html_url":"https://github.com/ethereum/EIPs/pull/214#discussion_r238505786","pull_request_url":"https://api.github.com/repos/ethereum/EIPs/pulls/214","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/ethereum/EIPs/pulls/comments/238505786"},"html":{"href":"https://github.com/ethereum/EIPs/pull/214#discussion_r238505786"},"pull_request":{"href":"https://api.github.com/repos/ethereum/EIPs/pulls/214"}}},"pull_request":{"url":"https://api.github.com/repos/ethereum/EIPs/pulls/214","id":105897195,"node_id":"MDExOlB1bGxSZXF1ZXN0MTA1ODk3MTk1","html_url":"https://github.com/ethereum/EIPs/pull/214","diff_url":"https://github.com/ethereum/EIPs/pull/214.diff","patch_url":"https://github.com/ethereum/EIPs/pull/214.patch","issue_url":"https://api.github.com/repos/ethereum/EIPs/issues/214","number":214,"state":"closed","locked":false,"title":"New opcode: STATICCALL","user":{"login":"chriseth","id":9073706,"node_id":"MDQ6VXNlcjkwNzM3MDY=","avatar_url":"https://avatars2.githubusercontent.com/u/9073706?v=4","gravatar_id":"","url":"https://api.github.com/users/chriseth","html_url":"https://github.com/chriseth","followers_url":"https://api.github.com/users/chriseth/followers","following_url":"https://api.github.com/users/chriseth/following{/other_user}","gists_url":"https://api.github.com/users/chriseth/gists{/gist_id}","starred_url":"https://api.github.com/users/chriseth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chriseth/subscriptions","organizations_url":"https://api.github.com/users/chriseth/orgs","repos_url":"https://api.github.com/users/chriseth/repos","events_url":"https://api.github.com/users/chriseth/events{/privacy}","received_events_url":"https://api.github.com/users/chriseth/received_events","type":"User","site_admin":false},"body":"To increase smart contract security, this proposal adds a new opcode that can be used to call another contract (or itself) while disallowing any modifications to the state during the call (and its subcalls, if present).\r\n\r\nReplaces https://github.com/ethereum/EIPs/issues/116","created_at":"2017-02-13T13:52:30Z","updated_at":"2018-12-04T01:53:49Z","closed_at":"2017-12-04T13:08:18Z","merged_at":"2017-12-04T13:08:17Z","merge_commit_sha":"f7be76006c0fec6478e7b2970510f2e535d2fd47","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":290507063,"node_id":"MDU6TGFiZWwyOTA1MDcwNjM=","url":"https://api.github.com/repos/ethereum/EIPs/labels/EIP","name":"EIP","color":"bfd4f2","default":false},{"id":533004111,"node_id":"MDU6TGFiZWw1MzMwMDQxMTE=","url":"https://api.github.com/repos/ethereum/EIPs/labels/follow-up-with-author","name":"follow-up-with-author","color":"b60205","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ethereum/EIPs/pulls/214/commits","review_comments_url":"https://api.github.com/repos/ethereum/EIPs/pulls/214/comments","review_comment_url":"https://api.github.com/repos/ethereum/EIPs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ethereum/EIPs/issues/214/comments","statuses_url":"https://api.github.com/repos/ethereum/EIPs/statuses/b1623c2f5f3b6350d74d7bf54115c8657aaab602","head":{"label":"ethereum:staticcall","ref":"staticcall","sha":"b1623c2f5f3b6350d74d7bf54115c8657aaab602","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":44971752,"node_id":"MDEwOlJlcG9zaXRvcnk0NDk3MTc1Mg==","name":"EIPs","full_name":"ethereum/EIPs","private":false,"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},"html_url":"https://github.com/ethereum/EIPs","description":"The Ethereum Improvement Proposal repository","fork":false,"url":"https://api.github.com/repos/ethereum/EIPs","forks_url":"https://api.github.com/repos/ethereum/EIPs/forks","keys_url":"https://api.github.com/repos/ethereum/EIPs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethereum/EIPs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethereum/EIPs/teams","hooks_url":"https://api.github.com/repos/ethereum/EIPs/hooks","issue_events_url":"https://api.github.com/repos/ethereum/EIPs/issues/events{/number}","events_url":"https://api.github.com/repos/ethereum/EIPs/events","assignees_url":"https://api.github.com/repos/ethereum/EIPs/assignees{/user}","branches_url":"https://api.github.com/repos/ethereum/EIPs/branches{/branch}","tags_url":"https://api.github.com/repos/ethereum/EIPs/tags","blobs_url":"https://api.github.com/repos/ethereum/EIPs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethereum/EIPs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethereum/EIPs/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethereum/EIPs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethereum/EIPs/statuses/{sha}","languages_url":"https://api.github.com/repos/ethereum/EIPs/languages","stargazers_url":"https://api.github.com/repos/ethereum/EIPs/stargazers","contributors_url":"https://api.github.com/repos/ethereum/EIPs/contributors","subscribers_url":"https://api.github.com/repos/ethereum/EIPs/subscribers","subscription_url":"https://api.github.com/repos/ethereum/EIPs/subscription","commits_url":"https://api.github.com/repos/ethereum/EIPs/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethereum/EIPs/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethereum/EIPs/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethereum/EIPs/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethereum/EIPs/contents/{+path}","compare_url":"https://api.github.com/repos/ethereum/EIPs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethereum/EIPs/merges","archive_url":"https://api.github.com/repos/ethereum/EIPs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethereum/EIPs/downloads","issues_url":"https://api.github.com/repos/ethereum/EIPs/issues{/number}","pulls_url":"https://api.github.com/repos/ethereum/EIPs/pulls{/number}","milestones_url":"https://api.github.com/repos/ethereum/EIPs/milestones{/number}","notifications_url":"https://api.github.com/repos/ethereum/EIPs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethereum/EIPs/labels{/name}","releases_url":"https://api.github.com/repos/ethereum/EIPs/releases{/id}","deployments_url":"https://api.github.com/repos/ethereum/EIPs/deployments","created_at":"2015-10-26T13:57:23Z","updated_at":"2018-12-04T00:15:31Z","pushed_at":"2018-12-04T00:15:15Z","git_url":"git://github.com/ethereum/EIPs.git","ssh_url":"git@github.com:ethereum/EIPs.git","clone_url":"https://github.com/ethereum/EIPs.git","svn_url":"https://github.com/ethereum/EIPs","homepage":"http://eips.ethereum.org/","size":2876,"stargazers_count":4094,"watchers_count":4094,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":1239,"mirror_url":null,"archived":false,"open_issues_count":414,"license":null,"forks":1239,"open_issues":414,"watchers":4094,"default_branch":"master"}},"base":{"label":"ethereum:master","ref":"master","sha":"598de64d6ba97bf1aa253ad579c228d0f856f044","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":44971752,"node_id":"MDEwOlJlcG9zaXRvcnk0NDk3MTc1Mg==","name":"EIPs","full_name":"ethereum/EIPs","private":false,"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},"html_url":"https://github.com/ethereum/EIPs","description":"The Ethereum Improvement Proposal repository","fork":false,"url":"https://api.github.com/repos/ethereum/EIPs","forks_url":"https://api.github.com/repos/ethereum/EIPs/forks","keys_url":"https://api.github.com/repos/ethereum/EIPs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethereum/EIPs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethereum/EIPs/teams","hooks_url":"https://api.github.com/repos/ethereum/EIPs/hooks","issue_events_url":"https://api.github.com/repos/ethereum/EIPs/issues/events{/number}","events_url":"https://api.github.com/repos/ethereum/EIPs/events","assignees_url":"https://api.github.com/repos/ethereum/EIPs/assignees{/user}","branches_url":"https://api.github.com/repos/ethereum/EIPs/branches{/branch}","tags_url":"https://api.github.com/repos/ethereum/EIPs/tags","blobs_url":"https://api.github.com/repos/ethereum/EIPs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethereum/EIPs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethereum/EIPs/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethereum/EIPs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethereum/EIPs/statuses/{sha}","languages_url":"https://api.github.com/repos/ethereum/EIPs/languages","stargazers_url":"https://api.github.com/repos/ethereum/EIPs/stargazers","contributors_url":"https://api.github.com/repos/ethereum/EIPs/contributors","subscribers_url":"https://api.github.com/repos/ethereum/EIPs/subscribers","subscription_url":"https://api.github.com/repos/ethereum/EIPs/subscription","commits_url":"https://api.github.com/repos/ethereum/EIPs/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethereum/EIPs/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethereum/EIPs/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethereum/EIPs/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethereum/EIPs/contents/{+path}","compare_url":"https://api.github.com/repos/ethereum/EIPs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethereum/EIPs/merges","archive_url":"https://api.github.com/repos/ethereum/EIPs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethereum/EIPs/downloads","issues_url":"https://api.github.com/repos/ethereum/EIPs/issues{/number}","pulls_url":"https://api.github.com/repos/ethereum/EIPs/pulls{/number}","milestones_url":"https://api.github.com/repos/ethereum/EIPs/milestones{/number}","notifications_url":"https://api.github.com/repos/ethereum/EIPs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethereum/EIPs/labels{/name}","releases_url":"https://api.github.com/repos/ethereum/EIPs/releases{/id}","deployments_url":"https://api.github.com/repos/ethereum/EIPs/deployments","created_at":"2015-10-26T13:57:23Z","updated_at":"2018-12-04T00:15:31Z","pushed_at":"2018-12-04T00:15:15Z","git_url":"git://github.com/ethereum/EIPs.git","ssh_url":"git@github.com:ethereum/EIPs.git","clone_url":"https://github.com/ethereum/EIPs.git","svn_url":"https://github.com/ethereum/EIPs","homepage":"http://eips.ethereum.org/","size":2876,"stargazers_count":4094,"watchers_count":4094,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":1239,"mirror_url":null,"archived":false,"open_issues_count":414,"license":null,"forks":1239,"open_issues":414,"watchers":4094,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ethereum/EIPs/pulls/214"},"html":{"href":"https://github.com/ethereum/EIPs/pull/214"},"issue":{"href":"https://api.github.com/repos/ethereum/EIPs/issues/214"},"comments":{"href":"https://api.github.com/repos/ethereum/EIPs/issues/214/comments"},"review_comments":{"href":"https://api.github.com/repos/ethereum/EIPs/pulls/214/comments"},"review_comment":{"href":"https://api.github.com/repos/ethereum/EIPs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ethereum/EIPs/pulls/214/commits"},"statuses":{"href":"https://api.github.com/repos/ethereum/EIPs/statuses/b1623c2f5f3b6350d74d7bf54115c8657aaab602"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"lithp"}}