{"action":"created","comment":{"url":"https://api.github.com/repos/polkadot-js/api/pulls/comments/228852048","pull_request_review_id":169211197,"id":228852048,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyODg1MjA0OA==","diff_hunk":"@@ -93,11 +111,35 @@ export default class Compact extends UInt {\n     );\n   }\n \n+  get bitLength (): UIntBitLength {\n+    return this.raw.bitLength;\n+  }\n+\n   get encodedLength (): number {\n     return this.toU8a().length;\n   }\n \n+  toBn (): any {","path":"packages/types/src/codec/Compact.ts","position":76,"original_position":75,"commit_id":"a763f3f45bccce9d7a6c4c480210e7ac260b0b05","original_commit_id":"a72f36c6865610bf08e6c7e1c1eb858603b2ab89","user":{"login":"jacogr","id":1424473,"node_id":"MDQ6VXNlcjE0MjQ0NzM=","avatar_url":"https://avatars2.githubusercontent.com/u/1424473?v=4","gravatar_id":"","url":"https://api.github.com/users/jacogr","html_url":"https://github.com/jacogr","followers_url":"https://api.github.com/users/jacogr/followers","following_url":"https://api.github.com/users/jacogr/following{/other_user}","gists_url":"https://api.github.com/users/jacogr/gists{/gist_id}","starred_url":"https://api.github.com/users/jacogr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacogr/subscriptions","organizations_url":"https://api.github.com/users/jacogr/orgs","repos_url":"https://api.github.com/users/jacogr/repos","events_url":"https://api.github.com/users/jacogr/events{/privacy}","received_events_url":"https://api.github.com/users/jacogr/received_events","type":"User","site_admin":false},"body":"... the above is a slight issue since we can either Compact UInt or Moment now.","created_at":"2018-10-29T09:35:41Z","updated_at":"2018-10-29T09:35:41Z","html_url":"https://github.com/polkadot-js/api/pull/358#discussion_r228852048","pull_request_url":"https://api.github.com/repos/polkadot-js/api/pulls/358","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/polkadot-js/api/pulls/comments/228852048"},"html":{"href":"https://github.com/polkadot-js/api/pull/358#discussion_r228852048"},"pull_request":{"href":"https://api.github.com/repos/polkadot-js/api/pulls/358"}},"in_reply_to_id":228833252},"pull_request":{"url":"https://api.github.com/repos/polkadot-js/api/pulls/358","id":226457313,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2NDU3MzEz","html_url":"https://github.com/polkadot-js/api/pull/358","diff_url":"https://github.com/polkadot-js/api/pull/358.diff","patch_url":"https://github.com/polkadot-js/api/pull/358.patch","issue_url":"https://api.github.com/repos/polkadot-js/api/issues/358","number":358,"state":"open","locked":false,"title":"Decode meta <T as HasCompact>::Type","user":{"login":"jacogr","id":1424473,"node_id":"MDQ6VXNlcjE0MjQ0NzM=","avatar_url":"https://avatars2.githubusercontent.com/u/1424473?v=4","gravatar_id":"","url":"https://api.github.com/users/jacogr","html_url":"https://github.com/jacogr","followers_url":"https://api.github.com/users/jacogr/followers","following_url":"https://api.github.com/users/jacogr/following{/other_user}","gists_url":"https://api.github.com/users/jacogr/gists{/gist_id}","starred_url":"https://api.github.com/users/jacogr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacogr/subscriptions","organizations_url":"https://api.github.com/users/jacogr/orgs","repos_url":"https://api.github.com/users/jacogr/repos","events_url":"https://api.github.com/users/jacogr/events{/privacy}","received_events_url":"https://api.github.com/users/jacogr/received_events","type":"User","site_admin":false},"body":"Handle `Compact<u32>` (existing) and `<T::BlockNumber as HasCompact>::Type` encodings on latest substrate master, (see https://github.com/polkadot-js/api/pull/356#issuecomment-433743891)\r\n\r\n- [x] Allow `Compact<*>` (previously stripped via generics)\r\n- [x] Allow `<T::BlockNumber as HasCompact>::Type`, consistent with first def\r\n- [x] Convert `Compact` to operate as `Compact.with(UInt)`\r\n- [x] Construct new `Compact<*>` types via `createType`\r\n- [x] Allow `Compact<Moment>` (underlying here is `Date`)\r\n- [x] Remove all `CompactU{16,32,64,128,256}` types (these are now unused)\r\n\r\nResults -\r\n```\r\n[\r\n      '()',\r\n      '(Balance, Vec<AccountId>)',\r\n      '(BlockNumber, Proposal, VoteThreshold)',\r\n      '(BlockNumber, Vec<AccountId>)',\r\n      '(BlockNumber, u32, Vec<AccountId>)',\r\n      '(Hash, AccountId)',\r\n      '(ProposalIndex, u32, Vec<AccountId>, Vec<AccountId>)',\r\n      '(ReferendumIndex, AccountId)',\r\n      '(VoteIndex, u32)',\r\n      'AccountId',\r\n      'AccountIndex',\r\n      'Address',\r\n      'Balance',\r\n      'BlockNumber',\r\n      'Bytes',\r\n      'Compact<Balance>',\r\n      'Compact<BlockNumber>',\r\n      'Compact<Gas>',\r\n      'Compact<Moment>',\r\n      'Compact<PropIndex>',\r\n      'Compact<ProposalIndex>',\r\n      'Compact<ReferendumIndex>',\r\n      'Compact<VoteIndex>',\r\n      'Compact<u32>',\r\n      'Digest',\r\n      'Hash',\r\n      'Index',\r\n      'Moment',\r\n      'NewAccountOutcome',\r\n      'PairOf<Balance>',\r\n      'Perbill',\r\n      'Permill',\r\n      'PropIndex',\r\n      'Proposal',\r\n      'ProposalIndex',\r\n      'ReferendumIndex',\r\n      'SessionKey',\r\n      'ValidatorPrefs',\r\n      'Vec<(AccountId, BlockNumber)>',\r\n      'Vec<(Balance, AccountId)>',\r\n      'Vec<(BlockNumber, Hash)>',\r\n      'Vec<(PropIndex, Proposal, AccountId)>',\r\n      'Vec<AccountId>',\r\n      'Vec<Balance>',\r\n      'Vec<EventRecord>',\r\n      'Vec<Hash>',\r\n      'Vec<KeyValue>',\r\n      'Vec<ProposalIndex>',\r\n      'Vec<SessionKey>',\r\n      'Vec<bool>',\r\n      'Vec<u32>',\r\n      'VoteIndex',\r\n      'VoteThreshold',\r\n      'bool',\r\n      'u32',\r\n      'u64'\r\n]\r\n```\r\n\r\nTODO:\r\n\r\n- Update static meta to pull in new Compact formats (not in this PR, a number of tests would need updates to cater for this as signatures have changed)","created_at":"2018-10-29T07:07:20Z","updated_at":"2018-10-29T09:35:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d57a2668de0d976789438627e399aa346314d44b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/polkadot-js/api/pulls/358/commits","review_comments_url":"https://api.github.com/repos/polkadot-js/api/pulls/358/comments","review_comment_url":"https://api.github.com/repos/polkadot-js/api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/polkadot-js/api/issues/358/comments","statuses_url":"https://api.github.com/repos/polkadot-js/api/statuses/a763f3f45bccce9d7a6c4c480210e7ac260b0b05","head":{"label":"polkadot-js:jg-meta-compact","ref":"jg-meta-compact","sha":"a763f3f45bccce9d7a6c4c480210e7ac260b0b05","user":{"login":"polkadot-js","id":33775474,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzNzc1NDc0","avatar_url":"https://avatars2.githubusercontent.com/u/33775474?v=4","gravatar_id":"","url":"https://api.github.com/users/polkadot-js","html_url":"https://github.com/polkadot-js","followers_url":"https://api.github.com/users/polkadot-js/followers","following_url":"https://api.github.com/users/polkadot-js/following{/other_user}","gists_url":"https://api.github.com/users/polkadot-js/gists{/gist_id}","starred_url":"https://api.github.com/users/polkadot-js/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/polkadot-js/subscriptions","organizations_url":"https://api.github.com/users/polkadot-js/orgs","repos_url":"https://api.github.com/users/polkadot-js/repos","events_url":"https://api.github.com/users/polkadot-js/events{/privacy}","received_events_url":"https://api.github.com/users/polkadot-js/received_events","type":"Organization","site_admin":false},"repo":{"id":111184073,"node_id":"MDEwOlJlcG9zaXRvcnkxMTExODQwNzM=","name":"api","full_name":"polkadot-js/api","private":false,"owner":{"login":"polkadot-js","id":33775474,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzNzc1NDc0","avatar_url":"https://avatars2.githubusercontent.com/u/33775474?v=4","gravatar_id":"","url":"https://api.github.com/users/polkadot-js","html_url":"https://github.com/polkadot-js","followers_url":"https://api.github.com/users/polkadot-js/followers","following_url":"https://api.github.com/users/polkadot-js/following{/other_user}","gists_url":"https://api.github.com/users/polkadot-js/gists{/gist_id}","starred_url":"https://api.github.com/users/polkadot-js/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/polkadot-js/subscriptions","organizations_url":"https://api.github.com/users/polkadot-js/orgs","repos_url":"https://api.github.com/users/polkadot-js/repos","events_url":"https://api.github.com/users/polkadot-js/events{/privacy}","received_events_url":"https://api.github.com/users/polkadot-js/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/polkadot-js/api","description":"Promise and RxJS APIs around Substrate RPC calls. Documentation & example available","fork":false,"url":"https://api.github.com/repos/polkadot-js/api","forks_url":"https://api.github.com/repos/polkadot-js/api/forks","keys_url":"https://api.github.com/repos/polkadot-js/api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/polkadot-js/api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/polkadot-js/api/teams","hooks_url":"https://api.github.com/repos/polkadot-js/api/hooks","issue_events_url":"https://api.github.com/repos/polkadot-js/api/issues/events{/number}","events_url":"https://api.github.com/repos/polkadot-js/api/events","assignees_url":"https://api.github.com/repos/polkadot-js/api/assignees{/user}","branches_url":"https://api.github.com/repos/polkadot-js/api/branches{/branch}","tags_url":"https://api.github.com/repos/polkadot-js/api/tags","blobs_url":"https://api.github.com/repos/polkadot-js/api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/polkadot-js/api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/polkadot-js/api/git/refs{/sha}","trees_url":"https://api.github.com/repos/polkadot-js/api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/polkadot-js/api/statuses/{sha}","languages_url":"https://api.github.com/repos/polkadot-js/api/languages","stargazers_url":"https://api.github.com/repos/polkadot-js/api/stargazers","contributors_url":"https://api.github.com/repos/polkadot-js/api/contributors","subscribers_url":"https://api.github.com/repos/polkadot-js/api/subscribers","subscription_url":"https://api.github.com/repos/polkadot-js/api/subscription","commits_url":"https://api.github.com/repos/polkadot-js/api/commits{/sha}","git_commits_url":"https://api.github.com/repos/polkadot-js/api/git/commits{/sha}","comments_url":"https://api.github.com/repos/polkadot-js/api/comments{/number}","issue_comment_url":"https://api.github.com/repos/polkadot-js/api/issues/comments{/number}","contents_url":"https://api.github.com/repos/polkadot-js/api/contents/{+path}","compare_url":"https://api.github.com/repos/polkadot-js/api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/polkadot-js/api/merges","archive_url":"https://api.github.com/repos/polkadot-js/api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/polkadot-js/api/downloads","issues_url":"https://api.github.com/repos/polkadot-js/api/issues{/number}","pulls_url":"https://api.github.com/repos/polkadot-js/api/pulls{/number}","milestones_url":"https://api.github.com/repos/polkadot-js/api/milestones{/number}","notifications_url":"https://api.github.com/repos/polkadot-js/api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/polkadot-js/api/labels{/name}","releases_url":"https://api.github.com/repos/polkadot-js/api/releases{/id}","deployments_url":"https://api.github.com/repos/polkadot-js/api/deployments","created_at":"2017-11-18T06:56:55Z","updated_at":"2018-10-29T09:34:55Z","pushed_at":"2018-10-29T09:34:52Z","git_url":"git://github.com/polkadot-js/api.git","ssh_url":"git@github.com:polkadot-js/api.git","clone_url":"https://github.com/polkadot-js/api.git","svn_url":"https://github.com/polkadot-js/api","homepage":"https://polkadot.js.org/api/","size":8421,"stargazers_count":13,"watchers_count":13,"language":"TypeScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":25,"license":{"key":"isc","name":"ISC License","spdx_id":"ISC","url":"https://api.github.com/licenses/isc","node_id":"MDc6TGljZW5zZTEw"},"forks":7,"open_issues":25,"watchers":13,"default_branch":"master"}},"base":{"label":"polkadot-js:master","ref":"master","sha":"5b229afeedbf5bd45a250b31292638eafce75c72","user":{"login":"polkadot-js","id":33775474,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzNzc1NDc0","avatar_url":"https://avatars2.githubusercontent.com/u/33775474?v=4","gravatar_id":"","url":"https://api.github.com/users/polkadot-js","html_url":"https://github.com/polkadot-js","followers_url":"https://api.github.com/users/polkadot-js/followers","following_url":"https://api.github.com/users/polkadot-js/following{/other_user}","gists_url":"https://api.github.com/users/polkadot-js/gists{/gist_id}","starred_url":"https://api.github.com/users/polkadot-js/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/polkadot-js/subscriptions","organizations_url":"https://api.github.com/users/polkadot-js/orgs","repos_url":"https://api.github.com/users/polkadot-js/repos","events_url":"https://api.github.com/users/polkadot-js/events{/privacy}","received_events_url":"https://api.github.com/users/polkadot-js/received_events","type":"Organization","site_admin":false},"repo":{"id":111184073,"node_id":"MDEwOlJlcG9zaXRvcnkxMTExODQwNzM=","name":"api","full_name":"polkadot-js/api","private":false,"owner":{"login":"polkadot-js","id":33775474,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzNzc1NDc0","avatar_url":"https://avatars2.githubusercontent.com/u/33775474?v=4","gravatar_id":"","url":"https://api.github.com/users/polkadot-js","html_url":"https://github.com/polkadot-js","followers_url":"https://api.github.com/users/polkadot-js/followers","following_url":"https://api.github.com/users/polkadot-js/following{/other_user}","gists_url":"https://api.github.com/users/polkadot-js/gists{/gist_id}","starred_url":"https://api.github.com/users/polkadot-js/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/polkadot-js/subscriptions","organizations_url":"https://api.github.com/users/polkadot-js/orgs","repos_url":"https://api.github.com/users/polkadot-js/repos","events_url":"https://api.github.com/users/polkadot-js/events{/privacy}","received_events_url":"https://api.github.com/users/polkadot-js/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/polkadot-js/api","description":"Promise and RxJS APIs around Substrate RPC calls. Documentation & example available","fork":false,"url":"https://api.github.com/repos/polkadot-js/api","forks_url":"https://api.github.com/repos/polkadot-js/api/forks","keys_url":"https://api.github.com/repos/polkadot-js/api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/polkadot-js/api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/polkadot-js/api/teams","hooks_url":"https://api.github.com/repos/polkadot-js/api/hooks","issue_events_url":"https://api.github.com/repos/polkadot-js/api/issues/events{/number}","events_url":"https://api.github.com/repos/polkadot-js/api/events","assignees_url":"https://api.github.com/repos/polkadot-js/api/assignees{/user}","branches_url":"https://api.github.com/repos/polkadot-js/api/branches{/branch}","tags_url":"https://api.github.com/repos/polkadot-js/api/tags","blobs_url":"https://api.github.com/repos/polkadot-js/api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/polkadot-js/api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/polkadot-js/api/git/refs{/sha}","trees_url":"https://api.github.com/repos/polkadot-js/api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/polkadot-js/api/statuses/{sha}","languages_url":"https://api.github.com/repos/polkadot-js/api/languages","stargazers_url":"https://api.github.com/repos/polkadot-js/api/stargazers","contributors_url":"https://api.github.com/repos/polkadot-js/api/contributors","subscribers_url":"https://api.github.com/repos/polkadot-js/api/subscribers","subscription_url":"https://api.github.com/repos/polkadot-js/api/subscription","commits_url":"https://api.github.com/repos/polkadot-js/api/commits{/sha}","git_commits_url":"https://api.github.com/repos/polkadot-js/api/git/commits{/sha}","comments_url":"https://api.github.com/repos/polkadot-js/api/comments{/number}","issue_comment_url":"https://api.github.com/repos/polkadot-js/api/issues/comments{/number}","contents_url":"https://api.github.com/repos/polkadot-js/api/contents/{+path}","compare_url":"https://api.github.com/repos/polkadot-js/api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/polkadot-js/api/merges","archive_url":"https://api.github.com/repos/polkadot-js/api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/polkadot-js/api/downloads","issues_url":"https://api.github.com/repos/polkadot-js/api/issues{/number}","pulls_url":"https://api.github.com/repos/polkadot-js/api/pulls{/number}","milestones_url":"https://api.github.com/repos/polkadot-js/api/milestones{/number}","notifications_url":"https://api.github.com/repos/polkadot-js/api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/polkadot-js/api/labels{/name}","releases_url":"https://api.github.com/repos/polkadot-js/api/releases{/id}","deployments_url":"https://api.github.com/repos/polkadot-js/api/deployments","created_at":"2017-11-18T06:56:55Z","updated_at":"2018-10-29T09:34:55Z","pushed_at":"2018-10-29T09:34:52Z","git_url":"git://github.com/polkadot-js/api.git","ssh_url":"git@github.com:polkadot-js/api.git","clone_url":"https://github.com/polkadot-js/api.git","svn_url":"https://github.com/polkadot-js/api","homepage":"https://polkadot.js.org/api/","size":8421,"stargazers_count":13,"watchers_count":13,"language":"TypeScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":25,"license":{"key":"isc","name":"ISC License","spdx_id":"ISC","url":"https://api.github.com/licenses/isc","node_id":"MDc6TGljZW5zZTEw"},"forks":7,"open_issues":25,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/polkadot-js/api/pulls/358"},"html":{"href":"https://github.com/polkadot-js/api/pull/358"},"issue":{"href":"https://api.github.com/repos/polkadot-js/api/issues/358"},"comments":{"href":"https://api.github.com/repos/polkadot-js/api/issues/358/comments"},"review_comments":{"href":"https://api.github.com/repos/polkadot-js/api/pulls/358/comments"},"review_comment":{"href":"https://api.github.com/repos/polkadot-js/api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/polkadot-js/api/pulls/358/commits"},"statuses":{"href":"https://api.github.com/repos/polkadot-js/api/statuses/a763f3f45bccce9d7a6c4c480210e7ac260b0b05"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jacogr"}}