Bump metadata (incl. lazy payouts) (#1995)
* Bump metadata (inl. lazy payouts) * Fix currentElected via generic * Update tests for latest metadata
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { ApiInterfaceRx } from '@polkadot/api/types';
|
||||
import { EraIndex, MomentOf, SessionIndex } from '@polkadot/types/interfaces';
|
||||
import { ActiveEraInfo, EraIndex, Moment, SessionIndex } from '@polkadot/types/interfaces';
|
||||
import { DeriveSessionIndexes } from '../types';
|
||||
|
||||
import { Observable, of } from 'rxjs';
|
||||
@@ -12,7 +12,7 @@ import { createType, Option, u32 } from '@polkadot/types';
|
||||
|
||||
import { memo } from '../util';
|
||||
|
||||
type Result = [EraIndex, Option<MomentOf>, EraIndex, SessionIndex, u32];
|
||||
type Result = [EraIndex, Option<Moment>, EraIndex, SessionIndex, u32];
|
||||
|
||||
// parse into Indexes
|
||||
function parse ([activeEra, activeEraStart, currentEra, currentIndex, validatorCount]: Result): DeriveSessionIndexes {
|
||||
@@ -34,7 +34,7 @@ function queryNoActive (api: ApiInterfaceRx): Observable<Result> {
|
||||
]).pipe(
|
||||
map(([currentEra, currentIndex, validatorCount]): Result => [
|
||||
currentEra,
|
||||
createType(api.registry, 'Option<MomentOf>'),
|
||||
createType(api.registry, 'Option<Moment>'),
|
||||
currentEra,
|
||||
currentIndex,
|
||||
validatorCount
|
||||
@@ -44,15 +44,14 @@ function queryNoActive (api: ApiInterfaceRx): Observable<Result> {
|
||||
|
||||
// query based on latest
|
||||
function query (api: ApiInterfaceRx): Observable<Result> {
|
||||
return api.queryMulti<[Option<EraIndex>, Option<MomentOf>, Option<EraIndex>, SessionIndex, u32]>([
|
||||
return api.queryMulti<[ActiveEraInfo, Option<EraIndex>, SessionIndex, u32]>([
|
||||
api.query.staking.activeEra,
|
||||
api.query.staking.activeEraStart,
|
||||
api.query.staking.currentEra,
|
||||
api.query.session.currentIndex,
|
||||
api.query.staking.validatorCount
|
||||
]).pipe(
|
||||
map(([activeEra, activeEraStart, currentEra, currentIndex, validatorCount]): Result => [
|
||||
activeEra.unwrapOr(createType(api.registry, 'EraIndex', 1)),
|
||||
map(([{ index: activeEra, start: activeEraStart }, currentEra, currentIndex, validatorCount]): Result => [
|
||||
activeEra,
|
||||
activeEraStart,
|
||||
currentEra.unwrapOr(createType(api.registry, 'EraIndex', 1)),
|
||||
currentIndex,
|
||||
@@ -65,7 +64,7 @@ function query (api: ApiInterfaceRx): Observable<Result> {
|
||||
function empty (api: ApiInterfaceRx): Observable<Result> {
|
||||
return of([
|
||||
createType(api.registry, 'EraIndex', 1),
|
||||
createType(api.registry, 'Option<MomentOf>'),
|
||||
createType(api.registry, 'Option<Moment>'),
|
||||
createType(api.registry, 'EraIndex', 1),
|
||||
createType(api.registry, 'SessionIndex', 1),
|
||||
createType(api.registry, 'u32')
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { ApiInterfaceRx } from '@polkadot/api/types';
|
||||
import { AccountId } from '@polkadot/types/interfaces';
|
||||
import { DeriveStakingValidators } from '../types';
|
||||
|
||||
import { Observable, combineLatest, of } from 'rxjs';
|
||||
@@ -26,7 +27,7 @@ export function validators (api: ApiInterfaceRx): () => Observable<DeriveStaking
|
||||
api.query.staking?.currentElected
|
||||
? api.query.staking.erasStakers
|
||||
? of(null)
|
||||
: api.query.staking.currentElected()
|
||||
: api.query.staking.currentElected<AccountId[]>()
|
||||
: of([])
|
||||
]).pipe(
|
||||
map(([validators, nextElected]): DeriveStakingValidators => ({
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { AccountId, AccountIndex, Balance, BalanceLock, BalanceLockTo212, BalanceOf, Bid, BidKind, BlockNumber, CollatorId, EraIndex, EraRewardPoints, Exposure, Hash, Index, Keys, MomentOf, ParaId, ParaInfo, Proposal, PropIndex, ProposalIndex, ReferendumInfo, RegistrationJudgement, RewardDestination, SessionIndex, SetIndex, SocietyVote, StakingLedger, StrikeCount, TreasuryProposal, UpwardMessage, ValidatorPrefs, Vote, Votes, VoteIndex, VouchingStatus } from '@polkadot/types/interfaces';
|
||||
import { AccountId, AccountIndex, Balance, BalanceLock, BalanceLockTo212, BalanceOf, Bid, BidKind, BlockNumber, CollatorId, EraIndex, EraRewardPoints, Exposure, Hash, Index, Keys, Moment, ParaId, ParaInfo, Proposal, PropIndex, ProposalIndex, ReferendumInfo, RegistrationJudgement, RewardDestination, SessionIndex, SetIndex, SocietyVote, StakingLedger, StrikeCount, TreasuryProposal, UpwardMessage, ValidatorPrefs, Vote, Votes, VoteIndex, VouchingStatus } from '@polkadot/types/interfaces';
|
||||
|
||||
import BN from 'bn.js';
|
||||
import { Bytes, Option, u32, Vec } from '@polkadot/types';
|
||||
@@ -172,7 +172,7 @@ export interface DerivedReferendumVote {
|
||||
|
||||
export interface DeriveSessionIndexes {
|
||||
activeEra: EraIndex;
|
||||
activeEraStart: Option<MomentOf>;
|
||||
activeEraStart: Option<Moment>;
|
||||
currentEra: EraIndex;
|
||||
currentIndex: SessionIndex;
|
||||
validatorCount: u32;
|
||||
|
||||
@@ -176,7 +176,7 @@ declare module '@polkadot/metadata/Decorated/consts/types' {
|
||||
**/
|
||||
tombstoneDeposit: AugmentedConst<BalanceOf>;
|
||||
/**
|
||||
* Size of a contract at the time of instantiaion. This is a simple way to ensure that
|
||||
* Size of a contract at the time of instantiation. This is a simple way to ensure that
|
||||
* empty contracts eventually gets deleted.
|
||||
**/
|
||||
storageSizeOffset: AugmentedConst<u32>;
|
||||
|
||||
@@ -10,18 +10,18 @@ import { AccountData, BalanceLock } from '@polkadot/types/interfaces/balances';
|
||||
import { ProposalIndex, Votes } from '@polkadot/types/interfaces/collective';
|
||||
import { AuthorityId } from '@polkadot/types/interfaces/consensus';
|
||||
import { CodeHash, ContractInfo, Gas, PrefabWasmModule, Schedule } from '@polkadot/types/interfaces/contracts';
|
||||
import { Conviction, PropIndex, Proposal, ReferendumIndex, ReferendumInfo } from '@polkadot/types/interfaces/democracy';
|
||||
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 { RegistrarInfo, Registration } from '@polkadot/types/interfaces/identity';
|
||||
import { AuthIndex } from '@polkadot/types/interfaces/imOnline';
|
||||
import { Kind, OffenceDetails, OpaqueTimeSlot, ReportIdOf } from '@polkadot/types/interfaces/offences';
|
||||
import { ActiveRecovery, RecoveryConfig } from '@polkadot/types/interfaces/recovery';
|
||||
import { AccountId, AccountIndex, Balance, BalanceOf, BlockNumber, Hash, Index, KeyTypeId, Moment, Perbill, ValidatorId, Weight } from '@polkadot/types/interfaces/runtime';
|
||||
import { AccountId, AccountIndex, Balance, BalanceOf, BlockNumber, Hash, KeyTypeId, Moment, Perbill, ValidatorId, Weight } from '@polkadot/types/interfaces/runtime';
|
||||
import { Keys, SessionIndex } from '@polkadot/types/interfaces/session';
|
||||
import { Bid, BidKind, SocietyVote, StrikeCount, VouchingStatus } from '@polkadot/types/interfaces/society';
|
||||
import { EraIndex, EraPoints, Exposure, Forcing, MomentOf, Nominations, RewardDestination, SlashingSpans, SpanIndex, SpanRecord, StakingLedger, UnappliedSlash, ValidatorPrefs } from '@polkadot/types/interfaces/staking';
|
||||
import { DigestOf, EventIndex, EventRecord } from '@polkadot/types/interfaces/system';
|
||||
import { ActiveEraInfo, EraIndex, EraRewardPoints, Exposure, Forcing, Nominations, RewardDestination, SlashingSpans, SpanIndex, SpanRecord, StakingLedger, UnappliedSlash, ValidatorPrefs } from '@polkadot/types/interfaces/staking';
|
||||
import { AccountInfo, DigestOf, EventIndex, EventRecord } 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';
|
||||
@@ -36,7 +36,7 @@ declare module '@polkadot/api/types/storage' {
|
||||
/**
|
||||
* The full account information for a particular account ID.
|
||||
**/
|
||||
account: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<ITuple<[Index, AccountData]>>> & QueryableStorageEntry<ApiType>;
|
||||
account: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<AccountInfo>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* Total extrinsics count for the current block.
|
||||
**/
|
||||
@@ -214,6 +214,14 @@ declare module '@polkadot/api/types/storage' {
|
||||
};
|
||||
staking: {
|
||||
[index: string]: QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* Number of era to keep in history.
|
||||
* Information is kept for eras in `[current_era - history_depth; current_era]
|
||||
* Must be more than the number of era delayed by session otherwise.
|
||||
* i.e. active era must always be in history.
|
||||
* i.e. `active_era > current_era - history_depth` must be guaranteed.
|
||||
**/
|
||||
historyDepth: AugmentedQuery<ApiType, () => Observable<u32>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* The ideal number of staking participants.
|
||||
**/
|
||||
@@ -246,41 +254,62 @@ declare module '@polkadot/api/types/storage' {
|
||||
validators: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<ValidatorPrefs>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* The map from nominator stash key to the set of stash keys of all validators to nominate.
|
||||
* NOTE: is private so that we can ensure upgraded before all typical accesses.
|
||||
* Direct storage APIs can still bypass this protection.
|
||||
**/
|
||||
nominators: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<Nominations>>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* Nominators for a particular account that is in action right now. You can't iterate
|
||||
* through validators here, but you can find them in the Session module.
|
||||
* This is keyed by the stash account.
|
||||
**/
|
||||
stakers: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Exposure>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* The currently elected validator set keyed by stash account ID.
|
||||
**/
|
||||
currentElected: AugmentedQuery<ApiType, () => Observable<Vec<AccountId>>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* The current era index.
|
||||
* This is the latest planned era, depending on how session module queues the validator
|
||||
* set, it might be active or not.
|
||||
**/
|
||||
currentEra: AugmentedQuery<ApiType, () => Observable<EraIndex>> & QueryableStorageEntry<ApiType>;
|
||||
currentEra: AugmentedQuery<ApiType, () => Observable<Option<EraIndex>>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* The start of the current era.
|
||||
* The active era information, it holds index and start.
|
||||
* The active era is the era currently rewarded.
|
||||
* Validator set of this era must be equal to `SessionInterface::validators`.
|
||||
**/
|
||||
currentEraStart: AugmentedQuery<ApiType, () => Observable<MomentOf>> & QueryableStorageEntry<ApiType>;
|
||||
activeEra: AugmentedQuery<ApiType, () => Observable<Option<ActiveEraInfo>>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* The session index at which the current era started.
|
||||
* The session index at which the era start for the last `HISTORY_DEPTH` eras
|
||||
**/
|
||||
currentEraStartSessionIndex: AugmentedQuery<ApiType, () => Observable<SessionIndex>> & QueryableStorageEntry<ApiType>;
|
||||
erasStartSessionIndex: AugmentedQuery<ApiType, (arg: EraIndex | AnyNumber | Uint8Array) => Observable<Option<SessionIndex>>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* Rewards for the current era. Using indices of current elected set.
|
||||
* Exposure of validator at era.
|
||||
* This is keyed first by the era index to allow bulk deletion and then the stash account.
|
||||
* Is it removed after `HISTORY_DEPTH` eras.
|
||||
* If stakers hasn't been set or has been removed then empty exposure is returned.
|
||||
**/
|
||||
currentEraPointsEarned: AugmentedQuery<ApiType, () => Observable<EraPoints>> & QueryableStorageEntry<ApiType>;
|
||||
erasStakers: AugmentedQueryDoubleMap<ApiType, (key1: EraIndex | AnyNumber | Uint8Array, key2: AccountId | string | Uint8Array) => Observable<Exposure>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* The amount of balance actively at stake for each validator slot, currently.
|
||||
* This is used to derive rewards and punishments.
|
||||
* Clipped Exposure of validator at era.
|
||||
* This is similar to [`ErasStakers`] but number of nominators exposed is reduce to the
|
||||
* `T::MaxNominatorRewardedPerValidator` biggest stakers.
|
||||
* This is used to limit the i/o cost for the nominator payout.
|
||||
* This is keyed fist by the era index to allow bulk deletion and then the stash account.
|
||||
* Is it removed after `HISTORY_DEPTH` eras.
|
||||
* If stakers hasn't been set or has been removed then empty exposure is returned.
|
||||
**/
|
||||
slotStake: AugmentedQuery<ApiType, () => Observable<BalanceOf>> & QueryableStorageEntry<ApiType>;
|
||||
erasStakersClipped: AugmentedQueryDoubleMap<ApiType, (key1: EraIndex | AnyNumber | Uint8Array, key2: AccountId | string | Uint8Array) => Observable<Exposure>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* Similarly to `ErasStakers` this holds the preferences of validators.
|
||||
* This is keyed fist by the era index to allow bulk deletion and then the stash account.
|
||||
* Is it removed after `HISTORY_DEPTH` eras.
|
||||
**/
|
||||
erasValidatorPrefs: AugmentedQueryDoubleMap<ApiType, (key1: EraIndex | AnyNumber | Uint8Array, key2: AccountId | string | Uint8Array) => Observable<ValidatorPrefs>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* The total validator era payout for the last `HISTORY_DEPTH` eras.
|
||||
* Eras that haven't finished yet or has been removed doesn't have reward.
|
||||
**/
|
||||
erasValidatorReward: AugmentedQuery<ApiType, (arg: EraIndex | AnyNumber | Uint8Array) => Observable<Option<BalanceOf>>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* Rewards for the last `HISTORY_DEPTH` eras.
|
||||
* If reward hasn't been set or has been removed then 0 reward is returned.
|
||||
**/
|
||||
erasRewardPoints: AugmentedQuery<ApiType, (arg: EraIndex | AnyNumber | Uint8Array) => Observable<EraRewardPoints>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* The total amount staked for the last `HISTORY_DEPTH` eras.
|
||||
* If total hasn't been set or has been removed then 0 stake is returned.
|
||||
**/
|
||||
erasTotalStake: AugmentedQuery<ApiType, (arg: EraIndex | AnyNumber | Uint8Array) => Observable<BalanceOf>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* True if the next session change will be a new era regardless of index.
|
||||
**/
|
||||
@@ -301,6 +330,8 @@ declare module '@polkadot/api/types/storage' {
|
||||
unappliedSlashes: AugmentedQuery<ApiType, (arg: EraIndex | AnyNumber | Uint8Array) => Observable<Vec<UnappliedSlash>>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* A mapping from still-bonded eras to the first session index of that era.
|
||||
* Must contains information for eras for the range:
|
||||
* `[active_era - bounding_duration; active_era]`
|
||||
**/
|
||||
bondedEras: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[EraIndex, SessionIndex]>>>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
@@ -325,6 +356,11 @@ declare module '@polkadot/api/types/storage' {
|
||||
* The earliest era for which we have a pending, unapplied slash.
|
||||
**/
|
||||
earliestUnappliedSlash: AugmentedQuery<ApiType, () => Observable<Option<EraIndex>>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* True if network has been upgraded to this version.
|
||||
* True for new networks.
|
||||
**/
|
||||
isUpgraded: AugmentedQuery<ApiType, () => Observable<bool>> & QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
session: {
|
||||
[index: string]: QueryableStorageEntry<ApiType>;
|
||||
@@ -415,7 +451,7 @@ declare module '@polkadot/api/types/storage' {
|
||||
* Who is able to vote for whom. Value is the fund-holding account, key is the
|
||||
* vote-transaction-sending account.
|
||||
**/
|
||||
proxy: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<AccountId>>> & QueryableStorageEntry<ApiType>;
|
||||
proxy: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<ProxyState>>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* Get the account (and lock periods) to which another account is delegating vote.
|
||||
**/
|
||||
@@ -533,7 +569,7 @@ declare module '@polkadot/api/types/storage' {
|
||||
/**
|
||||
* DEPRECATED
|
||||
* This used to store the current authority set, which has been migrated to the well-known
|
||||
* GRANDPA_AUTHORITES_KEY unhashed key.
|
||||
* GRANDPA_AUTHORITIES_KEY unhashed key.
|
||||
**/
|
||||
authorities: AugmentedQuery<ApiType, () => Observable<AuthorityList>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
@@ -782,10 +818,10 @@ declare module '@polkadot/api/types/storage' {
|
||||
**/
|
||||
activeRecoveries: AugmentedQueryDoubleMap<ApiType, (key1: AccountId | string | Uint8Array, key2: AccountId | string | Uint8Array) => Observable<Option<ActiveRecovery>>> & QueryableStorageEntry<ApiType>;
|
||||
/**
|
||||
* The final list of recovered accounts.
|
||||
* Map from the recovered account to the user who can access it.
|
||||
* The list of allowed proxy accounts.
|
||||
* Map from the user who can access it to the recovered account.
|
||||
**/
|
||||
recovered: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<AccountId>>> & QueryableStorageEntry<ApiType>;
|
||||
proxy: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<AccountId>>> & QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
vesting: {
|
||||
[index: string]: QueryableStorageEntry<ApiType>;
|
||||
|
||||
+113
-19
@@ -11,7 +11,7 @@ import { Vote } from '@polkadot/types/interfaces/elections';
|
||||
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';
|
||||
import { AccountId, AccountIndex, Address, Balance, BalanceOf, BlockNumber, Call, ChangesTrieConfiguration, Hash, Header, KeyValue, LookupSource, Moment } from '@polkadot/types/interfaces/runtime';
|
||||
import { AccountId, AccountIndex, Address, Balance, BalanceOf, BlockNumber, Call, ChangesTrieConfiguration, Hash, Header, KeyValue, LookupSource, Moment, Perbill } from '@polkadot/types/interfaces/runtime';
|
||||
import { Keys } from '@polkadot/types/interfaces/session';
|
||||
import { SocietyJudgement } from '@polkadot/types/interfaces/society';
|
||||
import { EraIndex, RewardDestination, ValidatorPrefs } from '@polkadot/types/interfaces/staking';
|
||||
@@ -24,9 +24,9 @@ declare module '@polkadot/api/types/submittable' {
|
||||
system: {
|
||||
[index: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
/**
|
||||
* A big dispatch that will disallow any other transaction to be included.
|
||||
* A dispatch that will fill the block weight up to the given ratio.
|
||||
**/
|
||||
fillBlock: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>>;
|
||||
fillBlock: AugmentedSubmittable<(ratio: Perbill | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Make some on-chain remark.
|
||||
**/
|
||||
@@ -59,6 +59,11 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* Kill all storage items with a key that starts with the given prefix.
|
||||
**/
|
||||
killPrefix: AugmentedSubmittable<(prefix: Key | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Kill the sending account, assuming there are no references outstanding and the composite
|
||||
* data is equal to its default value.
|
||||
**/
|
||||
suicide: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>>;
|
||||
};
|
||||
utility: {
|
||||
[index: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
@@ -82,7 +87,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* Send a call through an indexed pseudonym of the sender.
|
||||
* The dispatch origin for this call must be _Signed_.
|
||||
* # <weight>
|
||||
* - The weight of the `call`.
|
||||
* - The weight of the `call` + 10,000.
|
||||
* # </weight>
|
||||
**/
|
||||
asSub: AugmentedSubmittable<(index: u16 | AnyNumber | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
@@ -213,7 +218,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
claim: AugmentedSubmittable<(index: AccountIndex | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Assign an index already owned by the sender to another account. The balance reservation
|
||||
* is effectively transfered to the new account.
|
||||
* is effectively transferred to the new account.
|
||||
* The dispatch origin for this call must be _Signed_.
|
||||
* - `index`: the index to be re-assigned. This must be owned by the sender.
|
||||
* - `new`: the new owner of the index. This function is a no-op if it is equal to sender.
|
||||
@@ -351,7 +356,8 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* - 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`.
|
||||
* The only way to clean the aforementioned storage item is also user-controlled via
|
||||
* `withdraw_unbonded`.
|
||||
* - One DB entry.
|
||||
* </weight>
|
||||
**/
|
||||
@@ -469,6 +475,42 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* # </weight>
|
||||
**/
|
||||
cancelDeferredSlash: AugmentedSubmittable<(era: EraIndex | AnyNumber | Uint8Array, slashIndices: Vec<u32> | (u32 | AnyNumber | Uint8Array)[]) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Make one nominator's payout for one era.
|
||||
* - `who` is the controller account of the nominator to pay out.
|
||||
* - `era` may not be lower than one following the most recently paid era. If it is higher,
|
||||
* then it indicates an instruction to skip the payout of all previous eras.
|
||||
* - `validators` is the list of all validators that `who` had exposure to during `era`.
|
||||
* If it is incomplete, then less than the full reward will be paid out.
|
||||
* It must not exceed `MAX_NOMINATIONS`.
|
||||
* WARNING: once an era is payed for a validator such validator can't claim the payout of
|
||||
* previous era.
|
||||
* WARNING: Incorrect arguments here can result in loss of payout. Be very careful.
|
||||
* # <weight>
|
||||
* - Number of storage read of `O(validators)`; `validators` is the argument of the call,
|
||||
* and is bounded by `MAX_NOMINATIONS`.
|
||||
* - Each storage read is `O(N)` size and decode complexity; `N` is the maximum
|
||||
* nominations that can be given to a single validator.
|
||||
* - Computation complexity: `O(MAX_NOMINATIONS * logN)`; `MAX_NOMINATIONS` is the
|
||||
* maximum number of validators that may be nominated by a single nominator, it is
|
||||
* bounded only economically (all nominators are required to place a minimum stake).
|
||||
* # </weight>
|
||||
**/
|
||||
payoutNominator: AugmentedSubmittable<(era: EraIndex | AnyNumber | Uint8Array, validators: Vec<ITuple<[AccountId, u32]>> | ([AccountId | string | Uint8Array, u32 | AnyNumber | Uint8Array])[]) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Make one validator's payout for one era.
|
||||
* - `who` is the controller account of the validator to pay out.
|
||||
* - `era` may not be lower than one following the most recently paid era. If it is higher,
|
||||
* then it indicates an instruction to skip the payout of all previous eras.
|
||||
* WARNING: once an era is payed for a validator such validator can't claim the payout of
|
||||
* previous era.
|
||||
* WARNING: Incorrect arguments here can result in loss of payout. Be very careful.
|
||||
* # <weight>
|
||||
* - Time complexity: O(1).
|
||||
* - Contains a limited number of reads and writes.
|
||||
* # </weight>
|
||||
**/
|
||||
payoutValidator: AugmentedSubmittable<(era: EraIndex | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Rebond a portion of the stash scheduled to be unlocked.
|
||||
* # <weight>
|
||||
@@ -477,6 +519,19 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* # </weight>
|
||||
**/
|
||||
rebond: AugmentedSubmittable<(value: Compact<BalanceOf> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Set history_depth value.
|
||||
* Origin must be root.
|
||||
**/
|
||||
setHistoryDepth: AugmentedSubmittable<(newHistoryDepth: Compact<EraIndex> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Remove all data structure concerning a staker/stash once its balance is zero.
|
||||
* This is essentially equivalent to `withdraw_unbonded` except it can be called by anyone
|
||||
* and the target `stash` must have no funds left.
|
||||
* This can be called from any origin.
|
||||
* - `stash`: The stash account to reap. Its balance must be zero.
|
||||
**/
|
||||
reapStash: AugmentedSubmittable<(stash: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
};
|
||||
session: {
|
||||
[index: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
@@ -488,9 +543,22 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* # <weight>
|
||||
* - O(log n) in number of accounts.
|
||||
* - One extra DB entry.
|
||||
* - Increases system account refs by one on success iff there were previously no keys set.
|
||||
* In this case, purge_keys will need to be called before the account can be removed.
|
||||
* # </weight>
|
||||
**/
|
||||
setKeys: AugmentedSubmittable<(keys: Keys, proof: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Removes any session key(s) of the function caller.
|
||||
* This doesn't take effect until the next session.
|
||||
* The dispatch origin of this function must be signed.
|
||||
* # <weight>
|
||||
* - O(N) in number of key types.
|
||||
* - Removes N + 1 DB entries.
|
||||
* - Reduces system account refs by one on success.
|
||||
* # </weight>
|
||||
**/
|
||||
purgeKeys: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>>;
|
||||
};
|
||||
democracy: {
|
||||
[index: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
@@ -576,26 +644,30 @@ declare module '@polkadot/api/types/submittable' {
|
||||
**/
|
||||
cancelQueued: AugmentedSubmittable<(which: ReferendumIndex | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Specify a proxy. Called by the stash.
|
||||
* Specify a proxy that is already open to us. Called by the stash.
|
||||
* NOTE: Used to be called `set_proxy`.
|
||||
* # <weight>
|
||||
* - One extra DB entry.
|
||||
* # </weight>
|
||||
**/
|
||||
setProxy: AugmentedSubmittable<(proxy: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
activateProxy: AugmentedSubmittable<(proxy: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Clear the proxy. Called by the proxy.
|
||||
* NOTE: Used to be called `resign_proxy`.
|
||||
* # <weight>
|
||||
* - One DB clear.
|
||||
* # </weight>
|
||||
**/
|
||||
resignProxy: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>>;
|
||||
closeProxy: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Clear the proxy. Called by the stash.
|
||||
* Deactivate the proxy, but leave open to this account. Called by the stash.
|
||||
* The proxy must already be active.
|
||||
* NOTE: Used to be called `remove_proxy`.
|
||||
* # <weight>
|
||||
* - One DB clear.
|
||||
* # </weight>
|
||||
**/
|
||||
removeProxy: AugmentedSubmittable<(proxy: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
deactivateProxy: AugmentedSubmittable<(proxy: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Delegate vote.
|
||||
* # <weight>
|
||||
@@ -632,6 +704,17 @@ declare module '@polkadot/api/types/submittable' {
|
||||
**/
|
||||
reapPreimage: AugmentedSubmittable<(proposalHash: Hash | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
unlock: AugmentedSubmittable<(target: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Become a proxy.
|
||||
* This must be called prior to a later `activate_proxy`.
|
||||
* Origin must be a Signed.
|
||||
* - `target`: The account whose votes will later be proxied.
|
||||
* `close_proxy` must be called before the account can be destroyed.
|
||||
* # <weight>
|
||||
* - One extra DB entry.
|
||||
* # </weight>
|
||||
**/
|
||||
openProxy: AugmentedSubmittable<(target: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
};
|
||||
council: {
|
||||
[index: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
@@ -978,10 +1061,10 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* - O(1).
|
||||
* - Limited storage reads.
|
||||
* - One DB write (event).
|
||||
* - Unknown weight of derivative `proposal` execution.
|
||||
* - Weight of derivative `call` execution + 10,000.
|
||||
* # </weight>
|
||||
**/
|
||||
sudo: AugmentedSubmittable<(proposal: Proposal | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
sudo: AugmentedSubmittable<(call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo key.
|
||||
* The dispatch origin for this call must be _Signed_.
|
||||
@@ -1000,10 +1083,10 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* - O(1).
|
||||
* - Limited storage reads.
|
||||
* - One DB write (event).
|
||||
* - Unknown weight of derivative `proposal` execution.
|
||||
* - Weight of derivative `call` execution + 10,000.
|
||||
* # </weight>
|
||||
**/
|
||||
sudoAs: AugmentedSubmittable<(who: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array, proposal: Proposal | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
sudoAs: AugmentedSubmittable<(who: LookupSource | Address | AccountId | AccountIndex | string | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
};
|
||||
imOnline: {
|
||||
[index: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
@@ -1077,7 +1160,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* - `reg_index`: The index of the registrar whose judgement is requested.
|
||||
* - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as:
|
||||
* ```nocompile
|
||||
* Self::registrars(reg_index).uwnrap().fee
|
||||
* Self::registrars(reg_index).unwrap().fee
|
||||
* ```
|
||||
* Emits `JudgementRequested` if successful.
|
||||
* # <weight>
|
||||
@@ -1351,7 +1434,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
**/
|
||||
found: AugmentedSubmittable<(founder: AccountId | string | Uint8Array, maxMembers: u32 | AnyNumber | Uint8Array, rules: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Anull the founding of the society.
|
||||
* Annul the founding of the society.
|
||||
* The dispatch origin for this call must be Signed, and the signing account must be both
|
||||
* the `Founder` and the `Head`. This implies that it may only be done when there is one
|
||||
* member.
|
||||
@@ -1447,7 +1530,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* - `account`: The recovered account you want to make a call on-behalf-of.
|
||||
* - `call`: The call you want to make with the recovered account.
|
||||
* # <weight>
|
||||
* - The weight of the `call`.
|
||||
* - The weight of the `call` + 10,000.
|
||||
* - One storage lookup to check account is recovered by `who`. O(1)
|
||||
* # </weight>
|
||||
**/
|
||||
@@ -1571,7 +1654,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
**/
|
||||
closeRecovery: AugmentedSubmittable<(rescuer: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Remove the recovery process for your account.
|
||||
* Remove the recovery process for your account. Recovered accounts are still accessible.
|
||||
* NOTE: The user must make sure to call `close_recovery` on all active
|
||||
* recovery attempts before calling this function else it will fail.
|
||||
* Payment: By calling this function the recoverable account will unreserve
|
||||
@@ -1589,6 +1672,17 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* # </weight>
|
||||
**/
|
||||
removeRecovery: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Cancel the ability to use `as_recovered` for `account`.
|
||||
* The dispatch origin for this call must be _Signed_ and registered to
|
||||
* be able to make calls on behalf of the recovered account.
|
||||
* Parameters:
|
||||
* - `account`: The recovered account you are able to call on-behalf-of.
|
||||
* # <weight>
|
||||
* - One storage mutation to check account is recovered by `who`. O(1)
|
||||
* # </weight>
|
||||
**/
|
||||
cancelRecovered: AugmentedSubmittable<(account: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
};
|
||||
vesting: {
|
||||
[index: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
"Map": {
|
||||
"hasher": "Blake2_256",
|
||||
"key": "AccountId",
|
||||
"value": "(Index,AccountData)",
|
||||
"value": "AccountInfo",
|
||||
"linked": false
|
||||
}
|
||||
},
|
||||
"fallback": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||
"fallback": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||
"documentation": [
|
||||
" The full account information for a particular account ID."
|
||||
]
|
||||
@@ -185,9 +185,14 @@
|
||||
"calls": [
|
||||
{
|
||||
"name": "fill_block",
|
||||
"args": [],
|
||||
"args": [
|
||||
{
|
||||
"name": "_ratio",
|
||||
"type": "Perbill"
|
||||
}
|
||||
],
|
||||
"documentation": [
|
||||
" A big dispatch that will disallow any other transaction to be included."
|
||||
" A dispatch that will fill the block weight up to the given ratio."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -285,6 +290,14 @@
|
||||
"documentation": [
|
||||
" Kill all storage items with a key that starts with the given prefix."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "suicide",
|
||||
"args": [],
|
||||
"documentation": [
|
||||
" Kill the sending account, assuming there are no references outstanding and the composite",
|
||||
" data is equal to its default value."
|
||||
]
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
@@ -324,7 +337,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ReapedAccount",
|
||||
"name": "KilledAccount",
|
||||
"args": [
|
||||
"AccountId"
|
||||
],
|
||||
@@ -370,6 +383,18 @@
|
||||
"",
|
||||
" Either calling `Core_version` or decoding `RuntimeVersion` failed."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "NonDefaultComposite",
|
||||
"documentation": [
|
||||
" Suicide called when the account has non-default composite data."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "NonZeroRefCount",
|
||||
"documentation": [
|
||||
" There is a non-zero reference count preventing the account from being purged."
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -445,7 +470,7 @@
|
||||
" The dispatch origin for this call must be _Signed_.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" - The weight of the `call`.",
|
||||
" - The weight of the `call` + 10,000.",
|
||||
" # </weight>"
|
||||
]
|
||||
},
|
||||
@@ -892,7 +917,7 @@
|
||||
{
|
||||
"name": "EpochDuration",
|
||||
"type": "u64",
|
||||
"value": "0xc800000000000000",
|
||||
"value": "0x2800000000000000",
|
||||
"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."
|
||||
@@ -1146,7 +1171,7 @@
|
||||
],
|
||||
"documentation": [
|
||||
" Assign an index already owned by the sender to another account. The balance reservation",
|
||||
" is effectively transfered to the new account.",
|
||||
" is effectively transferred to the new account.",
|
||||
"",
|
||||
" The dispatch origin for this call must be _Signed_.",
|
||||
"",
|
||||
@@ -1589,6 +1614,23 @@
|
||||
"storage": {
|
||||
"prefix": "Staking",
|
||||
"items": [
|
||||
{
|
||||
"name": "HistoryDepth",
|
||||
"modifier": "Default",
|
||||
"type": {
|
||||
"Plain": "u32"
|
||||
},
|
||||
"fallback": "0x54000000",
|
||||
"documentation": [
|
||||
" Number of era to keep in history.",
|
||||
"",
|
||||
" Information is kept for eras in `[current_era - history_depth; current_era]",
|
||||
"",
|
||||
" Must be more than the number of era delayed by session otherwise.",
|
||||
" i.e. active era must always be in history.",
|
||||
" i.e. `active_era > current_era - history_depth` must be guaranteed."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ValidatorCount",
|
||||
"modifier": "Default",
|
||||
@@ -1701,97 +1743,172 @@
|
||||
},
|
||||
"fallback": "0x00",
|
||||
"documentation": [
|
||||
" The map from nominator stash key to the set of stash keys of all validators to nominate.",
|
||||
"",
|
||||
" NOTE: is private so that we can ensure upgraded before all typical accesses.",
|
||||
" Direct storage APIs can still bypass this protection."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Stakers",
|
||||
"modifier": "Default",
|
||||
"type": {
|
||||
"Map": {
|
||||
"hasher": "Blake2_256",
|
||||
"key": "AccountId",
|
||||
"value": "Exposure",
|
||||
"linked": false
|
||||
}
|
||||
},
|
||||
"fallback": "0x000000",
|
||||
"documentation": [
|
||||
" Nominators for a particular account that is in action right now. You can't iterate",
|
||||
" through validators here, but you can find them in the Session module.",
|
||||
"",
|
||||
" This is keyed by the stash account."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "CurrentElected",
|
||||
"modifier": "Default",
|
||||
"type": {
|
||||
"Plain": "Vec<AccountId>"
|
||||
},
|
||||
"fallback": "0x00",
|
||||
"documentation": [
|
||||
" The currently elected validator set keyed by stash account ID."
|
||||
" The map from nominator stash key to the set of stash keys of all validators to nominate."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "CurrentEra",
|
||||
"modifier": "Default",
|
||||
"modifier": "Optional",
|
||||
"type": {
|
||||
"Plain": "EraIndex"
|
||||
},
|
||||
"fallback": "0x00000000",
|
||||
"fallback": "0x00",
|
||||
"documentation": [
|
||||
" The current era index."
|
||||
" The current era index.",
|
||||
"",
|
||||
" This is the latest planned era, depending on how session module queues the validator",
|
||||
" set, it might be active or not."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "CurrentEraStart",
|
||||
"modifier": "Default",
|
||||
"name": "ActiveEra",
|
||||
"modifier": "Optional",
|
||||
"type": {
|
||||
"Plain": "MomentOf"
|
||||
"Plain": "ActiveEraInfo"
|
||||
},
|
||||
"fallback": "0x0000000000000000",
|
||||
"fallback": "0x00",
|
||||
"documentation": [
|
||||
" The start of the current era."
|
||||
" The active era information, it holds index and start.",
|
||||
"",
|
||||
" The active era is the era currently rewarded.",
|
||||
" Validator set of this era must be equal to `SessionInterface::validators`."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "CurrentEraStartSessionIndex",
|
||||
"modifier": "Default",
|
||||
"name": "ErasStartSessionIndex",
|
||||
"modifier": "Optional",
|
||||
"type": {
|
||||
"Plain": "SessionIndex"
|
||||
"Map": {
|
||||
"hasher": "Blake2_256",
|
||||
"key": "EraIndex",
|
||||
"value": "SessionIndex",
|
||||
"linked": false
|
||||
}
|
||||
},
|
||||
"fallback": "0x00000000",
|
||||
"fallback": "0x00",
|
||||
"documentation": [
|
||||
" The session index at which the current era started."
|
||||
" The session index at which the era start for the last `HISTORY_DEPTH` eras"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "CurrentEraPointsEarned",
|
||||
"name": "ErasStakers",
|
||||
"modifier": "Default",
|
||||
"type": {
|
||||
"Plain": "EraPoints"
|
||||
"DoubleMap": {
|
||||
"hasher": "Twox64Concat",
|
||||
"key1": "EraIndex",
|
||||
"key2": "AccountId",
|
||||
"value": "Exposure",
|
||||
"key2Hasher": "Twox64Concat"
|
||||
}
|
||||
},
|
||||
"fallback": "0x000000",
|
||||
"documentation": [
|
||||
" Exposure of validator at era.",
|
||||
"",
|
||||
" This is keyed first by the era index to allow bulk deletion and then the stash account.",
|
||||
"",
|
||||
" Is it removed after `HISTORY_DEPTH` eras.",
|
||||
" If stakers hasn't been set or has been removed then empty exposure is returned."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ErasStakersClipped",
|
||||
"modifier": "Default",
|
||||
"type": {
|
||||
"DoubleMap": {
|
||||
"hasher": "Twox64Concat",
|
||||
"key1": "EraIndex",
|
||||
"key2": "AccountId",
|
||||
"value": "Exposure",
|
||||
"key2Hasher": "Twox64Concat"
|
||||
}
|
||||
},
|
||||
"fallback": "0x000000",
|
||||
"documentation": [
|
||||
" Clipped Exposure of validator at era.",
|
||||
"",
|
||||
" This is similar to [`ErasStakers`] but number of nominators exposed is reduce to the",
|
||||
" `T::MaxNominatorRewardedPerValidator` biggest stakers.",
|
||||
" This is used to limit the i/o cost for the nominator payout.",
|
||||
"",
|
||||
" This is keyed fist by the era index to allow bulk deletion and then the stash account.",
|
||||
"",
|
||||
" Is it removed after `HISTORY_DEPTH` eras.",
|
||||
" If stakers hasn't been set or has been removed then empty exposure is returned."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ErasValidatorPrefs",
|
||||
"modifier": "Default",
|
||||
"type": {
|
||||
"DoubleMap": {
|
||||
"hasher": "Twox64Concat",
|
||||
"key1": "EraIndex",
|
||||
"key2": "AccountId",
|
||||
"value": "ValidatorPrefs",
|
||||
"key2Hasher": "Twox64Concat"
|
||||
}
|
||||
},
|
||||
"fallback": "0x00",
|
||||
"documentation": [
|
||||
" Similarly to `ErasStakers` this holds the preferences of validators.",
|
||||
"",
|
||||
" This is keyed fist by the era index to allow bulk deletion and then the stash account.",
|
||||
"",
|
||||
" Is it removed after `HISTORY_DEPTH` eras."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ErasValidatorReward",
|
||||
"modifier": "Optional",
|
||||
"type": {
|
||||
"Map": {
|
||||
"hasher": "Blake2_256",
|
||||
"key": "EraIndex",
|
||||
"value": "BalanceOf",
|
||||
"linked": false
|
||||
}
|
||||
},
|
||||
"fallback": "0x00",
|
||||
"documentation": [
|
||||
" The total validator era payout for the last `HISTORY_DEPTH` eras.",
|
||||
"",
|
||||
" Eras that haven't finished yet or has been removed doesn't have reward."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ErasRewardPoints",
|
||||
"modifier": "Default",
|
||||
"type": {
|
||||
"Map": {
|
||||
"hasher": "Blake2_256",
|
||||
"key": "EraIndex",
|
||||
"value": "EraRewardPoints",
|
||||
"linked": false
|
||||
}
|
||||
},
|
||||
"fallback": "0x0000000000",
|
||||
"documentation": [
|
||||
" Rewards for the current era. Using indices of current elected set."
|
||||
" Rewards for the last `HISTORY_DEPTH` eras.",
|
||||
" If reward hasn't been set or has been removed then 0 reward is returned."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "SlotStake",
|
||||
"name": "ErasTotalStake",
|
||||
"modifier": "Default",
|
||||
"type": {
|
||||
"Plain": "BalanceOf"
|
||||
"Map": {
|
||||
"hasher": "Blake2_256",
|
||||
"key": "EraIndex",
|
||||
"value": "BalanceOf",
|
||||
"linked": false
|
||||
}
|
||||
},
|
||||
"fallback": "0x00000000000000000000000000000000",
|
||||
"documentation": [
|
||||
" The amount of balance actively at stake for each validator slot, currently.",
|
||||
"",
|
||||
" This is used to derive rewards and punishments."
|
||||
" The total amount staked for the last `HISTORY_DEPTH` eras.",
|
||||
" If total hasn't been set or has been removed then 0 stake is returned."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -1854,7 +1971,10 @@
|
||||
},
|
||||
"fallback": "0x00",
|
||||
"documentation": [
|
||||
" A mapping from still-bonded eras to the first session index of that era."
|
||||
" A mapping from still-bonded eras to the first session index of that era.",
|
||||
"",
|
||||
" Must contains information for eras for the range:",
|
||||
" `[active_era - bounding_duration; active_era]`"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -1935,6 +2055,19 @@
|
||||
"documentation": [
|
||||
" The earliest era for which we have a pending, unapplied slash."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "IsUpgraded",
|
||||
"modifier": "Default",
|
||||
"type": {
|
||||
"Plain": "bool"
|
||||
},
|
||||
"fallback": "0x00",
|
||||
"documentation": [
|
||||
" True if network has been upgraded to this version.",
|
||||
"",
|
||||
" True for new networks."
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -2027,7 +2160,8 @@
|
||||
" - 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`.",
|
||||
" The only way to clean the aforementioned storage item is also user-controlled via",
|
||||
" `withdraw_unbonded`.",
|
||||
" - One DB entry.",
|
||||
" </weight>"
|
||||
]
|
||||
@@ -2251,6 +2385,70 @@
|
||||
" # </weight>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "payout_nominator",
|
||||
"args": [
|
||||
{
|
||||
"name": "era",
|
||||
"type": "EraIndex"
|
||||
},
|
||||
{
|
||||
"name": "validators",
|
||||
"type": "Vec<(AccountId,u32)>"
|
||||
}
|
||||
],
|
||||
"documentation": [
|
||||
" Make one nominator's payout for one era.",
|
||||
"",
|
||||
" - `who` is the controller account of the nominator to pay out.",
|
||||
" - `era` may not be lower than one following the most recently paid era. If it is higher,",
|
||||
" then it indicates an instruction to skip the payout of all previous eras.",
|
||||
" - `validators` is the list of all validators that `who` had exposure to during `era`.",
|
||||
" If it is incomplete, then less than the full reward will be paid out.",
|
||||
" It must not exceed `MAX_NOMINATIONS`.",
|
||||
"",
|
||||
" WARNING: once an era is payed for a validator such validator can't claim the payout of",
|
||||
" previous era.",
|
||||
"",
|
||||
" WARNING: Incorrect arguments here can result in loss of payout. Be very careful.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" - Number of storage read of `O(validators)`; `validators` is the argument of the call,",
|
||||
" and is bounded by `MAX_NOMINATIONS`.",
|
||||
" - Each storage read is `O(N)` size and decode complexity; `N` is the maximum",
|
||||
" nominations that can be given to a single validator.",
|
||||
" - Computation complexity: `O(MAX_NOMINATIONS * logN)`; `MAX_NOMINATIONS` is the",
|
||||
" maximum number of validators that may be nominated by a single nominator, it is",
|
||||
" bounded only economically (all nominators are required to place a minimum stake).",
|
||||
" # </weight>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "payout_validator",
|
||||
"args": [
|
||||
{
|
||||
"name": "era",
|
||||
"type": "EraIndex"
|
||||
}
|
||||
],
|
||||
"documentation": [
|
||||
" Make one validator's payout for one era.",
|
||||
"",
|
||||
" - `who` is the controller account of the validator to pay out.",
|
||||
" - `era` may not be lower than one following the most recently paid era. If it is higher,",
|
||||
" then it indicates an instruction to skip the payout of all previous eras.",
|
||||
"",
|
||||
" WARNING: once an era is payed for a validator such validator can't claim the payout of",
|
||||
" previous era.",
|
||||
"",
|
||||
" WARNING: Incorrect arguments here can result in loss of payout. Be very careful.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" - Time complexity: O(1).",
|
||||
" - Contains a limited number of reads and writes.",
|
||||
" # </weight>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "rebond",
|
||||
"args": [
|
||||
@@ -2267,18 +2465,49 @@
|
||||
" - Storage changes: Can't increase storage, only decrease it.",
|
||||
" # </weight>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "set_history_depth",
|
||||
"args": [
|
||||
{
|
||||
"name": "new_history_depth",
|
||||
"type": "Compact<EraIndex>"
|
||||
}
|
||||
],
|
||||
"documentation": [
|
||||
" Set history_depth value.",
|
||||
"",
|
||||
" Origin must be root."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "reap_stash",
|
||||
"args": [
|
||||
{
|
||||
"name": "stash",
|
||||
"type": "AccountId"
|
||||
}
|
||||
],
|
||||
"documentation": [
|
||||
" Remove all data structure concerning a staker/stash once its balance is zero.",
|
||||
" This is essentially equivalent to `withdraw_unbonded` except it can be called by anyone",
|
||||
" and the target `stash` must have no funds left.",
|
||||
"",
|
||||
" This can be called from any origin.",
|
||||
"",
|
||||
" - `stash`: The stash account to reap. Its balance must be zero."
|
||||
]
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"name": "Reward",
|
||||
"args": [
|
||||
"Balance",
|
||||
"AccountId",
|
||||
"Balance"
|
||||
],
|
||||
"documentation": [
|
||||
" All validators have been rewarded by the first balance; the second is the remainder",
|
||||
" from the maximum amount of reward."
|
||||
" The staker has been rewarded by this amount. AccountId is controller account."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -2380,6 +2609,24 @@
|
||||
"documentation": [
|
||||
" Can not rebond without unlocking chunks."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "FundedTarget",
|
||||
"documentation": [
|
||||
" Attempting to target a stash that still has funds."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "InvalidEraToReward",
|
||||
"documentation": [
|
||||
" Invalid era to reward."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "InvalidNumberOfNominations",
|
||||
"documentation": [
|
||||
" Invalid number of nominations."
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -2512,6 +2759,24 @@
|
||||
" # <weight>",
|
||||
" - O(log n) in number of accounts.",
|
||||
" - One extra DB entry.",
|
||||
" - Increases system account refs by one on success iff there were previously no keys set.",
|
||||
" In this case, purge_keys will need to be called before the account can be removed.",
|
||||
" # </weight>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "purge_keys",
|
||||
"args": [],
|
||||
"documentation": [
|
||||
" Removes any session key(s) of the function caller.",
|
||||
" This doesn't take effect until the next session.",
|
||||
"",
|
||||
" The dispatch origin of this function must be signed.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" - O(N) in number of key types.",
|
||||
" - Removes N + 1 DB entries.",
|
||||
" - Reduces system account refs by one on success.",
|
||||
" # </weight>"
|
||||
]
|
||||
}
|
||||
@@ -2557,6 +2822,12 @@
|
||||
"documentation": [
|
||||
" Registered duplicate key."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "NoKeys",
|
||||
"documentation": [
|
||||
" No keys are associated with this account."
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -2712,7 +2983,7 @@
|
||||
"Map": {
|
||||
"hasher": "Blake2_256",
|
||||
"key": "AccountId",
|
||||
"value": "AccountId",
|
||||
"value": "ProxyState",
|
||||
"linked": false
|
||||
}
|
||||
},
|
||||
@@ -3022,7 +3293,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "set_proxy",
|
||||
"name": "activate_proxy",
|
||||
"args": [
|
||||
{
|
||||
"name": "proxy",
|
||||
@@ -3030,7 +3301,9 @@
|
||||
}
|
||||
],
|
||||
"documentation": [
|
||||
" Specify a proxy. Called by the stash.",
|
||||
" Specify a proxy that is already open to us. Called by the stash.",
|
||||
"",
|
||||
" NOTE: Used to be called `set_proxy`.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" - One extra DB entry.",
|
||||
@@ -3038,18 +3311,20 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "resign_proxy",
|
||||
"name": "close_proxy",
|
||||
"args": [],
|
||||
"documentation": [
|
||||
" Clear the proxy. Called by the proxy.",
|
||||
"",
|
||||
" NOTE: Used to be called `resign_proxy`.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" - One DB clear.",
|
||||
" # </weight>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "remove_proxy",
|
||||
"name": "deactivate_proxy",
|
||||
"args": [
|
||||
{
|
||||
"name": "proxy",
|
||||
@@ -3057,7 +3332,11 @@
|
||||
}
|
||||
],
|
||||
"documentation": [
|
||||
" Clear the proxy. Called by the stash.",
|
||||
" Deactivate the proxy, but leave open to this account. Called by the stash.",
|
||||
"",
|
||||
" The proxy must already be active.",
|
||||
"",
|
||||
" NOTE: Used to be called `remove_proxy`.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" - One DB clear.",
|
||||
@@ -3153,6 +3432,30 @@
|
||||
}
|
||||
],
|
||||
"documentation": []
|
||||
},
|
||||
{
|
||||
"name": "open_proxy",
|
||||
"args": [
|
||||
{
|
||||
"name": "target",
|
||||
"type": "AccountId"
|
||||
}
|
||||
],
|
||||
"documentation": [
|
||||
" Become a proxy.",
|
||||
"",
|
||||
" This must be called prior to a later `activate_proxy`.",
|
||||
"",
|
||||
" Origin must be a Signed.",
|
||||
"",
|
||||
" - `target`: The account whose votes will later be proxied.",
|
||||
"",
|
||||
" `close_proxy` must be called before the account can be destroyed.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" - One extra DB entry.",
|
||||
" # </weight>"
|
||||
]
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
@@ -3531,6 +3834,24 @@
|
||||
"documentation": [
|
||||
" The lock on the account to be unlocked has not yet expired."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "NotOpen",
|
||||
"documentation": [
|
||||
" A proxy-pairing was attempted to an account that was not open."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "WrongOpen",
|
||||
"documentation": [
|
||||
" A proxy-pairing was attempted to an account that was open to another account."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "NotActive",
|
||||
"documentation": [
|
||||
" A proxy-de-pairing was attempted to an account that was not active."
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -4630,7 +4951,7 @@
|
||||
" DEPRECATED",
|
||||
"",
|
||||
" This used to store the current authority set, which has been migrated to the well-known",
|
||||
" GRANDPA_AUTHORITES_KEY unhashed key."
|
||||
" GRANDPA_AUTHORITIES_KEY unhashed key."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -5642,7 +5963,7 @@
|
||||
"type": "u32",
|
||||
"value": "0x08000000",
|
||||
"documentation": [
|
||||
" Size of a contract at the time of instantiaion. This is a simple way to ensure that",
|
||||
" Size of a contract at the time of instantiation. This is a simple way to ensure that",
|
||||
" empty contracts eventually gets deleted."
|
||||
]
|
||||
},
|
||||
@@ -5809,8 +6130,8 @@
|
||||
"name": "sudo",
|
||||
"args": [
|
||||
{
|
||||
"name": "proposal",
|
||||
"type": "Proposal"
|
||||
"name": "call",
|
||||
"type": "Call"
|
||||
}
|
||||
],
|
||||
"documentation": [
|
||||
@@ -5822,7 +6143,7 @@
|
||||
" - O(1).",
|
||||
" - Limited storage reads.",
|
||||
" - One DB write (event).",
|
||||
" - Unknown weight of derivative `proposal` execution.",
|
||||
" - Weight of derivative `call` execution + 10,000.",
|
||||
" # </weight>"
|
||||
]
|
||||
},
|
||||
@@ -5854,8 +6175,8 @@
|
||||
"type": "LookupSource"
|
||||
},
|
||||
{
|
||||
"name": "proposal",
|
||||
"type": "Proposal"
|
||||
"name": "call",
|
||||
"type": "Call"
|
||||
}
|
||||
],
|
||||
"documentation": [
|
||||
@@ -5868,7 +6189,7 @@
|
||||
" - O(1).",
|
||||
" - Limited storage reads.",
|
||||
" - One DB write (event).",
|
||||
" - Unknown weight of derivative `proposal` execution.",
|
||||
" - Weight of derivative `call` execution + 10,000.",
|
||||
" # </weight>"
|
||||
]
|
||||
}
|
||||
@@ -6351,7 +6672,7 @@
|
||||
" - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as:",
|
||||
"",
|
||||
" ```nocompile",
|
||||
" Self::registrars(reg_index).uwnrap().fee",
|
||||
" Self::registrars(reg_index).unwrap().fee",
|
||||
" ```",
|
||||
"",
|
||||
" Emits `JudgementRequested` if successful.",
|
||||
@@ -7203,7 +7524,7 @@
|
||||
"name": "unfound",
|
||||
"args": [],
|
||||
"documentation": [
|
||||
" Anull the founding of the society.",
|
||||
" Annul the founding of the society.",
|
||||
"",
|
||||
" The dispatch origin for this call must be Signed, and the signing account must be both",
|
||||
" the `Founder` and the `Head`. This implies that it may only be done when there is one",
|
||||
@@ -7694,7 +8015,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Recovered",
|
||||
"name": "Proxy",
|
||||
"modifier": "Optional",
|
||||
"type": {
|
||||
"Map": {
|
||||
@@ -7706,9 +8027,9 @@
|
||||
},
|
||||
"fallback": "0x00",
|
||||
"documentation": [
|
||||
" The final list of recovered accounts.",
|
||||
" The list of allowed proxy accounts.",
|
||||
"",
|
||||
" Map from the recovered account to the user who can access it."
|
||||
" Map from the user who can access it to the recovered account."
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -7737,7 +8058,7 @@
|
||||
" - `call`: The call you want to make with the recovered account.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" - The weight of the `call`.",
|
||||
" - The weight of the `call` + 10,000.",
|
||||
" - One storage lookup to check account is recovered by `who`. O(1)",
|
||||
" # </weight>"
|
||||
]
|
||||
@@ -7955,7 +8276,7 @@
|
||||
"name": "remove_recovery",
|
||||
"args": [],
|
||||
"documentation": [
|
||||
" Remove the recovery process for your account.",
|
||||
" Remove the recovery process for your account. Recovered accounts are still accessible.",
|
||||
"",
|
||||
" NOTE: The user must make sure to call `close_recovery` on all active",
|
||||
" recovery attempts before calling this function else it will fail.",
|
||||
@@ -7977,6 +8298,28 @@
|
||||
" Total Complexity: O(F + X)",
|
||||
" # </weight>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "cancel_recovered",
|
||||
"args": [
|
||||
{
|
||||
"name": "account",
|
||||
"type": "AccountId"
|
||||
}
|
||||
],
|
||||
"documentation": [
|
||||
" Cancel the ability to use `as_recovered` for `account`.",
|
||||
"",
|
||||
" The dispatch origin for this call must be _Signed_ and registered to",
|
||||
" be able to make calls on behalf of the recovered account.",
|
||||
"",
|
||||
" Parameters:",
|
||||
" - `account`: The recovered account you are able to call on-behalf-of.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" - One storage mutation to check account is recovered by `who`. O(1)",
|
||||
" # </weight>"
|
||||
]
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
@@ -8131,6 +8474,12 @@
|
||||
"documentation": [
|
||||
" There was an overflow in a calculation"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "AlreadyProxy",
|
||||
"documentation": [
|
||||
" This account is already set up for recovery"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -29,7 +29,7 @@ import { ApiId, BlockHash, ChainProperties, ExtrinsicOrHash, ExtrinsicStatus, He
|
||||
import { AccountId, AccountIdOf, AccountIndex, Address, AssetId, Balance, BalanceOf, Block, BlockNumber, Call, ChangesTrieConfiguration, Consensus, ConsensusEngineId, Digest, DigestItem, DispatchClass, DispatchInfo, DispatchInfoTo190, Fixed64, H160, H256, H512, Hash, Header, Index, Justification, KeyTypeId, KeyValue, LockIdentifier, LookupSource, LookupTarget, Moment, Origin, Perbill, Percent, Permill, Perquintill, Phantom, PhantomData, PreRuntime, Seal, SealV0, SignedBlock, StorageData, ValidatorId, Weight, WeightMultiplier } from '@polkadot/types/interfaces/runtime';
|
||||
import { FullIdentification, IdentificationTuple, Keys, SessionIndex, SessionKeys1, SessionKeys2, SessionKeys3, SessionKeys4, SessionKeys5, SessionKeys6 } from '@polkadot/types/interfaces/session';
|
||||
import { Bid, BidKind, SocietyJudgement, SocietyVote, StrikeCount, VouchingStatus } from '@polkadot/types/interfaces/society';
|
||||
import { CompactAssignments, CompactScore, ElectionCompute, ElectionResult, ElectionStatus, EraIndex, EraPoints, EraRewardPoints, EraRewards, Exposure, Forcing, IndividualExposure, KeyType, MomentOf, Nominations, PhragmenScore, Points, RewardDestination, RewardPoint, SlashJournalEntry, SlashingSpans, SlashingSpansTo204, SpanIndex, SpanRecord, StakingLedger, StakingLedgerNew, StakingLedgerTo223, UnappliedSlash, UnappliedSlashOther, UnlockChunk, ValidatorIndex, ValidatorPrefs, ValidatorPrefsTo145, ValidatorPrefsTo196 } from '@polkadot/types/interfaces/staking';
|
||||
import { ActiveEraInfo, CompactAssignments, CompactScore, ElectionCompute, ElectionResult, ElectionStatus, EraIndex, EraPoints, EraRewardPoints, EraRewards, Exposure, Forcing, IndividualExposure, KeyType, MomentOf, Nominations, PhragmenScore, Points, RewardDestination, RewardPoint, SlashJournalEntry, SlashingSpans, SlashingSpansTo204, SpanIndex, SpanRecord, StakingLedger, StakingLedgerNew, StakingLedgerTo223, UnappliedSlash, UnappliedSlashOther, UnlockChunk, ValidatorIndex, ValidatorPrefs, ValidatorPrefsTo145, ValidatorPrefsTo196 } from '@polkadot/types/interfaces/staking';
|
||||
import { AccountInfo, DigestOf, DispatchError, DispatchErrorModule, DispatchErrorTo198, DispatchResult, DispatchResultOf, DispatchResultTo198, Event, EventId, EventIndex, EventRecord, EventRecordTo76, Key, Phase, RefCount } from '@polkadot/types/interfaces/system';
|
||||
import { OpenTip, OpenTipFinder, OpenTipTip, TreasuryProposal } from '@polkadot/types/interfaces/treasury';
|
||||
import { Multiplier } from '@polkadot/types/interfaces/txpayment';
|
||||
@@ -698,6 +698,9 @@ declare module '@polkadot/types/types/registry' {
|
||||
EraPoints: EraPoints;
|
||||
'Option<EraPoints>': Option<EraPoints>;
|
||||
'Vec<EraPoints>': Vec<EraPoints>;
|
||||
ActiveEraInfo: ActiveEraInfo;
|
||||
'Option<ActiveEraInfo>': Option<ActiveEraInfo>;
|
||||
'Vec<ActiveEraInfo>': Vec<ActiveEraInfo>;
|
||||
CompactAssignments: CompactAssignments;
|
||||
'Option<CompactAssignments>': Option<CompactAssignments>;
|
||||
'Vec<CompactAssignments>': Vec<CompactAssignments>;
|
||||
|
||||
@@ -22,7 +22,10 @@ describe('ExtrinsicV2', (): void => {
|
||||
it('constructs a sane Uint8Array (default)', (): void => {
|
||||
expect(
|
||||
new Extrinsic(registry).toU8a()
|
||||
).toEqual(new Uint8Array([0, 0]));
|
||||
).toEqual(new Uint8Array([
|
||||
0, 0, // index
|
||||
0, 0, 0, 0 // fillBlock Perbill
|
||||
]));
|
||||
});
|
||||
|
||||
it('creates a unsigned extrinsic', (): void => {
|
||||
|
||||
@@ -22,7 +22,10 @@ describe('ExtrinsicV3', (): void => {
|
||||
it('constructs a sane Uint8Array (default)', (): void => {
|
||||
expect(
|
||||
new Extrinsic(registry).toU8a()
|
||||
).toEqual(new Uint8Array([0, 0]));
|
||||
).toEqual(new Uint8Array([
|
||||
0, 0, // index
|
||||
0, 0, 0, 0 // fillBlock Perbill
|
||||
]));
|
||||
});
|
||||
|
||||
it('creates a unsigned extrinsic', (): void => {
|
||||
|
||||
@@ -19,10 +19,13 @@ const keyring = testingPairs({ type: 'ed25519' }, false);
|
||||
new Metadata(registry, metadataStatic);
|
||||
|
||||
describe('ExtrinsicV4', (): void => {
|
||||
it('constructs a sane Uint8Array (default)', (): void => {
|
||||
it.only('constructs a sane Uint8Array (default)', (): void => {
|
||||
expect(
|
||||
new Extrinsic(registry).toU8a()
|
||||
).toEqual(new Uint8Array([0, 0]));
|
||||
).toEqual(new Uint8Array([
|
||||
0, 0, // index
|
||||
0, 0, 0, 0 // fillBlock Perbill
|
||||
]));
|
||||
});
|
||||
|
||||
it('creates a unsigned extrinsic', (): void => {
|
||||
|
||||
@@ -13,6 +13,10 @@ const deprecated = {
|
||||
export default {
|
||||
types: {
|
||||
...deprecated,
|
||||
ActiveEraInfo: {
|
||||
index: 'EraIndex',
|
||||
start: 'Option<Moment>'
|
||||
},
|
||||
CompactAssignments: {
|
||||
votes1: 'Vec<(AccountId, [CompactScore; 0], AccountId)>',
|
||||
votes2: 'Vec<(AccountId, [CompactScore; 1], AccountId)>',
|
||||
|
||||
@@ -2,10 +2,16 @@
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
import { ITuple } from '@polkadot/types/types';
|
||||
import { BTreeMap, Compact, Enum, Struct, Vec } from '@polkadot/types/codec';
|
||||
import { BTreeMap, Compact, Enum, Option, Struct, Vec } from '@polkadot/types/codec';
|
||||
import { bool, u128, u16, u32 } from '@polkadot/types/primitive';
|
||||
import { AccountId, Balance, BlockNumber, Moment, Perbill } from '@polkadot/types/interfaces/runtime';
|
||||
|
||||
/** @name ActiveEraInfo */
|
||||
export interface ActiveEraInfo extends Struct {
|
||||
readonly index: EraIndex;
|
||||
readonly start: Option<Moment>;
|
||||
}
|
||||
|
||||
/** @name CompactAssignments */
|
||||
export interface CompactAssignments extends Struct {
|
||||
readonly votes1: Vec<ITuple<[AccountId, Vec<CompactScore>, AccountId]>>;
|
||||
|
||||
Reference in New Issue
Block a user