Bump metadata (#2096)
* Bump metadata * Update staking types * Enum updates
This commit is contained in:
@@ -113,10 +113,6 @@ declare module '@polkadot/metadata/Decorated/consts/types' {
|
||||
* Period in blocks where an external proposal may not be re-submitted after being vetoed.
|
||||
**/
|
||||
cooloffPeriod: AugmentedConst<BlockNumber>;
|
||||
/**
|
||||
* Minimum voting period allowed for an emergency referendum.
|
||||
**/
|
||||
emergencyVotingPeriod: AugmentedConst<BlockNumber>;
|
||||
/**
|
||||
* The minimum period of locking and the period between a proposal being approved and enacted.
|
||||
* It should generally be a little more than the unstake period to ensure that
|
||||
@@ -124,6 +120,10 @@ declare module '@polkadot/metadata/Decorated/consts/types' {
|
||||
* they are on the losing side of a vote.
|
||||
**/
|
||||
enactmentPeriod: AugmentedConst<BlockNumber>;
|
||||
/**
|
||||
* Minimum voting period allowed for an emergency referendum.
|
||||
**/
|
||||
fastTrackVotingPeriod: AugmentedConst<BlockNumber>;
|
||||
/**
|
||||
* How often (in blocks) new public referenda are launched.
|
||||
**/
|
||||
|
||||
@@ -5,14 +5,14 @@ import { AnyNumber, ITuple } from '@polkadot/types/types';
|
||||
import { Option, U8aFixed, Vec } from '@polkadot/types/codec';
|
||||
import { Bytes, Data, bool, u32, u64 } from '@polkadot/types/primitive';
|
||||
import { UncleEntryItem } from '@polkadot/types/interfaces/authorship';
|
||||
import { BabeAuthorityWeight, MaybeVrf } from '@polkadot/types/interfaces/babe';
|
||||
import { BabeAuthorityWeight, MaybeVrf, Randomness } from '@polkadot/types/interfaces/babe';
|
||||
import { AccountData, BalanceLock, ReleasesBalances } from '@polkadot/types/interfaces/balances';
|
||||
import { ProposalIndex, Votes } from '@polkadot/types/interfaces/collective';
|
||||
import { AuthorityId } from '@polkadot/types/interfaces/consensus';
|
||||
import { AuthorityId, RawVRFOutput } from '@polkadot/types/interfaces/consensus';
|
||||
import { CodeHash, ContractInfo, Gas, PrefabWasmModule, Schedule } from '@polkadot/types/interfaces/contracts';
|
||||
import { Conviction, PropIndex, Proposal, ProxyState, ReferendumIndex, ReferendumInfo } from '@polkadot/types/interfaces/democracy';
|
||||
import { Vote, VoteThreshold } from '@polkadot/types/interfaces/elections';
|
||||
import { AuthorityList, SetId, StoredPendingChange, StoredState } from '@polkadot/types/interfaces/grandpa';
|
||||
import { PropIndex, Proposal, ProxyState, ReferendumIndex, ReferendumInfo, Voting } from '@polkadot/types/interfaces/democracy';
|
||||
import { VoteThreshold } from '@polkadot/types/interfaces/elections';
|
||||
import { SetId, StoredPendingChange, StoredState } from '@polkadot/types/interfaces/grandpa';
|
||||
import { RegistrarInfo, Registration } from '@polkadot/types/interfaces/identity';
|
||||
import { AuthIndex } from '@polkadot/types/interfaces/imOnline';
|
||||
import { Kind, OffenceDetails, OpaqueTimeSlot, ReportIdOf } from '@polkadot/types/interfaces/offences';
|
||||
@@ -21,7 +21,7 @@ import { AccountId, AccountIndex, Balance, BalanceOf, BlockNumber, Hash, KeyType
|
||||
import { Keys, SessionIndex } from '@polkadot/types/interfaces/session';
|
||||
import { Bid, BidKind, SocietyVote, StrikeCount, VouchingStatus } from '@polkadot/types/interfaces/society';
|
||||
import { ActiveEraInfo, EraIndex, EraRewardPoints, Exposure, Forcing, Nominations, ReleasesStaking, RewardDestination, SlashingSpans, SpanIndex, SpanRecord, StakingLedger, UnappliedSlash, ValidatorPrefs } from '@polkadot/types/interfaces/staking';
|
||||
import { AccountInfo, DigestOf, EventIndex, EventRecord, LastRuntimeUpgradeInfo } from '@polkadot/types/interfaces/system';
|
||||
import { AccountInfo, DigestOf, EventIndex, EventRecord, LastRuntimeUpgradeInfo, Phase } from '@polkadot/types/interfaces/system';
|
||||
import { OpenTip, TreasuryProposal } from '@polkadot/types/interfaces/treasury';
|
||||
import { Multiplier } from '@polkadot/types/interfaces/txpayment';
|
||||
import { Multisig } from '@polkadot/types/interfaces/utility';
|
||||
@@ -73,7 +73,7 @@ declare module '@polkadot/api/types/storage' {
|
||||
/**
|
||||
* Next epoch randomness.
|
||||
**/
|
||||
nextRandomness: AugmentedQuery<ApiType, () => Observable<U8aFixed>> & QueryableStorageEntry<ApiType>;
|
||||
nextRandomness: AugmentedQuery<ApiType, () => Observable<Randomness>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* The epoch randomness for the *current* epoch.
|
||||
* # Security
|
||||
@@ -84,7 +84,7 @@ declare module '@polkadot/api/types/storage' {
|
||||
* used where a number is needed that cannot have been chosen by an
|
||||
* adversary, for purposes such as public-coin zero-knowledge proofs.
|
||||
**/
|
||||
randomness: AugmentedQuery<ApiType, () => Observable<U8aFixed>> & QueryableStorageEntry<ApiType>;
|
||||
randomness: AugmentedQuery<ApiType, () => Observable<Randomness>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* Randomness under construction.
|
||||
* We make a tradeoff between storage accesses and list length.
|
||||
@@ -95,7 +95,7 @@ declare module '@polkadot/api/types/storage' {
|
||||
* epoch.
|
||||
**/
|
||||
segmentIndex: AugmentedQuery<ApiType, () => Observable<u32>> & QueryableStorageEntry<ApiType>;
|
||||
underConstruction: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<U8aFixed>>> & QueryableStorageEntry<ApiType>;
|
||||
underConstruction: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<RawVRFOutput>>> & QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
balances: {
|
||||
[index: string]: QueryableStorageEntry<ApiType>;
|
||||
@@ -191,10 +191,6 @@ declare module '@polkadot/api/types/storage' {
|
||||
* Record of all proposals that have been subject to emergency cancellation.
|
||||
**/
|
||||
cancellations: AugmentedQuery<ApiType, (arg: Hash | string | Uint8Array) => Observable<bool>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* Get the account (and lock periods) to which another account is delegating vote.
|
||||
**/
|
||||
delegations: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<ITuple<[AccountId, Conviction]>>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* Those who have locked a deposit.
|
||||
**/
|
||||
@@ -252,22 +248,16 @@ declare module '@polkadot/api/types/storage' {
|
||||
**/
|
||||
referendumInfoOf: AugmentedQuery<ApiType, (arg: ReferendumIndex | AnyNumber | Uint8Array) => Observable<Option<ReferendumInfo>>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* Get the vote in a given referendum of a particular voter. The result is meaningful only
|
||||
* if `voters_for` includes the voter when called with the referendum (you'll get the
|
||||
* default `Vote` value otherwise). If you don't want to check `voters_for`, then you can
|
||||
* also check for simple existence with `VoteOf::contains_key` first.
|
||||
* All votes for a particular voter. We store the balance for the number of votes that we
|
||||
* have recorded. The second item is the total amount of delegations, that will be added.
|
||||
**/
|
||||
voteOf: AugmentedQuery<ApiType, (arg: ITuple<[ReferendumIndex, AccountId]> | [ReferendumIndex | AnyNumber | Uint8Array, AccountId | string | Uint8Array]) => Observable<Vote>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* Get the voters for the current proposal.
|
||||
**/
|
||||
votersFor: AugmentedQuery<ApiType, (arg: ReferendumIndex | AnyNumber | Uint8Array) => Observable<Vec<AccountId>>> & QueryableStorageEntry<ApiType>;
|
||||
votingOf: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Voting>> & QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
elections: {
|
||||
[index: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* The present candidate list. Sorted based on account-id. A current member or a runner can
|
||||
* never enter this vector and is always implicitly assumed to be a candidate.
|
||||
* The present candidate list. Sorted based on account-id. A current member or runner-up
|
||||
* can never enter this vector and is always implicitly assumed to be a candidate.
|
||||
**/
|
||||
candidates: AugmentedQuery<ApiType, () => Observable<Vec<AccountId>>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
@@ -283,22 +273,12 @@ declare module '@polkadot/api/types/storage' {
|
||||
**/
|
||||
runnersUp: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[AccountId, BalanceOf]>>>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* Locked stake of a voter.
|
||||
* Votes and locked stake of a particular voter.
|
||||
**/
|
||||
stakeOf: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<BalanceOf>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* Votes of a particular voter, with the round index of the votes.
|
||||
**/
|
||||
votesOf: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Vec<AccountId>>> & QueryableStorageEntry<ApiType>;
|
||||
voting: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<ITuple<[BalanceOf, Vec<AccountId>]>>> & QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
grandpa: {
|
||||
[index: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* DEPRECATED
|
||||
* This used to store the current authority set, which has been migrated to the well-known
|
||||
* GRANDPA_AUTHORITIES_KEY unhashed key.
|
||||
**/
|
||||
authorities: AugmentedQuery<ApiType, () => Observable<AuthorityList>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* The number of changes (both in terms of keys and underlying economic responsibilities)
|
||||
* in the "set" of Grandpa validators from genesis.
|
||||
@@ -658,7 +638,7 @@ declare module '@polkadot/api/types/storage' {
|
||||
spanSlash: AugmentedQuery<ApiType, (arg: ITuple<[AccountId, SpanIndex]> | [AccountId | string | Uint8Array, SpanIndex | AnyNumber | Uint8Array]) => Observable<SpanRecord>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* Storage version of the pallet.
|
||||
* This is set to v2.0.0 for new networks.
|
||||
* This is set to v3.0.0 for new networks.
|
||||
**/
|
||||
storageVersion: AugmentedQuery<ApiType, () => Observable<ReleasesStaking>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
@@ -727,6 +707,10 @@ declare module '@polkadot/api/types/storage' {
|
||||
* no notification will be triggered thus the event might be lost.
|
||||
**/
|
||||
eventTopics: AugmentedQuery<ApiType, (arg: Hash | string | Uint8Array) => Observable<Vec<ITuple<[BlockNumber, EventIndex]>>>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* The execution phase of the block.
|
||||
**/
|
||||
executionPhase: AugmentedQuery<ApiType, () => Observable<Option<Phase>>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* Total extrinsics count for the current block.
|
||||
**/
|
||||
|
||||
@@ -48,7 +48,7 @@ declare module '@polkadot/rpc-core/types.jsonrpc' {
|
||||
/**
|
||||
* Remove given extrinsic from the pool and temporarily ban it to prevent reimporting
|
||||
**/
|
||||
removeExtrinsic: AugmentedRpc<(bytesOrHash: Vec<ExtrinsicOrHash> | (ExtrinsicOrHash | { hash: any } | { extrinsic: any } | string | Uint8Array)[]) => Observable<Vec<Hash>>>;
|
||||
removeExtrinsic: AugmentedRpc<(bytesOrHash: Vec<ExtrinsicOrHash> | (ExtrinsicOrHash | { Hash: any } | { Extrinsic: any } | string | Uint8Array)[]) => Observable<Vec<Hash>>>;
|
||||
/**
|
||||
* Generate new session keys and returns the corresponding public keys
|
||||
**/
|
||||
|
||||
+120
-27
@@ -6,8 +6,7 @@ import { Compact, Option, U8aFixed, Vec } from '@polkadot/types/codec';
|
||||
import { Bytes, Data, bool, u16, u32, u64 } from '@polkadot/types/primitive';
|
||||
import { MemberCount, ProposalIndex } from '@polkadot/types/interfaces/collective';
|
||||
import { CodeHash, Gas, Schedule } from '@polkadot/types/interfaces/contracts';
|
||||
import { Conviction, PropIndex, Proposal, ReferendumIndex } from '@polkadot/types/interfaces/democracy';
|
||||
import { Vote } from '@polkadot/types/interfaces/elections';
|
||||
import { AccountVote, Conviction, PropIndex, Proposal, ReferendumIndex } from '@polkadot/types/interfaces/democracy';
|
||||
import { Extrinsic, Signature } from '@polkadot/types/interfaces/extrinsics';
|
||||
import { IdentityFields, IdentityInfo, IdentityJudgement, RegistrarIndex } from '@polkadot/types/interfaces/identity';
|
||||
import { Heartbeat } from '@polkadot/types/interfaces/imOnline';
|
||||
@@ -179,6 +178,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* - `which`: The index of the referendum to cancel.
|
||||
* # <weight>
|
||||
* - One DB change.
|
||||
* - O(d) where d is the items in the dispatch queue.
|
||||
* # </weight>
|
||||
**/
|
||||
cancelQueued: AugmentedSubmittable<(which: ReferendumIndex | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
@@ -221,25 +221,30 @@ declare module '@polkadot/api/types/submittable' {
|
||||
**/
|
||||
deactivateProxy: AugmentedSubmittable<(proxy: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Delegate vote.
|
||||
* Currency is locked indefinitely for as long as it's delegated.
|
||||
* The dispatch origin of this call must be _Signed_.
|
||||
* - `to`: The account to make a delegate of the sender.
|
||||
* - `conviction`: The conviction that will be attached to the delegated
|
||||
* votes.
|
||||
* Delegate the voting power (with some given conviction) of the sending account.
|
||||
* The balance delegated is locked for as long as it's delegated, and thereafter for the
|
||||
* time appropriate for the conviction's lock period.
|
||||
* The dispatch origin of this call must be _Signed_, and the signing account must either:
|
||||
* - be delegating already; or
|
||||
* - have no voting activity (if there is, then it will need to be removed/consolidated
|
||||
* through `reap_vote` or `unvote`).
|
||||
* - `to`: The account whose voting the `target` account's voting power will follow.
|
||||
* - `conviction`: The conviction that will be attached to the delegated votes. When the
|
||||
* account is undelegated, the funds will be locked for the corresponding period.
|
||||
* - `balance`: The amount of the account's balance to be used in delegating. This must
|
||||
* not be more than the account's current balance.
|
||||
* Emits `Delegated`.
|
||||
* # <weight>
|
||||
* - One extra DB entry.
|
||||
* # </weight>
|
||||
**/
|
||||
delegate: AugmentedSubmittable<(to: AccountId | string | Uint8Array, conviction: Conviction | ('None' | 'Locked1x' | 'Locked2x' | 'Locked3x' | 'Locked4x' | 'Locked5x' | 'Locked6x') | number | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
delegate: AugmentedSubmittable<(to: AccountId | string | Uint8Array, conviction: Conviction | ('None' | 'Locked1x' | 'Locked2x' | 'Locked3x' | 'Locked4x' | 'Locked5x' | 'Locked6x') | number | Uint8Array, balance: BalanceOf | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Schedule an emergency cancellation of a referendum. Cannot happen twice to the same
|
||||
* referendum.
|
||||
* The dispatch origin of this call must be `CancellationOrigin`.
|
||||
* -`ref_index`: The index of the referendum to cancel.
|
||||
* # <weight>
|
||||
* - Depends on size of storage vec `VotersFor` for this referendum.
|
||||
* - `O(1)`.
|
||||
* # </weight>
|
||||
**/
|
||||
emergencyCancel: AugmentedSubmittable<(refIndex: ReferendumIndex | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
@@ -287,7 +292,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* The dispatch of this call must be `FastTrackOrigin`.
|
||||
* - `proposal_hash`: The hash of the current external proposal.
|
||||
* - `voting_period`: The period that is allowed for voting on this proposal. Increased to
|
||||
* `EmergencyVotingPeriod` if too low.
|
||||
* `FastTrackVotingPeriod` if too low.
|
||||
* - `delay`: The number of block after voting has ended in approval and this should be
|
||||
* enacted. This doesn't have a minimum amount.
|
||||
* Emits `Started`.
|
||||
@@ -305,7 +310,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* - `encoded_proposal`: The preimage of a proposal.
|
||||
* Emits `PreimageNoted`.
|
||||
* # <weight>
|
||||
* - Dependent on the size of `encoded_proposal`.
|
||||
* - Dependent on the size of `encoded_proposal` and length of dispatch queue.
|
||||
* # </weight>
|
||||
**/
|
||||
noteImminentPreimage: AugmentedSubmittable<(encodedProposal: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
@@ -340,11 +345,57 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* - `value`: The amount of deposit (must be at least `MinimumDeposit`).
|
||||
* Emits `Proposed`.
|
||||
* # <weight>
|
||||
* - `O(1)`.
|
||||
* - `O(P)`
|
||||
* - P is the number proposals in the `PublicProps` vec.
|
||||
* - Two DB changes, one DB entry.
|
||||
* # </weight>
|
||||
**/
|
||||
propose: AugmentedSubmittable<(proposalHash: Hash | string | Uint8Array, value: Compact<BalanceOf> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Delegate the voting power (with some given conviction) of a proxied account.
|
||||
* The balance delegated is locked for as long as it's delegated, and thereafter for the
|
||||
* time appropriate for the conviction's lock period.
|
||||
* The dispatch origin of this call must be _Signed_, and the signing account must have
|
||||
* been set as the proxy account for `target`.
|
||||
* - `target`: The account whole voting power shall be delegated and whose balance locked.
|
||||
* This account must either:
|
||||
* - be delegating already; or
|
||||
* - have no voting activity (if there is, then it will need to be removed/consolidated
|
||||
* through `reap_vote` or `unvote`).
|
||||
* - `to`: The account whose voting the `target` account's voting power will follow.
|
||||
* - `conviction`: The conviction that will be attached to the delegated votes. When the
|
||||
* account is undelegated, the funds will be locked for the corresponding period.
|
||||
* - `balance`: The amount of the account's balance to be used in delegating. This must
|
||||
* not be more than the account's current balance.
|
||||
* Emits `Delegated`.
|
||||
* # <weight>
|
||||
* # </weight>
|
||||
**/
|
||||
proxyDelegate: AugmentedSubmittable<(to: AccountId | string | Uint8Array, conviction: Conviction | ('None' | 'Locked1x' | 'Locked2x' | 'Locked3x' | 'Locked4x' | 'Locked5x' | 'Locked6x') | number | Uint8Array, balance: BalanceOf | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Remove a proxied vote for a referendum.
|
||||
* Exactly equivalent to `remove_vote` except that it operates on the account that the
|
||||
* sender is a proxy for.
|
||||
* The dispatch origin of this call must be _Signed_ and the signing account must be a
|
||||
* proxy for some other account which has a registered vote for the referendum of `index`.
|
||||
* - `index`: The index of referendum of the vote to be removed.
|
||||
* # <weight>
|
||||
* - `O(R + log R)` where R is the number of referenda that `target` has voted on.
|
||||
* # </weight>
|
||||
**/
|
||||
proxyRemoveVote: AugmentedSubmittable<(index: ReferendumIndex | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Undelegate the voting power of a proxied account.
|
||||
* Tokens may be unlocked following once an amount of time consistent with the lock period
|
||||
* of the conviction with which the delegation was issued.
|
||||
* The dispatch origin of this call must be _Signed_ and the signing account must be a
|
||||
* proxy for some other account which is currently delegating.
|
||||
* Emits `Undelegated`.
|
||||
* # <weight>
|
||||
* - O(1).
|
||||
* # </weight>
|
||||
**/
|
||||
proxyUndelegate: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Vote in a referendum on behalf of a stash. If `vote.is_aye()`, the vote is to enact
|
||||
* the proposal; otherwise it is a vote to keep the status quo.
|
||||
@@ -356,7 +407,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* - One DB change, one DB entry.
|
||||
* # </weight>
|
||||
**/
|
||||
proxyVote: AugmentedSubmittable<(refIndex: Compact<ReferendumIndex> | AnyNumber | Uint8Array, vote: Vote | { aye: boolean; conviction?: ('None' | 'Locked1x' | 'Locked2x' | 'Locked3x' | 'Locked4x' | 'Locked5x' | 'Locked6x') | number } | boolean | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
proxyVote: AugmentedSubmittable<(refIndex: Compact<ReferendumIndex> | AnyNumber | Uint8Array, vote: AccountVote | { Standard: any } | { Split: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Remove an expired proposal preimage and collect the deposit.
|
||||
* The dispatch origin of this call must be _Signed_.
|
||||
@@ -370,23 +421,65 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* # </weight>
|
||||
**/
|
||||
reapPreimage: AugmentedSubmittable<(proposalHash: Hash | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Remove a vote for a referendum.
|
||||
* If the `target` is equal to the signer, then this function is exactly equivalent to
|
||||
* `remove_vote`. If not equal to the signer, then the vote must have expired,
|
||||
* either because the referendum was cancelled, because the voter lost the referendum or
|
||||
* because the conviction period is over.
|
||||
* The dispatch origin of this call must be _Signed_.
|
||||
* - `target`: The account of the vote to be removed; this account must have voted for
|
||||
* referendum `index`.
|
||||
* - `index`: The index of referendum of the vote to be removed.
|
||||
* # <weight>
|
||||
* - `O(R + log R)` where R is the number of referenda that `target` has voted on.
|
||||
* # </weight>
|
||||
**/
|
||||
removeOtherVote: AugmentedSubmittable<(target: AccountId | string | Uint8Array, index: ReferendumIndex | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Remove a vote for a referendum.
|
||||
* If:
|
||||
* - the referendum was cancelled, or
|
||||
* - the referendum is ongoing, or
|
||||
* - the referendum has ended such that
|
||||
* - the vote of the account was in opposition to the result; or
|
||||
* - there was no conviction to the account's vote; or
|
||||
* - the account made a split vote
|
||||
* ...then the vote is removed cleanly and a following call to `unlock` may result in more
|
||||
* funds being available.
|
||||
* If, however, the referendum has ended and:
|
||||
* - it finished corresponding to the vote of the account, and
|
||||
* - the account made a standard vote with conviction, and
|
||||
* - the lock period of the conviction is not over
|
||||
* ...then the lock will be aggregated into the overall account's lock, which may involve
|
||||
* *overlocking* (where the two locks are combined into a single lock that is the maximum
|
||||
* of both the amount locked and the time is it locked for).
|
||||
* The dispatch origin of this call must be _Signed_, and the signer must have a vote
|
||||
* registered for referendum `index`.
|
||||
* - `index`: The index of referendum of the vote to be removed.
|
||||
* # <weight>
|
||||
* - `O(R + log R)` where R is the number of referenda that `target` has voted on.
|
||||
* # </weight>
|
||||
**/
|
||||
removeVote: AugmentedSubmittable<(index: ReferendumIndex | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Signals agreement with a particular proposal.
|
||||
* The dispatch origin of this call must be _Signed_ and the sender
|
||||
* must have funds to cover the deposit, equal to the original deposit.
|
||||
* - `proposal`: The index of the proposal to second.
|
||||
* # <weight>
|
||||
* - `O(1)`.
|
||||
* - `O(S)`.
|
||||
* - S is the number of seconds a proposal already has.
|
||||
* - One DB entry.
|
||||
* # </weight>
|
||||
**/
|
||||
second: AugmentedSubmittable<(proposal: Compact<PropIndex> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Undelegate vote.
|
||||
* Must be sent from an account that has called delegate previously.
|
||||
* The tokens will be reduced from an indefinite lock to the maximum
|
||||
* possible according to the conviction of the prior delegation.
|
||||
* The dispatch origin of this call must be _Signed_.
|
||||
* Undelegate the voting power of the sending account.
|
||||
* Tokens may be unlocked following once an amount of time consistent with the lock period
|
||||
* of the conviction with which the delegation was issued.
|
||||
* The dispatch origin of this call must be _Signed_ and the signing account must be
|
||||
* currently delegating.
|
||||
* Emits `Undelegated`.
|
||||
* # <weight>
|
||||
* - O(1).
|
||||
@@ -397,7 +490,6 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* Unlock tokens that have an expired lock.
|
||||
* The dispatch origin of this call must be _Signed_.
|
||||
* - `target`: The account to remove the lock on.
|
||||
* Emits `Unlocked`.
|
||||
* # <weight>
|
||||
* - `O(1)`.
|
||||
* # </weight>
|
||||
@@ -413,6 +505,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* - One DB clear.
|
||||
* - Performs a binary search on `existing_vetoers` which should not
|
||||
* be very large.
|
||||
* - O(log v), v is number of `existing_vetoers`
|
||||
* # </weight>
|
||||
**/
|
||||
vetoExternal: AugmentedSubmittable<(proposalHash: Hash | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
@@ -423,11 +516,12 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* - `ref_index`: The index of the referendum to vote for.
|
||||
* - `vote`: The vote configuration.
|
||||
* # <weight>
|
||||
* - `O(1)`.
|
||||
* - `O(R)`.
|
||||
* - R is the number of referendums the voter has voted on.
|
||||
* - One DB change, one DB entry.
|
||||
* # </weight>
|
||||
**/
|
||||
vote: AugmentedSubmittable<(refIndex: Compact<ReferendumIndex> | AnyNumber | Uint8Array, vote: Vote | { aye: boolean; conviction?: ('None' | 'Locked1x' | 'Locked2x' | 'Locked3x' | 'Locked4x' | 'Locked5x' | 'Locked6x') | number } | boolean | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
vote: AugmentedSubmittable<(refIndex: Compact<ReferendumIndex> | AnyNumber | Uint8Array, vote: AccountVote | { Standard: any } | { Split: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
};
|
||||
elections: {
|
||||
[index: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
@@ -601,7 +695,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* - One event.
|
||||
* # </weight>
|
||||
**/
|
||||
provideJudgement: AugmentedSubmittable<(regIndex: Compact<RegistrarIndex> | AnyNumber | Uint8Array, target: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array, judgement: IdentityJudgement | { unknown: any } | { feePaid: any } | { reasonable: any } | { knownGood: any } | { outOfDate: any } | { lowQuality: any } | { erroneous: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
provideJudgement: AugmentedSubmittable<(regIndex: Compact<RegistrarIndex> | AnyNumber | Uint8Array, target: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array, judgement: IdentityJudgement | { Unknown: any } | { FeePaid: any } | { Reasonable: any } | { KnownGood: any } | { OutOfDate: any } | { LowQuality: any } | { Erroneous: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Request a judgement from a registrar.
|
||||
* Payment: At most `max_fee` will be reserved for payment to the registrar if judgement
|
||||
@@ -688,7 +782,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* one storage-exists.
|
||||
* # </weight>
|
||||
**/
|
||||
setSubs: AugmentedSubmittable<(subs: Vec<ITuple<[AccountId, Data]>> | ([AccountId | string | Uint8Array, Data | { none: any } | { raw: any } | { blakeTwo256: any } | { sha256: any } | { keccak256: any } | { shaThree256: any } | string | Uint8Array])[]) => SubmittableExtrinsic<ApiType>>;
|
||||
setSubs: AugmentedSubmittable<(subs: Vec<ITuple<[AccountId, Data]>> | ([AccountId | string | Uint8Array, Data | { None: any } | { Raw: any } | { BlakeTwo256: any } | { Sha256: any } | { Keccak256: any } | { ShaThree256: any } | string | Uint8Array])[]) => SubmittableExtrinsic<ApiType>>;
|
||||
};
|
||||
imOnline: {
|
||||
[index: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
@@ -1488,7 +1582,6 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* Kill some items from storage.
|
||||
**/
|
||||
killStorage: AugmentedSubmittable<(keys: Vec<Key> | (Key | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>>;
|
||||
migrateAccounts: AugmentedSubmittable<(accounts: Vec<AccountId> | (AccountId | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Make some on-chain remark.
|
||||
**/
|
||||
|
||||
@@ -159,6 +159,9 @@ async function tx (api: ApiPromise, keyring: TestKeyringMap): Promise<void> {
|
||||
second.signAndSend('123', (result): void => {
|
||||
console.log(result);
|
||||
});
|
||||
|
||||
// it handles enum inputs correctly
|
||||
await api.tx.democracy.proxyVote(123, { Split: { yay: 123, nay: 456 } }).signAndSend(keyring.alice);
|
||||
}
|
||||
|
||||
async function main (): Promise<void> {
|
||||
|
||||
@@ -190,6 +190,17 @@
|
||||
"documentation": [
|
||||
" Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ExecutionPhase",
|
||||
"modifier": "Optional",
|
||||
"type": {
|
||||
"Plain": "Phase"
|
||||
},
|
||||
"fallback": "0x00",
|
||||
"documentation": [
|
||||
" The execution phase of the block."
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -309,16 +320,6 @@
|
||||
" Kill the sending account, assuming there are no references outstanding and the composite",
|
||||
" data is equal to its default value."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "migrate_accounts",
|
||||
"args": [
|
||||
{
|
||||
"name": "accounts",
|
||||
"type": "Vec<AccountId>"
|
||||
}
|
||||
],
|
||||
"documentation": []
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
@@ -844,7 +845,7 @@
|
||||
"name": "Randomness",
|
||||
"modifier": "Default",
|
||||
"type": {
|
||||
"Plain": "[u8;32]"
|
||||
"Plain": "Randomness"
|
||||
},
|
||||
"fallback": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
||||
"documentation": [
|
||||
@@ -864,7 +865,7 @@
|
||||
"name": "NextRandomness",
|
||||
"modifier": "Default",
|
||||
"type": {
|
||||
"Plain": "[u8;32]"
|
||||
"Plain": "Randomness"
|
||||
},
|
||||
"fallback": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
||||
"documentation": [
|
||||
@@ -897,7 +898,7 @@
|
||||
"Map": {
|
||||
"hasher": "Twox64Concat",
|
||||
"key": "u32",
|
||||
"value": "Vec<[u8;32]>",
|
||||
"value": "Vec<RawVRFOutput>",
|
||||
"linked": false
|
||||
}
|
||||
},
|
||||
@@ -924,7 +925,7 @@
|
||||
{
|
||||
"name": "EpochDuration",
|
||||
"type": "u64",
|
||||
"value": "0xc800000000000000",
|
||||
"value": "0x1400000000000000",
|
||||
"documentation": [
|
||||
" The number of **slots** that an epoch takes. We couple sessions to",
|
||||
" epochs, i.e. we start a new session once the new epoch begins."
|
||||
@@ -2070,11 +2071,11 @@
|
||||
"type": {
|
||||
"Plain": "ReleasesStaking"
|
||||
},
|
||||
"fallback": "0x01",
|
||||
"fallback": "0x02",
|
||||
"documentation": [
|
||||
" Storage version of the pallet.",
|
||||
"",
|
||||
" This is set to v2.0.0 for new networks."
|
||||
" This is set to v3.0.0 for new networks."
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -2899,6 +2900,22 @@
|
||||
" The public proposals. Unsorted. The second item is the proposal's hash."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "DepositOf",
|
||||
"modifier": "Optional",
|
||||
"type": {
|
||||
"Map": {
|
||||
"hasher": "Twox64Concat",
|
||||
"key": "PropIndex",
|
||||
"value": "(BalanceOf,Vec<AccountId>)",
|
||||
"linked": false
|
||||
}
|
||||
},
|
||||
"fallback": "0x00",
|
||||
"documentation": [
|
||||
" Those who have locked a deposit."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Preimages",
|
||||
"modifier": "Optional",
|
||||
@@ -2916,22 +2933,6 @@
|
||||
" The block number is the block at which it was deposited."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "DepositOf",
|
||||
"modifier": "Optional",
|
||||
"type": {
|
||||
"Map": {
|
||||
"hasher": "Twox64Concat",
|
||||
"key": "PropIndex",
|
||||
"value": "(BalanceOf,Vec<AccountId>)",
|
||||
"linked": false
|
||||
}
|
||||
},
|
||||
"fallback": "0x00",
|
||||
"documentation": [
|
||||
" Those who have locked a deposit."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ReferendumCount",
|
||||
"modifier": "Default",
|
||||
@@ -2983,38 +2984,20 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "VotersFor",
|
||||
"name": "VotingOf",
|
||||
"modifier": "Default",
|
||||
"type": {
|
||||
"Map": {
|
||||
"hasher": "Twox64Concat",
|
||||
"key": "ReferendumIndex",
|
||||
"value": "Vec<AccountId>",
|
||||
"key": "AccountId",
|
||||
"value": "Voting",
|
||||
"linked": false
|
||||
}
|
||||
},
|
||||
"fallback": "0x00",
|
||||
"fallback": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||
"documentation": [
|
||||
" Get the voters for the current proposal."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "VoteOf",
|
||||
"modifier": "Default",
|
||||
"type": {
|
||||
"Map": {
|
||||
"hasher": "Twox64Concat",
|
||||
"key": "(ReferendumIndex,AccountId)",
|
||||
"value": "Vote",
|
||||
"linked": false
|
||||
}
|
||||
},
|
||||
"fallback": "0x00",
|
||||
"documentation": [
|
||||
" Get the vote in a given referendum of a particular voter. The result is meaningful only",
|
||||
" if `voters_for` includes the voter when called with the referendum (you'll get the",
|
||||
" default `Vote` value otherwise). If you don't want to check `voters_for`, then you can",
|
||||
" also check for simple existence with `VoteOf::contains_key` first."
|
||||
" All votes for a particular voter. We store the balance for the number of votes that we",
|
||||
" have recorded. The second item is the total amount of delegations, that will be added."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -3034,22 +3017,6 @@
|
||||
" vote-transaction-sending account."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Delegations",
|
||||
"modifier": "Default",
|
||||
"type": {
|
||||
"Map": {
|
||||
"hasher": "Twox64Concat",
|
||||
"key": "AccountId",
|
||||
"value": "(AccountId,Conviction)",
|
||||
"linked": false
|
||||
}
|
||||
},
|
||||
"fallback": "0x000000000000000000000000000000000000000000000000000000000000000000",
|
||||
"documentation": [
|
||||
" Get the account (and lock periods) to which another account is delegating vote."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Locks",
|
||||
"modifier": "Optional",
|
||||
@@ -3153,7 +3120,8 @@
|
||||
" Emits `Proposed`.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" - `O(1)`.",
|
||||
" - `O(P)`",
|
||||
" - P is the number proposals in the `PublicProps` vec.",
|
||||
" - Two DB changes, one DB entry.",
|
||||
" # </weight>"
|
||||
]
|
||||
@@ -3175,7 +3143,8 @@
|
||||
" - `proposal`: The index of the proposal to second.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" - `O(1)`.",
|
||||
" - `O(S)`.",
|
||||
" - S is the number of seconds a proposal already has.",
|
||||
" - One DB entry.",
|
||||
" # </weight>"
|
||||
]
|
||||
@@ -3189,7 +3158,7 @@
|
||||
},
|
||||
{
|
||||
"name": "vote",
|
||||
"type": "Vote"
|
||||
"type": "AccountVote"
|
||||
}
|
||||
],
|
||||
"documentation": [
|
||||
@@ -3202,7 +3171,8 @@
|
||||
" - `vote`: The vote configuration.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" - `O(1)`.",
|
||||
" - `O(R)`.",
|
||||
" - R is the number of referendums the voter has voted on.",
|
||||
" - One DB change, one DB entry.",
|
||||
" # </weight>"
|
||||
]
|
||||
@@ -3216,7 +3186,7 @@
|
||||
},
|
||||
{
|
||||
"name": "vote",
|
||||
"type": "Vote"
|
||||
"type": "AccountVote"
|
||||
}
|
||||
],
|
||||
"documentation": [
|
||||
@@ -3251,7 +3221,7 @@
|
||||
" -`ref_index`: The index of the referendum to cancel.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" - Depends on size of storage vec `VotersFor` for this referendum.",
|
||||
" - `O(1)`.",
|
||||
" # </weight>"
|
||||
]
|
||||
},
|
||||
@@ -3352,7 +3322,7 @@
|
||||
"",
|
||||
" - `proposal_hash`: The hash of the current external proposal.",
|
||||
" - `voting_period`: The period that is allowed for voting on this proposal. Increased to",
|
||||
" `EmergencyVotingPeriod` if too low.",
|
||||
" `FastTrackVotingPeriod` if too low.",
|
||||
" - `delay`: The number of block after voting has ended in approval and this should be",
|
||||
" enacted. This doesn't have a minimum amount.",
|
||||
"",
|
||||
@@ -3387,6 +3357,7 @@
|
||||
" - One DB clear.",
|
||||
" - Performs a binary search on `existing_vetoers` which should not",
|
||||
" be very large.",
|
||||
" - O(log v), v is number of `existing_vetoers`",
|
||||
" # </weight>"
|
||||
]
|
||||
},
|
||||
@@ -3427,6 +3398,7 @@
|
||||
"",
|
||||
" # <weight>",
|
||||
" - One DB change.",
|
||||
" - O(d) where d is the items in the dispatch queue.",
|
||||
" # </weight>"
|
||||
]
|
||||
},
|
||||
@@ -3501,23 +3473,32 @@
|
||||
{
|
||||
"name": "conviction",
|
||||
"type": "Conviction"
|
||||
},
|
||||
{
|
||||
"name": "balance",
|
||||
"type": "BalanceOf"
|
||||
}
|
||||
],
|
||||
"documentation": [
|
||||
" Delegate vote.",
|
||||
" Delegate the voting power (with some given conviction) of the sending account.",
|
||||
"",
|
||||
" Currency is locked indefinitely for as long as it's delegated.",
|
||||
" The balance delegated is locked for as long as it's delegated, and thereafter for the",
|
||||
" time appropriate for the conviction's lock period.",
|
||||
"",
|
||||
" The dispatch origin of this call must be _Signed_.",
|
||||
" The dispatch origin of this call must be _Signed_, and the signing account must either:",
|
||||
" - be delegating already; or",
|
||||
" - have no voting activity (if there is, then it will need to be removed/consolidated",
|
||||
" through `reap_vote` or `unvote`).",
|
||||
"",
|
||||
" - `to`: The account to make a delegate of the sender.",
|
||||
" - `conviction`: The conviction that will be attached to the delegated",
|
||||
" votes.",
|
||||
" - `to`: The account whose voting the `target` account's voting power will follow.",
|
||||
" - `conviction`: The conviction that will be attached to the delegated votes. When the",
|
||||
" account is undelegated, the funds will be locked for the corresponding period.",
|
||||
" - `balance`: The amount of the account's balance to be used in delegating. This must",
|
||||
" not be more than the account's current balance.",
|
||||
"",
|
||||
" Emits `Delegated`.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" - One extra DB entry.",
|
||||
" # </weight>"
|
||||
]
|
||||
},
|
||||
@@ -3525,13 +3506,13 @@
|
||||
"name": "undelegate",
|
||||
"args": [],
|
||||
"documentation": [
|
||||
" Undelegate vote.",
|
||||
" Undelegate the voting power of the sending account.",
|
||||
"",
|
||||
" Must be sent from an account that has called delegate previously.",
|
||||
" The tokens will be reduced from an indefinite lock to the maximum",
|
||||
" possible according to the conviction of the prior delegation.",
|
||||
" Tokens may be unlocked following once an amount of time consistent with the lock period",
|
||||
" of the conviction with which the delegation was issued.",
|
||||
"",
|
||||
" The dispatch origin of this call must be _Signed_.",
|
||||
" The dispatch origin of this call must be _Signed_ and the signing account must be",
|
||||
" currently delegating.",
|
||||
"",
|
||||
" Emits `Undelegated`.",
|
||||
"",
|
||||
@@ -3597,7 +3578,7 @@
|
||||
" Emits `PreimageNoted`.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" - Dependent on the size of `encoded_proposal`.",
|
||||
" - Dependent on the size of `encoded_proposal` and length of dispatch queue.",
|
||||
" # </weight>"
|
||||
]
|
||||
},
|
||||
@@ -3642,8 +3623,6 @@
|
||||
"",
|
||||
" - `target`: The account to remove the lock on.",
|
||||
"",
|
||||
" Emits `Unlocked`.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" - `O(1)`.",
|
||||
" # </weight>"
|
||||
@@ -3672,6 +3651,161 @@
|
||||
" - One extra DB entry.",
|
||||
" # </weight>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "remove_vote",
|
||||
"args": [
|
||||
{
|
||||
"name": "index",
|
||||
"type": "ReferendumIndex"
|
||||
}
|
||||
],
|
||||
"documentation": [
|
||||
" Remove a vote for a referendum.",
|
||||
"",
|
||||
" If:",
|
||||
" - the referendum was cancelled, or",
|
||||
" - the referendum is ongoing, or",
|
||||
" - the referendum has ended such that",
|
||||
" - the vote of the account was in opposition to the result; or",
|
||||
" - there was no conviction to the account's vote; or",
|
||||
" - the account made a split vote",
|
||||
" ...then the vote is removed cleanly and a following call to `unlock` may result in more",
|
||||
" funds being available.",
|
||||
"",
|
||||
" If, however, the referendum has ended and:",
|
||||
" - it finished corresponding to the vote of the account, and",
|
||||
" - the account made a standard vote with conviction, and",
|
||||
" - the lock period of the conviction is not over",
|
||||
" ...then the lock will be aggregated into the overall account's lock, which may involve",
|
||||
" *overlocking* (where the two locks are combined into a single lock that is the maximum",
|
||||
" of both the amount locked and the time is it locked for).",
|
||||
"",
|
||||
" The dispatch origin of this call must be _Signed_, and the signer must have a vote",
|
||||
" registered for referendum `index`.",
|
||||
"",
|
||||
" - `index`: The index of referendum of the vote to be removed.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" - `O(R + log R)` where R is the number of referenda that `target` has voted on.",
|
||||
" # </weight>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "remove_other_vote",
|
||||
"args": [
|
||||
{
|
||||
"name": "target",
|
||||
"type": "AccountId"
|
||||
},
|
||||
{
|
||||
"name": "index",
|
||||
"type": "ReferendumIndex"
|
||||
}
|
||||
],
|
||||
"documentation": [
|
||||
" Remove a vote for a referendum.",
|
||||
"",
|
||||
" If the `target` is equal to the signer, then this function is exactly equivalent to",
|
||||
" `remove_vote`. If not equal to the signer, then the vote must have expired,",
|
||||
" either because the referendum was cancelled, because the voter lost the referendum or",
|
||||
" because the conviction period is over.",
|
||||
"",
|
||||
" The dispatch origin of this call must be _Signed_.",
|
||||
"",
|
||||
" - `target`: The account of the vote to be removed; this account must have voted for",
|
||||
" referendum `index`.",
|
||||
" - `index`: The index of referendum of the vote to be removed.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" - `O(R + log R)` where R is the number of referenda that `target` has voted on.",
|
||||
" # </weight>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "proxy_delegate",
|
||||
"args": [
|
||||
{
|
||||
"name": "to",
|
||||
"type": "AccountId"
|
||||
},
|
||||
{
|
||||
"name": "conviction",
|
||||
"type": "Conviction"
|
||||
},
|
||||
{
|
||||
"name": "balance",
|
||||
"type": "BalanceOf"
|
||||
}
|
||||
],
|
||||
"documentation": [
|
||||
" Delegate the voting power (with some given conviction) of a proxied account.",
|
||||
"",
|
||||
" The balance delegated is locked for as long as it's delegated, and thereafter for the",
|
||||
" time appropriate for the conviction's lock period.",
|
||||
"",
|
||||
" The dispatch origin of this call must be _Signed_, and the signing account must have",
|
||||
" been set as the proxy account for `target`.",
|
||||
"",
|
||||
" - `target`: The account whole voting power shall be delegated and whose balance locked.",
|
||||
" This account must either:",
|
||||
" - be delegating already; or",
|
||||
" - have no voting activity (if there is, then it will need to be removed/consolidated",
|
||||
" through `reap_vote` or `unvote`).",
|
||||
" - `to`: The account whose voting the `target` account's voting power will follow.",
|
||||
" - `conviction`: The conviction that will be attached to the delegated votes. When the",
|
||||
" account is undelegated, the funds will be locked for the corresponding period.",
|
||||
" - `balance`: The amount of the account's balance to be used in delegating. This must",
|
||||
" not be more than the account's current balance.",
|
||||
"",
|
||||
" Emits `Delegated`.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" # </weight>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "proxy_undelegate",
|
||||
"args": [],
|
||||
"documentation": [
|
||||
" Undelegate the voting power of a proxied account.",
|
||||
"",
|
||||
" Tokens may be unlocked following once an amount of time consistent with the lock period",
|
||||
" of the conviction with which the delegation was issued.",
|
||||
"",
|
||||
" The dispatch origin of this call must be _Signed_ and the signing account must be a",
|
||||
" proxy for some other account which is currently delegating.",
|
||||
"",
|
||||
" Emits `Undelegated`.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" - O(1).",
|
||||
" # </weight>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "proxy_remove_vote",
|
||||
"args": [
|
||||
{
|
||||
"name": "index",
|
||||
"type": "ReferendumIndex"
|
||||
}
|
||||
],
|
||||
"documentation": [
|
||||
" Remove a proxied vote for a referendum.",
|
||||
"",
|
||||
" Exactly equivalent to `remove_vote` except that it operates on the account that the",
|
||||
" sender is a proxy for.",
|
||||
"",
|
||||
" The dispatch origin of this call must be _Signed_ and the signing account must be a",
|
||||
" proxy for some other account which has a registered vote for the referendum of `index`.",
|
||||
"",
|
||||
" - `index`: The index of referendum of the vote to be removed.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" - `O(R + log R)` where R is the number of referenda that `target` has voted on.",
|
||||
" # </weight>"
|
||||
]
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
@@ -3882,7 +4016,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "EmergencyVotingPeriod",
|
||||
"name": "FastTrackVotingPeriod",
|
||||
"type": "BlockNumber",
|
||||
"value": "0x80510100",
|
||||
"documentation": [
|
||||
@@ -4004,7 +4138,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Early",
|
||||
"name": "TooEarly",
|
||||
"documentation": [
|
||||
" Too early"
|
||||
]
|
||||
@@ -4068,6 +4202,67 @@
|
||||
"documentation": [
|
||||
" A proxy-de-pairing was attempted to an account that was not active."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "NotVoter",
|
||||
"documentation": [
|
||||
" The given account did not vote on the referendum."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "NoPermission",
|
||||
"documentation": [
|
||||
" The actor has no permission to conduct the action."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "AlreadyDelegating",
|
||||
"documentation": [
|
||||
" The account is already delegating."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Overflow",
|
||||
"documentation": [
|
||||
" An unexpected integer overflow occurred."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Underflow",
|
||||
"documentation": [
|
||||
" An unexpected integer underflow occurred."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "InsufficientFunds",
|
||||
"documentation": [
|
||||
" Too high a balance was provided that the account cannot afford."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "NotDelegating",
|
||||
"documentation": [
|
||||
" The account is not currently delegating."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "VotesExist",
|
||||
"documentation": [
|
||||
" The account currently has votes attached to it and the operation cannot succeed until",
|
||||
" these are removed, either through `unvote` or `reap_vote`."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "InstantNotAllowed",
|
||||
"documentation": [
|
||||
" The instant referendum origin is currently disallowed."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Nonsense",
|
||||
"documentation": [
|
||||
" Delegation to oneself makes no sense."
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -4740,35 +4935,19 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "VotesOf",
|
||||
"name": "Voting",
|
||||
"modifier": "Default",
|
||||
"type": {
|
||||
"Map": {
|
||||
"hasher": "Twox64Concat",
|
||||
"key": "AccountId",
|
||||
"value": "Vec<AccountId>",
|
||||
"value": "(BalanceOf,Vec<AccountId>)",
|
||||
"linked": false
|
||||
}
|
||||
},
|
||||
"fallback": "0x00",
|
||||
"fallback": "0x0000000000000000000000000000000000",
|
||||
"documentation": [
|
||||
" Votes of a particular voter, with the round index of the votes."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "StakeOf",
|
||||
"modifier": "Default",
|
||||
"type": {
|
||||
"Map": {
|
||||
"hasher": "Twox64Concat",
|
||||
"key": "AccountId",
|
||||
"value": "BalanceOf",
|
||||
"linked": false
|
||||
}
|
||||
},
|
||||
"fallback": "0x00000000000000000000000000000000",
|
||||
"documentation": [
|
||||
" Locked stake of a voter."
|
||||
" Votes and locked stake of a particular voter."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -4779,8 +4958,8 @@
|
||||
},
|
||||
"fallback": "0x00",
|
||||
"documentation": [
|
||||
" The present candidate list. Sorted based on account-id. A current member or a runner can",
|
||||
" never enter this vector and is always implicitly assumed to be a candidate."
|
||||
" The present candidate list. Sorted based on account-id. A current member or runner-up",
|
||||
" can never enter this vector and is always implicitly assumed to be a candidate."
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -5316,20 +5495,6 @@
|
||||
"storage": {
|
||||
"prefix": "GrandpaFinality",
|
||||
"items": [
|
||||
{
|
||||
"name": "Authorities",
|
||||
"modifier": "Default",
|
||||
"type": {
|
||||
"Plain": "AuthorityList"
|
||||
},
|
||||
"fallback": "0x00",
|
||||
"documentation": [
|
||||
" DEPRECATED",
|
||||
"",
|
||||
" This used to store the current authority set, which has been migrated to the well-known",
|
||||
" GRANDPA_AUTHORITIES_KEY unhashed key."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "State",
|
||||
"modifier": "Default",
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -20,7 +20,7 @@ import GenericAddress from '@polkadot/types/generic/Address';
|
||||
import Vote from '@polkadot/types/generic/Vote';
|
||||
import Null from '@polkadot/types/primitive/Null';
|
||||
import * as primitiveClasses from '@polkadot/types/primitive';
|
||||
import { isChildClass, stringLowerFirst } from '@polkadot/util';
|
||||
import { isChildClass } from '@polkadot/util';
|
||||
|
||||
import { isCompactEncodable } from './class';
|
||||
import { formatType } from './formatting';
|
||||
@@ -53,6 +53,7 @@ export function getDerivedTypes (definitions: object, type: string, primitiveNam
|
||||
sub: def
|
||||
}
|
||||
];
|
||||
|
||||
if (isCompact) {
|
||||
types.unshift({
|
||||
info: TypeDefInfo.Compact,
|
||||
@@ -110,7 +111,7 @@ export function getSimilarTypes (definitions: object, registry: Registry, _type:
|
||||
possibleTypes.push(arrayToStrType(e.defKeys), 'number');
|
||||
} else {
|
||||
// TODO We don't really want any here, these should be expanded
|
||||
possibleTypes.push(...e.defKeys.map((key): string => `{ ${stringLowerFirst(key)}: any }`), 'string');
|
||||
possibleTypes.push(...e.defKeys.map((key): string => `{ ${key}: any }`), 'string');
|
||||
}
|
||||
|
||||
possibleTypes.push('Uint8Array');
|
||||
|
||||
@@ -7,12 +7,12 @@ import { BlockAttestations, IncludedBlocks, MoreAttestations } from '@polkadot/t
|
||||
import { RawAuraPreDigest } from '@polkadot/types/interfaces/aura';
|
||||
import { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interfaces/author';
|
||||
import { UncleEntryItem } from '@polkadot/types/interfaces/authorship';
|
||||
import { BabeAuthorityWeight, BabeBlockWeight, BabeWeight, EpochAuthorship, MaybeVrf, RawBabePreDigest, RawBabePreDigestCompat, RawBabePreDigestPrimary, RawBabePreDigestPrimaryTo159, RawBabePreDigestSecondary, RawBabePreDigestSecondaryTo159, RawBabePreDigestTo159, SlotNumber, VrfData, VrfProof } from '@polkadot/types/interfaces/babe';
|
||||
import { BabeAuthorityWeight, BabeBlockWeight, BabeWeight, EpochAuthorship, MaybeVrf, Randomness, RawBabePreDigest, RawBabePreDigestCompat, RawBabePreDigestPrimary, RawBabePreDigestPrimaryTo159, RawBabePreDigestSecondary, RawBabePreDigestSecondaryTo159, RawBabePreDigestTo159, SlotNumber, VrfData, VrfProof } from '@polkadot/types/interfaces/babe';
|
||||
import { AccountData, BalanceLock, BalanceLockTo212, Reasons, ReleasesBalances, VestingSchedule, WithdrawReasons } from '@polkadot/types/interfaces/balances';
|
||||
import { BlockHash } from '@polkadot/types/interfaces/chain';
|
||||
import { EthereumAddress } from '@polkadot/types/interfaces/claims';
|
||||
import { MemberCount, ProposalIndex, Votes, VotesTo230 } from '@polkadot/types/interfaces/collective';
|
||||
import { AuthorityId } from '@polkadot/types/interfaces/consensus';
|
||||
import { AuthorityId, RawVRFOutput } from '@polkadot/types/interfaces/consensus';
|
||||
import { AliveContractInfo, CodeHash, ContractCallRequest, ContractExecResult, ContractExecResultSuccess, ContractInfo, ContractStorageKey, Gas, PrefabWasmModule, PrefabWasmModuleReserved, Schedule, ScheduleTo212, SeedOf, TombstoneContractInfo, TrieId } from '@polkadot/types/interfaces/contracts';
|
||||
import { AccountVote, AccountVoteSplit, AccountVoteStandard, Conviction, Delegations, PriorLock, PropIndex, Proposal, ProxyState, ReferendumIndex, ReferendumInfo, ReferendumInfoFinished, ReferendumInfoTo239, ReferendumStatus, Tally, Voting, VotingDelegating, VotingDirect, VotingDirectVote } from '@polkadot/types/interfaces/democracy';
|
||||
import { ApprovalFlag, SetIndex, Vote, VoteIndex, VoteThreshold, VoterInfo } from '@polkadot/types/interfaces/elections';
|
||||
@@ -299,6 +299,9 @@ declare module '@polkadot/types/types/registry' {
|
||||
EpochAuthorship: EpochAuthorship;
|
||||
'Option<EpochAuthorship>': Option<EpochAuthorship>;
|
||||
'Vec<EpochAuthorship>': Vec<EpochAuthorship>;
|
||||
Randomness: Randomness;
|
||||
'Option<Randomness>': Option<Randomness>;
|
||||
'Vec<Randomness>': Vec<Randomness>;
|
||||
RawBabePreDigest: RawBabePreDigest;
|
||||
'Option<RawBabePreDigest>': Option<RawBabePreDigest>;
|
||||
'Vec<RawBabePreDigest>': Vec<RawBabePreDigest>;
|
||||
@@ -368,6 +371,9 @@ declare module '@polkadot/types/types/registry' {
|
||||
AuthorityId: AuthorityId;
|
||||
'Option<AuthorityId>': Option<AuthorityId>;
|
||||
'Vec<AuthorityId>': Vec<AuthorityId>;
|
||||
RawVRFOutput: RawVRFOutput;
|
||||
'Option<RawVRFOutput>': Option<RawVRFOutput>;
|
||||
'Vec<RawVRFOutput>': Vec<RawVRFOutput>;
|
||||
AliveContractInfo: AliveContractInfo;
|
||||
'Option<AliveContractInfo>': Option<AliveContractInfo>;
|
||||
'Vec<AliveContractInfo>': Vec<AliveContractInfo>;
|
||||
|
||||
@@ -22,6 +22,7 @@ export default {
|
||||
primary: 'Vec<u64>',
|
||||
secondary: 'Vec<u64>'
|
||||
},
|
||||
Randomness: 'Hash',
|
||||
RawBabePreDigest: {
|
||||
_enum: {
|
||||
Phantom: 'Null', // index starts at 1... empty slot at 0
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
import { Enum, Option, Struct, U8aFixed, Vec } from '@polkadot/types/codec';
|
||||
import { u32, u64 } from '@polkadot/types/primitive';
|
||||
import { Hash } from '@polkadot/types/interfaces/runtime';
|
||||
|
||||
/** @name BabeAuthorityWeight */
|
||||
export interface BabeAuthorityWeight extends u64 {}
|
||||
@@ -22,6 +23,9 @@ export interface EpochAuthorship extends Struct {
|
||||
/** @name MaybeVrf */
|
||||
export interface MaybeVrf extends Option<VrfData> {}
|
||||
|
||||
/** @name Randomness */
|
||||
export interface Randomness extends Hash {}
|
||||
|
||||
/** @name RawBabePreDigest */
|
||||
export interface RawBabePreDigest extends Enum {
|
||||
readonly isPhantom: boolean;
|
||||
|
||||
@@ -7,6 +7,7 @@ import { Definitions } from '../../types';
|
||||
export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
AuthorityId: 'AccountId'
|
||||
AuthorityId: 'AccountId',
|
||||
RawVRFOutput: '[u8; 32]'
|
||||
}
|
||||
} as Definitions;
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
import { U8aFixed } from '@polkadot/types/codec';
|
||||
import { AccountId } from '@polkadot/types/interfaces/runtime';
|
||||
|
||||
/** @name AuthorityId */
|
||||
export interface AuthorityId extends AccountId {}
|
||||
|
||||
/** @name RawVRFOutput */
|
||||
export interface RawVRFOutput extends U8aFixed {}
|
||||
|
||||
export type PHANTOM_CONSENSUS = 'consensus';
|
||||
|
||||
@@ -90,7 +90,7 @@ export default {
|
||||
PhragmenScore: '[u128; 3]',
|
||||
Points: 'u32',
|
||||
ReleasesStaking: {
|
||||
_enum: ['V1_0_0', 'V2_0_0']
|
||||
_enum: ['V1_0_0', 'V2_0_0', 'V3_0_0']
|
||||
},
|
||||
RewardDestination: {
|
||||
_enum: [
|
||||
|
||||
@@ -122,6 +122,7 @@ export interface Points extends u32 {}
|
||||
export interface ReleasesStaking extends Enum {
|
||||
readonly isV100: boolean;
|
||||
readonly isV200: boolean;
|
||||
readonly isV300: boolean;
|
||||
}
|
||||
|
||||
/** @name RewardDestination */
|
||||
|
||||
Reference in New Issue
Block a user