Add society-specific Vote type (#1754)
* Add society-specific Vote type * Cnvert storage types via toLatest
This commit is contained in:
@@ -19,7 +19,7 @@ import { AuthIndex } from '@polkadot/types/interfaces/imOnline';
|
|||||||
import { Kind, OffenceDetails, OpaqueTimeSlot, ReportIdOf } from '@polkadot/types/interfaces/offences';
|
import { Kind, OffenceDetails, OpaqueTimeSlot, ReportIdOf } from '@polkadot/types/interfaces/offences';
|
||||||
import { ActiveRecovery, RecoveryConfig } from '@polkadot/types/interfaces/recovery';
|
import { ActiveRecovery, RecoveryConfig } from '@polkadot/types/interfaces/recovery';
|
||||||
import { Keys, SessionIndex } from '@polkadot/types/interfaces/session';
|
import { Keys, SessionIndex } from '@polkadot/types/interfaces/session';
|
||||||
import { Bid, BidKind, StrikeCount, VouchingStatus } from '@polkadot/types/interfaces/society';
|
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 { 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 { DigestOf, EventIndex, EventRecord } from '@polkadot/types/interfaces/system';
|
||||||
import { OpenTip, TreasuryProposal } from '@polkadot/types/interfaces/treasury';
|
import { OpenTip, TreasuryProposal } from '@polkadot/types/interfaces/treasury';
|
||||||
@@ -246,9 +246,9 @@ declare module './types' {
|
|||||||
vouching: StorageEntryExact<ApiType, (arg: AccountId | Uint8Array | string) => Observable<Option<VouchingStatus>>> & QueryableStorageEntry<ApiType>;
|
vouching: StorageEntryExact<ApiType, (arg: AccountId | Uint8Array | string) => Observable<Option<VouchingStatus>>> & QueryableStorageEntry<ApiType>;
|
||||||
payouts: StorageEntryExact<ApiType, (arg: AccountId | Uint8Array | string) => Observable<Vec<ITuple<[BlockNumber, BalanceOf]>>>> & QueryableStorageEntry<ApiType>;
|
payouts: StorageEntryExact<ApiType, (arg: AccountId | Uint8Array | string) => Observable<Vec<ITuple<[BlockNumber, BalanceOf]>>>> & QueryableStorageEntry<ApiType>;
|
||||||
strikes: StorageEntryExact<ApiType, (arg: AccountId | Uint8Array | string) => Observable<StrikeCount>> & QueryableStorageEntry<ApiType>;
|
strikes: StorageEntryExact<ApiType, (arg: AccountId | Uint8Array | string) => Observable<StrikeCount>> & QueryableStorageEntry<ApiType>;
|
||||||
votes: StorageEntryExact<ApiType, (key1: AccountId | Uint8Array | string, key2: AccountId | Uint8Array | string) => Observable<Option<Vote>>> & QueryableStorageEntry<ApiType>;
|
votes: StorageEntryExact<ApiType, (key1: AccountId | Uint8Array | string, key2: AccountId | Uint8Array | string) => Observable<Option<SocietyVote>>> & QueryableStorageEntry<ApiType>;
|
||||||
defender: StorageEntryExact<ApiType, () => Observable<Option<AccountId>>> & QueryableStorageEntry<ApiType>;
|
defender: StorageEntryExact<ApiType, () => Observable<Option<AccountId>>> & QueryableStorageEntry<ApiType>;
|
||||||
defenderVotes: StorageEntryExact<ApiType, (arg: AccountId | Uint8Array | string) => Observable<Option<Vote>>> & QueryableStorageEntry<ApiType>;
|
defenderVotes: StorageEntryExact<ApiType, (arg: AccountId | Uint8Array | string) => Observable<Option<SocietyVote>>> & QueryableStorageEntry<ApiType>;
|
||||||
maxMembers: StorageEntryExact<ApiType, () => Observable<u32>> & QueryableStorageEntry<ApiType>;
|
maxMembers: StorageEntryExact<ApiType, () => Observable<u32>> & QueryableStorageEntry<ApiType>;
|
||||||
};
|
};
|
||||||
recovery: {
|
recovery: {
|
||||||
|
|||||||
@@ -6631,7 +6631,7 @@
|
|||||||
"hasher": "twox64Concat",
|
"hasher": "twox64Concat",
|
||||||
"key1": "AccountId",
|
"key1": "AccountId",
|
||||||
"key2": "AccountId",
|
"key2": "AccountId",
|
||||||
"value": "Vote",
|
"value": "SocietyVote",
|
||||||
"key2Hasher": "twox64Concat"
|
"key2Hasher": "twox64Concat"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -6658,7 +6658,7 @@
|
|||||||
"Map": {
|
"Map": {
|
||||||
"hasher": "twox64Concat",
|
"hasher": "twox64Concat",
|
||||||
"key": "AccountId",
|
"key": "AccountId",
|
||||||
"value": "Vote",
|
"value": "SocietyVote",
|
||||||
"linked": false
|
"linked": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,14 +3,14 @@
|
|||||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||||
|
|
||||||
import { OverrideModuleType } from '@polkadot/types/known/types';
|
import { OverrideModuleType } from '@polkadot/types/known/types';
|
||||||
import { FunctionMetadataV10, FunctionMetadataLatest, MetadataV10, MetadataLatest, ModuleMetadataV10, ModuleMetadataLatest } from '@polkadot/types/interfaces/metadata';
|
import { FunctionMetadataV10, FunctionMetadataLatest, MetadataV10, MetadataLatest, ModuleMetadataV10, ModuleMetadataLatest, StorageMetadataV10, StorageMetadataLatest, StorageEntryMetadataLatest } from '@polkadot/types/interfaces/metadata';
|
||||||
import { Registry } from '@polkadot/types/types';
|
import { Registry } from '@polkadot/types/types';
|
||||||
|
|
||||||
import { getModuleTypes } from '@polkadot/types/known';
|
import { getModuleTypes } from '@polkadot/types/known';
|
||||||
import { createType } from '@polkadot/types';
|
import { Type, createType } from '@polkadot/types';
|
||||||
import { stringCamelCase } from '@polkadot/util';
|
import { stringCamelCase } from '@polkadot/util';
|
||||||
|
|
||||||
// apply module-specific type overrides - this should always be done as part of toLatest
|
// apply module-specific type overrides (always be done as part of toLatest)
|
||||||
/** @internal */
|
/** @internal */
|
||||||
function convertCalls (registry: Registry, calls: FunctionMetadataV10[], sectionTypes: OverrideModuleType[]): FunctionMetadataLatest[] {
|
function convertCalls (registry: Registry, calls: FunctionMetadataV10[], sectionTypes: OverrideModuleType[]): FunctionMetadataLatest[] {
|
||||||
return calls.map(({ args, documentation, name }): FunctionMetadataLatest => {
|
return calls.map(({ args, documentation, name }): FunctionMetadataLatest => {
|
||||||
@@ -26,15 +26,46 @@ function convertCalls (registry: Registry, calls: FunctionMetadataV10[], section
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// apply module-specific storage type overrides (always part of toLatest)
|
||||||
|
/** @internal */
|
||||||
|
function convertStorage (registry: Registry, { items, prefix }: StorageMetadataV10, sectionTypes: OverrideModuleType[]): StorageMetadataLatest {
|
||||||
|
return createType(registry, 'StorageMetadataLatest', {
|
||||||
|
items: items.map(({ documentation, fallback, modifier, name, type }): StorageEntryMetadataLatest => {
|
||||||
|
let resultType: Type;
|
||||||
|
|
||||||
|
if (type.isMap) {
|
||||||
|
resultType = type.asMap.value;
|
||||||
|
} else if (type.isDoubleMap) {
|
||||||
|
resultType = type.asDoubleMap.value;
|
||||||
|
} else {
|
||||||
|
resultType = type.asPlain;
|
||||||
|
}
|
||||||
|
|
||||||
|
const queued = sectionTypes.find(({ name }): boolean => resultType.eq(name));
|
||||||
|
|
||||||
|
if (queued) {
|
||||||
|
resultType.setOverride(queued.override);
|
||||||
|
}
|
||||||
|
|
||||||
|
return createType(registry, 'StorageEntryMetadataLatest', { documentation, fallback, modifier, name, type });
|
||||||
|
}),
|
||||||
|
prefix
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/** @internal */
|
/** @internal */
|
||||||
function convertModule (registry: Registry, mod: ModuleMetadataV10): ModuleMetadataLatest {
|
function convertModule (registry: Registry, mod: ModuleMetadataV10): ModuleMetadataLatest {
|
||||||
const calls = mod.calls.unwrapOr(null);
|
const calls = mod.calls.unwrapOr(null);
|
||||||
|
const storage = mod.storage.unwrapOr(null);
|
||||||
const sectionTypes = getModuleTypes(stringCamelCase(mod.name.toString())) || [];
|
const sectionTypes = getModuleTypes(stringCamelCase(mod.name.toString())) || [];
|
||||||
|
|
||||||
return createType(registry, 'ModuleMetadataLatest', {
|
return createType(registry, 'ModuleMetadataLatest', {
|
||||||
...mod,
|
...mod,
|
||||||
calls: calls
|
calls: calls
|
||||||
? convertCalls(registry, calls, sectionTypes)
|
? convertCalls(registry, calls, sectionTypes)
|
||||||
|
: null,
|
||||||
|
storage: storage
|
||||||
|
? convertStorage(registry, storage, sectionTypes)
|
||||||
: null
|
: null
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import { AuthIndex, AuthoritySignature, Heartbeat, OpaqueMultiaddr, OpaqueNetwor
|
|||||||
import { Kind, OffenceDetails, Offender, OpaqueTimeSlot, ReportIdOf, Reporter } from '@polkadot/types/interfaces/offences';
|
import { Kind, OffenceDetails, Offender, OpaqueTimeSlot, ReportIdOf, Reporter } from '@polkadot/types/interfaces/offences';
|
||||||
import { ActiveRecovery, RecoveryConfig } from '@polkadot/types/interfaces/recovery';
|
import { ActiveRecovery, RecoveryConfig } from '@polkadot/types/interfaces/recovery';
|
||||||
import { FullIdentification, IdentificationTuple, Keys, SessionIndex, SessionKeys1, SessionKeys2, SessionKeys3, SessionKeys4, SessionKeys5, SessionKeys6 } from '@polkadot/types/interfaces/session';
|
import { FullIdentification, IdentificationTuple, Keys, SessionIndex, SessionKeys1, SessionKeys2, SessionKeys3, SessionKeys4, SessionKeys5, SessionKeys6 } from '@polkadot/types/interfaces/session';
|
||||||
import { Bid, BidKind, BidKindVouch, SocietyJudgement, StrikeCount, VouchingStatus } from '@polkadot/types/interfaces/society';
|
import { Bid, BidKind, BidKindVouch, SocietyJudgement, SocietyVote, StrikeCount, VouchingStatus } from '@polkadot/types/interfaces/society';
|
||||||
import { EraIndex, EraPoints, EraRewards, Exposure, Forcing, IndividualExposure, MomentOf, Nominations, Points, RewardDestination, SlashJournalEntry, SlashingSpans, SlashingSpansTo204, SpanIndex, SpanRecord, StakingLedger, UnappliedSlash, UnappliedSlashOther, UnlockChunk, ValidatorPrefs, ValidatorPrefsTo145, ValidatorPrefsTo196 } from '@polkadot/types/interfaces/staking';
|
import { EraIndex, EraPoints, EraRewards, Exposure, Forcing, IndividualExposure, MomentOf, Nominations, Points, RewardDestination, SlashJournalEntry, SlashingSpans, SlashingSpansTo204, SpanIndex, SpanRecord, StakingLedger, UnappliedSlash, UnappliedSlashOther, UnlockChunk, ValidatorPrefs, ValidatorPrefsTo145, ValidatorPrefsTo196 } from '@polkadot/types/interfaces/staking';
|
||||||
import { DigestOf, DispatchError, DispatchErrorModule, DispatchErrorTo198, DispatchResult, DispatchResultOf, DispatchResultTo198, Event, EventId, EventIndex, EventRecord, EventRecordTo76, Key, Phase } from '@polkadot/types/interfaces/system';
|
import { DigestOf, DispatchError, DispatchErrorModule, DispatchErrorTo198, DispatchResult, DispatchResultOf, DispatchResultTo198, Event, EventId, EventIndex, EventRecord, EventRecordTo76, Key, Phase } from '@polkadot/types/interfaces/system';
|
||||||
import { OpenTip, OpenTipFinder, OpenTipTip, TreasuryProposal } from '@polkadot/types/interfaces/treasury';
|
import { OpenTip, OpenTipFinder, OpenTipTip, TreasuryProposal } from '@polkadot/types/interfaces/treasury';
|
||||||
@@ -30,7 +30,7 @@ import { Multisig, Timepoint } from '@polkadot/types/interfaces/utility';
|
|||||||
import { BlockAttestations, IncludedBlocks, MoreAttestations } from '@polkadot/types/interfaces/attestations';
|
import { BlockAttestations, IncludedBlocks, MoreAttestations } from '@polkadot/types/interfaces/attestations';
|
||||||
import { EthereumAddress } from '@polkadot/types/interfaces/claims';
|
import { EthereumAddress } from '@polkadot/types/interfaces/claims';
|
||||||
import { AttestedCandidate, AuctionIndex, BalanceUpload, Bidder, CandidateReceipt, CollatorId, CollatorSignature, EgressQueueRoot, HeadData, IncomingParachain, IncomingParachainDeploy, IncomingParachainFixed, LeasePeriod, LeasePeriodOf, NewBidder, ParaId, ParaIdOf, ParaInfo, ParaScheduling, ParachainDispatchOrigin, Retriable, SlotRange, SubId, UpwardMessage, ValidatorIndex, ValidityAttestation, ValidityVote, WinningData, WinningDataEntry } from '@polkadot/types/interfaces/parachains';
|
import { AttestedCandidate, AuctionIndex, BalanceUpload, Bidder, CandidateReceipt, CollatorId, CollatorSignature, EgressQueueRoot, HeadData, IncomingParachain, IncomingParachainDeploy, IncomingParachainFixed, LeasePeriod, LeasePeriodOf, NewBidder, ParaId, ParaIdOf, ParaInfo, ParaScheduling, ParachainDispatchOrigin, Retriable, SlotRange, SubId, UpwardMessage, ValidatorIndex, ValidityAttestation, ValidityVote, WinningData, WinningDataEntry } from '@polkadot/types/interfaces/parachains';
|
||||||
import { CallMetadataV0, DoubleMapTypeLatest, DoubleMapTypeV10, DoubleMapTypeV3, DoubleMapTypeV4, DoubleMapTypeV5, DoubleMapTypeV6, DoubleMapTypeV7, DoubleMapTypeV8, DoubleMapTypeV9, ErrorMetadataV10, ErrorMetadataV8, ErrorMetadataV9, EventMetadataLatest, EventMetadataV0, EventMetadataV1, EventMetadataV10, EventMetadataV2, EventMetadataV3, EventMetadataV4, EventMetadataV5, EventMetadataV6, EventMetadataV7, EventMetadataV8, EventMetadataV9, FunctionArgumentMetadataLatest, FunctionArgumentMetadataV0, FunctionArgumentMetadataV1, FunctionArgumentMetadataV10, FunctionArgumentMetadataV2, FunctionArgumentMetadataV3, FunctionArgumentMetadataV4, FunctionArgumentMetadataV5, FunctionArgumentMetadataV6, FunctionArgumentMetadataV7, FunctionArgumentMetadataV8, FunctionArgumentMetadataV9, FunctionMetadataLatest, FunctionMetadataV0, FunctionMetadataV1, FunctionMetadataV10, FunctionMetadataV2, FunctionMetadataV3, FunctionMetadataV4, FunctionMetadataV5, FunctionMetadataV6, FunctionMetadataV7, FunctionMetadataV8, FunctionMetadataV9, MapTypeLatest, MapTypeV0, MapTypeV10, MapTypeV2, MapTypeV3, MapTypeV4, MapTypeV5, MapTypeV6, MapTypeV7, MapTypeV8, MapTypeV9, MetadataAll, MetadataLatest, MetadataV0, MetadataV1, MetadataV10, MetadataV2, MetadataV3, MetadataV4, MetadataV5, MetadataV6, MetadataV7, MetadataV8, MetadataV9, ModuleConstantMetadataLatest, ModuleConstantMetadataV10, ModuleConstantMetadataV6, ModuleConstantMetadataV7, ModuleConstantMetadataV8, ModuleConstantMetadataV9, ModuleMetadataLatest, ModuleMetadataV0, ModuleMetadataV1, ModuleMetadataV10, ModuleMetadataV2, ModuleMetadataV3, ModuleMetadataV4, ModuleMetadataV5, ModuleMetadataV6, ModuleMetadataV7, ModuleMetadataV8, ModuleMetadataV9, OuterDispatchCallV0, OuterDispatchMetadataV0, OuterEventEventMetadataEventsV0, OuterEventEventMetadataV0, OuterEventMetadataV0, PlainTypeLatest, PlainTypeV0, PlainTypeV10, PlainTypeV2, PlainTypeV3, PlainTypeV4, PlainTypeV5, PlainTypeV6, PlainTypeV7, PlainTypeV8, PlainTypeV9, RuntimeModuleMetadataV0, StorageEntryMetadataLatest, StorageEntryMetadataV10, StorageEntryMetadataV6, StorageEntryMetadataV7, StorageEntryMetadataV8, StorageEntryMetadataV9, StorageEntryModifierLatest, StorageEntryModifierV10, StorageEntryModifierV6, StorageEntryModifierV7, StorageEntryModifierV8, StorageEntryModifierV9, StorageEntryTypeLatest, StorageEntryTypeV10, StorageEntryTypeV6, StorageEntryTypeV7, StorageEntryTypeV8, StorageEntryTypeV9, StorageFunctionMetadataV0, StorageFunctionMetadataV1, StorageFunctionMetadataV2, StorageFunctionMetadataV3, StorageFunctionMetadataV4, StorageFunctionMetadataV5, StorageFunctionModifierV0, StorageFunctionModifierV1, StorageFunctionModifierV2, StorageFunctionModifierV3, StorageFunctionModifierV4, StorageFunctionModifierV5, StorageFunctionTypeV0, StorageFunctionTypeV1, StorageFunctionTypeV2, StorageFunctionTypeV3, StorageFunctionTypeV4, StorageFunctionTypeV5, StorageHasher, StorageHasherV10, StorageHasherV4, StorageHasherV5, StorageHasherV6, StorageHasherV7, StorageHasherV8, StorageHasherV9, StorageMetadataV0, StorageMetadataV10, StorageMetadataV7, StorageMetadataV8, StorageMetadataV9 } from '@polkadot/types/interfaces/metadata';
|
import { CallMetadataV0, DoubleMapTypeLatest, DoubleMapTypeV10, DoubleMapTypeV3, DoubleMapTypeV4, DoubleMapTypeV5, DoubleMapTypeV6, DoubleMapTypeV7, DoubleMapTypeV8, DoubleMapTypeV9, ErrorMetadataV10, ErrorMetadataV8, ErrorMetadataV9, EventMetadataLatest, EventMetadataV0, EventMetadataV1, EventMetadataV10, EventMetadataV2, EventMetadataV3, EventMetadataV4, EventMetadataV5, EventMetadataV6, EventMetadataV7, EventMetadataV8, EventMetadataV9, FunctionArgumentMetadataLatest, FunctionArgumentMetadataV0, FunctionArgumentMetadataV1, FunctionArgumentMetadataV10, FunctionArgumentMetadataV2, FunctionArgumentMetadataV3, FunctionArgumentMetadataV4, FunctionArgumentMetadataV5, FunctionArgumentMetadataV6, FunctionArgumentMetadataV7, FunctionArgumentMetadataV8, FunctionArgumentMetadataV9, FunctionMetadataLatest, FunctionMetadataV0, FunctionMetadataV1, FunctionMetadataV10, FunctionMetadataV2, FunctionMetadataV3, FunctionMetadataV4, FunctionMetadataV5, FunctionMetadataV6, FunctionMetadataV7, FunctionMetadataV8, FunctionMetadataV9, MapTypeLatest, MapTypeV0, MapTypeV10, MapTypeV2, MapTypeV3, MapTypeV4, MapTypeV5, MapTypeV6, MapTypeV7, MapTypeV8, MapTypeV9, MetadataAll, MetadataLatest, MetadataV0, MetadataV1, MetadataV10, MetadataV2, MetadataV3, MetadataV4, MetadataV5, MetadataV6, MetadataV7, MetadataV8, MetadataV9, ModuleConstantMetadataLatest, ModuleConstantMetadataV10, ModuleConstantMetadataV6, ModuleConstantMetadataV7, ModuleConstantMetadataV8, ModuleConstantMetadataV9, ModuleMetadataLatest, ModuleMetadataV0, ModuleMetadataV1, ModuleMetadataV10, ModuleMetadataV2, ModuleMetadataV3, ModuleMetadataV4, ModuleMetadataV5, ModuleMetadataV6, ModuleMetadataV7, ModuleMetadataV8, ModuleMetadataV9, OuterDispatchCallV0, OuterDispatchMetadataV0, OuterEventEventMetadataEventsV0, OuterEventEventMetadataV0, OuterEventMetadataV0, PlainTypeLatest, PlainTypeV0, PlainTypeV10, PlainTypeV2, PlainTypeV3, PlainTypeV4, PlainTypeV5, PlainTypeV6, PlainTypeV7, PlainTypeV8, PlainTypeV9, RuntimeModuleMetadataV0, StorageEntryMetadataLatest, StorageEntryMetadataV10, StorageEntryMetadataV6, StorageEntryMetadataV7, StorageEntryMetadataV8, StorageEntryMetadataV9, StorageEntryModifierLatest, StorageEntryModifierV10, StorageEntryModifierV6, StorageEntryModifierV7, StorageEntryModifierV8, StorageEntryModifierV9, StorageEntryTypeLatest, StorageEntryTypeV10, StorageEntryTypeV6, StorageEntryTypeV7, StorageEntryTypeV8, StorageEntryTypeV9, StorageFunctionMetadataV0, StorageFunctionMetadataV1, StorageFunctionMetadataV2, StorageFunctionMetadataV3, StorageFunctionMetadataV4, StorageFunctionMetadataV5, StorageFunctionModifierV0, StorageFunctionModifierV1, StorageFunctionModifierV2, StorageFunctionModifierV3, StorageFunctionModifierV4, StorageFunctionModifierV5, StorageFunctionTypeV0, StorageFunctionTypeV1, StorageFunctionTypeV2, StorageFunctionTypeV3, StorageFunctionTypeV4, StorageFunctionTypeV5, StorageHasher, StorageHasherV10, StorageHasherV4, StorageHasherV5, StorageHasherV6, StorageHasherV7, StorageHasherV8, StorageHasherV9, StorageMetadataLatest, StorageMetadataV0, StorageMetadataV10, StorageMetadataV7, StorageMetadataV8, StorageMetadataV9 } from '@polkadot/types/interfaces/metadata';
|
||||||
import { ApiId, BlockHash, ChainProperties, ExtrinsicOrHash, ExtrinsicStatus, Health, KeyValueOption, NetworkState, PeerInfo, RpcMethods, RuntimeDispatchInfo, RuntimeVersion, RuntimeVersionApi, StorageChangeSet } from '@polkadot/types/interfaces/rpc';
|
import { ApiId, BlockHash, ChainProperties, ExtrinsicOrHash, ExtrinsicStatus, Health, KeyValueOption, NetworkState, PeerInfo, RpcMethods, RuntimeDispatchInfo, RuntimeVersion, RuntimeVersionApi, StorageChangeSet } from '@polkadot/types/interfaces/rpc';
|
||||||
|
|
||||||
export interface InterfaceRegistry {
|
export interface InterfaceRegistry {
|
||||||
@@ -662,6 +662,9 @@ export interface InterfaceRegistry {
|
|||||||
SocietyJudgement: SocietyJudgement;
|
SocietyJudgement: SocietyJudgement;
|
||||||
'Option<SocietyJudgement>': Option<SocietyJudgement>;
|
'Option<SocietyJudgement>': Option<SocietyJudgement>;
|
||||||
'Vec<SocietyJudgement>': Vec<SocietyJudgement>;
|
'Vec<SocietyJudgement>': Vec<SocietyJudgement>;
|
||||||
|
SocietyVote: SocietyVote;
|
||||||
|
'Option<SocietyVote>': Option<SocietyVote>;
|
||||||
|
'Vec<SocietyVote>': Vec<SocietyVote>;
|
||||||
StrikeCount: StrikeCount;
|
StrikeCount: StrikeCount;
|
||||||
'Compact<StrikeCount>': Compact<StrikeCount>;
|
'Compact<StrikeCount>': Compact<StrikeCount>;
|
||||||
'Option<StrikeCount>': Option<StrikeCount>;
|
'Option<StrikeCount>': Option<StrikeCount>;
|
||||||
@@ -1370,6 +1373,9 @@ export interface InterfaceRegistry {
|
|||||||
StorageEntryTypeLatest: StorageEntryTypeLatest;
|
StorageEntryTypeLatest: StorageEntryTypeLatest;
|
||||||
'Option<StorageEntryTypeLatest>': Option<StorageEntryTypeLatest>;
|
'Option<StorageEntryTypeLatest>': Option<StorageEntryTypeLatest>;
|
||||||
'Vec<StorageEntryTypeLatest>': Vec<StorageEntryTypeLatest>;
|
'Vec<StorageEntryTypeLatest>': Vec<StorageEntryTypeLatest>;
|
||||||
|
StorageMetadataLatest: StorageMetadataLatest;
|
||||||
|
'Option<StorageMetadataLatest>': Option<StorageMetadataLatest>;
|
||||||
|
'Vec<StorageMetadataLatest>': Vec<StorageMetadataLatest>;
|
||||||
StorageHasher: StorageHasher;
|
StorageHasher: StorageHasher;
|
||||||
'Option<StorageHasher>': Option<StorageHasher>;
|
'Option<StorageHasher>': Option<StorageHasher>;
|
||||||
'Vec<StorageHasher>': Vec<StorageHasher>;
|
'Vec<StorageHasher>': Vec<StorageHasher>;
|
||||||
|
|||||||
@@ -447,6 +447,7 @@ export default {
|
|||||||
StorageEntryMetadataLatest: 'StorageEntryMetadataV10',
|
StorageEntryMetadataLatest: 'StorageEntryMetadataV10',
|
||||||
StorageEntryModifierLatest: 'StorageEntryModifierV10',
|
StorageEntryModifierLatest: 'StorageEntryModifierV10',
|
||||||
StorageEntryTypeLatest: 'StorageEntryTypeV10',
|
StorageEntryTypeLatest: 'StorageEntryTypeV10',
|
||||||
|
StorageMetadataLatest: 'StorageMetadataV10',
|
||||||
StorageHasher: 'StorageHasherV10',
|
StorageHasher: 'StorageHasherV10',
|
||||||
|
|
||||||
// the enum containing all the mappings
|
// the enum containing all the mappings
|
||||||
|
|||||||
@@ -962,6 +962,9 @@ export interface StorageHasherV8 extends StorageHasherV7 {}
|
|||||||
/** StorageHasherV8 */
|
/** StorageHasherV8 */
|
||||||
export interface StorageHasherV9 extends StorageHasherV8 {}
|
export interface StorageHasherV9 extends StorageHasherV8 {}
|
||||||
|
|
||||||
|
/** StorageMetadataV10 */
|
||||||
|
export interface StorageMetadataLatest extends StorageMetadataV10 {}
|
||||||
|
|
||||||
/** Struct */
|
/** Struct */
|
||||||
export interface StorageMetadataV0 extends Struct {
|
export interface StorageMetadataV0 extends Struct {
|
||||||
/** Text */
|
/** Text */
|
||||||
|
|||||||
@@ -20,6 +20,10 @@ export default {
|
|||||||
SocietyJudgement: {
|
SocietyJudgement: {
|
||||||
_enum: ['Rebid', 'Reject', 'Approve']
|
_enum: ['Rebid', 'Reject', 'Approve']
|
||||||
},
|
},
|
||||||
|
// a society-specific Vote
|
||||||
|
SocietyVote: {
|
||||||
|
_enum: ['Skeptic', 'Reject', 'Approve']
|
||||||
|
},
|
||||||
StrikeCount: 'u32',
|
StrikeCount: 'u32',
|
||||||
VouchingStatus: {
|
VouchingStatus: {
|
||||||
_enum: ['Vouching', 'Banned']
|
_enum: ['Vouching', 'Banned']
|
||||||
|
|||||||
@@ -41,6 +41,16 @@ export interface SocietyJudgement extends Enum {
|
|||||||
readonly isApprove: boolean;
|
readonly isApprove: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Enum */
|
||||||
|
export interface SocietyVote extends Enum {
|
||||||
|
/** 0:: Skeptic */
|
||||||
|
readonly isSkeptic: boolean;
|
||||||
|
/** 1:: Reject */
|
||||||
|
readonly isReject: boolean;
|
||||||
|
/** 2:: Approve */
|
||||||
|
readonly isApprove: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
/** u32 */
|
/** u32 */
|
||||||
export interface StrikeCount extends u32 {}
|
export interface StrikeCount extends u32 {}
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,10 @@ const TYPES_MODULES: Record<string, OverrideModuleType[]> = {
|
|||||||
{
|
{
|
||||||
name: 'Judgement',
|
name: 'Judgement',
|
||||||
override: 'SocietyJudgement'
|
override: 'SocietyJudgement'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Vote',
|
||||||
|
override: 'SocietyVote'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user