Skip to content

Commit 30d4d8c

Browse files
authored
Bump metadata (#2000)
* Bump metadata * Fix lint & docs
1 parent 6963e40 commit 30d4d8c

File tree

7 files changed

+379
-54
lines changed

7 files changed

+379
-54
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
**/build/*
22
**/coverage/*
33
**/node_modules/*
4+
docs/examples/promise/90_typegen/*

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@
2525
"@babel/core": "^7.8.4",
2626
"@babel/register": "^7.8.3",
2727
"@babel/runtime": "^7.8.4",
28-
"@polkadot/dev": "^0.50.16",
29-
"@polkadot/ts": "^0.3.6",
28+
"@polkadot/dev": "^0.50.26",
29+
"@polkadot/ts": "^0.3.7",
3030
"@polkadot/typegen": "workspace:packages/typegen",
31+
"@vue/component-compiler-utils": "^3.1.1",
3132
"copyfiles": "^2.2.0"
3233
}
3334
}

packages/api/src/augment/query.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,11 @@ declare module '@polkadot/api/types/storage' {
509509
* The current members of the collective. This is stored sorted (just by value).
510510
**/
511511
members: AugmentedQuery<ApiType, () => Observable<Vec<AccountId>>> & QueryableStorageEntry<ApiType>;
512+
/**
513+
* The member who provides the default vote for any other members that do not vote before
514+
* the timeout. If None, then no member has that privilege.
515+
**/
516+
prime: AugmentedQuery<ApiType, () => Observable<Option<AccountId>>> & QueryableStorageEntry<ApiType>;
512517
};
513518
technicalCommittee: {
514519
[index: string]: QueryableStorageEntry<ApiType>;
@@ -532,6 +537,11 @@ declare module '@polkadot/api/types/storage' {
532537
* The current members of the collective. This is stored sorted (just by value).
533538
**/
534539
members: AugmentedQuery<ApiType, () => Observable<Vec<AccountId>>> & QueryableStorageEntry<ApiType>;
540+
/**
541+
* The member who provides the default vote for any other members that do not vote before
542+
* the timeout. If None, then no member has that privilege.
543+
**/
544+
prime: AugmentedQuery<ApiType, () => Observable<Option<AccountId>>> & QueryableStorageEntry<ApiType>;
535545
};
536546
elections: {
537547
[index: string]: QueryableStorageEntry<ApiType>;
@@ -567,6 +577,10 @@ declare module '@polkadot/api/types/storage' {
567577
* The current membership, stored as an ordered Vec.
568578
**/
569579
members: AugmentedQuery<ApiType, () => Observable<Vec<AccountId>>> & QueryableStorageEntry<ApiType>;
580+
/**
581+
* The current prime member, if one exists.
582+
**/
583+
prime: AugmentedQuery<ApiType, () => Observable<Option<AccountId>>> & QueryableStorageEntry<ApiType>;
570584
};
571585
grandpa: {
572586
[index: string]: QueryableStorageEntry<ApiType>;

packages/api/src/augment/tx.ts

Lines changed: 46 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -832,11 +832,12 @@ declare module '@polkadot/api/types/submittable' {
832832
council: {
833833
[index: string]: SubmittableExtrinsicFunction<ApiType>;
834834
/**
835-
* Set the collective's membership manually to `new_members`. Be nice to the chain and
836-
* provide it pre-sorted.
835+
* Set the collective's membership.
836+
* - `new_members`: The new member list. Be nice to the chain and
837+
* - `prime`: The prime member whose vote sets the default.
837838
* Requires root origin.
838839
**/
839-
setMembers: AugmentedSubmittable<(newMembers: Vec<AccountId> | (AccountId | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>>;
840+
setMembers: AugmentedSubmittable<(newMembers: Vec<AccountId> | (AccountId | string | Uint8Array)[], prime: Option<AccountId> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
840841
/**
841842
* Dispatch a proposal from a member using the `Member` origin.
842843
* Origin must be a member of the collective.
@@ -856,15 +857,30 @@ declare module '@polkadot/api/types/submittable' {
856857
* # </weight>
857858
**/
858859
vote: AugmentedSubmittable<(proposal: Hash | string | Uint8Array, index: Compact<ProposalIndex> | AnyNumber | Uint8Array, approve: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>>;
860+
/**
861+
* May be called by any signed account after the voting duration has ended in order to
862+
* finish voting and close the proposal.
863+
* Abstentions are counted as rejections unless there is a prime member set and the prime
864+
* member cast an approval.
865+
* - the weight of `proposal` preimage.
866+
* - up to three events deposited.
867+
* - one read, two removals, one mutation. (plus three static reads.)
868+
* - computation and i/o `O(P + L + M)` where:
869+
* - `M` is number of members,
870+
* - `P` is number of active proposals,
871+
* - `L` is the encoded length of `proposal` preimage.
872+
**/
873+
close: AugmentedSubmittable<(proposal: Hash | string | Uint8Array, index: Compact<ProposalIndex> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
859874
};
860875
technicalCommittee: {
861876
[index: string]: SubmittableExtrinsicFunction<ApiType>;
862877
/**
863-
* Set the collective's membership manually to `new_members`. Be nice to the chain and
864-
* provide it pre-sorted.
878+
* Set the collective's membership.
879+
* - `new_members`: The new member list. Be nice to the chain and
880+
* - `prime`: The prime member whose vote sets the default.
865881
* Requires root origin.
866882
**/
867-
setMembers: AugmentedSubmittable<(newMembers: Vec<AccountId> | (AccountId | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>>;
883+
setMembers: AugmentedSubmittable<(newMembers: Vec<AccountId> | (AccountId | string | Uint8Array)[], prime: Option<AccountId> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
868884
/**
869885
* Dispatch a proposal from a member using the `Member` origin.
870886
* Origin must be a member of the collective.
@@ -884,6 +900,20 @@ declare module '@polkadot/api/types/submittable' {
884900
* # </weight>
885901
**/
886902
vote: AugmentedSubmittable<(proposal: Hash | string | Uint8Array, index: Compact<ProposalIndex> | AnyNumber | Uint8Array, approve: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>>;
903+
/**
904+
* May be called by any signed account after the voting duration has ended in order to
905+
* finish voting and close the proposal.
906+
* Abstentions are counted as rejections unless there is a prime member set and the prime
907+
* member cast an approval.
908+
* - the weight of `proposal` preimage.
909+
* - up to three events deposited.
910+
* - one read, two removals, one mutation. (plus three static reads.)
911+
* - computation and i/o `O(P + L + M)` where:
912+
* - `M` is number of members,
913+
* - `P` is number of active proposals,
914+
* - `L` is the encoded length of `proposal` preimage.
915+
**/
916+
close: AugmentedSubmittable<(proposal: Hash | string | Uint8Array, index: Compact<ProposalIndex> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
887917
};
888918
elections: {
889919
[index: string]: SubmittableExtrinsicFunction<ApiType>;
@@ -980,6 +1010,7 @@ declare module '@polkadot/api/types/submittable' {
9801010
/**
9811011
* Swap out one member `remove` for another `add`.
9821012
* May only be called from `SwapOrigin` or root.
1013+
* Prime membership is *not* passed from `remove` to `add`, if extant.
9831014
**/
9841015
swapMember: AugmentedSubmittable<(remove: AccountId | string | Uint8Array, add: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
9851016
/**
@@ -991,8 +1022,17 @@ declare module '@polkadot/api/types/submittable' {
9911022
/**
9921023
* Swap out the sending member for some other key `new`.
9931024
* May only be called from `Signed` origin of a current member.
1025+
* Prime membership is passed from the origin account to `new`, if extant.
9941026
**/
9951027
changeKey: AugmentedSubmittable<(updated: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
1028+
/**
1029+
* Set the prime member. Must be a current member.
1030+
**/
1031+
setPrime: AugmentedSubmittable<(who: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
1032+
/**
1033+
* Remove the prime member if it exists.
1034+
**/
1035+
clearPrime: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>>;
9961036
};
9971037
finalityTracker: {
9981038
[index: string]: SubmittableExtrinsicFunction<ApiType>;

0 commit comments

Comments
 (0)