Types for time-delay proxies (#2468)
* Types for time-delay proxies * Remove duplicated CallHash (& generate output)
This commit is contained in:
@@ -16,8 +16,9 @@ import { SetId, StoredPendingChange, StoredState } from '@polkadot/types/interfa
|
||||
import { RegistrarInfo, Registration } from '@polkadot/types/interfaces/identity';
|
||||
import { AuthIndex } from '@polkadot/types/interfaces/imOnline';
|
||||
import { DeferredOffenceOf, Kind, OffenceDetails, OpaqueTimeSlot, ReportIdOf } from '@polkadot/types/interfaces/offences';
|
||||
import { ProxyType } from '@polkadot/types/interfaces/proxy';
|
||||
import { ActiveRecovery, RecoveryConfig } from '@polkadot/types/interfaces/recovery';
|
||||
import { AccountId, AccountIndex, Balance, BalanceOf, BlockNumber, ExtrinsicsWeight, Hash, KeyTypeId, Moment, OpaqueCall, Perbill, ProxyType, Releases, ValidatorId } from '@polkadot/types/interfaces/runtime';
|
||||
import { AccountId, AccountIndex, Balance, BalanceOf, BlockNumber, ExtrinsicsWeight, Hash, KeyTypeId, Moment, OpaqueCall, Perbill, Releases, ValidatorId } from '@polkadot/types/interfaces/runtime';
|
||||
import { Scheduled, TaskAddress } from '@polkadot/types/interfaces/scheduler';
|
||||
import { Keys, SessionIndex } from '@polkadot/types/interfaces/session';
|
||||
import { Bid, BidKind, SocietyVote, StrikeCount, VouchingStatus } from '@polkadot/types/interfaces/society';
|
||||
|
||||
@@ -13,7 +13,8 @@ import { Extrinsic, Signature } from '@polkadot/types/interfaces/extrinsics';
|
||||
import { GrandpaEquivocationProof, KeyOwnerProof } from '@polkadot/types/interfaces/grandpa';
|
||||
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, OpaqueCall, Perbill, Percent, ProxyType, Weight } from '@polkadot/types/interfaces/runtime';
|
||||
import { ProxyType } from '@polkadot/types/interfaces/proxy';
|
||||
import { AccountId, AccountIndex, Address, Balance, BalanceOf, BlockNumber, Call, ChangesTrieConfiguration, Hash, Header, KeyValue, LookupSource, Moment, OpaqueCall, Perbill, Percent, Weight } from '@polkadot/types/interfaces/runtime';
|
||||
import { Period, Priority } from '@polkadot/types/interfaces/scheduler';
|
||||
import { Keys } from '@polkadot/types/interfaces/session';
|
||||
import { SocietyJudgement } from '@polkadot/types/interfaces/society';
|
||||
|
||||
@@ -29,6 +29,9 @@ const typesModules: Record<string, OverrideModuleType> = {
|
||||
parachains: {
|
||||
Id: 'ParaId'
|
||||
},
|
||||
proxy: {
|
||||
Announcement: 'ProxyAnnouncement'
|
||||
},
|
||||
society: {
|
||||
Judgement: 'SocietyJudgement',
|
||||
Vote: 'SocietyVote'
|
||||
|
||||
@@ -30,10 +30,11 @@ import { DeferredOffenceOf, Kind, OffenceDetails, Offender, OpaqueTimeSlot, Repo
|
||||
import { AbridgedCandidateReceipt, AttestedCandidate, AuctionIndex, Bidder, CandidateCommitments, CandidateReceipt, CollatorId, CollatorSignature, DoubleVoteReport, DownwardMessage, GlobalValidationSchedule, HeadData, IncomingParachain, IncomingParachainDeploy, IncomingParachainFixed, LeasePeriod, LeasePeriodOf, LocalValidationData, NewBidder, ParaId, ParaInfo, ParaPastCodeMeta, ParaScheduling, ParachainDispatchOrigin, RelayChainBlockNumber, Remark, Retriable, Scheduling, SigningContext, SlotRange, Statement, SubId, UpwardMessage, ValidationCode, ValidationFunctionParams, ValidatorSignature, ValidityAttestation, WinningData, WinningDataEntry } from '@polkadot/types/interfaces/parachains';
|
||||
import { RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
||||
import { Approvals } from '@polkadot/types/interfaces/poll';
|
||||
import { ProxyAnnouncement, ProxyDefinition, ProxyType } from '@polkadot/types/interfaces/proxy';
|
||||
import { AccountStatus, AccountValidity } from '@polkadot/types/interfaces/purchase';
|
||||
import { ActiveRecovery, RecoveryConfig } from '@polkadot/types/interfaces/recovery';
|
||||
import { RpcMethods } from '@polkadot/types/interfaces/rpc';
|
||||
import { AccountId, AccountIdOf, AccountIndex, Address, AssetId, Balance, BalanceOf, Block, BlockNumber, Call, ChangesTrieConfiguration, Consensus, ConsensusEngineId, Digest, DigestItem, ExtrinsicsWeight, Fixed128, Fixed64, H160, H256, H512, Hash, Header, Index, Justification, KeyTypeId, KeyValue, LockIdentifier, LookupSource, LookupTarget, ModuleId, Moment, OpaqueCall, Origin, Pays, Perbill, Percent, Permill, Perquintill, Phantom, PhantomData, PreRuntime, ProxyType, Releases, RuntimeDbWeight, Seal, SealV0, SignedBlock, StorageData, ValidatorId, Weight, WeightMultiplier } from '@polkadot/types/interfaces/runtime';
|
||||
import { AccountId, AccountIdOf, AccountIndex, Address, AssetId, Balance, BalanceOf, Block, BlockNumber, Call, CallHash, CallHashOf, ChangesTrieConfiguration, Consensus, ConsensusEngineId, Digest, DigestItem, ExtrinsicsWeight, Fixed128, Fixed64, H160, H256, H512, Hash, Header, Index, Justification, KeyTypeId, KeyValue, LockIdentifier, LookupSource, LookupTarget, ModuleId, Moment, OpaqueCall, Origin, Pays, Perbill, Percent, Permill, Perquintill, Phantom, PhantomData, PreRuntime, Releases, RuntimeDbWeight, Seal, SealV0, SignedBlock, StorageData, ValidatorId, Weight, WeightMultiplier } from '@polkadot/types/interfaces/runtime';
|
||||
import { Period, Priority, SchedulePeriod, SchedulePriority, Scheduled, TaskAddress } from '@polkadot/types/interfaces/scheduler';
|
||||
import { FullIdentification, IdentificationTuple, Keys, MembershipProof, SessionIndex, SessionKeys1, SessionKeys2, SessionKeys3, SessionKeys4, SessionKeys5, SessionKeys6, ValidatorCount } from '@polkadot/types/interfaces/session';
|
||||
import { Bid, BidKind, SocietyJudgement, SocietyVote, StrikeCount, VouchingStatus } from '@polkadot/types/interfaces/society';
|
||||
@@ -43,7 +44,7 @@ import { WeightToFeeCoefficient } from '@polkadot/types/interfaces/support';
|
||||
import { AccountInfo, ApplyExtrinsicResult, ChainProperties, ChainType, DigestOf, DispatchClass, DispatchError, DispatchErrorModule, DispatchErrorTo198, DispatchInfo, DispatchInfoTo190, DispatchInfoTo244, DispatchOutcome, DispatchResult, DispatchResultOf, DispatchResultTo198, Event, EventId, EventIndex, EventRecord, EventRecordTo76, Health, InvalidTransaction, Key, LastRuntimeUpgradeInfo, NetworkState, NetworkStatePeerset, NetworkStatePeersetInfo, NodeRole, NotConnectedPeer, Peer, PeerEndpoint, PeerEndpointAddr, PeerInfo, PeerPing, Phase, RefCount, TransactionValidityError, UnknownTransaction } from '@polkadot/types/interfaces/system';
|
||||
import { OpenTip, OpenTipFinderTo225, OpenTipTip, OpenTipTo225, TreasuryProposal } from '@polkadot/types/interfaces/treasury';
|
||||
import { Multiplier } from '@polkadot/types/interfaces/txpayment';
|
||||
import { CallHash, Multisig, Timepoint } from '@polkadot/types/interfaces/utility';
|
||||
import { Multisig, Timepoint } from '@polkadot/types/interfaces/utility';
|
||||
import { VestingInfo } from '@polkadot/types/interfaces/vesting';
|
||||
|
||||
declare module '@polkadot/types/types/registry' {
|
||||
@@ -161,6 +162,12 @@ declare module '@polkadot/types/types/registry' {
|
||||
Call: Call;
|
||||
'Option<Call>': Option<Call>;
|
||||
'Vec<Call>': Vec<Call>;
|
||||
CallHash: CallHash;
|
||||
'Option<CallHash>': Option<CallHash>;
|
||||
'Vec<CallHash>': Vec<CallHash>;
|
||||
CallHashOf: CallHashOf;
|
||||
'Option<CallHashOf>': Option<CallHashOf>;
|
||||
'Vec<CallHashOf>': Vec<CallHashOf>;
|
||||
ChangesTrieConfiguration: ChangesTrieConfiguration;
|
||||
'Option<ChangesTrieConfiguration>': Option<ChangesTrieConfiguration>;
|
||||
'Vec<ChangesTrieConfiguration>': Vec<ChangesTrieConfiguration>;
|
||||
@@ -258,9 +265,6 @@ declare module '@polkadot/types/types/registry' {
|
||||
PhantomData: PhantomData;
|
||||
'Option<PhantomData>': Option<PhantomData>;
|
||||
'Vec<PhantomData>': Vec<PhantomData>;
|
||||
ProxyType: ProxyType;
|
||||
'Option<ProxyType>': Option<ProxyType>;
|
||||
'Vec<ProxyType>': Vec<ProxyType>;
|
||||
Releases: Releases;
|
||||
'Option<Releases>': Option<Releases>;
|
||||
'Vec<Releases>': Vec<Releases>;
|
||||
@@ -789,6 +793,15 @@ declare module '@polkadot/types/types/registry' {
|
||||
Reporter: Reporter;
|
||||
'Option<Reporter>': Option<Reporter>;
|
||||
'Vec<Reporter>': Vec<Reporter>;
|
||||
ProxyDefinition: ProxyDefinition;
|
||||
'Option<ProxyDefinition>': Option<ProxyDefinition>;
|
||||
'Vec<ProxyDefinition>': Vec<ProxyDefinition>;
|
||||
ProxyType: ProxyType;
|
||||
'Option<ProxyType>': Option<ProxyType>;
|
||||
'Vec<ProxyType>': Vec<ProxyType>;
|
||||
ProxyAnnouncement: ProxyAnnouncement;
|
||||
'Option<ProxyAnnouncement>': Option<ProxyAnnouncement>;
|
||||
'Vec<ProxyAnnouncement>': Vec<ProxyAnnouncement>;
|
||||
ActiveRecovery: ActiveRecovery;
|
||||
'Option<ActiveRecovery>': Option<ActiveRecovery>;
|
||||
'Vec<ActiveRecovery>': Vec<ActiveRecovery>;
|
||||
@@ -1138,9 +1151,6 @@ declare module '@polkadot/types/types/registry' {
|
||||
Multiplier: Multiplier;
|
||||
'Option<Multiplier>': Option<Multiplier>;
|
||||
'Vec<Multiplier>': Vec<Multiplier>;
|
||||
CallHash: CallHash;
|
||||
'Option<CallHash>': Option<CallHash>;
|
||||
'Vec<CallHash>': Vec<CallHash>;
|
||||
Multisig: Multisig;
|
||||
'Option<Multisig>': Option<Multisig>;
|
||||
'Vec<Multisig>': Vec<Multisig>;
|
||||
|
||||
@@ -23,6 +23,7 @@ export { default as grandpa } from './grandpa/definitions';
|
||||
export { default as identity } from './identity/definitions';
|
||||
export { default as imOnline } from './imOnline/definitions';
|
||||
export { default as offences } from './offences/definitions';
|
||||
export { default as proxy } from './proxy/definitions';
|
||||
export { default as recovery } from './recovery/definitions';
|
||||
export { default as scheduler } from './scheduler/definitions';
|
||||
export { default as session } from './session/definitions';
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
// Copyright 2017-2020 @polkadot/types authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
// order important in structs... :)
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
import { Definitions } from '../../types';
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
ProxyDefinition: {
|
||||
delegate: 'AccountId',
|
||||
proxyType: 'ProxyType',
|
||||
delay: 'BlockNumber'
|
||||
},
|
||||
ProxyType: {
|
||||
_enum: ['Any', 'NonTransfer', 'Governance', 'Staking']
|
||||
},
|
||||
ProxyAnnouncement: {
|
||||
real: 'AccountId',
|
||||
callHash: 'Hash',
|
||||
height: 'BlockNumber'
|
||||
}
|
||||
}
|
||||
} as Definitions;
|
||||
@@ -0,0 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
@@ -0,0 +1,29 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
import { Enum, Struct } from '@polkadot/types/codec';
|
||||
import { AccountId, BlockNumber, Hash } from '@polkadot/types/interfaces/runtime';
|
||||
|
||||
/** @name ProxyAnnouncement */
|
||||
export interface ProxyAnnouncement extends Struct {
|
||||
readonly real: AccountId;
|
||||
readonly callHash: Hash;
|
||||
readonly height: BlockNumber;
|
||||
}
|
||||
|
||||
/** @name ProxyDefinition */
|
||||
export interface ProxyDefinition extends Struct {
|
||||
readonly delegate: AccountId;
|
||||
readonly proxyType: ProxyType;
|
||||
readonly delay: BlockNumber;
|
||||
}
|
||||
|
||||
/** @name ProxyType */
|
||||
export interface ProxyType extends Enum {
|
||||
readonly isAny: boolean;
|
||||
readonly isNonTransfer: boolean;
|
||||
readonly isGovernance: boolean;
|
||||
readonly isStaking: boolean;
|
||||
}
|
||||
|
||||
export type PHANTOM_PROXY = 'proxy';
|
||||
@@ -20,6 +20,8 @@ export default {
|
||||
Block: 'GenericBlock',
|
||||
BlockNumber: 'u32',
|
||||
Call: 'GenericCall',
|
||||
CallHash: 'Hash',
|
||||
CallHashOf: 'CallHash',
|
||||
ChangesTrieConfiguration: {
|
||||
digestInterval: 'u32',
|
||||
digestLevels: 'u32'
|
||||
@@ -76,9 +78,6 @@ export default {
|
||||
Perquintill: 'u64',
|
||||
Phantom: 'Null',
|
||||
PhantomData: 'Null',
|
||||
ProxyType: {
|
||||
_enum: ['Any', 'NonTransfer', 'Governance', 'Staking']
|
||||
},
|
||||
Releases: {
|
||||
_enum: ['V1', 'V2', 'V3', 'V4', 'V5', 'V6', 'V7', 'V8', 'V9', 'V10']
|
||||
},
|
||||
|
||||
@@ -38,6 +38,12 @@ export interface BlockNumber extends u32 {}
|
||||
/** @name Call */
|
||||
export interface Call extends GenericCall {}
|
||||
|
||||
/** @name CallHash */
|
||||
export interface CallHash extends Hash {}
|
||||
|
||||
/** @name CallHashOf */
|
||||
export interface CallHashOf extends CallHash {}
|
||||
|
||||
/** @name ChangesTrieConfiguration */
|
||||
export interface ChangesTrieConfiguration extends Struct {
|
||||
readonly digestInterval: u32;
|
||||
@@ -166,14 +172,6 @@ export interface PhantomData extends Null {}
|
||||
/** @name PreRuntime */
|
||||
export interface PreRuntime extends ITuple<[ConsensusEngineId, Bytes]> {}
|
||||
|
||||
/** @name ProxyType */
|
||||
export interface ProxyType extends Enum {
|
||||
readonly isAny: boolean;
|
||||
readonly isNonTransfer: boolean;
|
||||
readonly isGovernance: boolean;
|
||||
readonly isStaking: boolean;
|
||||
}
|
||||
|
||||
/** @name Releases */
|
||||
export interface Releases extends Enum {
|
||||
readonly isV1: boolean;
|
||||
|
||||
@@ -19,6 +19,7 @@ export * from './grandpa/types';
|
||||
export * from './identity/types';
|
||||
export * from './imOnline/types';
|
||||
export * from './offences/types';
|
||||
export * from './proxy/types';
|
||||
export * from './recovery/types';
|
||||
export * from './scheduler/types';
|
||||
export * from './session/types';
|
||||
|
||||
@@ -10,7 +10,6 @@ import { Definitions } from '../../types';
|
||||
export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
CallHash: 'H256',
|
||||
Multisig: {
|
||||
when: 'Timepoint',
|
||||
deposit: 'Balance',
|
||||
|
||||
@@ -3,10 +3,7 @@
|
||||
|
||||
import { Struct, Vec } from '@polkadot/types/codec';
|
||||
import { u32 } from '@polkadot/types/primitive';
|
||||
import { AccountId, Balance, BlockNumber, H256 } from '@polkadot/types/interfaces/runtime';
|
||||
|
||||
/** @name CallHash */
|
||||
export interface CallHash extends H256 {}
|
||||
import { AccountId, Balance, BlockNumber } from '@polkadot/types/interfaces/runtime';
|
||||
|
||||
/** @name Multisig */
|
||||
export interface Multisig extends Struct {
|
||||
|
||||
Reference in New Issue
Block a user