{"action":"created","comment":{"url":"https://api.github.com/repos/neo-project/examples-java/pulls/comments/146919003","pull_request_review_id":71930724,"id":146919003,"diff_hunk":"@@ -0,0 +1,79 @@\n+import java.math.BigInteger;\n+\n+import org.neo.smartcontract.framework.Helper;\n+import org.neo.smartcontract.framework.SmartContract;\n+import org.neo.smartcontract.framework.services.neo.Runtime;\n+import org.neo.smartcontract.framework.services.neo.Storage;\n+\n+public class NEP5TOK extends SmartContract {\n+\n+    public static Object Main(byte[] originator, String Event, byte[] args0, byte[] args1, byte[] args2) {\n+        \n+    \tBigInteger supply = BigInteger.valueOf(100000);\n+        String name = \"NEP5TOK\";\n+        String sym = \"N5T\";\n+        byte decimals = 0;\n+        \n+        if (!Runtime.checkWitness(originator)) return false;\n+\n+        if (Event == \"totalSupply\") return supply;\n+        if (Event == \"name\") return name;\n+        if (Event == \"symbol\") return sym;\n+        if (Event == \"decimals\") return decimals;\n+        if (Event == \"deploy\") return Deploy(originator, supply);\n+        if (Event == \"balanceOf\") return Storage.get(Storage.currentContext(), args0);\n+        if (Event == \"transfer\") return Transfer(originator, args0, args1);\n+        if (Event == \"transferFrom\") return TransferFrom(originator, args0, args1, args2);\n+        if (Event == \"approve\") return Approve(originator, args0, args1);\n+        if (Event == \"allowance\") return Allowance(args0, args1);\n+        return false;\n+    }\n+    \n+    private static Boolean Deploy(byte[] originator, BigInteger supply) {\n+        byte[] adminKey = new byte[] {};\n+        if (originator != adminKey) return false;","path":"ERC20/NEP5TOK.java","position":34,"original_position":34,"commit_id":"05d70af7242825f04d16ea007b646f5b88d9c318","original_commit_id":"05d70af7242825f04d16ea007b646f5b88d9c318","user":{"login":"privettoli","id":3314620,"avatar_url":"https://avatars1.githubusercontent.com/u/3314620?v=4","gravatar_id":"","url":"https://api.github.com/users/privettoli","html_url":"https://github.com/privettoli","followers_url":"https://api.github.com/users/privettoli/followers","following_url":"https://api.github.com/users/privettoli/following{/other_user}","gists_url":"https://api.github.com/users/privettoli/gists{/gist_id}","starred_url":"https://api.github.com/users/privettoli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/privettoli/subscriptions","organizations_url":"https://api.github.com/users/privettoli/orgs","repos_url":"https://api.github.com/users/privettoli/repos","events_url":"https://api.github.com/users/privettoli/events{/privacy}","received_events_url":"https://api.github.com/users/privettoli/received_events","type":"User","site_admin":false},"body":"impossible condition, create static ByteUtils.isEmpty with check of null and array.isEmpty ","created_at":"2017-10-25T16:49:17Z","updated_at":"2017-10-25T16:52:02Z","html_url":"https://github.com/neo-project/examples-java/pull/2#discussion_r146919003","pull_request_url":"https://api.github.com/repos/neo-project/examples-java/pulls/2","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/neo-project/examples-java/pulls/comments/146919003"},"html":{"href":"https://github.com/neo-project/examples-java/pull/2#discussion_r146919003"},"pull_request":{"href":"https://api.github.com/repos/neo-project/examples-java/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/neo-project/examples-java/pulls/2","id":146458464,"html_url":"https://github.com/neo-project/examples-java/pull/2","diff_url":"https://github.com/neo-project/examples-java/pull/2.diff","patch_url":"https://github.com/neo-project/examples-java/pull/2.patch","issue_url":"https://api.github.com/repos/neo-project/examples-java/issues/2","number":2,"state":"open","locked":false,"title":"Added HelloWorld, NEP5 example, Domain, and Lock SC using latest java-framework 2.3.0","user":{"login":"fabwa","id":7439206,"avatar_url":"https://avatars1.githubusercontent.com/u/7439206?v=4","gravatar_id":"","url":"https://api.github.com/users/fabwa","html_url":"https://github.com/fabwa","followers_url":"https://api.github.com/users/fabwa/followers","following_url":"https://api.github.com/users/fabwa/following{/other_user}","gists_url":"https://api.github.com/users/fabwa/gists{/gist_id}","starred_url":"https://api.github.com/users/fabwa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabwa/subscriptions","organizations_url":"https://api.github.com/users/fabwa/orgs","repos_url":"https://api.github.com/users/fabwa/repos","events_url":"https://api.github.com/users/fabwa/events{/privacy}","received_events_url":"https://api.github.com/users/fabwa/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-10-13T13:33:18Z","updated_at":"2017-10-25T16:52:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ba1abea7493c6312f30d8889febd34615082b41a","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/neo-project/examples-java/pulls/2/commits","review_comments_url":"https://api.github.com/repos/neo-project/examples-java/pulls/2/comments","review_comment_url":"https://api.github.com/repos/neo-project/examples-java/pulls/comments{/number}","comments_url":"https://api.github.com/repos/neo-project/examples-java/issues/2/comments","statuses_url":"https://api.github.com/repos/neo-project/examples-java/statuses/05d70af7242825f04d16ea007b646f5b88d9c318","head":{"label":"fabwa:master","ref":"master","sha":"05d70af7242825f04d16ea007b646f5b88d9c318","user":{"login":"fabwa","id":7439206,"avatar_url":"https://avatars1.githubusercontent.com/u/7439206?v=4","gravatar_id":"","url":"https://api.github.com/users/fabwa","html_url":"https://github.com/fabwa","followers_url":"https://api.github.com/users/fabwa/followers","following_url":"https://api.github.com/users/fabwa/following{/other_user}","gists_url":"https://api.github.com/users/fabwa/gists{/gist_id}","starred_url":"https://api.github.com/users/fabwa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabwa/subscriptions","organizations_url":"https://api.github.com/users/fabwa/orgs","repos_url":"https://api.github.com/users/fabwa/repos","events_url":"https://api.github.com/users/fabwa/events{/privacy}","received_events_url":"https://api.github.com/users/fabwa/received_events","type":"User","site_admin":false},"repo":{"id":106823101,"name":"examples-java","full_name":"fabwa/examples-java","owner":{"login":"fabwa","id":7439206,"avatar_url":"https://avatars1.githubusercontent.com/u/7439206?v=4","gravatar_id":"","url":"https://api.github.com/users/fabwa","html_url":"https://github.com/fabwa","followers_url":"https://api.github.com/users/fabwa/followers","following_url":"https://api.github.com/users/fabwa/following{/other_user}","gists_url":"https://api.github.com/users/fabwa/gists{/gist_id}","starred_url":"https://api.github.com/users/fabwa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabwa/subscriptions","organizations_url":"https://api.github.com/users/fabwa/orgs","repos_url":"https://api.github.com/users/fabwa/repos","events_url":"https://api.github.com/users/fabwa/events{/privacy}","received_events_url":"https://api.github.com/users/fabwa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fabwa/examples-java","description":null,"fork":true,"url":"https://api.github.com/repos/fabwa/examples-java","forks_url":"https://api.github.com/repos/fabwa/examples-java/forks","keys_url":"https://api.github.com/repos/fabwa/examples-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fabwa/examples-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fabwa/examples-java/teams","hooks_url":"https://api.github.com/repos/fabwa/examples-java/hooks","issue_events_url":"https://api.github.com/repos/fabwa/examples-java/issues/events{/number}","events_url":"https://api.github.com/repos/fabwa/examples-java/events","assignees_url":"https://api.github.com/repos/fabwa/examples-java/assignees{/user}","branches_url":"https://api.github.com/repos/fabwa/examples-java/branches{/branch}","tags_url":"https://api.github.com/repos/fabwa/examples-java/tags","blobs_url":"https://api.github.com/repos/fabwa/examples-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fabwa/examples-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fabwa/examples-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/fabwa/examples-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fabwa/examples-java/statuses/{sha}","languages_url":"https://api.github.com/repos/fabwa/examples-java/languages","stargazers_url":"https://api.github.com/repos/fabwa/examples-java/stargazers","contributors_url":"https://api.github.com/repos/fabwa/examples-java/contributors","subscribers_url":"https://api.github.com/repos/fabwa/examples-java/subscribers","subscription_url":"https://api.github.com/repos/fabwa/examples-java/subscription","commits_url":"https://api.github.com/repos/fabwa/examples-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/fabwa/examples-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/fabwa/examples-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/fabwa/examples-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/fabwa/examples-java/contents/{+path}","compare_url":"https://api.github.com/repos/fabwa/examples-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fabwa/examples-java/merges","archive_url":"https://api.github.com/repos/fabwa/examples-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fabwa/examples-java/downloads","issues_url":"https://api.github.com/repos/fabwa/examples-java/issues{/number}","pulls_url":"https://api.github.com/repos/fabwa/examples-java/pulls{/number}","milestones_url":"https://api.github.com/repos/fabwa/examples-java/milestones{/number}","notifications_url":"https://api.github.com/repos/fabwa/examples-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fabwa/examples-java/labels{/name}","releases_url":"https://api.github.com/repos/fabwa/examples-java/releases{/id}","deployments_url":"https://api.github.com/repos/fabwa/examples-java/deployments","created_at":"2017-10-13T12:44:23Z","updated_at":"2017-10-13T12:48:04Z","pushed_at":"2017-10-16T11:44:47Z","git_url":"git://github.com/fabwa/examples-java.git","ssh_url":"git@github.com:fabwa/examples-java.git","clone_url":"https://github.com/fabwa/examples-java.git","svn_url":"https://github.com/fabwa/examples-java","homepage":null,"size":25,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"neo-project:master","ref":"master","sha":"b017a86e0599cca6deabb042f77f0aaab65ec1e0","user":{"login":"neo-project","id":12685221,"avatar_url":"https://avatars3.githubusercontent.com/u/12685221?v=4","gravatar_id":"","url":"https://api.github.com/users/neo-project","html_url":"https://github.com/neo-project","followers_url":"https://api.github.com/users/neo-project/followers","following_url":"https://api.github.com/users/neo-project/following{/other_user}","gists_url":"https://api.github.com/users/neo-project/gists{/gist_id}","starred_url":"https://api.github.com/users/neo-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neo-project/subscriptions","organizations_url":"https://api.github.com/users/neo-project/orgs","repos_url":"https://api.github.com/users/neo-project/repos","events_url":"https://api.github.com/users/neo-project/events{/privacy}","received_events_url":"https://api.github.com/users/neo-project/received_events","type":"Organization","site_admin":false},"repo":{"id":101163663,"name":"examples-java","full_name":"neo-project/examples-java","owner":{"login":"neo-project","id":12685221,"avatar_url":"https://avatars3.githubusercontent.com/u/12685221?v=4","gravatar_id":"","url":"https://api.github.com/users/neo-project","html_url":"https://github.com/neo-project","followers_url":"https://api.github.com/users/neo-project/followers","following_url":"https://api.github.com/users/neo-project/following{/other_user}","gists_url":"https://api.github.com/users/neo-project/gists{/gist_id}","starred_url":"https://api.github.com/users/neo-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neo-project/subscriptions","organizations_url":"https://api.github.com/users/neo-project/orgs","repos_url":"https://api.github.com/users/neo-project/repos","events_url":"https://api.github.com/users/neo-project/events{/privacy}","received_events_url":"https://api.github.com/users/neo-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/neo-project/examples-java","description":null,"fork":false,"url":"https://api.github.com/repos/neo-project/examples-java","forks_url":"https://api.github.com/repos/neo-project/examples-java/forks","keys_url":"https://api.github.com/repos/neo-project/examples-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/neo-project/examples-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/neo-project/examples-java/teams","hooks_url":"https://api.github.com/repos/neo-project/examples-java/hooks","issue_events_url":"https://api.github.com/repos/neo-project/examples-java/issues/events{/number}","events_url":"https://api.github.com/repos/neo-project/examples-java/events","assignees_url":"https://api.github.com/repos/neo-project/examples-java/assignees{/user}","branches_url":"https://api.github.com/repos/neo-project/examples-java/branches{/branch}","tags_url":"https://api.github.com/repos/neo-project/examples-java/tags","blobs_url":"https://api.github.com/repos/neo-project/examples-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/neo-project/examples-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/neo-project/examples-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/neo-project/examples-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/neo-project/examples-java/statuses/{sha}","languages_url":"https://api.github.com/repos/neo-project/examples-java/languages","stargazers_url":"https://api.github.com/repos/neo-project/examples-java/stargazers","contributors_url":"https://api.github.com/repos/neo-project/examples-java/contributors","subscribers_url":"https://api.github.com/repos/neo-project/examples-java/subscribers","subscription_url":"https://api.github.com/repos/neo-project/examples-java/subscription","commits_url":"https://api.github.com/repos/neo-project/examples-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/neo-project/examples-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/neo-project/examples-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/neo-project/examples-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/neo-project/examples-java/contents/{+path}","compare_url":"https://api.github.com/repos/neo-project/examples-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/neo-project/examples-java/merges","archive_url":"https://api.github.com/repos/neo-project/examples-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/neo-project/examples-java/downloads","issues_url":"https://api.github.com/repos/neo-project/examples-java/issues{/number}","pulls_url":"https://api.github.com/repos/neo-project/examples-java/pulls{/number}","milestones_url":"https://api.github.com/repos/neo-project/examples-java/milestones{/number}","notifications_url":"https://api.github.com/repos/neo-project/examples-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/neo-project/examples-java/labels{/name}","releases_url":"https://api.github.com/repos/neo-project/examples-java/releases{/id}","deployments_url":"https://api.github.com/repos/neo-project/examples-java/deployments","created_at":"2017-08-23T09:37:46Z","updated_at":"2017-10-16T19:41:51Z","pushed_at":"2017-10-16T11:44:48Z","git_url":"git://github.com/neo-project/examples-java.git","ssh_url":"git@github.com:neo-project/examples-java.git","clone_url":"https://github.com/neo-project/examples-java.git","svn_url":"https://github.com/neo-project/examples-java","homepage":null,"size":1,"stargazers_count":4,"watchers_count":4,"language":null,"has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":2,"forks":6,"open_issues":2,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/neo-project/examples-java/pulls/2"},"html":{"href":"https://github.com/neo-project/examples-java/pull/2"},"issue":{"href":"https://api.github.com/repos/neo-project/examples-java/issues/2"},"comments":{"href":"https://api.github.com/repos/neo-project/examples-java/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/neo-project/examples-java/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/neo-project/examples-java/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/neo-project/examples-java/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/neo-project/examples-java/statuses/05d70af7242825f04d16ea007b646f5b88d9c318"}},"author_association":"NONE"}}
{"actor":{"display_login":"privettoli"}}