Add types for uniques (#3551)

This commit is contained in:
Jaco
2021-05-20 14:02:10 +02:00
committed by GitHub
parent f26ca0e624
commit c4c099e693
6 changed files with 150 additions and 0 deletions
+32
View File
@@ -53,6 +53,7 @@ import type { WeightToFeeCoefficient } from '@polkadot/types/interfaces/support'
import type { AccountInfo, AccountInfoWithDualRefCount, AccountInfoWithProviders, AccountInfoWithRefCount, AccountInfoWithTripleRefCount, ApplyExtrinsicResult, ArithmeticError, BlockLength, BlockWeights, ChainProperties, ChainType, ConsumedWeight, DigestOf, DispatchClass, DispatchError, DispatchErrorModule, DispatchErrorTo198, DispatchInfo, DispatchInfoTo190, DispatchInfoTo244, DispatchOutcome, DispatchResult, DispatchResultOf, DispatchResultTo198, Event, EventId, EventIndex, EventRecord, Health, InvalidTransaction, Key, LastRuntimeUpgradeInfo, NetworkState, NetworkStatePeerset, NetworkStatePeersetInfo, NodeRole, NotConnectedPeer, Peer, PeerEndpoint, PeerEndpointAddr, PeerInfo, PeerPing, PerDispatchClassU32, PerDispatchClassWeight, PerDispatchClassWeightsPerClass, Phase, RawOrigin, RefCount, RefCountTo259, SyncState, SystemOrigin, TokenError, TransactionValidityError, UnknownTransaction, WeightPerClass } from '@polkadot/types/interfaces/system';
import type { Bounty, BountyIndex, BountyStatus, BountyStatusActive, BountyStatusCuratorProposed, BountyStatusPendingPayout, OpenTip, OpenTipFinderTo225, OpenTipTip, OpenTipTo225, TreasuryProposal } from '@polkadot/types/interfaces/treasury';
import type { Multiplier } from '@polkadot/types/interfaces/txpayment';
import type { ClassDetails, ClassId, ClassMetadata, DepositBalance, DepositBalanceOf, DestroyWitness, InstanceDetails, InstanceId, InstanceMetadata } from '@polkadot/types/interfaces/uniques';
import type { Multisig, Timepoint } from '@polkadot/types/interfaces/utility';
import type { VestingInfo } from '@polkadot/types/interfaces/vesting';
import type { AccountId32Junction, AccountIndex64Junction, AccountKey20Junction, AssetInstance, BodyId, BodyPart, BodyPartAtLeastProportion, BodyPartFraction, BodyPartMoreThanProportion, DoubleEncodedCall, InboundStatus, Junction, MultiAsset, MultiAssetAbstractFungible, MultiAssetAbstractNonFungible, MultiAssetConcreteFungible, MultiAssetConcreteNonFungible, MultiLocation, NetworkId, OutboundStatus, Outcome, PluralityJunction, QueueConfigData, VersionedMultiAsset, VersionedMultiLocation, VersionedXcm, Xcm, XcmAssetEffects, XcmError, XcmHrmpChannelAccepted, XcmHrmpChannelClosing, XcmHrmpNewChannelOpenRequest, XcmOrder, XcmOrderBuyExecution, XcmOrderDepositAsset, XcmOrderDepositReserveAsset, XcmOrderExchangeAsset, XcmOrderInitiateReserveWithdraw, XcmOrderInitiateTeleport, XcmOrderQueryHolding, XcmOriginKind, XcmQueryResponse, XcmRelayedFrom, XcmReserveAssetDeposit, XcmResponse, XcmTeleportAsset, XcmTransact, XcmTransferAsset, XcmTransferReserveAsset, XcmWithdrawAsset, XcmpMessageFormat } from '@polkadot/types/interfaces/xcm';
@@ -74,8 +75,11 @@ declare module '@polkadot/types/types/registry' {
'Compact<BalanceOf>': Compact<BalanceOf>;
'Compact<BlockNumber>': Compact<BlockNumber>;
'Compact<BountyIndex>': Compact<BountyIndex>;
'Compact<ClassId>': Compact<ClassId>;
'Compact<ContractDiscriminant>': Compact<ContractDiscriminant>;
'Compact<CoreIndex>': Compact<CoreIndex>;
'Compact<DepositBalance>': Compact<DepositBalance>;
'Compact<DepositBalanceOf>': Compact<DepositBalanceOf>;
'Compact<EraIndex>': Compact<EraIndex>;
'Compact<EventIndex>': Compact<EventIndex>;
'Compact<ExtendedBalance>': Compact<ExtendedBalance>;
@@ -85,6 +89,7 @@ declare module '@polkadot/types/types/registry' {
'Compact<Gas>': Compact<Gas>;
'Compact<GroupIndex>': Compact<GroupIndex>;
'Compact<Index>': Compact<Index>;
'Compact<InstanceId>': Compact<InstanceId>;
'Compact<KeyTypeId>': Compact<KeyTypeId>;
'Compact<LeasePeriod>': Compact<LeasePeriod>;
'Compact<LeasePeriodOf>': Compact<LeasePeriodOf>;
@@ -262,6 +267,9 @@ declare module '@polkadot/types/types/registry' {
'Option<ChainType>': Option<ChainType>;
'Option<ChangesTrieConfiguration>': Option<ChangesTrieConfiguration>;
'Option<ChangesTrieSignal>': Option<ChangesTrieSignal>;
'Option<ClassDetails>': Option<ClassDetails>;
'Option<ClassId>': Option<ClassId>;
'Option<ClassMetadata>': Option<ClassMetadata>;
'Option<CodecHash>': Option<CodecHash>;
'Option<CodeHash>': Option<CodeHash>;
'Option<CollatorId>': Option<CollatorId>;
@@ -325,6 +333,9 @@ declare module '@polkadot/types/types/registry' {
'Option<DefunctVoter>': Option<DefunctVoter>;
'Option<Delegations>': Option<Delegations>;
'Option<DeletedContract>': Option<DeletedContract>;
'Option<DepositBalance>': Option<DepositBalance>;
'Option<DepositBalanceOf>': Option<DepositBalanceOf>;
'Option<DestroyWitness>': Option<DestroyWitness>;
'Option<Digest>': Option<Digest>;
'Option<DigestItem>': Option<DigestItem>;
'Option<DigestOf>': Option<DigestOf>;
@@ -527,6 +538,9 @@ declare module '@polkadot/types/types/registry' {
'Option<Index>': Option<Index>;
'Option<IndicesLookupSource>': Option<IndicesLookupSource>;
'Option<IndividualExposure>': Option<IndividualExposure>;
'Option<InstanceDetails>': Option<InstanceDetails>;
'Option<InstanceId>': Option<InstanceId>;
'Option<InstanceMetadata>': Option<InstanceMetadata>;
'Option<InstantiateRequest>': Option<InstantiateRequest>;
'Option<InstantiateReturnValue>': Option<InstantiateReturnValue>;
'Option<InstructionWeights>': Option<InstructionWeights>;
@@ -1105,6 +1119,9 @@ declare module '@polkadot/types/types/registry' {
'Vec<ChainType>': Vec<ChainType>;
'Vec<ChangesTrieConfiguration>': Vec<ChangesTrieConfiguration>;
'Vec<ChangesTrieSignal>': Vec<ChangesTrieSignal>;
'Vec<ClassDetails>': Vec<ClassDetails>;
'Vec<ClassId>': Vec<ClassId>;
'Vec<ClassMetadata>': Vec<ClassMetadata>;
'Vec<CodecHash>': Vec<CodecHash>;
'Vec<CodeHash>': Vec<CodeHash>;
'Vec<CollatorId>': Vec<CollatorId>;
@@ -1168,6 +1185,9 @@ declare module '@polkadot/types/types/registry' {
'Vec<DefunctVoter>': Vec<DefunctVoter>;
'Vec<Delegations>': Vec<Delegations>;
'Vec<DeletedContract>': Vec<DeletedContract>;
'Vec<DepositBalance>': Vec<DepositBalance>;
'Vec<DepositBalanceOf>': Vec<DepositBalanceOf>;
'Vec<DestroyWitness>': Vec<DestroyWitness>;
'Vec<Digest>': Vec<Digest>;
'Vec<DigestItem>': Vec<DigestItem>;
'Vec<DigestOf>': Vec<DigestOf>;
@@ -1370,6 +1390,9 @@ declare module '@polkadot/types/types/registry' {
'Vec<Index>': Vec<Index>;
'Vec<IndicesLookupSource>': Vec<IndicesLookupSource>;
'Vec<IndividualExposure>': Vec<IndividualExposure>;
'Vec<InstanceDetails>': Vec<InstanceDetails>;
'Vec<InstanceId>': Vec<InstanceId>;
'Vec<InstanceMetadata>': Vec<InstanceMetadata>;
'Vec<InstantiateRequest>': Vec<InstantiateRequest>;
'Vec<InstantiateReturnValue>': Vec<InstantiateReturnValue>;
'Vec<InstructionWeights>': Vec<InstructionWeights>;
@@ -1948,6 +1971,9 @@ declare module '@polkadot/types/types/registry' {
ChainType: ChainType;
ChangesTrieConfiguration: ChangesTrieConfiguration;
ChangesTrieSignal: ChangesTrieSignal;
ClassDetails: ClassDetails;
ClassId: ClassId;
ClassMetadata: ClassMetadata;
CodecHash: CodecHash;
CodeHash: CodeHash;
CollatorId: CollatorId;
@@ -2011,6 +2037,9 @@ declare module '@polkadot/types/types/registry' {
DefunctVoter: DefunctVoter;
Delegations: Delegations;
DeletedContract: DeletedContract;
DepositBalance: DepositBalance;
DepositBalanceOf: DepositBalanceOf;
DestroyWitness: DestroyWitness;
Digest: Digest;
DigestItem: DigestItem;
DigestOf: DigestOf;
@@ -2213,6 +2242,9 @@ declare module '@polkadot/types/types/registry' {
Index: Index;
IndicesLookupSource: IndicesLookupSource;
IndividualExposure: IndividualExposure;
InstanceDetails: InstanceDetails;
InstanceId: InstanceId;
InstanceMetadata: InstanceMetadata;
InstantiateRequest: InstantiateRequest;
InstantiateReturnValue: InstantiateReturnValue;
InstructionWeights: InstructionWeights;
@@ -38,6 +38,7 @@ export { default as syncstate } from './syncstate/definitions';
export { default as system } from './system/definitions';
export { default as treasury } from './treasury/definitions';
export { default as txpayment } from './txpayment/definitions';
export { default as uniques } from './uniques/definitions';
export { default as utility } from './utility/definitions';
export { default as vesting } from './vesting/definitions';
+1
View File
@@ -35,6 +35,7 @@ export * from './syncstate/types';
export * from './system/types';
export * from './treasury/types';
export * from './txpayment/types';
export * from './uniques/types';
export * from './utility/types';
export * from './vesting/types';
export * from './attestations/types';
@@ -0,0 +1,50 @@
// Copyright 2017-2021 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
// order important in structs... :)
/* eslint-disable sort-keys */
import type { Definitions } from '../../types';
export default {
rpc: {},
types: {
ClassId: 'u32',
InstanceId: 'u32',
DepositBalance: 'Balance',
DepositBalanceOf: 'Balance',
ClassDetails: {
owner: 'AccountId',
issuer: 'AccountId',
admin: 'AccountId',
freezer: 'AccountId',
totalTeposit: 'DepositBalance',
freeHolding: 'bool',
instances: 'u32',
instanceMetadatas: 'u32',
isFrozen: 'bool'
},
DestroyWitness: {
instances: 'Compact<u32>',
instanceMetadatas: 'Compact<u32>'
},
InstanceDetails: {
owner: 'AccountId',
approved: 'Option<AccountId>',
isFrozen: 'bool',
deposit: 'DepositBalance'
},
ClassMetadata: {
deposit: 'DepositBalance',
name: 'Vec<u8>',
information: 'Vec<u8>',
isFrozen: 'bool'
},
InstanceMetadata: {
deposit: 'DepositBalance',
name: 'Vec<u8>',
information: 'Vec<u8>',
isFrozen: 'bool'
}
}
} 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,62 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
import type { Bytes, Compact, Option, Struct, bool, u32 } from '@polkadot/types';
import type { AccountId, Balance } from '@polkadot/types/interfaces/runtime';
/** @name ClassDetails */
export interface ClassDetails extends Struct {
readonly owner: AccountId;
readonly issuer: AccountId;
readonly admin: AccountId;
readonly freezer: AccountId;
readonly totalTeposit: DepositBalance;
readonly freeHolding: bool;
readonly instances: u32;
readonly instanceMetadatas: u32;
readonly isFrozen: bool;
}
/** @name ClassId */
export interface ClassId extends u32 {}
/** @name ClassMetadata */
export interface ClassMetadata extends Struct {
readonly deposit: DepositBalance;
readonly name: Bytes;
readonly information: Bytes;
readonly isFrozen: bool;
}
/** @name DepositBalance */
export interface DepositBalance extends Balance {}
/** @name DepositBalanceOf */
export interface DepositBalanceOf extends Balance {}
/** @name DestroyWitness */
export interface DestroyWitness extends Struct {
readonly instances: Compact<u32>;
readonly instanceMetadatas: Compact<u32>;
}
/** @name InstanceDetails */
export interface InstanceDetails extends Struct {
readonly owner: AccountId;
readonly approved: Option<AccountId>;
readonly isFrozen: bool;
readonly deposit: DepositBalance;
}
/** @name InstanceId */
export interface InstanceId extends u32 {}
/** @name InstanceMetadata */
export interface InstanceMetadata extends Struct {
readonly deposit: DepositBalance;
readonly name: Bytes;
readonly information: Bytes;
readonly isFrozen: bool;
}
export type PHANTOM_UNIQUES = 'uniques';