Compare commits

...
2 Commits
Author SHA1 Message Date
Github Actions c03068f0ec [CI Skip] release/stable 4.16.2
skip-checks: true
2021-06-27 04:03:48 +00:00
Jaco e8f352930d Correct CompactAssignments & RawSolution types for Polkadot (#3705)
* Correct `CompactAssignments` & `RawSolution` types for Polkadot

* Default to Solution 16
2021-06-27 05:55:11 +02:00
26 changed files with 98 additions and 95 deletions
+2
View File
@@ -23,3 +23,5 @@
4.7.2
4.9.2
4.11.2
4.16.2
+9
View File
@@ -1,5 +1,14 @@
# CHANGELOG
## 4.16.2 Jun 27, 2021
Upgrade priority: Low. Recommended for Polkadot with runtime >= 9050.
Changes:
- Correct `CompactAssignments` & `RawSolution` types for Polkadot
## 4.16.1 Jun 26, 2021
Upgrade priority: Low. Recommended for full from-genesis queries on Kusama.
+1 -1
View File
@@ -34,5 +34,5 @@
"@types/jest": "^26.0.23",
"copyfiles": "^2.4.1"
},
"version": "4.16.1"
"version": "4.16.2"
}
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/api-contract",
"version": "4.16.1",
"version": "4.16.2",
"type": "module",
"description": "Interfaces for interacting with contracts and contract ABIs",
"main": "index.js",
@@ -20,8 +20,8 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-contract#readme",
"dependencies": {
"@babel/runtime": "^7.14.6",
"@polkadot/api": "4.16.1",
"@polkadot/types": "4.16.1",
"@polkadot/api": "4.16.2",
"@polkadot/types": "4.16.2",
"@polkadot/util": "^6.10.1",
"@polkadot/x-rxjs": "^6.10.1"
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/api-contract', version: '4.16.1' };
export const packageInfo = { name: '@polkadot/api-contract', version: '4.16.2' };
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/api-derive",
"version": "4.16.1",
"version": "4.16.2",
"type": "module",
"description": "Common functions used across Polkadot, derived from RPC calls and storage queries.",
"main": "index.js",
@@ -20,15 +20,15 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-derive#readme",
"dependencies": {
"@babel/runtime": "^7.14.6",
"@polkadot/api": "4.16.1",
"@polkadot/rpc-core": "4.16.1",
"@polkadot/types": "4.16.1",
"@polkadot/api": "4.16.2",
"@polkadot/rpc-core": "4.16.2",
"@polkadot/types": "4.16.2",
"@polkadot/util": "^6.10.1",
"@polkadot/util-crypto": "^6.10.1",
"@polkadot/x-rxjs": "^6.10.1"
},
"devDependencies": {
"@polkadot/keyring": "^6.10.1",
"@polkadot/rpc-provider": "4.16.1"
"@polkadot/rpc-provider": "4.16.2"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/api-derive', version: '4.16.1' };
export const packageInfo = { name: '@polkadot/api-derive', version: '4.16.2' };
+7 -7
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/api",
"version": "4.16.1",
"version": "4.16.2",
"type": "module",
"description": "Promise and RxJS wrappers around the Polkadot JS RPC",
"main": "index.js",
@@ -20,13 +20,13 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api#readme",
"dependencies": {
"@babel/runtime": "^7.14.6",
"@polkadot/api-derive": "4.16.1",
"@polkadot/api-derive": "4.16.2",
"@polkadot/keyring": "^6.10.1",
"@polkadot/metadata": "4.16.1",
"@polkadot/rpc-core": "4.16.1",
"@polkadot/rpc-provider": "4.16.1",
"@polkadot/types": "4.16.1",
"@polkadot/types-known": "4.16.1",
"@polkadot/metadata": "4.16.2",
"@polkadot/rpc-core": "4.16.2",
"@polkadot/rpc-provider": "4.16.2",
"@polkadot/types": "4.16.2",
"@polkadot/types-known": "4.16.2",
"@polkadot/util": "^6.10.1",
"@polkadot/util-crypto": "^6.10.1",
"@polkadot/x-rxjs": "^6.10.1",
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/api', version: '4.16.1' };
export const packageInfo = { name: '@polkadot/api', version: '4.16.2' };
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/metadata",
"version": "4.16.1",
"version": "4.16.2",
"type": "module",
"description": "Helpers to extract information from runtime metadata",
"main": "index.js",
@@ -20,8 +20,8 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/type-metadata#readme",
"dependencies": {
"@babel/runtime": "^7.14.6",
"@polkadot/types": "4.16.1",
"@polkadot/types-known": "4.16.1",
"@polkadot/types": "4.16.2",
"@polkadot/types-known": "4.16.2",
"@polkadot/util": "^6.10.1",
"@polkadot/util-crypto": "^6.10.1"
},
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/metadata', version: '4.16.1' };
export const packageInfo = { name: '@polkadot/metadata', version: '4.16.2' };
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/rpc-core",
"version": "4.16.1",
"version": "4.16.2",
"type": "module",
"description": "A JavaScript wrapper for the Polkadot JsonRPC interface",
"main": "index.js",
@@ -20,9 +20,9 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-core#readme",
"dependencies": {
"@babel/runtime": "^7.14.6",
"@polkadot/metadata": "4.16.1",
"@polkadot/rpc-provider": "4.16.1",
"@polkadot/types": "4.16.1",
"@polkadot/metadata": "4.16.2",
"@polkadot/rpc-provider": "4.16.2",
"@polkadot/types": "4.16.2",
"@polkadot/util": "^6.10.1",
"@polkadot/x-rxjs": "^6.10.1"
},
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/rpc-core', version: '4.16.1' };
export const packageInfo = { name: '@polkadot/rpc-core', version: '4.16.2' };
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/rpc-provider",
"version": "4.16.1",
"version": "4.16.2",
"type": "module",
"description": "Transport providers for the API",
"main": "index.js",
@@ -20,7 +20,7 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-provider#readme",
"dependencies": {
"@babel/runtime": "^7.14.6",
"@polkadot/types": "4.16.1",
"@polkadot/types": "4.16.2",
"@polkadot/util": "^6.10.1",
"@polkadot/util-crypto": "^6.10.1",
"@polkadot/x-fetch": "^6.10.1",
@@ -30,7 +30,7 @@
},
"devDependencies": {
"@polkadot/keyring": "^6.10.1",
"@polkadot/metadata": "4.16.1",
"@polkadot/metadata": "4.16.2",
"mock-socket": "^9.0.3",
"nock": "^13.1.0"
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/rpc-provider', version: '4.16.1' };
export const packageInfo = { name: '@polkadot/rpc-provider', version: '4.16.2' };
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/typegen",
"version": "4.16.1",
"version": "4.16.2",
"type": "module",
"description": "Type generation scripts",
"main": "index.js",
@@ -29,10 +29,10 @@
"@babel/core": "^7.14.6",
"@babel/register": "^7.14.5",
"@babel/runtime": "^7.14.6",
"@polkadot/api": "4.16.1",
"@polkadot/metadata": "4.16.1",
"@polkadot/rpc-provider": "4.16.1",
"@polkadot/types": "4.16.1",
"@polkadot/api": "4.16.2",
"@polkadot/metadata": "4.16.2",
"@polkadot/rpc-provider": "4.16.2",
"@polkadot/types": "4.16.2",
"@polkadot/util": "^6.10.1",
"handlebars": "^4.7.7",
"websocket": "^1.0.34",
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/typegen', version: '4.16.1' };
export const packageInfo = { name: '@polkadot/typegen', version: '4.16.2' };
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/types-known",
"version": "4.16.1",
"version": "4.16.2",
"type": "module",
"description": "A JavaScript wrapper for the Polkadot JsonRPC interface",
"main": "index.js",
@@ -21,7 +21,7 @@
"dependencies": {
"@babel/runtime": "^7.14.6",
"@polkadot/networks": "^6.10.1",
"@polkadot/types": "4.16.1",
"@polkadot/types": "4.16.2",
"@polkadot/util": "^6.10.1"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/types-known', version: '4.16.1' };
export const packageInfo = { name: '@polkadot/types-known', version: '4.16.2' };
+4 -2
View File
@@ -6,6 +6,8 @@
import type { OverrideVersionedType } from '@polkadot/types/types';
const sharedTypes = {
CompactAssignments: 'CompactAssignmentsWith24',
RawSolution: 'RawSolutionWith24',
Keys: 'SessionKeys6',
ProxyType: {
_enum: ['Any', 'NonTransfer', 'Governance', 'Staking', 'IdentityJudgement', 'CancelProxy']
@@ -16,9 +18,9 @@ const addrIndicesTypes = {
AccountInfo: 'AccountInfoWithRefCount',
Address: 'LookupSource',
CompactAssignments: 'CompactAssignmentsWith16',
RawSolution: 'RawSolutionWith16',
Keys: 'SessionKeys5',
LookupSource: 'IndicesLookupSource',
RawSolution: 'RawSolutionWith16',
ValidatorPrefs: 'ValidatorPrefsWithCommission'
};
@@ -26,9 +28,9 @@ const addrAccountIdTypes = {
AccountInfo: 'AccountInfoWithRefCount',
Address: 'AccountId',
CompactAssignments: 'CompactAssignmentsWith16',
RawSolution: 'RawSolutionWith16',
Keys: 'SessionKeys5',
LookupSource: 'AccountId',
RawSolution: 'RawSolutionWith16',
ValidatorPrefs: 'ValidatorPrefsWithCommission'
};
+3 -13
View File
@@ -6,6 +6,8 @@
import type { OverrideVersionedType } from '@polkadot/types/types';
const sharedTypes = {
CompactAssignments: 'CompactAssignmentsWith16',
RawSolution: 'RawSolutionWith16',
Keys: 'SessionKeys6',
ProxyType: {
_enum: {
@@ -23,10 +25,8 @@ const sharedTypes = {
const addrAccountIdTypes = {
AccountInfo: 'AccountInfoWithRefCount',
Address: 'AccountId',
CompactAssignments: 'CompactAssignmentsWith16',
Keys: 'SessionKeys5',
LookupSource: 'AccountId',
RawSolution: 'RawSolutionWith16',
ValidatorPrefs: 'ValidatorPrefsWithCommission'
};
@@ -70,21 +70,11 @@ const versioned: OverrideVersionedType[] = [
minmax: [28, 29],
types: {
...sharedTypes,
CompactAssignments: 'CompactAssignmentsWith16',
RawSolution: 'RawSolutionWith16',
AccountInfo: 'AccountInfoWithDualRefCount'
}
},
{
minmax: [30, 9000],
types: {
...sharedTypes,
CompactAssignments: 'CompactAssignmentsWith16',
RawSolution: 'RawSolutionWith16'
}
},
{
minmax: [9010, undefined],
minmax: [30, undefined],
types: {
...sharedTypes
}
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/types",
"version": "4.16.1",
"version": "4.16.2",
"type": "module",
"description": "Implementation of the Parity codec",
"main": "index.js",
@@ -20,7 +20,7 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types#readme",
"dependencies": {
"@babel/runtime": "^7.14.6",
"@polkadot/metadata": "4.16.1",
"@polkadot/metadata": "4.16.2",
"@polkadot/util": "^6.10.1",
"@polkadot/util-crypto": "^6.10.1",
"@polkadot/x-rxjs": "^6.10.1"
@@ -15,7 +15,7 @@ const deprecated = {
};
const phragmen = {
CompactAssignments: 'CompactAssignmentsWith24',
CompactAssignments: 'CompactAssignmentsWith16',
CompactAssignmentsWith16: {
votes1: 'Vec<(NominatorIndexCompact, ValidatorIndexCompact)>',
votes2: 'Vec<(NominatorIndexCompact, CompactScoreCompact, ValidatorIndexCompact)>',
@@ -111,7 +111,7 @@ const phragmen = {
}
},
ExtendedBalance: 'u128',
RawSolution: 'RawSolutionWith24',
RawSolution: 'RawSolutionWith16',
RawSolutionWith16: {
compact: 'CompactAssignmentsWith16',
score: 'ElectionScore',
@@ -12,7 +12,7 @@ export interface ActiveEraInfo extends Struct {
}
/** @name CompactAssignments */
export interface CompactAssignments extends CompactAssignmentsWith24 {}
export interface CompactAssignments extends CompactAssignmentsWith16 {}
/** @name CompactAssignmentsTo257 */
export interface CompactAssignmentsTo257 extends Struct {
@@ -207,7 +207,7 @@ export interface PhragmenScore extends Vec<u128> {}
export interface Points extends u32 {}
/** @name RawSolution */
export interface RawSolution extends RawSolutionWith24 {}
export interface RawSolution extends RawSolutionWith16 {}
/** @name RawSolutionTo265 */
export interface RawSolutionTo265 extends RawSolutionWith16 {}
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/types', version: '4.16.1' };
export const packageInfo = { name: '@polkadot/types', version: '4.16.2' };
+32 -32
View File
@@ -1849,41 +1849,41 @@ __metadata:
resolution: "@polkadot/api-contract@workspace:packages/api-contract"
dependencies:
"@babel/runtime": ^7.14.6
"@polkadot/api": 4.16.1
"@polkadot/types": 4.16.1
"@polkadot/api": 4.16.2
"@polkadot/types": 4.16.2
"@polkadot/util": ^6.10.1
"@polkadot/x-rxjs": ^6.10.1
languageName: unknown
linkType: soft
"@polkadot/api-derive@4.16.1, @polkadot/api-derive@workspace:packages/api-derive":
"@polkadot/api-derive@4.16.2, @polkadot/api-derive@workspace:packages/api-derive":
version: 0.0.0-use.local
resolution: "@polkadot/api-derive@workspace:packages/api-derive"
dependencies:
"@babel/runtime": ^7.14.6
"@polkadot/api": 4.16.1
"@polkadot/api": 4.16.2
"@polkadot/keyring": ^6.10.1
"@polkadot/rpc-core": 4.16.1
"@polkadot/rpc-provider": 4.16.1
"@polkadot/types": 4.16.1
"@polkadot/rpc-core": 4.16.2
"@polkadot/rpc-provider": 4.16.2
"@polkadot/types": 4.16.2
"@polkadot/util": ^6.10.1
"@polkadot/util-crypto": ^6.10.1
"@polkadot/x-rxjs": ^6.10.1
languageName: unknown
linkType: soft
"@polkadot/api@4.16.1, @polkadot/api@workspace:packages/api":
"@polkadot/api@4.16.2, @polkadot/api@workspace:packages/api":
version: 0.0.0-use.local
resolution: "@polkadot/api@workspace:packages/api"
dependencies:
"@babel/runtime": ^7.14.6
"@polkadot/api-derive": 4.16.1
"@polkadot/api-derive": 4.16.2
"@polkadot/keyring": ^6.10.1
"@polkadot/metadata": 4.16.1
"@polkadot/rpc-core": 4.16.1
"@polkadot/rpc-provider": 4.16.1
"@polkadot/types": 4.16.1
"@polkadot/types-known": 4.16.1
"@polkadot/metadata": 4.16.2
"@polkadot/rpc-core": 4.16.2
"@polkadot/rpc-provider": 4.16.2
"@polkadot/types": 4.16.2
"@polkadot/types-known": 4.16.2
"@polkadot/util": ^6.10.1
"@polkadot/util-crypto": ^6.10.1
"@polkadot/x-rxjs": ^6.10.1
@@ -1991,14 +1991,14 @@ __metadata:
languageName: node
linkType: hard
"@polkadot/metadata@4.16.1, @polkadot/metadata@workspace:packages/metadata":
"@polkadot/metadata@4.16.2, @polkadot/metadata@workspace:packages/metadata":
version: 0.0.0-use.local
resolution: "@polkadot/metadata@workspace:packages/metadata"
dependencies:
"@babel/runtime": ^7.14.6
"@polkadot/keyring": ^6.10.1
"@polkadot/types": 4.16.1
"@polkadot/types-known": 4.16.1
"@polkadot/types": 4.16.2
"@polkadot/types-known": 4.16.2
"@polkadot/util": ^6.10.1
"@polkadot/util-crypto": ^6.10.1
languageName: unknown
@@ -2013,28 +2013,28 @@ __metadata:
languageName: node
linkType: hard
"@polkadot/rpc-core@4.16.1, @polkadot/rpc-core@workspace:packages/rpc-core":
"@polkadot/rpc-core@4.16.2, @polkadot/rpc-core@workspace:packages/rpc-core":
version: 0.0.0-use.local
resolution: "@polkadot/rpc-core@workspace:packages/rpc-core"
dependencies:
"@babel/runtime": ^7.14.6
"@polkadot/keyring": ^6.10.1
"@polkadot/metadata": 4.16.1
"@polkadot/rpc-provider": 4.16.1
"@polkadot/types": 4.16.1
"@polkadot/metadata": 4.16.2
"@polkadot/rpc-provider": 4.16.2
"@polkadot/types": 4.16.2
"@polkadot/util": ^6.10.1
"@polkadot/x-rxjs": ^6.10.1
languageName: unknown
linkType: soft
"@polkadot/rpc-provider@4.16.1, @polkadot/rpc-provider@workspace:packages/rpc-provider":
"@polkadot/rpc-provider@4.16.2, @polkadot/rpc-provider@workspace:packages/rpc-provider":
version: 0.0.0-use.local
resolution: "@polkadot/rpc-provider@workspace:packages/rpc-provider"
dependencies:
"@babel/runtime": ^7.14.6
"@polkadot/keyring": ^6.10.1
"@polkadot/metadata": 4.16.1
"@polkadot/types": 4.16.1
"@polkadot/metadata": 4.16.2
"@polkadot/types": 4.16.2
"@polkadot/util": ^6.10.1
"@polkadot/util-crypto": ^6.10.1
"@polkadot/x-fetch": ^6.10.1
@@ -2062,10 +2062,10 @@ __metadata:
"@babel/core": ^7.14.6
"@babel/register": ^7.14.5
"@babel/runtime": ^7.14.6
"@polkadot/api": 4.16.1
"@polkadot/metadata": 4.16.1
"@polkadot/rpc-provider": 4.16.1
"@polkadot/types": 4.16.1
"@polkadot/api": 4.16.2
"@polkadot/metadata": 4.16.2
"@polkadot/rpc-provider": 4.16.2
"@polkadot/types": 4.16.2
"@polkadot/util": ^6.10.1
"@types/websocket": ^1.0.2
"@types/yargs": ^17.0.0
@@ -2081,24 +2081,24 @@ __metadata:
languageName: unknown
linkType: soft
"@polkadot/types-known@4.16.1, @polkadot/types-known@workspace:packages/types-known":
"@polkadot/types-known@4.16.2, @polkadot/types-known@workspace:packages/types-known":
version: 0.0.0-use.local
resolution: "@polkadot/types-known@workspace:packages/types-known"
dependencies:
"@babel/runtime": ^7.14.6
"@polkadot/networks": ^6.10.1
"@polkadot/types": 4.16.1
"@polkadot/types": 4.16.2
"@polkadot/util": ^6.10.1
languageName: unknown
linkType: soft
"@polkadot/types@4.16.1, @polkadot/types@workspace:packages/types":
"@polkadot/types@4.16.2, @polkadot/types@workspace:packages/types":
version: 0.0.0-use.local
resolution: "@polkadot/types@workspace:packages/types"
dependencies:
"@babel/runtime": ^7.14.6
"@polkadot/keyring": ^6.10.1
"@polkadot/metadata": 4.16.1
"@polkadot/metadata": 4.16.2
"@polkadot/util": ^6.10.1
"@polkadot/util-crypto": ^6.10.1
"@polkadot/x-rxjs": ^6.10.1