Skip to content

Commit 70f1fa5

Browse files
authored
2.10 (#2920)
* 2.10 * Use system.blockHashCount
1 parent 37f49b3 commit 70f1fa5

File tree

14 files changed

+96
-76
lines changed

14 files changed

+96
-76
lines changed

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# CHANGELOG
22

3+
## 2.10.1 Dec 7, 2020
4+
5+
Upgrade priority: Low. Recommended when following Substrate master and/or parachains development, contains the latest types for both.
6+
7+
- **Breaking change** If using the `staking.query` derive, you now need to pass flags as to which values to retrieve
8+
9+
Changes:
10+
11+
- Ensure that maximum era is limited to `consts.system.blockHashCount` (don't overflow on very low blocktimes)
12+
- Apply current Polkadot master parachain types
13+
- Apply current Substrate master asset types
14+
- Add `system_{addLogFilter, resetLogFilter}` RPCs
15+
- Adjust tests for latest Substrate metadata
16+
- Adjust staking derives to be more performant (flags indicate which query values to retrieve)
17+
- Add account derive to cater for the availability of identities
18+
- Use `import type` in all cases
19+
20+
321
## 2.9.1 Nov 30, 2020
422

523
Upgrade priority: Low. No major changes when on at least 2.8.2. Users encouraged to upgrade to at least that patch.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626
"@babel/core": "^7.12.9",
2727
"@babel/register": "^7.12.1",
2828
"@babel/runtime": "^7.12.5",
29-
"@polkadot/dev": "^0.60.7",
29+
"@polkadot/dev": "^0.60.8",
3030
"@polkadot/ts": "^0.3.57",
3131
"@polkadot/typegen": "workspace:packages/typegen",
3232
"@types/jest": "^26.0.16",
3333
"copyfiles": "^2.4.1"
3434
},
35-
"version": "2.9.2-13"
35+
"version": "2.10.0"
3636
}

packages/api-contract/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@polkadot/api-contract",
3-
"version": "2.9.2-13",
3+
"version": "2.10.0",
44
"description": "Interfaces for interacting with contracts and contract ABIs",
55
"main": "index.js",
66
"sideEffects": false,
@@ -17,8 +17,8 @@
1717
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-contract#readme",
1818
"dependencies": {
1919
"@babel/runtime": "^7.12.5",
20-
"@polkadot/api": "2.9.2-13",
21-
"@polkadot/types": "2.9.2-13",
20+
"@polkadot/api": "2.10.0",
21+
"@polkadot/types": "2.10.0",
2222
"@polkadot/util": "^4.2.1",
2323
"bn.js": "^4.11.9",
2424
"rxjs": "^6.6.3"

packages/api-derive/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@polkadot/api-derive",
3-
"version": "2.9.2-13",
3+
"version": "2.10.0",
44
"description": "Common functions used across Polkadot, derived from RPC calls and storage queries.",
55
"main": "index.js",
66
"sideEffects": false,
@@ -18,9 +18,9 @@
1818
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-derive#readme",
1919
"dependencies": {
2020
"@babel/runtime": "^7.12.5",
21-
"@polkadot/api": "2.9.2-13",
22-
"@polkadot/rpc-core": "2.9.2-13",
23-
"@polkadot/types": "2.9.2-13",
21+
"@polkadot/api": "2.10.0",
22+
"@polkadot/rpc-core": "2.10.0",
23+
"@polkadot/types": "2.10.0",
2424
"@polkadot/util": "^4.2.1",
2525
"@polkadot/util-crypto": "^4.2.1",
2626
"bn.js": "^4.11.9",
@@ -29,6 +29,6 @@
2929
},
3030
"devDependencies": {
3131
"@polkadot/keyring": "^4.2.1",
32-
"@polkadot/rpc-provider": "2.9.2-13"
32+
"@polkadot/rpc-provider": "2.10.0"
3333
}
3434
}

packages/api-derive/src/tx/signingInfo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export function signingInfo (_instanceId: string, api: ApiInterfaceRx): (address
6464
map(([nonce, header]) => ({
6565
header,
6666
mortalLength: Math.min(
67-
FALLBACK_MAX_HASH_COUNT,
67+
api.consts.system?.blockHashCount?.toNumber() || FALLBACK_MAX_HASH_COUNT,
6868
MORTAL_PERIOD
6969
.div(api.consts.babe?.expectedBlockTime || api.consts.timestamp?.minimumPeriod.muln(2) || FALLBACK_PERIOD)
7070
.iadd(MAX_FINALITY_LAG)

packages/api/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@polkadot/api",
3-
"version": "2.9.2-13",
3+
"version": "2.10.0",
44
"description": "Promise and RxJS wrappers around the Polkadot JS RPC",
55
"main": "index.js",
66
"sideEffects": false,
@@ -17,13 +17,13 @@
1717
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api#readme",
1818
"dependencies": {
1919
"@babel/runtime": "^7.12.5",
20-
"@polkadot/api-derive": "2.9.2-13",
20+
"@polkadot/api-derive": "2.10.0",
2121
"@polkadot/keyring": "^4.2.1",
22-
"@polkadot/metadata": "2.9.2-13",
23-
"@polkadot/rpc-core": "2.9.2-13",
24-
"@polkadot/rpc-provider": "2.9.2-13",
25-
"@polkadot/types": "2.9.2-13",
26-
"@polkadot/types-known": "2.9.2-13",
22+
"@polkadot/metadata": "2.10.0",
23+
"@polkadot/rpc-core": "2.10.0",
24+
"@polkadot/rpc-provider": "2.10.0",
25+
"@polkadot/types": "2.10.0",
26+
"@polkadot/types-known": "2.10.0",
2727
"@polkadot/util": "^4.2.1",
2828
"@polkadot/util-crypto": "^4.2.1",
2929
"bn.js": "^4.11.9",

packages/api/src/submittable/createClass.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
2929
// an instance of the base extrinsic for us to extend
3030
const ExtrinsicBase = api.registry.createClass('Extrinsic');
3131

32-
return class Submittable extends ExtrinsicBase implements SubmittableExtrinsic<ApiType> {
32+
class Submittable extends ExtrinsicBase implements SubmittableExtrinsic<ApiType> {
3333
readonly #ignoreStatusCb: boolean;
3434

3535
#transformResult: (input: ISubmittableResult) => ISubmittableResult = identity;
@@ -309,5 +309,7 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
309309
api.signer.update(updateId, status);
310310
}
311311
}
312-
};
312+
}
313+
314+
return Submittable;
313315
}

packages/metadata/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@polkadot/metadata",
3-
"version": "2.9.2-13",
3+
"version": "2.10.0",
44
"description": "Helpers to extract information from runtime metadata",
55
"main": "index.js",
66
"sideEffects": false,
@@ -16,8 +16,8 @@
1616
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/type-metadata#readme",
1717
"dependencies": {
1818
"@babel/runtime": "^7.12.5",
19-
"@polkadot/types": "2.9.2-13",
20-
"@polkadot/types-known": "2.9.2-13",
19+
"@polkadot/types": "2.10.0",
20+
"@polkadot/types-known": "2.10.0",
2121
"@polkadot/util": "^4.2.1",
2222
"@polkadot/util-crypto": "^4.2.1",
2323
"bn.js": "^4.11.9"

packages/rpc-core/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@polkadot/rpc-core",
3-
"version": "2.9.2-13",
3+
"version": "2.10.0",
44
"description": "A JavaScript wrapper for the Polkadot JsonRPC interface",
55
"main": "index.js",
66
"sideEffects": false,
@@ -17,9 +17,9 @@
1717
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-core#readme",
1818
"dependencies": {
1919
"@babel/runtime": "^7.12.5",
20-
"@polkadot/metadata": "2.9.2-13",
21-
"@polkadot/rpc-provider": "2.9.2-13",
22-
"@polkadot/types": "2.9.2-13",
20+
"@polkadot/metadata": "2.10.0",
21+
"@polkadot/rpc-provider": "2.10.0",
22+
"@polkadot/types": "2.10.0",
2323
"@polkadot/util": "^4.2.1",
2424
"memoizee": "^0.4.14",
2525
"rxjs": "^6.6.3"

packages/rpc-provider/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@polkadot/rpc-provider",
3-
"version": "2.9.2-13",
3+
"version": "2.10.0",
44
"description": "Transport providers for the API",
55
"main": "index.js",
66
"sideEffects": false,
@@ -17,7 +17,7 @@
1717
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-provider#readme",
1818
"dependencies": {
1919
"@babel/runtime": "^7.12.5",
20-
"@polkadot/types": "2.9.2-13",
20+
"@polkadot/types": "2.10.0",
2121
"@polkadot/util": "^4.2.1",
2222
"@polkadot/util-crypto": "^4.2.1",
2323
"@polkadot/x-fetch": "^4.2.1",
@@ -27,7 +27,7 @@
2727
},
2828
"devDependencies": {
2929
"@polkadot/keyring": "^4.2.1",
30-
"@polkadot/metadata": "2.9.2-13",
30+
"@polkadot/metadata": "2.10.0",
3131
"mock-socket": "^9.0.3",
3232
"nock": "^13.0.5"
3333
}

0 commit comments

Comments
 (0)