|
|
|
@@ -19,7 +19,7 @@ import type { AccountId, AccountIndex, AssetId, Balance, BalanceOf, BlockNumber,
|
|
|
|
|
import type { Period, Priority } from '@polkadot/types/interfaces/scheduler';
|
|
|
|
|
import type { Keys } from '@polkadot/types/interfaces/session';
|
|
|
|
|
import type { SocietyJudgement } from '@polkadot/types/interfaces/society';
|
|
|
|
|
import type { ElectionScore, EraIndex, RawSolution, ReadySolution, RewardDestination, SolutionOrSnapshotSize, ValidatorPrefs } from '@polkadot/types/interfaces/staking';
|
|
|
|
|
import type { ElectionScore, EraIndex, RawSolution, RewardDestination, SolutionOrSnapshotSize, Supports, ValidatorPrefs } from '@polkadot/types/interfaces/staking';
|
|
|
|
|
import type { Key } from '@polkadot/types/interfaces/system';
|
|
|
|
|
import type { BountyIndex } from '@polkadot/types/interfaces/treasury';
|
|
|
|
|
import type { ClassId, DestroyWitness, InstanceId } from '@polkadot/types/interfaces/uniques';
|
|
|
|
@@ -1256,7 +1256,7 @@ declare module '@polkadot/api/types/submittable' {
|
|
|
|
|
* feasibility check itself can in principle cause the election process to fail (due to
|
|
|
|
|
* memory/weight constrains).
|
|
|
|
|
**/
|
|
|
|
|
setEmergencyElectionResult: AugmentedSubmittable<(solution: ReadySolution | { supports?: any; score?: any; compute?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [ReadySolution]>;
|
|
|
|
|
setEmergencyElectionResult: AugmentedSubmittable<(supports: Supports) => SubmittableExtrinsic<ApiType>, [Supports]>;
|
|
|
|
|
/**
|
|
|
|
|
* Set a new value for `MinimumUntrustedScore`.
|
|
|
|
|
*
|
|
|
|
@@ -2936,7 +2936,6 @@ declare module '@polkadot/api/types/submittable' {
|
|
|
|
|
* The dispatch origin for this call must be _Signed_ by the stash account.
|
|
|
|
|
*
|
|
|
|
|
* Emits `Bonded`.
|
|
|
|
|
*
|
|
|
|
|
* # <weight>
|
|
|
|
|
* - Independent of the arguments. Moderate complexity.
|
|
|
|
|
* - O(1).
|
|
|
|
@@ -2945,10 +2944,6 @@ declare module '@polkadot/api/types/submittable' {
|
|
|
|
|
* NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned
|
|
|
|
|
* unless the `origin` falls below _existential deposit_ and gets removed as dust.
|
|
|
|
|
* ------------------
|
|
|
|
|
* Weight: O(1)
|
|
|
|
|
* DB Weight:
|
|
|
|
|
* - Read: Bonded, Ledger, [Origin Account], Current Era, History Depth, Locks
|
|
|
|
|
* - Write: Bonded, Payee, [Origin Account], Locks, Ledger
|
|
|
|
|
* # </weight>
|
|
|
|
|
**/
|
|
|
|
|
bond: AugmentedSubmittable<(controller: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, value: Compact<BalanceOf> | AnyNumber | Uint8Array, payee: RewardDestination | { Staked: any } | { Stash: any } | { Controller: any } | { Account: any } | { None: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource, Compact<BalanceOf>, RewardDestination]>;
|
|
|
|
@@ -2956,23 +2951,17 @@ declare module '@polkadot/api/types/submittable' {
|
|
|
|
|
* Add some extra amount that have appeared in the stash `free_balance` into the balance up
|
|
|
|
|
* for staking.
|
|
|
|
|
*
|
|
|
|
|
* The dispatch origin for this call must be _Signed_ by the stash, not the controller.
|
|
|
|
|
*
|
|
|
|
|
* Use this if there are additional funds in your stash account that you wish to bond.
|
|
|
|
|
* Unlike [`bond`] or [`unbond`] this function does not impose any limitation on the amount
|
|
|
|
|
* that can be added.
|
|
|
|
|
*
|
|
|
|
|
* The dispatch origin for this call must be _Signed_ by the stash, not the controller and
|
|
|
|
|
* it can be only called when [`EraElectionStatus`] is `Closed`.
|
|
|
|
|
*
|
|
|
|
|
* Emits `Bonded`.
|
|
|
|
|
*
|
|
|
|
|
* # <weight>
|
|
|
|
|
* - Independent of the arguments. Insignificant complexity.
|
|
|
|
|
* - O(1).
|
|
|
|
|
* - One DB entry.
|
|
|
|
|
* ------------
|
|
|
|
|
* DB Weight:
|
|
|
|
|
* - Read: Era Election Status, Bonded, Ledger, [Origin Account], Locks
|
|
|
|
|
* - Write: [Origin Account], Locks, Ledger
|
|
|
|
|
* # </weight>
|
|
|
|
|
**/
|
|
|
|
|
bondExtra: AugmentedSubmittable<(maxAdditional: Compact<BalanceOf> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<BalanceOf>]>;
|
|
|
|
@@ -2998,17 +2987,11 @@ declare module '@polkadot/api/types/submittable' {
|
|
|
|
|
* Effects will be felt at the beginning of the next era.
|
|
|
|
|
*
|
|
|
|
|
* The dispatch origin for this call must be _Signed_ by the controller, not the stash.
|
|
|
|
|
* And, it can be only called when [`EraElectionStatus`] is `Closed`.
|
|
|
|
|
*
|
|
|
|
|
* # <weight>
|
|
|
|
|
* - Independent of the arguments. Insignificant complexity.
|
|
|
|
|
* - Contains one read.
|
|
|
|
|
* - Writes are limited to the `origin` account key.
|
|
|
|
|
* --------
|
|
|
|
|
* Weight: O(1)
|
|
|
|
|
* DB Weight:
|
|
|
|
|
* - Read: EraElectionStatus, Ledger
|
|
|
|
|
* - Write: Validators, Nominators
|
|
|
|
|
* # </weight>
|
|
|
|
|
**/
|
|
|
|
|
chill: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
|
|
|
@@ -3120,8 +3103,6 @@ declare module '@polkadot/api/types/submittable' {
|
|
|
|
|
* Effects will be felt at the beginning of the next era.
|
|
|
|
|
*
|
|
|
|
|
* The dispatch origin for this call must be _Signed_ by the controller, not the stash.
|
|
|
|
|
* And, it can be only called when [`EraElectionStatus`] is `Closed`. The controller
|
|
|
|
|
* account should represent a validator.
|
|
|
|
|
*
|
|
|
|
|
* - `who`: A list of nominator stash accounts who are nominating this validator which
|
|
|
|
|
* should no longer be nominating this validator.
|
|
|
|
@@ -3133,22 +3114,14 @@ declare module '@polkadot/api/types/submittable' {
|
|
|
|
|
/**
|
|
|
|
|
* Declare the desire to nominate `targets` for the origin controller.
|
|
|
|
|
*
|
|
|
|
|
* Effects will be felt at the beginning of the next era. This can only be called when
|
|
|
|
|
* [`EraElectionStatus`] is `Closed`.
|
|
|
|
|
* Effects will be felt at the beginning of the next era.
|
|
|
|
|
*
|
|
|
|
|
* The dispatch origin for this call must be _Signed_ by the controller, not the stash.
|
|
|
|
|
* And, it can be only called when [`EraElectionStatus`] is `Closed`.
|
|
|
|
|
*
|
|
|
|
|
* # <weight>
|
|
|
|
|
* - The transaction's complexity is proportional to the size of `targets` (N)
|
|
|
|
|
* which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS).
|
|
|
|
|
* - Both the reads and writes follow a similar pattern.
|
|
|
|
|
* ---------
|
|
|
|
|
* Weight: O(N)
|
|
|
|
|
* where N is the number of targets
|
|
|
|
|
* DB Weight:
|
|
|
|
|
* - Reads: Era Election Status, Ledger, Current Era
|
|
|
|
|
* - Writes: Validators, Nominators
|
|
|
|
|
* # </weight>
|
|
|
|
|
**/
|
|
|
|
|
nominate: AugmentedSubmittable<(targets: Vec<LookupSource> | (LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<LookupSource>]>;
|
|
|
|
@@ -3162,8 +3135,6 @@ declare module '@polkadot/api/types/submittable' {
|
|
|
|
|
* The origin of this call must be _Signed_. Any account can call this function, even if
|
|
|
|
|
* it is not one of the stakers.
|
|
|
|
|
*
|
|
|
|
|
* This can only be called when [`EraElectionStatus`] is `Closed`.
|
|
|
|
|
*
|
|
|
|
|
* # <weight>
|
|
|
|
|
* - Time complexity: at most O(MaxNominatorRewardedPerValidator).
|
|
|
|
|
* - Contains a limited number of reads and writes.
|
|
|
|
@@ -3172,11 +3143,6 @@ declare module '@polkadot/api/types/submittable' {
|
|
|
|
|
* Weight:
|
|
|
|
|
* - Reward Destination Staked: O(N)
|
|
|
|
|
* - Reward Destination Controller (Creating): O(N)
|
|
|
|
|
* DB Weight:
|
|
|
|
|
* - Read: EraElectionStatus, CurrentEra, HistoryDepth, ErasValidatorReward,
|
|
|
|
|
* ErasStakersClipped, ErasRewardPoints, ErasValidatorPrefs (8 items)
|
|
|
|
|
* - Read Each: Bonded, Ledger, Payee, Locks, System Account (5 items)
|
|
|
|
|
* - Write Each: System Account, Locks, Ledger (3 items)
|
|
|
|
|
*
|
|
|
|
|
* NOTE: weights are assuming that payouts are made to alive stash account (Staked).
|
|
|
|
|
* Paying even a dead controller is cheaper weight-wise. We don't do any refunds here.
|
|
|
|
@@ -3204,17 +3170,12 @@ declare module '@polkadot/api/types/submittable' {
|
|
|
|
|
/**
|
|
|
|
|
* Rebond a portion of the stash scheduled to be unlocked.
|
|
|
|
|
*
|
|
|
|
|
* The dispatch origin must be signed by the controller, and it can be only called when
|
|
|
|
|
* [`EraElectionStatus`] is `Closed`.
|
|
|
|
|
* The dispatch origin must be signed by the controller.
|
|
|
|
|
*
|
|
|
|
|
* # <weight>
|
|
|
|
|
* - Time complexity: O(L), where L is unlocking chunks
|
|
|
|
|
* - Bounded by `MAX_UNLOCKING_CHUNKS`.
|
|
|
|
|
* - Storage changes: Can't increase storage, only decrease it.
|
|
|
|
|
* ---------------
|
|
|
|
|
* - DB Weight:
|
|
|
|
|
* - Reads: EraElectionStatus, Ledger, Locks, [Origin Account]
|
|
|
|
|
* - Writes: [Origin Account], Locks, Ledger
|
|
|
|
|
* # </weight>
|
|
|
|
|
**/
|
|
|
|
|
rebond: AugmentedSubmittable<(value: Compact<BalanceOf> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<BalanceOf>]>;
|
|
|
|
@@ -3333,6 +3294,8 @@ declare module '@polkadot/api/types/submittable' {
|
|
|
|
|
* period ends. If this leaves an amount actively bonded less than
|
|
|
|
|
* T::Currency::minimum_balance(), then it is increased to the full amount.
|
|
|
|
|
*
|
|
|
|
|
* The dispatch origin for this call must be _Signed_ by the controller, not the stash.
|
|
|
|
|
*
|
|
|
|
|
* Once the unlock period is done, you can call `withdraw_unbonded` to actually move
|
|
|
|
|
* the funds out of management ready for transfer.
|
|
|
|
|
*
|
|
|
|
@@ -3343,27 +3306,9 @@ declare module '@polkadot/api/types/submittable' {
|
|
|
|
|
* If a user encounters the `InsufficientBond` error when calling this extrinsic,
|
|
|
|
|
* they should call `chill` first in order to free up their bonded funds.
|
|
|
|
|
*
|
|
|
|
|
* The dispatch origin for this call must be _Signed_ by the controller, not the stash.
|
|
|
|
|
* And, it can be only called when [`EraElectionStatus`] is `Closed`.
|
|
|
|
|
*
|
|
|
|
|
* Emits `Unbonded`.
|
|
|
|
|
*
|
|
|
|
|
* See also [`Call::withdraw_unbonded`].
|
|
|
|
|
*
|
|
|
|
|
* # <weight>
|
|
|
|
|
* - Independent of the arguments. Limited but potentially exploitable complexity.
|
|
|
|
|
* - Contains a limited number of reads.
|
|
|
|
|
* - Each call (requires the remainder of the bonded balance to be above `minimum_balance`)
|
|
|
|
|
* will cause a new entry to be inserted into a vector (`Ledger.unlocking`) kept in storage.
|
|
|
|
|
* The only way to clean the aforementioned storage item is also user-controlled via
|
|
|
|
|
* `withdraw_unbonded`.
|
|
|
|
|
* - One DB entry.
|
|
|
|
|
* ----------
|
|
|
|
|
* Weight: O(1)
|
|
|
|
|
* DB Weight:
|
|
|
|
|
* - Read: EraElectionStatus, Ledger, CurrentEra, Locks, BalanceOf Stash,
|
|
|
|
|
* - Write: Locks, Ledger, BalanceOf Stash,
|
|
|
|
|
* </weight>
|
|
|
|
|
**/
|
|
|
|
|
unbond: AugmentedSubmittable<(value: Compact<BalanceOf> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<BalanceOf>]>;
|
|
|
|
|
/**
|
|
|
|
@@ -3372,18 +3317,6 @@ declare module '@polkadot/api/types/submittable' {
|
|
|
|
|
* Effects will be felt at the beginning of the next era.
|
|
|
|
|
*
|
|
|
|
|
* The dispatch origin for this call must be _Signed_ by the controller, not the stash.
|
|
|
|
|
* And, it can be only called when [`EraElectionStatus`] is `Closed`.
|
|
|
|
|
*
|
|
|
|
|
* # <weight>
|
|
|
|
|
* - Independent of the arguments. Insignificant complexity.
|
|
|
|
|
* - Contains a limited number of reads.
|
|
|
|
|
* - Writes are limited to the `origin` account key.
|
|
|
|
|
* -----------
|
|
|
|
|
* Weight: O(1)
|
|
|
|
|
* DB Weight:
|
|
|
|
|
* - Read: Era Election Status, Ledger
|
|
|
|
|
* - Write: Nominators, Validators
|
|
|
|
|
* # </weight>
|
|
|
|
|
**/
|
|
|
|
|
validate: AugmentedSubmittable<(prefs: ValidatorPrefs | { commission?: any; blocked?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [ValidatorPrefs]>;
|
|
|
|
|
/**
|
|
|
|
@@ -3392,30 +3325,14 @@ declare module '@polkadot/api/types/submittable' {
|
|
|
|
|
* This essentially frees up that balance to be used by the stash account to do
|
|
|
|
|
* whatever it wants.
|
|
|
|
|
*
|
|
|
|
|
* The dispatch origin for this call must be _Signed_ by the controller, not the stash.
|
|
|
|
|
* And, it can be only called when [`EraElectionStatus`] is `Closed`.
|
|
|
|
|
* The dispatch origin for this call must be _Signed_ by the controller.
|
|
|
|
|
*
|
|
|
|
|
* Emits `Withdrawn`.
|
|
|
|
|
*
|
|
|
|
|
* See also [`Call::unbond`].
|
|
|
|
|
*
|
|
|
|
|
* # <weight>
|
|
|
|
|
* - Could be dependent on the `origin` argument and how much `unlocking` chunks exist.
|
|
|
|
|
* It implies `consolidate_unlocked` which loops over `Ledger.unlocking`, which is
|
|
|
|
|
* indirectly user-controlled. See [`unbond`] for more detail.
|
|
|
|
|
* - Contains a limited number of reads, yet the size of which could be large based on `ledger`.
|
|
|
|
|
* - Writes are limited to the `origin` account key.
|
|
|
|
|
* ---------------
|
|
|
|
|
* Complexity O(S) where S is the number of slashing spans to remove
|
|
|
|
|
* Update:
|
|
|
|
|
* - Reads: EraElectionStatus, Ledger, Current Era, Locks, [Origin Account]
|
|
|
|
|
* - Writes: [Origin Account], Locks, Ledger
|
|
|
|
|
* Kill:
|
|
|
|
|
* - Reads: EraElectionStatus, Ledger, Current Era, Bonded, Slashing Spans, [Origin
|
|
|
|
|
* Account], Locks, BalanceOf stash
|
|
|
|
|
* - Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators,
|
|
|
|
|
* [Origin Account], Locks, BalanceOf stash.
|
|
|
|
|
* - Writes Each: SpanSlash * S
|
|
|
|
|
* NOTE: Weight annotation is the kill scenario, we refund otherwise.
|
|
|
|
|
* # </weight>
|
|
|
|
|
**/
|
|
|
|
|