{"action":"created","comment":{"url":"https://api.github.com/repos/ethereum/vyper/pulls/comments/195590386","pull_request_review_id":128992202,"id":195590386,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NTU5MDM4Ng==","diff_hunk":"@@ -42,6 +42,41 @@ Functions are the executable units of code within a contract.\n and have different levels of visibility (:ref:`visibility-and-getters`)\n towards other contracts. Functions must be decorated with either @public or @private.\n \n+Default function\n+----------------\n+\n+A contract can also have a default function, which is executed on a call to the contract if no other functions match the given function identifier (or if none was supplied at all, such as through someone sending it Eth). It is the same construct as fallback functions `in Solidity <https://solidity.readthedocs.io/en/latest/contracts.html?highlight=fallback#fallback-function>`_. \n+\n+This function is always named `__default__` and must be annotated with `@public` and `@payable`. It cannot have arguments and cannot return anything.","path":"docs/structure-of-a-contract.rst","position":9,"original_position":9,"commit_id":"e8dac2506bfeddcb89bf1ee959d4ac0355ead13a","original_commit_id":"e8dac2506bfeddcb89bf1ee959d4ac0355ead13a","user":{"login":"fubuloubu","id":3859395,"node_id":"MDQ6VXNlcjM4NTkzOTU=","avatar_url":"https://avatars3.githubusercontent.com/u/3859395?v=4","gravatar_id":"","url":"https://api.github.com/users/fubuloubu","html_url":"https://github.com/fubuloubu","followers_url":"https://api.github.com/users/fubuloubu/followers","following_url":"https://api.github.com/users/fubuloubu/following{/other_user}","gists_url":"https://api.github.com/users/fubuloubu/gists{/gist_id}","starred_url":"https://api.github.com/users/fubuloubu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fubuloubu/subscriptions","organizations_url":"https://api.github.com/users/fubuloubu/orgs","repos_url":"https://api.github.com/users/fubuloubu/repos","events_url":"https://api.github.com/users/fubuloubu/events{/privacy}","received_events_url":"https://api.github.com/users/fubuloubu/received_events","type":"User","site_admin":false},"body":"I'm not :100:, wait for confirmation from @jacqueswww unless you found in the code/tests where this is allowed.","created_at":"2018-06-14T22:28:37Z","updated_at":"2018-06-14T22:28:38Z","html_url":"https://github.com/ethereum/vyper/pull/896#discussion_r195590386","pull_request_url":"https://api.github.com/repos/ethereum/vyper/pulls/896","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ethereum/vyper/pulls/comments/195590386"},"html":{"href":"https://github.com/ethereum/vyper/pull/896#discussion_r195590386"},"pull_request":{"href":"https://api.github.com/repos/ethereum/vyper/pulls/896"}},"in_reply_to_id":195501263},"pull_request":{"url":"https://api.github.com/repos/ethereum/vyper/pulls/896","id":194954121,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0OTU0MTIx","html_url":"https://github.com/ethereum/vyper/pull/896","diff_url":"https://github.com/ethereum/vyper/pull/896.diff","patch_url":"https://github.com/ethereum/vyper/pull/896.patch","issue_url":"https://api.github.com/repos/ethereum/vyper/issues/896","number":896,"state":"open","locked":false,"title":"Documentation for default funcs","user":{"login":"liamzebedee","id":584141,"node_id":"MDQ6VXNlcjU4NDE0MQ==","avatar_url":"https://avatars3.githubusercontent.com/u/584141?v=4","gravatar_id":"","url":"https://api.github.com/users/liamzebedee","html_url":"https://github.com/liamzebedee","followers_url":"https://api.github.com/users/liamzebedee/followers","following_url":"https://api.github.com/users/liamzebedee/following{/other_user}","gists_url":"https://api.github.com/users/liamzebedee/gists{/gist_id}","starred_url":"https://api.github.com/users/liamzebedee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liamzebedee/subscriptions","organizations_url":"https://api.github.com/users/liamzebedee/orgs","repos_url":"https://api.github.com/users/liamzebedee/repos","events_url":"https://api.github.com/users/liamzebedee/events{/privacy}","received_events_url":"https://api.github.com/users/liamzebedee/received_events","type":"User","site_admin":false},"body":"### - What I did\r\n\r\nDocumented new default function usage.\r\n\r\n### - How I did it\r\n\r\nRead the source changes, researched a bit about the EVM execution sematics to communicate a stronger understanding.\r\n\r\n### - How to verify it\r\n\r\nGenerate docs and visit `structure-of-a-contract.html`\r\n\r\n### - Description for the changelog\r\n\r\nDocumented default functions of contracts (fallback funcs).\r\n\r\n### - Cute Animal Picture\r\n\r\n![image](https://user-images.githubusercontent.com/584141/41426032-ba7f2e22-7002-11e8-849d-042c14dfa852.png)\r\n","created_at":"2018-06-14T16:43:03Z","updated_at":"2018-06-14T22:28:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"effe36ee2ead5a3da1ca8c2f4d4dd1f59ef1b7c8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ethereum/vyper/pulls/896/commits","review_comments_url":"https://api.github.com/repos/ethereum/vyper/pulls/896/comments","review_comment_url":"https://api.github.com/repos/ethereum/vyper/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ethereum/vyper/issues/896/comments","statuses_url":"https://api.github.com/repos/ethereum/vyper/statuses/e8dac2506bfeddcb89bf1ee959d4ac0355ead13a","head":{"label":"liamzebedee:patch-1","ref":"patch-1","sha":"e8dac2506bfeddcb89bf1ee959d4ac0355ead13a","user":{"login":"liamzebedee","id":584141,"node_id":"MDQ6VXNlcjU4NDE0MQ==","avatar_url":"https://avatars3.githubusercontent.com/u/584141?v=4","gravatar_id":"","url":"https://api.github.com/users/liamzebedee","html_url":"https://github.com/liamzebedee","followers_url":"https://api.github.com/users/liamzebedee/followers","following_url":"https://api.github.com/users/liamzebedee/following{/other_user}","gists_url":"https://api.github.com/users/liamzebedee/gists{/gist_id}","starred_url":"https://api.github.com/users/liamzebedee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liamzebedee/subscriptions","organizations_url":"https://api.github.com/users/liamzebedee/orgs","repos_url":"https://api.github.com/users/liamzebedee/repos","events_url":"https://api.github.com/users/liamzebedee/events{/privacy}","received_events_url":"https://api.github.com/users/liamzebedee/received_events","type":"User","site_admin":false},"repo":{"id":137374788,"node_id":"MDEwOlJlcG9zaXRvcnkxMzczNzQ3ODg=","name":"vyper","full_name":"liamzebedee/vyper","owner":{"login":"liamzebedee","id":584141,"node_id":"MDQ6VXNlcjU4NDE0MQ==","avatar_url":"https://avatars3.githubusercontent.com/u/584141?v=4","gravatar_id":"","url":"https://api.github.com/users/liamzebedee","html_url":"https://github.com/liamzebedee","followers_url":"https://api.github.com/users/liamzebedee/followers","following_url":"https://api.github.com/users/liamzebedee/following{/other_user}","gists_url":"https://api.github.com/users/liamzebedee/gists{/gist_id}","starred_url":"https://api.github.com/users/liamzebedee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liamzebedee/subscriptions","organizations_url":"https://api.github.com/users/liamzebedee/orgs","repos_url":"https://api.github.com/users/liamzebedee/repos","events_url":"https://api.github.com/users/liamzebedee/events{/privacy}","received_events_url":"https://api.github.com/users/liamzebedee/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/liamzebedee/vyper","description":"New experimental programming language","fork":true,"url":"https://api.github.com/repos/liamzebedee/vyper","forks_url":"https://api.github.com/repos/liamzebedee/vyper/forks","keys_url":"https://api.github.com/repos/liamzebedee/vyper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/liamzebedee/vyper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/liamzebedee/vyper/teams","hooks_url":"https://api.github.com/repos/liamzebedee/vyper/hooks","issue_events_url":"https://api.github.com/repos/liamzebedee/vyper/issues/events{/number}","events_url":"https://api.github.com/repos/liamzebedee/vyper/events","assignees_url":"https://api.github.com/repos/liamzebedee/vyper/assignees{/user}","branches_url":"https://api.github.com/repos/liamzebedee/vyper/branches{/branch}","tags_url":"https://api.github.com/repos/liamzebedee/vyper/tags","blobs_url":"https://api.github.com/repos/liamzebedee/vyper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/liamzebedee/vyper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/liamzebedee/vyper/git/refs{/sha}","trees_url":"https://api.github.com/repos/liamzebedee/vyper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/liamzebedee/vyper/statuses/{sha}","languages_url":"https://api.github.com/repos/liamzebedee/vyper/languages","stargazers_url":"https://api.github.com/repos/liamzebedee/vyper/stargazers","contributors_url":"https://api.github.com/repos/liamzebedee/vyper/contributors","subscribers_url":"https://api.github.com/repos/liamzebedee/vyper/subscribers","subscription_url":"https://api.github.com/repos/liamzebedee/vyper/subscription","commits_url":"https://api.github.com/repos/liamzebedee/vyper/commits{/sha}","git_commits_url":"https://api.github.com/repos/liamzebedee/vyper/git/commits{/sha}","comments_url":"https://api.github.com/repos/liamzebedee/vyper/comments{/number}","issue_comment_url":"https://api.github.com/repos/liamzebedee/vyper/issues/comments{/number}","contents_url":"https://api.github.com/repos/liamzebedee/vyper/contents/{+path}","compare_url":"https://api.github.com/repos/liamzebedee/vyper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/liamzebedee/vyper/merges","archive_url":"https://api.github.com/repos/liamzebedee/vyper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/liamzebedee/vyper/downloads","issues_url":"https://api.github.com/repos/liamzebedee/vyper/issues{/number}","pulls_url":"https://api.github.com/repos/liamzebedee/vyper/pulls{/number}","milestones_url":"https://api.github.com/repos/liamzebedee/vyper/milestones{/number}","notifications_url":"https://api.github.com/repos/liamzebedee/vyper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/liamzebedee/vyper/labels{/name}","releases_url":"https://api.github.com/repos/liamzebedee/vyper/releases{/id}","deployments_url":"https://api.github.com/repos/liamzebedee/vyper/deployments","created_at":"2018-06-14T15:12:50Z","updated_at":"2018-06-14T15:12:52Z","pushed_at":"2018-06-14T16:37:40Z","git_url":"git://github.com/liamzebedee/vyper.git","ssh_url":"git@github.com:liamzebedee/vyper.git","clone_url":"https://github.com/liamzebedee/vyper.git","svn_url":"https://github.com/liamzebedee/vyper","homepage":null,"size":2020,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ethereum:master","ref":"master","sha":"d61c77242978781754a05a74b0bc0c0bfef89644","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":73461676,"node_id":"MDEwOlJlcG9zaXRvcnk3MzQ2MTY3Ng==","name":"vyper","full_name":"ethereum/vyper","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/vyper","description":"New experimental programming language","fork":false,"url":"https://api.github.com/repos/ethereum/vyper","forks_url":"https://api.github.com/repos/ethereum/vyper/forks","keys_url":"https://api.github.com/repos/ethereum/vyper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethereum/vyper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethereum/vyper/teams","hooks_url":"https://api.github.com/repos/ethereum/vyper/hooks","issue_events_url":"https://api.github.com/repos/ethereum/vyper/issues/events{/number}","events_url":"https://api.github.com/repos/ethereum/vyper/events","assignees_url":"https://api.github.com/repos/ethereum/vyper/assignees{/user}","branches_url":"https://api.github.com/repos/ethereum/vyper/branches{/branch}","tags_url":"https://api.github.com/repos/ethereum/vyper/tags","blobs_url":"https://api.github.com/repos/ethereum/vyper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethereum/vyper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethereum/vyper/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethereum/vyper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethereum/vyper/statuses/{sha}","languages_url":"https://api.github.com/repos/ethereum/vyper/languages","stargazers_url":"https://api.github.com/repos/ethereum/vyper/stargazers","contributors_url":"https://api.github.com/repos/ethereum/vyper/contributors","subscribers_url":"https://api.github.com/repos/ethereum/vyper/subscribers","subscription_url":"https://api.github.com/repos/ethereum/vyper/subscription","commits_url":"https://api.github.com/repos/ethereum/vyper/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethereum/vyper/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethereum/vyper/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethereum/vyper/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethereum/vyper/contents/{+path}","compare_url":"https://api.github.com/repos/ethereum/vyper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethereum/vyper/merges","archive_url":"https://api.github.com/repos/ethereum/vyper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethereum/vyper/downloads","issues_url":"https://api.github.com/repos/ethereum/vyper/issues{/number}","pulls_url":"https://api.github.com/repos/ethereum/vyper/pulls{/number}","milestones_url":"https://api.github.com/repos/ethereum/vyper/milestones{/number}","notifications_url":"https://api.github.com/repos/ethereum/vyper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethereum/vyper/labels{/name}","releases_url":"https://api.github.com/repos/ethereum/vyper/releases{/id}","deployments_url":"https://api.github.com/repos/ethereum/vyper/deployments","created_at":"2016-11-11T08:56:41Z","updated_at":"2018-06-14T15:45:06Z","pushed_at":"2018-06-14T16:43:03Z","git_url":"git://github.com/ethereum/vyper.git","ssh_url":"git@github.com:ethereum/vyper.git","clone_url":"https://github.com/ethereum/vyper.git","svn_url":"https://github.com/ethereum/vyper","homepage":null,"size":2016,"stargazers_count":1633,"watchers_count":1633,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":226,"mirror_url":null,"archived":false,"open_issues_count":86,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":226,"open_issues":86,"watchers":1633,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ethereum/vyper/pulls/896"},"html":{"href":"https://github.com/ethereum/vyper/pull/896"},"issue":{"href":"https://api.github.com/repos/ethereum/vyper/issues/896"},"comments":{"href":"https://api.github.com/repos/ethereum/vyper/issues/896/comments"},"review_comments":{"href":"https://api.github.com/repos/ethereum/vyper/pulls/896/comments"},"review_comment":{"href":"https://api.github.com/repos/ethereum/vyper/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ethereum/vyper/pulls/896/commits"},"statuses":{"href":"https://api.github.com/repos/ethereum/vyper/statuses/e8dac2506bfeddcb89bf1ee959d4ac0355ead13a"}},"author_association":"NONE"}}
{"actor":{"display_login":"fubuloubu"}}