{"action":"created","comment":{"url":"https://api.github.com/repos/ChainSafe/ssz-js/pulls/comments/280981401","pull_request_review_id":233735905,"id":280981401,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI4MDk4MTQwMQ==","diff_hunk":"@@ -0,0 +1,36 @@\n+import assert from \"assert\";\n+import BN from \"bn.js\";\n+\n+import {\n+  FullSSZType,\n+  Type,\n+} from \"./types\";\n+\n+\n+export function assertValidValue(value: any, type: FullSSZType): void {\n+  switch (type.type) {\n+    case Type.uint:\n+      assert(BN.isBN(value) || value === Number(value), 'Invalid uint value')\n+      break;\n+    case Type.bool:\n+      assert(value === true || value === false, 'Invalid boolean value');\n+      break;\n+    case Type.byteList:\n+      assert(value instanceof Uint8Array, 'Invalid byte array value');","path":"src/assertValidValue.ts","position":19,"original_position":19,"commit_id":"78eabe73d35cbee483c34c711974e78589ba8b2d","original_commit_id":"78eabe73d35cbee483c34c711974e78589ba8b2d","user":{"login":"mpetrunic","id":8836210,"node_id":"MDQ6VXNlcjg4MzYyMTA=","avatar_url":"https://avatars0.githubusercontent.com/u/8836210?v=4","gravatar_id":"","url":"https://api.github.com/users/mpetrunic","html_url":"https://github.com/mpetrunic","followers_url":"https://api.github.com/users/mpetrunic/followers","following_url":"https://api.github.com/users/mpetrunic/following{/other_user}","gists_url":"https://api.github.com/users/mpetrunic/gists{/gist_id}","starred_url":"https://api.github.com/users/mpetrunic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpetrunic/subscriptions","organizations_url":"https://api.github.com/users/mpetrunic/orgs","repos_url":"https://api.github.com/users/mpetrunic/repos","events_url":"https://api.github.com/users/mpetrunic/events{/privacy}","received_events_url":"https://api.github.com/users/mpetrunic/received_events","type":"User","site_admin":false},"body":"https://repl.it/repls/MushyOffensiveDatamining oh well :)","created_at":"2019-05-04T13:16:18Z","updated_at":"2019-05-04T13:16:18Z","html_url":"https://github.com/ChainSafe/ssz-js/pull/79#discussion_r280981401","pull_request_url":"https://api.github.com/repos/ChainSafe/ssz-js/pulls/79","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/ChainSafe/ssz-js/pulls/comments/280981401"},"html":{"href":"https://github.com/ChainSafe/ssz-js/pull/79#discussion_r280981401"},"pull_request":{"href":"https://api.github.com/repos/ChainSafe/ssz-js/pulls/79"}},"in_reply_to_id":280005273},"pull_request":{"url":"https://api.github.com/repos/ChainSafe/ssz-js/pulls/79","id":274889925,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjc0ODg5OTI1","html_url":"https://github.com/ChainSafe/ssz-js/pull/79","diff_url":"https://github.com/ChainSafe/ssz-js/pull/79.diff","patch_url":"https://github.com/ChainSafe/ssz-js/pull/79.patch","issue_url":"https://api.github.com/repos/ChainSafe/ssz-js/issues/79","number":79,"state":"open","locked":false,"title":"Use SOS style layout","user":{"login":"wemeetagain","id":1348242,"node_id":"MDQ6VXNlcjEzNDgyNDI=","avatar_url":"https://avatars2.githubusercontent.com/u/1348242?v=4","gravatar_id":"","url":"https://api.github.com/users/wemeetagain","html_url":"https://github.com/wemeetagain","followers_url":"https://api.github.com/users/wemeetagain/followers","following_url":"https://api.github.com/users/wemeetagain/following{/other_user}","gists_url":"https://api.github.com/users/wemeetagain/gists{/gist_id}","starred_url":"https://api.github.com/users/wemeetagain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wemeetagain/subscriptions","organizations_url":"https://api.github.com/users/wemeetagain/orgs","repos_url":"https://api.github.com/users/wemeetagain/repos","events_url":"https://api.github.com/users/wemeetagain/events{/privacy}","received_events_url":"https://api.github.com/users/wemeetagain/received_events","type":"User","site_admin":false},"body":"See https://github.com/ethereum/eth2.0-specs/pull/787\r\n\r\nAdd isVariableSizeType\r\nSplit out assertValidValue from size\r\nSplit size into fixedSize and variableSize\r\n","created_at":"2019-04-30T21:13:33Z","updated_at":"2019-05-04T13:16:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fe73e3d452d92d502a605df29cd096ddddae1af0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ChainSafe/ssz-js/pulls/79/commits","review_comments_url":"https://api.github.com/repos/ChainSafe/ssz-js/pulls/79/comments","review_comment_url":"https://api.github.com/repos/ChainSafe/ssz-js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ChainSafe/ssz-js/issues/79/comments","statuses_url":"https://api.github.com/repos/ChainSafe/ssz-js/statuses/78eabe73d35cbee483c34c711974e78589ba8b2d","head":{"label":"ChainSafe:cayman/sos-offset","ref":"cayman/sos-offset","sha":"78eabe73d35cbee483c34c711974e78589ba8b2d","user":{"login":"ChainSafe","id":27474093,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NDc0MDkz","avatar_url":"https://avatars1.githubusercontent.com/u/27474093?v=4","gravatar_id":"","url":"https://api.github.com/users/ChainSafe","html_url":"https://github.com/ChainSafe","followers_url":"https://api.github.com/users/ChainSafe/followers","following_url":"https://api.github.com/users/ChainSafe/following{/other_user}","gists_url":"https://api.github.com/users/ChainSafe/gists{/gist_id}","starred_url":"https://api.github.com/users/ChainSafe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChainSafe/subscriptions","organizations_url":"https://api.github.com/users/ChainSafe/orgs","repos_url":"https://api.github.com/users/ChainSafe/repos","events_url":"https://api.github.com/users/ChainSafe/events{/privacy}","received_events_url":"https://api.github.com/users/ChainSafe/received_events","type":"Organization","site_admin":false},"repo":{"id":148647503,"node_id":"MDEwOlJlcG9zaXRvcnkxNDg2NDc1MDM=","name":"ssz-js","full_name":"ChainSafe/ssz-js","private":false,"owner":{"login":"ChainSafe","id":27474093,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NDc0MDkz","avatar_url":"https://avatars1.githubusercontent.com/u/27474093?v=4","gravatar_id":"","url":"https://api.github.com/users/ChainSafe","html_url":"https://github.com/ChainSafe","followers_url":"https://api.github.com/users/ChainSafe/followers","following_url":"https://api.github.com/users/ChainSafe/following{/other_user}","gists_url":"https://api.github.com/users/ChainSafe/gists{/gist_id}","starred_url":"https://api.github.com/users/ChainSafe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChainSafe/subscriptions","organizations_url":"https://api.github.com/users/ChainSafe/orgs","repos_url":"https://api.github.com/users/ChainSafe/repos","events_url":"https://api.github.com/users/ChainSafe/events{/privacy}","received_events_url":"https://api.github.com/users/ChainSafe/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ChainSafe/ssz-js","description":"Simple Serialize in TypeScript","fork":false,"url":"https://api.github.com/repos/ChainSafe/ssz-js","forks_url":"https://api.github.com/repos/ChainSafe/ssz-js/forks","keys_url":"https://api.github.com/repos/ChainSafe/ssz-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ChainSafe/ssz-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ChainSafe/ssz-js/teams","hooks_url":"https://api.github.com/repos/ChainSafe/ssz-js/hooks","issue_events_url":"https://api.github.com/repos/ChainSafe/ssz-js/issues/events{/number}","events_url":"https://api.github.com/repos/ChainSafe/ssz-js/events","assignees_url":"https://api.github.com/repos/ChainSafe/ssz-js/assignees{/user}","branches_url":"https://api.github.com/repos/ChainSafe/ssz-js/branches{/branch}","tags_url":"https://api.github.com/repos/ChainSafe/ssz-js/tags","blobs_url":"https://api.github.com/repos/ChainSafe/ssz-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ChainSafe/ssz-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ChainSafe/ssz-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/ChainSafe/ssz-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ChainSafe/ssz-js/statuses/{sha}","languages_url":"https://api.github.com/repos/ChainSafe/ssz-js/languages","stargazers_url":"https://api.github.com/repos/ChainSafe/ssz-js/stargazers","contributors_url":"https://api.github.com/repos/ChainSafe/ssz-js/contributors","subscribers_url":"https://api.github.com/repos/ChainSafe/ssz-js/subscribers","subscription_url":"https://api.github.com/repos/ChainSafe/ssz-js/subscription","commits_url":"https://api.github.com/repos/ChainSafe/ssz-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/ChainSafe/ssz-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/ChainSafe/ssz-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/ChainSafe/ssz-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/ChainSafe/ssz-js/contents/{+path}","compare_url":"https://api.github.com/repos/ChainSafe/ssz-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ChainSafe/ssz-js/merges","archive_url":"https://api.github.com/repos/ChainSafe/ssz-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ChainSafe/ssz-js/downloads","issues_url":"https://api.github.com/repos/ChainSafe/ssz-js/issues{/number}","pulls_url":"https://api.github.com/repos/ChainSafe/ssz-js/pulls{/number}","milestones_url":"https://api.github.com/repos/ChainSafe/ssz-js/milestones{/number}","notifications_url":"https://api.github.com/repos/ChainSafe/ssz-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ChainSafe/ssz-js/labels{/name}","releases_url":"https://api.github.com/repos/ChainSafe/ssz-js/releases{/id}","deployments_url":"https://api.github.com/repos/ChainSafe/ssz-js/deployments","created_at":"2018-09-13T14:09:59Z","updated_at":"2019-04-24T06:50:49Z","pushed_at":"2019-05-04T12:54:26Z","git_url":"git://github.com/ChainSafe/ssz-js.git","ssh_url":"git@github.com:ChainSafe/ssz-js.git","clone_url":"https://github.com/ChainSafe/ssz-js.git","svn_url":"https://github.com/ChainSafe/ssz-js","homepage":"","size":490,"stargazers_count":7,"watchers_count":7,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":8,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":2,"open_issues":8,"watchers":7,"default_branch":"master"}},"base":{"label":"ChainSafe:master","ref":"master","sha":"cf50c22c5c1ac341d8b8aceb882c5bef51985696","user":{"login":"ChainSafe","id":27474093,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NDc0MDkz","avatar_url":"https://avatars1.githubusercontent.com/u/27474093?v=4","gravatar_id":"","url":"https://api.github.com/users/ChainSafe","html_url":"https://github.com/ChainSafe","followers_url":"https://api.github.com/users/ChainSafe/followers","following_url":"https://api.github.com/users/ChainSafe/following{/other_user}","gists_url":"https://api.github.com/users/ChainSafe/gists{/gist_id}","starred_url":"https://api.github.com/users/ChainSafe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChainSafe/subscriptions","organizations_url":"https://api.github.com/users/ChainSafe/orgs","repos_url":"https://api.github.com/users/ChainSafe/repos","events_url":"https://api.github.com/users/ChainSafe/events{/privacy}","received_events_url":"https://api.github.com/users/ChainSafe/received_events","type":"Organization","site_admin":false},"repo":{"id":148647503,"node_id":"MDEwOlJlcG9zaXRvcnkxNDg2NDc1MDM=","name":"ssz-js","full_name":"ChainSafe/ssz-js","private":false,"owner":{"login":"ChainSafe","id":27474093,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NDc0MDkz","avatar_url":"https://avatars1.githubusercontent.com/u/27474093?v=4","gravatar_id":"","url":"https://api.github.com/users/ChainSafe","html_url":"https://github.com/ChainSafe","followers_url":"https://api.github.com/users/ChainSafe/followers","following_url":"https://api.github.com/users/ChainSafe/following{/other_user}","gists_url":"https://api.github.com/users/ChainSafe/gists{/gist_id}","starred_url":"https://api.github.com/users/ChainSafe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChainSafe/subscriptions","organizations_url":"https://api.github.com/users/ChainSafe/orgs","repos_url":"https://api.github.com/users/ChainSafe/repos","events_url":"https://api.github.com/users/ChainSafe/events{/privacy}","received_events_url":"https://api.github.com/users/ChainSafe/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ChainSafe/ssz-js","description":"Simple Serialize in TypeScript","fork":false,"url":"https://api.github.com/repos/ChainSafe/ssz-js","forks_url":"https://api.github.com/repos/ChainSafe/ssz-js/forks","keys_url":"https://api.github.com/repos/ChainSafe/ssz-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ChainSafe/ssz-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ChainSafe/ssz-js/teams","hooks_url":"https://api.github.com/repos/ChainSafe/ssz-js/hooks","issue_events_url":"https://api.github.com/repos/ChainSafe/ssz-js/issues/events{/number}","events_url":"https://api.github.com/repos/ChainSafe/ssz-js/events","assignees_url":"https://api.github.com/repos/ChainSafe/ssz-js/assignees{/user}","branches_url":"https://api.github.com/repos/ChainSafe/ssz-js/branches{/branch}","tags_url":"https://api.github.com/repos/ChainSafe/ssz-js/tags","blobs_url":"https://api.github.com/repos/ChainSafe/ssz-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ChainSafe/ssz-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ChainSafe/ssz-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/ChainSafe/ssz-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ChainSafe/ssz-js/statuses/{sha}","languages_url":"https://api.github.com/repos/ChainSafe/ssz-js/languages","stargazers_url":"https://api.github.com/repos/ChainSafe/ssz-js/stargazers","contributors_url":"https://api.github.com/repos/ChainSafe/ssz-js/contributors","subscribers_url":"https://api.github.com/repos/ChainSafe/ssz-js/subscribers","subscription_url":"https://api.github.com/repos/ChainSafe/ssz-js/subscription","commits_url":"https://api.github.com/repos/ChainSafe/ssz-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/ChainSafe/ssz-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/ChainSafe/ssz-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/ChainSafe/ssz-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/ChainSafe/ssz-js/contents/{+path}","compare_url":"https://api.github.com/repos/ChainSafe/ssz-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ChainSafe/ssz-js/merges","archive_url":"https://api.github.com/repos/ChainSafe/ssz-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ChainSafe/ssz-js/downloads","issues_url":"https://api.github.com/repos/ChainSafe/ssz-js/issues{/number}","pulls_url":"https://api.github.com/repos/ChainSafe/ssz-js/pulls{/number}","milestones_url":"https://api.github.com/repos/ChainSafe/ssz-js/milestones{/number}","notifications_url":"https://api.github.com/repos/ChainSafe/ssz-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ChainSafe/ssz-js/labels{/name}","releases_url":"https://api.github.com/repos/ChainSafe/ssz-js/releases{/id}","deployments_url":"https://api.github.com/repos/ChainSafe/ssz-js/deployments","created_at":"2018-09-13T14:09:59Z","updated_at":"2019-04-24T06:50:49Z","pushed_at":"2019-05-04T12:54:26Z","git_url":"git://github.com/ChainSafe/ssz-js.git","ssh_url":"git@github.com:ChainSafe/ssz-js.git","clone_url":"https://github.com/ChainSafe/ssz-js.git","svn_url":"https://github.com/ChainSafe/ssz-js","homepage":"","size":490,"stargazers_count":7,"watchers_count":7,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":8,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":2,"open_issues":8,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ChainSafe/ssz-js/pulls/79"},"html":{"href":"https://github.com/ChainSafe/ssz-js/pull/79"},"issue":{"href":"https://api.github.com/repos/ChainSafe/ssz-js/issues/79"},"comments":{"href":"https://api.github.com/repos/ChainSafe/ssz-js/issues/79/comments"},"review_comments":{"href":"https://api.github.com/repos/ChainSafe/ssz-js/pulls/79/comments"},"review_comment":{"href":"https://api.github.com/repos/ChainSafe/ssz-js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ChainSafe/ssz-js/pulls/79/commits"},"statuses":{"href":"https://api.github.com/repos/ChainSafe/ssz-js/statuses/78eabe73d35cbee483c34c711974e78589ba8b2d"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"mpetrunic"}}