{"action":"created","comment":{"url":"https://api.github.com/repos/magmo/force-move-games/pulls/comments/222841022","pull_request_review_id":161825078,"id":222841022,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMjg0MTAyMg==","diff_hunk":"@@ -1,19 +1,69 @@\n+import Web3 from 'web3';\n+import { soliditySha3 } from 'web3-utils';\n+import { Signature } from 'web3/eth/accounts';\n+\n+// TODO: write some jest tests for utils.\n+\n export function toHex32(num) {\n   return \"0x\" + toPaddedHexString(num, 64);\n }\n \n export function padBytes32(data){\n-  let l = 66-data.length;\n+  const l = 66-data.length;\n   let x = data.substr(2, data.length);\n \n-  for(var i=0; i<l; i++) {\n+  for(let i=0; i<l; i++) {\n     x = 0 + x;\n   }\n   return '0x' + x;\n }\n \n // https://stackoverflow.com/a/42203200\n export function toPaddedHexString(num, len) {\n-    let str = num.toString(16);\n+    const str = num.toString(16);\n     return \"0\".repeat(len - str.length) + str;\n }\n+\n+enum SolidityType {\n+  // Only the types we'd use\n+  bool,\n+  uint8,\n+  uint256,\n+  address,\n+  bytes,\n+  bytes32,\n+}\n+\n+class SolidityParameter {\n+  type: SolidityType;\n+  value: string;\n+\n+  constructor({ type, value }) {\n+    this.type = type;\n+    this.value = value;\n+  }\n+}","path":"packages/fmg-core/src/utils.ts","position":48,"original_position":48,"commit_id":"262b64a9613fc9eb9cd6b6b84fd6d9f653a88c1a","original_commit_id":"262b64a9613fc9eb9cd6b6b84fd6d9f653a88c1a","user":{"login":"tomclose","id":29596,"node_id":"MDQ6VXNlcjI5NTk2","avatar_url":"https://avatars0.githubusercontent.com/u/29596?v=4","gravatar_id":"","url":"https://api.github.com/users/tomclose","html_url":"https://github.com/tomclose","followers_url":"https://api.github.com/users/tomclose/followers","following_url":"https://api.github.com/users/tomclose/following{/other_user}","gists_url":"https://api.github.com/users/tomclose/gists{/gist_id}","starred_url":"https://api.github.com/users/tomclose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomclose/subscriptions","organizations_url":"https://api.github.com/users/tomclose/orgs","repos_url":"https://api.github.com/users/tomclose/repos","events_url":"https://api.github.com/users/tomclose/events{/privacy}","received_events_url":"https://api.github.com/users/tomclose/received_events","type":"User","site_admin":false},"body":"Are these new types actually used or tested anywhere?","created_at":"2018-10-04T22:00:57Z","updated_at":"2018-10-04T22:03:52Z","html_url":"https://github.com/magmo/force-move-games/pull/30#discussion_r222841022","pull_request_url":"https://api.github.com/repos/magmo/force-move-games/pulls/30","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/magmo/force-move-games/pulls/comments/222841022"},"html":{"href":"https://github.com/magmo/force-move-games/pull/30#discussion_r222841022"},"pull_request":{"href":"https://api.github.com/repos/magmo/force-move-games/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/magmo/force-move-games/pulls/30","id":220253727,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIwMjUzNzI3","html_url":"https://github.com/magmo/force-move-games/pull/30","diff_url":"https://github.com/magmo/force-move-games/pull/30.diff","patch_url":"https://github.com/magmo/force-move-games/pull/30.patch","issue_url":"https://api.github.com/repos/magmo/force-move-games/issues/30","number":30,"state":"open","locked":false,"title":"Update withdraw","user":{"login":"andrewgordstewart","id":8432675,"node_id":"MDQ6VXNlcjg0MzI2NzU=","avatar_url":"https://avatars2.githubusercontent.com/u/8432675?v=4","gravatar_id":"","url":"https://api.github.com/users/andrewgordstewart","html_url":"https://github.com/andrewgordstewart","followers_url":"https://api.github.com/users/andrewgordstewart/followers","following_url":"https://api.github.com/users/andrewgordstewart/following{/other_user}","gists_url":"https://api.github.com/users/andrewgordstewart/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewgordstewart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewgordstewart/subscriptions","organizations_url":"https://api.github.com/users/andrewgordstewart/orgs","repos_url":"https://api.github.com/users/andrewgordstewart/repos","events_url":"https://api.github.com/users/andrewgordstewart/events{/privacy}","received_events_url":"https://api.github.com/users/andrewgordstewart/received_events","type":"User","site_admin":false},"body":"Allows the player to specify the destination address, by signing it with key ephemeral key.","created_at":"2018-10-04T05:29:12Z","updated_at":"2018-10-04T22:03:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5a95682325e3bc33cbedcd3bb9d60832ff8a3f83","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/magmo/force-move-games/pulls/30/commits","review_comments_url":"https://api.github.com/repos/magmo/force-move-games/pulls/30/comments","review_comment_url":"https://api.github.com/repos/magmo/force-move-games/pulls/comments{/number}","comments_url":"https://api.github.com/repos/magmo/force-move-games/issues/30/comments","statuses_url":"https://api.github.com/repos/magmo/force-move-games/statuses/262b64a9613fc9eb9cd6b6b84fd6d9f653a88c1a","head":{"label":"magmo:as-update-withdraw","ref":"as-update-withdraw","sha":"262b64a9613fc9eb9cd6b6b84fd6d9f653a88c1a","user":{"login":"magmo","id":36650395,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NjUwMzk1","avatar_url":"https://avatars2.githubusercontent.com/u/36650395?v=4","gravatar_id":"","url":"https://api.github.com/users/magmo","html_url":"https://github.com/magmo","followers_url":"https://api.github.com/users/magmo/followers","following_url":"https://api.github.com/users/magmo/following{/other_user}","gists_url":"https://api.github.com/users/magmo/gists{/gist_id}","starred_url":"https://api.github.com/users/magmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magmo/subscriptions","organizations_url":"https://api.github.com/users/magmo/orgs","repos_url":"https://api.github.com/users/magmo/repos","events_url":"https://api.github.com/users/magmo/events{/privacy}","received_events_url":"https://api.github.com/users/magmo/received_events","type":"Organization","site_admin":false},"repo":{"id":129157317,"node_id":"MDEwOlJlcG9zaXRvcnkxMjkxNTczMTc=","name":"force-move-games","full_name":"magmo/force-move-games","private":false,"owner":{"login":"magmo","id":36650395,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NjUwMzk1","avatar_url":"https://avatars2.githubusercontent.com/u/36650395?v=4","gravatar_id":"","url":"https://api.github.com/users/magmo","html_url":"https://github.com/magmo","followers_url":"https://api.github.com/users/magmo/followers","following_url":"https://api.github.com/users/magmo/following{/other_user}","gists_url":"https://api.github.com/users/magmo/gists{/gist_id}","starred_url":"https://api.github.com/users/magmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magmo/subscriptions","organizations_url":"https://api.github.com/users/magmo/orgs","repos_url":"https://api.github.com/users/magmo/repos","events_url":"https://api.github.com/users/magmo/events{/privacy}","received_events_url":"https://api.github.com/users/magmo/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/magmo/force-move-games","description":"A minimal viable force-move-games implementation","fork":false,"url":"https://api.github.com/repos/magmo/force-move-games","forks_url":"https://api.github.com/repos/magmo/force-move-games/forks","keys_url":"https://api.github.com/repos/magmo/force-move-games/keys{/key_id}","collaborators_url":"https://api.github.com/repos/magmo/force-move-games/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/magmo/force-move-games/teams","hooks_url":"https://api.github.com/repos/magmo/force-move-games/hooks","issue_events_url":"https://api.github.com/repos/magmo/force-move-games/issues/events{/number}","events_url":"https://api.github.com/repos/magmo/force-move-games/events","assignees_url":"https://api.github.com/repos/magmo/force-move-games/assignees{/user}","branches_url":"https://api.github.com/repos/magmo/force-move-games/branches{/branch}","tags_url":"https://api.github.com/repos/magmo/force-move-games/tags","blobs_url":"https://api.github.com/repos/magmo/force-move-games/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/magmo/force-move-games/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/magmo/force-move-games/git/refs{/sha}","trees_url":"https://api.github.com/repos/magmo/force-move-games/git/trees{/sha}","statuses_url":"https://api.github.com/repos/magmo/force-move-games/statuses/{sha}","languages_url":"https://api.github.com/repos/magmo/force-move-games/languages","stargazers_url":"https://api.github.com/repos/magmo/force-move-games/stargazers","contributors_url":"https://api.github.com/repos/magmo/force-move-games/contributors","subscribers_url":"https://api.github.com/repos/magmo/force-move-games/subscribers","subscription_url":"https://api.github.com/repos/magmo/force-move-games/subscription","commits_url":"https://api.github.com/repos/magmo/force-move-games/commits{/sha}","git_commits_url":"https://api.github.com/repos/magmo/force-move-games/git/commits{/sha}","comments_url":"https://api.github.com/repos/magmo/force-move-games/comments{/number}","issue_comment_url":"https://api.github.com/repos/magmo/force-move-games/issues/comments{/number}","contents_url":"https://api.github.com/repos/magmo/force-move-games/contents/{+path}","compare_url":"https://api.github.com/repos/magmo/force-move-games/compare/{base}...{head}","merges_url":"https://api.github.com/repos/magmo/force-move-games/merges","archive_url":"https://api.github.com/repos/magmo/force-move-games/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/magmo/force-move-games/downloads","issues_url":"https://api.github.com/repos/magmo/force-move-games/issues{/number}","pulls_url":"https://api.github.com/repos/magmo/force-move-games/pulls{/number}","milestones_url":"https://api.github.com/repos/magmo/force-move-games/milestones{/number}","notifications_url":"https://api.github.com/repos/magmo/force-move-games/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/magmo/force-move-games/labels{/name}","releases_url":"https://api.github.com/repos/magmo/force-move-games/releases{/id}","deployments_url":"https://api.github.com/repos/magmo/force-move-games/deployments","created_at":"2018-04-11T21:39:44Z","updated_at":"2018-10-01T03:11:51Z","pushed_at":"2018-10-04T21:39:20Z","git_url":"git://github.com/magmo/force-move-games.git","ssh_url":"git@github.com:magmo/force-move-games.git","clone_url":"https://github.com/magmo/force-move-games.git","svn_url":"https://github.com/magmo/force-move-games","homepage":"","size":903,"stargazers_count":32,"watchers_count":32,"language":"Solidity","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":3,"open_issues":3,"watchers":32,"default_branch":"master"}},"base":{"label":"magmo:master","ref":"master","sha":"d0714f05c172d7622b743c1002b2e919cba432df","user":{"login":"magmo","id":36650395,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NjUwMzk1","avatar_url":"https://avatars2.githubusercontent.com/u/36650395?v=4","gravatar_id":"","url":"https://api.github.com/users/magmo","html_url":"https://github.com/magmo","followers_url":"https://api.github.com/users/magmo/followers","following_url":"https://api.github.com/users/magmo/following{/other_user}","gists_url":"https://api.github.com/users/magmo/gists{/gist_id}","starred_url":"https://api.github.com/users/magmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magmo/subscriptions","organizations_url":"https://api.github.com/users/magmo/orgs","repos_url":"https://api.github.com/users/magmo/repos","events_url":"https://api.github.com/users/magmo/events{/privacy}","received_events_url":"https://api.github.com/users/magmo/received_events","type":"Organization","site_admin":false},"repo":{"id":129157317,"node_id":"MDEwOlJlcG9zaXRvcnkxMjkxNTczMTc=","name":"force-move-games","full_name":"magmo/force-move-games","private":false,"owner":{"login":"magmo","id":36650395,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NjUwMzk1","avatar_url":"https://avatars2.githubusercontent.com/u/36650395?v=4","gravatar_id":"","url":"https://api.github.com/users/magmo","html_url":"https://github.com/magmo","followers_url":"https://api.github.com/users/magmo/followers","following_url":"https://api.github.com/users/magmo/following{/other_user}","gists_url":"https://api.github.com/users/magmo/gists{/gist_id}","starred_url":"https://api.github.com/users/magmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magmo/subscriptions","organizations_url":"https://api.github.com/users/magmo/orgs","repos_url":"https://api.github.com/users/magmo/repos","events_url":"https://api.github.com/users/magmo/events{/privacy}","received_events_url":"https://api.github.com/users/magmo/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/magmo/force-move-games","description":"A minimal viable force-move-games implementation","fork":false,"url":"https://api.github.com/repos/magmo/force-move-games","forks_url":"https://api.github.com/repos/magmo/force-move-games/forks","keys_url":"https://api.github.com/repos/magmo/force-move-games/keys{/key_id}","collaborators_url":"https://api.github.com/repos/magmo/force-move-games/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/magmo/force-move-games/teams","hooks_url":"https://api.github.com/repos/magmo/force-move-games/hooks","issue_events_url":"https://api.github.com/repos/magmo/force-move-games/issues/events{/number}","events_url":"https://api.github.com/repos/magmo/force-move-games/events","assignees_url":"https://api.github.com/repos/magmo/force-move-games/assignees{/user}","branches_url":"https://api.github.com/repos/magmo/force-move-games/branches{/branch}","tags_url":"https://api.github.com/repos/magmo/force-move-games/tags","blobs_url":"https://api.github.com/repos/magmo/force-move-games/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/magmo/force-move-games/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/magmo/force-move-games/git/refs{/sha}","trees_url":"https://api.github.com/repos/magmo/force-move-games/git/trees{/sha}","statuses_url":"https://api.github.com/repos/magmo/force-move-games/statuses/{sha}","languages_url":"https://api.github.com/repos/magmo/force-move-games/languages","stargazers_url":"https://api.github.com/repos/magmo/force-move-games/stargazers","contributors_url":"https://api.github.com/repos/magmo/force-move-games/contributors","subscribers_url":"https://api.github.com/repos/magmo/force-move-games/subscribers","subscription_url":"https://api.github.com/repos/magmo/force-move-games/subscription","commits_url":"https://api.github.com/repos/magmo/force-move-games/commits{/sha}","git_commits_url":"https://api.github.com/repos/magmo/force-move-games/git/commits{/sha}","comments_url":"https://api.github.com/repos/magmo/force-move-games/comments{/number}","issue_comment_url":"https://api.github.com/repos/magmo/force-move-games/issues/comments{/number}","contents_url":"https://api.github.com/repos/magmo/force-move-games/contents/{+path}","compare_url":"https://api.github.com/repos/magmo/force-move-games/compare/{base}...{head}","merges_url":"https://api.github.com/repos/magmo/force-move-games/merges","archive_url":"https://api.github.com/repos/magmo/force-move-games/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/magmo/force-move-games/downloads","issues_url":"https://api.github.com/repos/magmo/force-move-games/issues{/number}","pulls_url":"https://api.github.com/repos/magmo/force-move-games/pulls{/number}","milestones_url":"https://api.github.com/repos/magmo/force-move-games/milestones{/number}","notifications_url":"https://api.github.com/repos/magmo/force-move-games/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/magmo/force-move-games/labels{/name}","releases_url":"https://api.github.com/repos/magmo/force-move-games/releases{/id}","deployments_url":"https://api.github.com/repos/magmo/force-move-games/deployments","created_at":"2018-04-11T21:39:44Z","updated_at":"2018-10-01T03:11:51Z","pushed_at":"2018-10-04T21:39:20Z","git_url":"git://github.com/magmo/force-move-games.git","ssh_url":"git@github.com:magmo/force-move-games.git","clone_url":"https://github.com/magmo/force-move-games.git","svn_url":"https://github.com/magmo/force-move-games","homepage":"","size":903,"stargazers_count":32,"watchers_count":32,"language":"Solidity","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":3,"open_issues":3,"watchers":32,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/magmo/force-move-games/pulls/30"},"html":{"href":"https://github.com/magmo/force-move-games/pull/30"},"issue":{"href":"https://api.github.com/repos/magmo/force-move-games/issues/30"},"comments":{"href":"https://api.github.com/repos/magmo/force-move-games/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/magmo/force-move-games/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/magmo/force-move-games/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/magmo/force-move-games/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/magmo/force-move-games/statuses/262b64a9613fc9eb9cd6b6b84fd6d9f653a88c1a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"tomclose"}}