Skip to content

Commit 8b02faf

Browse files
committed
[CI Skip] 1.15.0-beta.9
skip-checks: true
1 parent 393f46b commit 8b02faf

File tree

14 files changed

+116
-81
lines changed

14 files changed

+116
-81
lines changed

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
"packages": [
1010
"packages/*"
1111
],
12-
"version": "1.15.0-beta.8"
12+
"version": "1.15.0-beta.9"
1313
}

packages/api-contract/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@polkadot/api-contract",
3-
"version": "1.15.0-beta.8",
3+
"version": "1.15.0-beta.9",
44
"description": "Interfaces for interacting with contracts and contract ABIs",
55
"main": "index.js",
66
"keywords": [
@@ -27,9 +27,9 @@
2727
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-contract#readme",
2828
"dependencies": {
2929
"@babel/runtime": "^7.9.6",
30-
"@polkadot/api": "1.15.0-beta.8",
31-
"@polkadot/rpc-core": "1.15.0-beta.8",
32-
"@polkadot/types": "1.15.0-beta.8",
30+
"@polkadot/api": "1.15.0-beta.9",
31+
"@polkadot/rpc-core": "1.15.0-beta.9",
32+
"@polkadot/types": "1.15.0-beta.9",
3333
"@polkadot/util": "^2.10.1",
3434
"bn.js": "^5.1.2",
3535
"rxjs": "^6.5.5"

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": "1.15.0-beta.8",
3+
"version": "1.15.0-beta.9",
44
"description": "Common functions used across Polkadot, derived from RPC calls and storage queries.",
55
"main": "index.js",
66
"keywords": [
@@ -28,10 +28,10 @@
2828
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-derive#readme",
2929
"dependencies": {
3030
"@babel/runtime": "^7.9.6",
31-
"@polkadot/api": "1.15.0-beta.8",
32-
"@polkadot/rpc-core": "1.15.0-beta.8",
33-
"@polkadot/rpc-provider": "1.15.0-beta.8",
34-
"@polkadot/types": "1.15.0-beta.8",
31+
"@polkadot/api": "1.15.0-beta.9",
32+
"@polkadot/rpc-core": "1.15.0-beta.9",
33+
"@polkadot/rpc-provider": "1.15.0-beta.9",
34+
"@polkadot/types": "1.15.0-beta.9",
3535
"@polkadot/util": "^2.10.1",
3636
"@polkadot/util-crypto": "^2.10.1",
3737
"bn.js": "^5.1.2",

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": "1.15.0-beta.8",
3+
"version": "1.15.0-beta.9",
44
"description": "Promise and RxJS wrappers around the Polkadot JS RPC",
55
"main": "index.js",
66
"keywords": [
@@ -27,13 +27,13 @@
2727
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api#readme",
2828
"dependencies": {
2929
"@babel/runtime": "^7.9.6",
30-
"@polkadot/api-derive": "1.15.0-beta.8",
30+
"@polkadot/api-derive": "1.15.0-beta.9",
3131
"@polkadot/keyring": "^2.10.1",
32-
"@polkadot/metadata": "1.15.0-beta.8",
33-
"@polkadot/rpc-core": "1.15.0-beta.8",
34-
"@polkadot/rpc-provider": "1.15.0-beta.8",
35-
"@polkadot/types": "1.15.0-beta.8",
36-
"@polkadot/types-known": "1.15.0-beta.8",
32+
"@polkadot/metadata": "1.15.0-beta.9",
33+
"@polkadot/rpc-core": "1.15.0-beta.9",
34+
"@polkadot/rpc-provider": "1.15.0-beta.9",
35+
"@polkadot/types": "1.15.0-beta.9",
36+
"@polkadot/types-known": "1.15.0-beta.9",
3737
"@polkadot/util": "^2.10.1",
3838
"@polkadot/util-crypto": "^2.10.1",
3939
"bn.js": "^5.1.2",

packages/api/src/augment/consts.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
/* eslint-disable */
33

44
import { Codec } from '@polkadot/types/types';
5+
import { Vec } from '@polkadot/types/codec';
56
import { u32, u64 } from '@polkadot/types/primitive';
67
import { Balance, BalanceOf, BlockNumber, LockIdentifier, ModuleId, Moment, Percent, Permill, RuntimeDbWeight, Weight } from '@polkadot/types/interfaces/runtime';
78
import { SessionIndex } from '@polkadot/types/interfaces/session';
89
import { EraIndex } from '@polkadot/types/interfaces/staking';
10+
import { WeightToFeeCoefficient } from '@polkadot/types/interfaces/support';
911

1012
declare module '@polkadot/metadata/Decorated/consts/types' {
1113
export interface Constants {
@@ -102,6 +104,10 @@ declare module '@polkadot/metadata/Decorated/consts/types' {
102104
* How often (in blocks) new public referenda are launched.
103105
**/
104106
launchPeriod: AugmentedConst<BlockNumber>;
107+
/**
108+
* The maximum number of votes for an account.
109+
**/
110+
maxVotes: AugmentedConst<u32>;
105111
/**
106112
* The minimum amount to be used as a deposit for a public referendum proposal.
107113
**/
@@ -253,6 +259,10 @@ declare module '@polkadot/metadata/Decorated/consts/types' {
253259
* The fee to be paid for making a transaction; the per-byte portion.
254260
**/
255261
transactionByteFee: AugmentedConst<BalanceOf>;
262+
/**
263+
* The polynomial that is applied in order to derive fee from weight.
264+
**/
265+
weightToFee: AugmentedConst<Vec<WeightToFeeCoefficient>>;
256266
};
257267
treasury: {
258268
[index: string]: AugmentedConst<object & Codec>;

packages/api/src/augment/query.ts

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ declare module '@polkadot/api/types/storage' {
111111
* epoch.
112112
**/
113113
segmentIndex: AugmentedQuery<ApiType, () => Observable<u32>> & QueryableStorageEntry<ApiType>;
114+
/**
115+
* TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay.
116+
**/
114117
underConstruction: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<Randomness>>> & QueryableStorageEntry<ApiType>;
115118
};
116119
balances: {
@@ -152,6 +155,8 @@ declare module '@polkadot/api/types/storage' {
152155
codeStorage: AugmentedQuery<ApiType, (arg: CodeHash | string | Uint8Array) => Observable<Option<PrefabWasmModule>>> & QueryableStorageEntry<ApiType>;
153156
/**
154157
* The code associated with a given account.
158+
*
159+
* TWOX-NOTE: SAFE since `AccountId` is a secure hash.
155160
**/
156161
contractInfoOf: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<ContractInfo>>> & QueryableStorageEntry<ApiType>;
157162
/**
@@ -204,6 +209,8 @@ declare module '@polkadot/api/types/storage' {
204209
cancellations: AugmentedQuery<ApiType, (arg: Hash | string | Uint8Array) => Observable<bool>> & QueryableStorageEntry<ApiType>;
205210
/**
206211
* Those who have locked a deposit.
212+
*
213+
* TWOX-NOTE: Safe, as increasing integer keys are safe.
207214
**/
208215
depositOf: AugmentedQuery<ApiType, (arg: PropIndex | AnyNumber | Uint8Array) => Observable<Option<ITuple<[Vec<AccountId>, BalanceOf]>>>> & QueryableStorageEntry<ApiType>;
209216
/**
@@ -214,6 +221,8 @@ declare module '@polkadot/api/types/storage' {
214221
/**
215222
* Accounts for which there are locks in action which may be removed at some point in the
216223
* future. The value is the block number at which the lock expires and may be removed.
224+
*
225+
* TWOX-NOTE: OK ― `AccountId` is a secure hash.
217226
**/
218227
locks: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<BlockNumber>>> & QueryableStorageEntry<ApiType>;
219228
/**
@@ -236,6 +245,8 @@ declare module '@polkadot/api/types/storage' {
236245
/**
237246
* Who is able to vote for whom. Value is the fund-holding account, key is the
238247
* vote-transaction-sending account.
248+
*
249+
* TWOX-NOTE: OK ― `AccountId` is a secure hash.
239250
**/
240251
proxy: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<ProxyState>>> & QueryableStorageEntry<ApiType>;
241252
/**
@@ -252,6 +263,8 @@ declare module '@polkadot/api/types/storage' {
252263
referendumCount: AugmentedQuery<ApiType, () => Observable<ReferendumIndex>> & QueryableStorageEntry<ApiType>;
253264
/**
254265
* Information concerning any given referendum.
266+
*
267+
* TWOX-NOTE: SAFE as indexes are not under an attacker’s control.
255268
**/
256269
referendumInfoOf: AugmentedQuery<ApiType, (arg: ReferendumIndex | AnyNumber | Uint8Array) => Observable<Option<ReferendumInfo>>> & QueryableStorageEntry<ApiType>;
257270
/**
@@ -263,6 +276,8 @@ declare module '@polkadot/api/types/storage' {
263276
/**
264277
* All votes for a particular voter. We store the balance for the number of votes that we
265278
* have recorded. The second item is the total amount of delegations, that will be added.
279+
*
280+
* TWOX-NOTE: SAFE as `AccountId`s are crypto hashes anyway.
266281
**/
267282
votingOf: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Voting>> & QueryableStorageEntry<ApiType>;
268283
};
@@ -287,6 +302,8 @@ declare module '@polkadot/api/types/storage' {
287302
runnersUp: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[AccountId, BalanceOf]>>>> & QueryableStorageEntry<ApiType>;
288303
/**
289304
* Votes and locked stake of a particular voter.
305+
*
306+
* TWOX-NOTE: SAFE as `AccountId` is a crypto hash
290307
**/
291308
voting: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<ITuple<[BalanceOf, Vec<AccountId>]>>> & QueryableStorageEntry<ApiType>;
292309
};
@@ -308,6 +325,8 @@ declare module '@polkadot/api/types/storage' {
308325
/**
309326
* A mapping from grandpa set ID to the index of the *most recent* session for which its
310327
* members were responsible.
328+
*
329+
* TWOX-NOTE: `SetId` is not under user control.
311330
**/
312331
setIdSession: AugmentedQuery<ApiType, (arg: SetId | AnyNumber | Uint8Array) => Observable<Option<SessionIndex>>> & QueryableStorageEntry<ApiType>;
313332
/**
@@ -323,6 +342,8 @@ declare module '@polkadot/api/types/storage' {
323342
[index: string]: QueryableStorageEntry<ApiType>;
324343
/**
325344
* Information that is pertinent to identify the entity behind an account.
345+
*
346+
* TWOX-NOTE: OK ― `AccountId` is a secure hash.
326347
**/
327348
identityOf: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<Registration>>> & QueryableStorageEntry<ApiType>;
328349
/**
@@ -336,6 +357,8 @@ declare module '@polkadot/api/types/storage' {
336357
* Alternative "sub" identities of this account.
337358
*
338359
* The first item is the deposit, the second is a vector of the accounts.
360+
*
361+
* TWOX-NOTE: OK ― `AccountId` is a secure hash.
339362
**/
340363
subsOf: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<ITuple<[BalanceOf, Vec<AccountId>]>>> & QueryableStorageEntry<ApiType>;
341364
/**
@@ -763,14 +786,14 @@ declare module '@polkadot/api/types/storage' {
763786
* Total length (in bytes) for all extrinsics put together, for the current block.
764787
**/
765788
allExtrinsicsLen: AugmentedQuery<ApiType, () => Observable<Option<u32>>> & QueryableStorageEntry<ApiType>;
766-
/**
767-
* Total weight for all extrinsics for the current block.
768-
**/
769-
allExtrinsicsWeight: AugmentedQuery<ApiType, () => Observable<ExtrinsicsWeight>> & QueryableStorageEntry<ApiType>;
770789
/**
771790
* Map of block numbers to block hashes.
772791
**/
773792
blockHash: AugmentedQuery<ApiType, (arg: BlockNumber | AnyNumber | Uint8Array) => Observable<Hash>> & QueryableStorageEntry<ApiType>;
793+
/**
794+
* The current weight for the block.
795+
**/
796+
blockWeight: AugmentedQuery<ApiType, () => Observable<ExtrinsicsWeight>> & QueryableStorageEntry<ApiType>;
774797
/**
775798
* Digest of the current block, also part of the block header.
776799
**/

packages/api/src/augment/tx.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -503,13 +503,14 @@ declare module '@polkadot/api/types/submittable' {
503503
* Emits `PreimageNoted`.
504504
*
505505
* # <weight>
506-
* - Complexity: `O(E)` with E size of `encoded_proposal` (protected by a required deposit).
507-
* - Db reads: `Preimages`
508-
* - Db writes: `Preimages`
509-
* - Base Weight: 28.04 + .003 * b µs
506+
* see `weight_for::note_preimage`
510507
* # </weight>
511508
**/
512509
noteImminentPreimage: AugmentedSubmittable<(encodedProposal: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
510+
/**
511+
* Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`.
512+
**/
513+
noteImminentPreimageOperational: AugmentedSubmittable<(encodedProposal: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
513514
/**
514515
* Register the preimage for an upcoming proposal. This doesn't require the proposal to be
515516
* in the dispatch queue but does require a deposit, returned once enacted.
@@ -521,13 +522,14 @@ declare module '@polkadot/api/types/submittable' {
521522
* Emits `PreimageNoted`.
522523
*
523524
* # <weight>
524-
* - Complexity: `O(E)` with E size of `encoded_proposal` (protected by a required deposit).
525-
* - Db reads: `Preimages`
526-
* - Db writes: `Preimages`
527-
* - Base Weight: 37.93 + .004 * b µs
525+
* see `weight_for::note_preimage`
528526
* # </weight>
529527
**/
530528
notePreimage: AugmentedSubmittable<(encodedProposal: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
529+
/**
530+
* Same as `note_preimage` but origin is `OperationalPreimageOrigin`.
531+
**/
532+
notePreimageOperational: AugmentedSubmittable<(encodedProposal: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
531533
/**
532534
* Become a proxy.
533535
*

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": "1.15.0-beta.8",
3+
"version": "1.15.0-beta.9",
44
"description": "Helpers to extract information from runtime metadata",
55
"main": "index.js",
66
"publishConfig": {
@@ -27,8 +27,8 @@
2727
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/type-metadata#readme",
2828
"dependencies": {
2929
"@babel/runtime": "^7.9.6",
30-
"@polkadot/types": "1.15.0-beta.8",
31-
"@polkadot/types-known": "1.15.0-beta.8",
30+
"@polkadot/types": "1.15.0-beta.9",
31+
"@polkadot/types-known": "1.15.0-beta.9",
3232
"@polkadot/util": "^2.10.1",
3333
"@polkadot/util-crypto": "^2.10.1",
3434
"bn.js": "^5.1.2"

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": "1.15.0-beta.8",
3+
"version": "1.15.0-beta.9",
44
"description": "A JavaScript wrapper for the Polkadot JsonRPC interface",
55
"main": "index.js",
66
"keywords": [
@@ -27,9 +27,9 @@
2727
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-core#readme",
2828
"dependencies": {
2929
"@babel/runtime": "^7.9.6",
30-
"@polkadot/metadata": "1.15.0-beta.8",
31-
"@polkadot/rpc-provider": "1.15.0-beta.8",
32-
"@polkadot/types": "1.15.0-beta.8",
30+
"@polkadot/metadata": "1.15.0-beta.9",
31+
"@polkadot/rpc-provider": "1.15.0-beta.9",
32+
"@polkadot/types": "1.15.0-beta.9",
3333
"@polkadot/util": "^2.10.1",
3434
"memoizee": "^0.4.14",
3535
"rxjs": "^6.5.5"

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": "1.15.0-beta.8",
3+
"version": "1.15.0-beta.9",
44
"description": "Transport providers for the API",
55
"main": "index.js",
66
"keywords": [
@@ -27,8 +27,8 @@
2727
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-provider#readme",
2828
"dependencies": {
2929
"@babel/runtime": "^7.9.6",
30-
"@polkadot/metadata": "1.15.0-beta.8",
31-
"@polkadot/types": "1.15.0-beta.8",
30+
"@polkadot/metadata": "1.15.0-beta.9",
31+
"@polkadot/types": "1.15.0-beta.9",
3232
"@polkadot/util": "^2.10.1",
3333
"@polkadot/util-crypto": "^2.10.1",
3434
"bn.js": "^5.1.2",

0 commit comments

Comments
 (0)