{"action":"created","comment":{"url":"https://api.github.com/repos/corda/corda/pulls/comments/119328817","pull_request_review_id":41196706,"id":119328817,"diff_hunk":"@@ -0,0 +1,298 @@\n+.. highlight:: kotlin\n+.. raw:: html\n+\n+   <script type=\"text/javascript\" src=\"_static/jquery.js\"></script>\n+   <script type=\"text/javascript\" src=\"_static/codesets.js\"></script>\n+\n+Contracts\n+=========\n+\n+.. note:: Before reading this page, you should be familiar with the key concepts of :doc:`key-concepts-contracts`.\n+\n+All Corda contracts are JVM classes that implement ``net.corda.core.contracts.Contract``.\n+\n+The ``Contract`` interface is defined as follows:\n+\n+.. container:: codeset\n+\n+    .. literalinclude:: ../../core/src/main/kotlin/net/corda/core/contracts/Structures.kt\n+        :language: kotlin\n+        :start-after: DOCSTART 5\n+        :end-before: DOCEND 5\n+\n+Where:\n+\n+* ``verify(tx: TransactionForContract)`` constrains the evolution of states using this contract by restricting which\n+  transactions involving states of this type are valid\n+* ``legalContractReference`` is the hash of the legal prose contract that ``verify`` seeks to express in code\n+\n+verify()\n+--------\n+\n+``verify()`` is a method that doesn't return anything and takes a ``TransactionForContract`` as a parameter. It\n+either throws an exception if the transaction is considered invalid, or returns normally if the transaction is\n+considered valid.\n+\n+``verify()`` is executed in a sandbox. It does not have access to the enclosing scope, and is not able to access\n+the network or perform any other I/O. It only has access to the properties defined on ``TransactionForContract`` when\n+ deciding whether a transaction is valid.","path":"docs/source/api-contracts.rst","position":38,"original_position":38,"commit_id":"376c833d90e4fb01fdc9f57917242fc5688c175b","original_commit_id":"70d0d2b225445c98efc14093fdb3b26a96ee834c","user":{"login":"joeldudleyr3","id":24230167,"avatar_url":"https://avatars3.githubusercontent.com/u/24230167?v=3","gravatar_id":"","url":"https://api.github.com/users/joeldudleyr3","html_url":"https://github.com/joeldudleyr3","followers_url":"https://api.github.com/users/joeldudleyr3/followers","following_url":"https://api.github.com/users/joeldudleyr3/following{/other_user}","gists_url":"https://api.github.com/users/joeldudleyr3/gists{/gist_id}","starred_url":"https://api.github.com/users/joeldudleyr3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joeldudleyr3/subscriptions","organizations_url":"https://api.github.com/users/joeldudleyr3/orgs","repos_url":"https://api.github.com/users/joeldudleyr3/repos","events_url":"https://api.github.com/users/joeldudleyr3/events{/privacy}","received_events_url":"https://api.github.com/users/joeldudleyr3/received_events","type":"User","site_admin":false},"body":"addressed","created_at":"2017-05-31T10:59:05Z","updated_at":"2017-05-31T10:59:05Z","html_url":"https://github.com/corda/corda/pull/686#discussion_r119328817","pull_request_url":"https://api.github.com/repos/corda/corda/pulls/686","_links":{"self":{"href":"https://api.github.com/repos/corda/corda/pulls/comments/119328817"},"html":{"href":"https://github.com/corda/corda/pull/686#discussion_r119328817"},"pull_request":{"href":"https://api.github.com/repos/corda/corda/pulls/686"}}},"pull_request":{"url":"https://api.github.com/repos/corda/corda/pulls/686","id":120575810,"html_url":"https://github.com/corda/corda/pull/686","diff_url":"https://github.com/corda/corda/pull/686.diff","patch_url":"https://github.com/corda/corda/pull/686.patch","issue_url":"https://api.github.com/repos/corda/corda/issues/686","number":686,"state":"open","locked":false,"title":"Docsite reorg.","user":{"login":"joeldudleyr3","id":24230167,"avatar_url":"https://avatars3.githubusercontent.com/u/24230167?v=3","gravatar_id":"","url":"https://api.github.com/users/joeldudleyr3","html_url":"https://github.com/joeldudleyr3","followers_url":"https://api.github.com/users/joeldudleyr3/followers","following_url":"https://api.github.com/users/joeldudleyr3/following{/other_user}","gists_url":"https://api.github.com/users/joeldudleyr3/gists{/gist_id}","starred_url":"https://api.github.com/users/joeldudleyr3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joeldudleyr3/subscriptions","organizations_url":"https://api.github.com/users/joeldudleyr3/orgs","repos_url":"https://api.github.com/users/joeldudleyr3/repos","events_url":"https://api.github.com/users/joeldudleyr3/events{/privacy}","received_events_url":"https://api.github.com/users/joeldudleyr3/received_events","type":"User","site_admin":false},"body":"Main changes:\r\n- Renamed \"What's included\" to \"The Corda repository\", moved it down so that we start with \"Getting set up\", added a link to the Corda repo\r\n- Added a link to the Corda repo on \"Running the demos\"\r\n- Moved \"The example Cordapp\" into the \"Getting started\" section, ahead of \"Running the demos\"\r\n- Added a \"Release Process\" section, grouping anything about the release process for Corda\r\n- Moved \"The Corda plugin framework\" and \"Secure coding guidelines\" into the \"CorDapps\" section\r\n- Moved \"Out of process verification\" into \"The Corda node\"\r\n- Removed \"Further notes on Kotlin\", adding the link to Mike Hearn's blog into \"Getting Set Up\" instead\r\n- Renamed \"Client RPC API tutorial\" to \"Using the client RPC API\", in-line with the names of the other tutorials","created_at":"2017-05-15T11:04:10Z","updated_at":"2017-05-31T10:59:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ed8fcecbf24dd73eb26cf2957a0d7e5f14901fba","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/corda/corda/pulls/686/commits","review_comments_url":"https://api.github.com/repos/corda/corda/pulls/686/comments","review_comment_url":"https://api.github.com/repos/corda/corda/pulls/comments{/number}","comments_url":"https://api.github.com/repos/corda/corda/issues/686/comments","statuses_url":"https://api.github.com/repos/corda/corda/statuses/376c833d90e4fb01fdc9f57917242fc5688c175b","head":{"label":"corda:joel-docsite-reorg","ref":"joel-docsite-reorg","sha":"376c833d90e4fb01fdc9f57917242fc5688c175b","user":{"login":"corda","id":22600631,"avatar_url":"https://avatars2.githubusercontent.com/u/22600631?v=3","gravatar_id":"","url":"https://api.github.com/users/corda","html_url":"https://github.com/corda","followers_url":"https://api.github.com/users/corda/followers","following_url":"https://api.github.com/users/corda/following{/other_user}","gists_url":"https://api.github.com/users/corda/gists{/gist_id}","starred_url":"https://api.github.com/users/corda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/corda/subscriptions","organizations_url":"https://api.github.com/users/corda/orgs","repos_url":"https://api.github.com/users/corda/repos","events_url":"https://api.github.com/users/corda/events{/privacy}","received_events_url":"https://api.github.com/users/corda/received_events","type":"Organization","site_admin":false},"repo":{"id":70137417,"name":"corda","full_name":"corda/corda","owner":{"login":"corda","id":22600631,"avatar_url":"https://avatars2.githubusercontent.com/u/22600631?v=3","gravatar_id":"","url":"https://api.github.com/users/corda","html_url":"https://github.com/corda","followers_url":"https://api.github.com/users/corda/followers","following_url":"https://api.github.com/users/corda/following{/other_user}","gists_url":"https://api.github.com/users/corda/gists{/gist_id}","starred_url":"https://api.github.com/users/corda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/corda/subscriptions","organizations_url":"https://api.github.com/users/corda/orgs","repos_url":"https://api.github.com/users/corda/repos","events_url":"https://api.github.com/users/corda/events{/privacy}","received_events_url":"https://api.github.com/users/corda/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/corda/corda","description":"Corda is a distributed ledger platform designed to record, manage and automate legal agreements between business partners. Designed by (and for) the world's largest financial institutions, it offers a unique response to the privacy and scalability challenges facing decentralised applications.","fork":false,"url":"https://api.github.com/repos/corda/corda","forks_url":"https://api.github.com/repos/corda/corda/forks","keys_url":"https://api.github.com/repos/corda/corda/keys{/key_id}","collaborators_url":"https://api.github.com/repos/corda/corda/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/corda/corda/teams","hooks_url":"https://api.github.com/repos/corda/corda/hooks","issue_events_url":"https://api.github.com/repos/corda/corda/issues/events{/number}","events_url":"https://api.github.com/repos/corda/corda/events","assignees_url":"https://api.github.com/repos/corda/corda/assignees{/user}","branches_url":"https://api.github.com/repos/corda/corda/branches{/branch}","tags_url":"https://api.github.com/repos/corda/corda/tags","blobs_url":"https://api.github.com/repos/corda/corda/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/corda/corda/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/corda/corda/git/refs{/sha}","trees_url":"https://api.github.com/repos/corda/corda/git/trees{/sha}","statuses_url":"https://api.github.com/repos/corda/corda/statuses/{sha}","languages_url":"https://api.github.com/repos/corda/corda/languages","stargazers_url":"https://api.github.com/repos/corda/corda/stargazers","contributors_url":"https://api.github.com/repos/corda/corda/contributors","subscribers_url":"https://api.github.com/repos/corda/corda/subscribers","subscription_url":"https://api.github.com/repos/corda/corda/subscription","commits_url":"https://api.github.com/repos/corda/corda/commits{/sha}","git_commits_url":"https://api.github.com/repos/corda/corda/git/commits{/sha}","comments_url":"https://api.github.com/repos/corda/corda/comments{/number}","issue_comment_url":"https://api.github.com/repos/corda/corda/issues/comments{/number}","contents_url":"https://api.github.com/repos/corda/corda/contents/{+path}","compare_url":"https://api.github.com/repos/corda/corda/compare/{base}...{head}","merges_url":"https://api.github.com/repos/corda/corda/merges","archive_url":"https://api.github.com/repos/corda/corda/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/corda/corda/downloads","issues_url":"https://api.github.com/repos/corda/corda/issues{/number}","pulls_url":"https://api.github.com/repos/corda/corda/pulls{/number}","milestones_url":"https://api.github.com/repos/corda/corda/milestones{/number}","notifications_url":"https://api.github.com/repos/corda/corda/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/corda/corda/labels{/name}","releases_url":"https://api.github.com/repos/corda/corda/releases{/id}","deployments_url":"https://api.github.com/repos/corda/corda/deployments","created_at":"2016-10-06T08:46:29Z","updated_at":"2017-05-31T02:19:27Z","pushed_at":"2017-05-31T10:52:54Z","git_url":"git://github.com/corda/corda.git","ssh_url":"git@github.com:corda/corda.git","clone_url":"https://github.com/corda/corda.git","svn_url":"https://github.com/corda/corda","homepage":"https://www.corda.net","size":85680,"stargazers_count":678,"watchers_count":678,"language":"Kotlin","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":203,"mirror_url":null,"open_issues_count":71,"forks":203,"open_issues":71,"watchers":678,"default_branch":"master"}},"base":{"label":"corda:master","ref":"master","sha":"9307e720be53f1d52dcd4a8b0d97fdb5fb485f81","user":{"login":"corda","id":22600631,"avatar_url":"https://avatars2.githubusercontent.com/u/22600631?v=3","gravatar_id":"","url":"https://api.github.com/users/corda","html_url":"https://github.com/corda","followers_url":"https://api.github.com/users/corda/followers","following_url":"https://api.github.com/users/corda/following{/other_user}","gists_url":"https://api.github.com/users/corda/gists{/gist_id}","starred_url":"https://api.github.com/users/corda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/corda/subscriptions","organizations_url":"https://api.github.com/users/corda/orgs","repos_url":"https://api.github.com/users/corda/repos","events_url":"https://api.github.com/users/corda/events{/privacy}","received_events_url":"https://api.github.com/users/corda/received_events","type":"Organization","site_admin":false},"repo":{"id":70137417,"name":"corda","full_name":"corda/corda","owner":{"login":"corda","id":22600631,"avatar_url":"https://avatars2.githubusercontent.com/u/22600631?v=3","gravatar_id":"","url":"https://api.github.com/users/corda","html_url":"https://github.com/corda","followers_url":"https://api.github.com/users/corda/followers","following_url":"https://api.github.com/users/corda/following{/other_user}","gists_url":"https://api.github.com/users/corda/gists{/gist_id}","starred_url":"https://api.github.com/users/corda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/corda/subscriptions","organizations_url":"https://api.github.com/users/corda/orgs","repos_url":"https://api.github.com/users/corda/repos","events_url":"https://api.github.com/users/corda/events{/privacy}","received_events_url":"https://api.github.com/users/corda/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/corda/corda","description":"Corda is a distributed ledger platform designed to record, manage and automate legal agreements between business partners. Designed by (and for) the world's largest financial institutions, it offers a unique response to the privacy and scalability challenges facing decentralised applications.","fork":false,"url":"https://api.github.com/repos/corda/corda","forks_url":"https://api.github.com/repos/corda/corda/forks","keys_url":"https://api.github.com/repos/corda/corda/keys{/key_id}","collaborators_url":"https://api.github.com/repos/corda/corda/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/corda/corda/teams","hooks_url":"https://api.github.com/repos/corda/corda/hooks","issue_events_url":"https://api.github.com/repos/corda/corda/issues/events{/number}","events_url":"https://api.github.com/repos/corda/corda/events","assignees_url":"https://api.github.com/repos/corda/corda/assignees{/user}","branches_url":"https://api.github.com/repos/corda/corda/branches{/branch}","tags_url":"https://api.github.com/repos/corda/corda/tags","blobs_url":"https://api.github.com/repos/corda/corda/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/corda/corda/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/corda/corda/git/refs{/sha}","trees_url":"https://api.github.com/repos/corda/corda/git/trees{/sha}","statuses_url":"https://api.github.com/repos/corda/corda/statuses/{sha}","languages_url":"https://api.github.com/repos/corda/corda/languages","stargazers_url":"https://api.github.com/repos/corda/corda/stargazers","contributors_url":"https://api.github.com/repos/corda/corda/contributors","subscribers_url":"https://api.github.com/repos/corda/corda/subscribers","subscription_url":"https://api.github.com/repos/corda/corda/subscription","commits_url":"https://api.github.com/repos/corda/corda/commits{/sha}","git_commits_url":"https://api.github.com/repos/corda/corda/git/commits{/sha}","comments_url":"https://api.github.com/repos/corda/corda/comments{/number}","issue_comment_url":"https://api.github.com/repos/corda/corda/issues/comments{/number}","contents_url":"https://api.github.com/repos/corda/corda/contents/{+path}","compare_url":"https://api.github.com/repos/corda/corda/compare/{base}...{head}","merges_url":"https://api.github.com/repos/corda/corda/merges","archive_url":"https://api.github.com/repos/corda/corda/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/corda/corda/downloads","issues_url":"https://api.github.com/repos/corda/corda/issues{/number}","pulls_url":"https://api.github.com/repos/corda/corda/pulls{/number}","milestones_url":"https://api.github.com/repos/corda/corda/milestones{/number}","notifications_url":"https://api.github.com/repos/corda/corda/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/corda/corda/labels{/name}","releases_url":"https://api.github.com/repos/corda/corda/releases{/id}","deployments_url":"https://api.github.com/repos/corda/corda/deployments","created_at":"2016-10-06T08:46:29Z","updated_at":"2017-05-31T02:19:27Z","pushed_at":"2017-05-31T10:52:54Z","git_url":"git://github.com/corda/corda.git","ssh_url":"git@github.com:corda/corda.git","clone_url":"https://github.com/corda/corda.git","svn_url":"https://github.com/corda/corda","homepage":"https://www.corda.net","size":85680,"stargazers_count":678,"watchers_count":678,"language":"Kotlin","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":203,"mirror_url":null,"open_issues_count":71,"forks":203,"open_issues":71,"watchers":678,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/corda/corda/pulls/686"},"html":{"href":"https://github.com/corda/corda/pull/686"},"issue":{"href":"https://api.github.com/repos/corda/corda/issues/686"},"comments":{"href":"https://api.github.com/repos/corda/corda/issues/686/comments"},"review_comments":{"href":"https://api.github.com/repos/corda/corda/pulls/686/comments"},"review_comment":{"href":"https://api.github.com/repos/corda/corda/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/corda/corda/pulls/686/commits"},"statuses":{"href":"https://api.github.com/repos/corda/corda/statuses/376c833d90e4fb01fdc9f57917242fc5688c175b"}}}}
{"actor":{"display_login":"joeldudleyr3"}}