Adjust spread usage in types/interfaces (#5610)

This commit is contained in:
Jaco
2023-04-28 10:23:04 +03:00
committed by GitHub
parent 5a48ca3a0a
commit ad59abfc37
22 changed files with 224 additions and 191 deletions
+4 -6
View File
@@ -3,8 +3,6 @@
import type { OverrideModuleType, Registry } from '../types/index.js';
import { objectSpread } from '@polkadot/util';
// type overrides for modules (where duplication between modules exist)
const typesAlias: Record<string, OverrideModuleType> = {
assets: {
@@ -111,8 +109,8 @@ const typesAlias: Record<string, OverrideModuleType> = {
* @description Get types for specific modules (metadata override)
*/
export function getAliasTypes ({ knownTypes }: Registry, section: string): OverrideModuleType {
return objectSpread({},
typesAlias[section],
knownTypes.typesAlias?.[section]
);
return {
...(typesAlias[section] ?? {}),
...(knownTypes.typesAlias?.[section] ?? {})
};
}
@@ -3,8 +3,6 @@
import type { DefinitionCall, DefinitionsCall } from '../../types/index.js';
import { objectSpread } from '@polkadot/util';
const V1_V2_SHARED: Record<string, DefinitionCall> = {
current_epoch: {
description: 'Returns information regarding the current epoch.',
@@ -54,23 +52,25 @@ const V1_V2_SHARED: Record<string, DefinitionCall> = {
export const runtime: DefinitionsCall = {
BabeApi: [
{
methods: objectSpread({
methods: {
configuration: {
description: 'Return the genesis configuration for BABE. The configuration is only read on genesis.',
params: [],
type: 'BabeGenesisConfiguration'
}
}, V1_V2_SHARED),
},
...V1_V2_SHARED
},
version: 2
},
{
methods: objectSpread({
methods: {
configuration: {
description: 'Return the configuration for BABE. Version 1.',
params: [],
type: 'BabeGenesisConfigurationV1'
}
}, V1_V2_SHARED),
},
...V1_V2_SHARED
},
version: 1
}
]
@@ -3,8 +3,6 @@
import type { DefinitionsCall, DefinitionsCallEntry } from '../../types/index.js';
import { objectSpread } from '@polkadot/util';
const BB_V2_TO_V4: DefinitionsCallEntry['methods'] = {
// this was removed after V4
random_seed: {
@@ -66,7 +64,7 @@ const BB_V3_TO_V6: DefinitionsCallEntry['methods'] = {
export const runtime: DefinitionsCall = {
BlockBuilder: [
{
methods: objectSpread({
methods: {
apply_extrinsic: {
description: 'Apply the given extrinsic.',
params: [
@@ -76,36 +74,50 @@ export const runtime: DefinitionsCall = {
}
],
type: 'ApplyExtrinsicResult'
}
}, BB_V2_TO_V6, BB_V3_TO_V6),
},
...BB_V2_TO_V6,
...BB_V3_TO_V6
},
version: 6
},
{
methods: objectSpread({
methods: {
// apply_extrinsic result changed in 6
}, BB_V2_TO_V5, BB_V2_TO_V6, BB_V3_TO_V6),
...BB_V2_TO_V5,
...BB_V2_TO_V6,
...BB_V3_TO_V6
},
version: 5
},
{
methods: objectSpread({
methods: {
// random_seed removed
}, BB_V2_TO_V4, BB_V2_TO_V5, BB_V2_TO_V6, BB_V3_TO_V6),
...BB_V2_TO_V4,
...BB_V2_TO_V5,
...BB_V2_TO_V6,
...BB_V3_TO_V6
},
version: 4
},
{
methods: objectSpread({
methods: {
// finalize_block renamed
}, BB_V2_TO_V4, BB_V2_TO_V6, BB_V3_TO_V6),
...BB_V2_TO_V4,
...BB_V2_TO_V6,
...BB_V3_TO_V6
},
version: 3
},
{
methods: objectSpread({
methods: {
finalise_block: {
description: 'Finish the current block.',
params: [],
type: 'Header'
}
}, BB_V2_TO_V4, BB_V2_TO_V6),
},
...BB_V2_TO_V4,
...BB_V2_TO_V6
},
version: 2
}
]
@@ -3,8 +3,6 @@
import type { DefinitionCall, DefinitionsCall } from '../../types/index.js';
import { objectSpread } from '@polkadot/util';
const SHARED_V1_V2: Record<string, DefinitionCall> = {
get_storage: {
description: 'Query a given storage key in a given contract.',
@@ -43,7 +41,7 @@ const SHARED_V1_V2: Record<string, DefinitionCall> = {
export const runtime: DefinitionsCall = {
ContractsApi: [
{
methods: objectSpread({
methods: {
call: {
description: 'Perform a call from a specified account to a given contract.',
params: [
@@ -107,12 +105,13 @@ export const runtime: DefinitionsCall = {
}
],
type: 'ContractInstantiateResult'
}
}, SHARED_V1_V2),
},
...SHARED_V1_V2
},
version: 2
},
{
methods: objectSpread({
methods: {
call: {
description: 'Perform a call from a specified account to a given contract.',
params: [
@@ -176,8 +175,9 @@ export const runtime: DefinitionsCall = {
}
],
type: 'ContractInstantiateResultU64'
}
}, SHARED_V1_V2),
},
...SHARED_V1_V2
},
version: 1
}
]
@@ -3,8 +3,6 @@
import type { Definitions } from '../../types/index.js';
import { objectSpread } from '@polkadot/util';
// order important in structs... :)
/* eslint-disable sort-keys */
@@ -177,34 +175,6 @@ const spec = {
}
};
const ContractMetadataV0 = {
metadataVersion: 'Text',
types: 'Vec<Si0Type>',
spec: 'ContractContractSpecV0'
};
const ContractMetadataV1 = {
types: 'Vec<PortableType>',
spec: 'ContractContractSpecV1'
};
const ContractMetadataV2 = {
types: 'Vec<PortableType>',
spec: 'ContractContractSpecV2'
};
const ContractMetadataV3 = {
types: 'Vec<PortableType>',
spec: 'ContractContractSpecV3'
};
const ContractMetadataV4 = ContractMetadataV3;
const ContractProjectInfo = {
source: 'ContractProjectSource',
contract: 'ContractProjectContract'
};
const latest = {
ContractConstructorSpecLatest: 'ContractConstructorSpecV3',
ContractEventSpecLatest: 'ContractEventSpecV2',
@@ -216,13 +186,32 @@ const latest = {
export default {
rpc: {},
types: objectSpread({}, layout, spec, latest, {
ContractProjectInfo,
ContractMetadataV0,
ContractMetadataV1,
ContractMetadataV2,
ContractMetadataV3,
ContractMetadataV4,
types: {
...layout,
...spec,
...latest,
ContractProjectInfo: {
source: 'ContractProjectSource',
contract: 'ContractProjectContract'
},
ContractMetadataV0: {
metadataVersion: 'Text',
types: 'Vec<Si0Type>',
spec: 'ContractContractSpecV0'
},
ContractMetadataV1: {
types: 'Vec<PortableType>',
spec: 'ContractContractSpecV1'
},
ContractMetadataV2: {
types: 'Vec<PortableType>',
spec: 'ContractContractSpecV2'
},
ContractMetadataV3: {
types: 'Vec<PortableType>',
spec: 'ContractContractSpecV3'
},
ContractMetadataV4: 'ContractMetadataV3',
ContractMetadata: {
_enum: {
V0: 'ContractMetadataV0',
@@ -232,7 +221,13 @@ export default {
V4: 'ContractMetadataV4'
}
},
ContractProjectV0: objectSpread({ metadataVersion: 'Text' }, ContractProjectInfo, ContractMetadataV0),
ContractProjectV0: {
metadataVersion: 'Text',
source: 'ContractProjectSource',
contract: 'ContractProjectContract',
types: 'Vec<Si0Type>',
spec: 'ContractContractSpecV0'
},
ContractProject: '(ContractProjectInfo, ContractMetadata)',
ContractProjectContract: {
_alias: {
@@ -256,5 +251,5 @@ export default {
compiler: 'Text',
wasm: 'Raw'
}
})
}
} as Definitions;
@@ -277,10 +277,7 @@ export interface ContractMetadataV3 extends Struct {
}
/** @name ContractMetadataV4 */
export interface ContractMetadataV4 extends Struct {
readonly types: Vec<PortableType>;
readonly spec: ContractContractSpecV3;
}
export interface ContractMetadataV4 extends ContractMetadataV3 {}
/** @name ContractProject */
export interface ContractProject extends ITuple<[ContractProjectInfo, ContractMetadata]> {}
@@ -8,8 +8,6 @@
import type { DefinitionsTypes } from '../../types/index.js';
import { objectSpread } from '@polkadot/util';
import { rpc } from './rpc.js';
import { runtime } from './runtime.js';
@@ -87,7 +85,10 @@ const V2: DefinitionsTypes = {
}
};
const types: DefinitionsTypes = objectSpread({}, V0, V1, V2, {
const types: DefinitionsTypes = {
...V0,
...V1,
...V2,
EthereumAccountId: 'GenericEthereumAccountId',
EthereumAddress: 'GenericEthereumAccountId',
EthereumLookupSource: 'GenericEthereumLookupSource',
@@ -361,6 +362,6 @@ const types: DefinitionsTypes = objectSpread({}, V0, V1, V2, {
target: 'H256',
number: 'Option<u64>'
}
});
};
export default { rpc, runtime, types };
+4 -4
View File
@@ -5,8 +5,6 @@
import type { DefinitionsRpc } from '../../types/index.js';
import { objectSpread } from '@polkadot/util';
// We use aliasSection here to override since these are in another namespace
const netRpc: DefinitionsRpc = {
listening: {
@@ -43,7 +41,9 @@ const web3Rpc: DefinitionsRpc = {
}
};
export const rpc: DefinitionsRpc = objectSpread({}, netRpc, web3Rpc, {
export const rpc: DefinitionsRpc = {
...netRpc,
...web3Rpc,
accounts: {
description: 'Returns accounts list.',
params: [],
@@ -505,4 +505,4 @@ export const rpc: DefinitionsRpc = objectSpread({}, netRpc, web3Rpc, {
],
type: 'bool'
}
});
};
@@ -3,8 +3,6 @@
import type { DefinitionsCall, DefinitionsCallEntry } from '../../types/index.js';
import { objectSpread } from '@polkadot/util';
const GRANDPA_V2_V3: DefinitionsCallEntry['methods'] = {
generate_key_ownership_proof: {
description: 'Generates a proof of key ownership for the given authority in the given set.',
@@ -44,13 +42,14 @@ const GRANDPA_V2_V3: DefinitionsCallEntry['methods'] = {
export const runtime: DefinitionsCall = {
GrandpaApi: [
{
methods: objectSpread({
methods: {
current_set_id: {
description: 'Get current GRANDPA authority set id.',
params: [],
type: 'SetId'
}
}, GRANDPA_V2_V3),
},
...GRANDPA_V2_V3
},
version: 3
},
{
@@ -6,8 +6,6 @@
import type { Definitions } from '../../types/index.js';
import { objectSpread } from '@polkadot/util';
import { AllHashers } from './hashers.js';
import { runtime } from './runtime.js';
import { v9 } from './v9.js';
@@ -22,7 +20,13 @@ export { AllHashers };
export default {
rpc: {},
runtime,
types: objectSpread({}, v9, v10, v11, v12, v13, v14, {
types: {
...v9,
...v10,
...v11,
...v12,
...v13,
...v14,
// latest mappings
ErrorMetadataLatest: 'ErrorMetadataV14',
EventMetadataLatest: 'EventMetadataV14',
@@ -67,5 +71,5 @@ export default {
V14: 'MetadataV14'
}
}
})
}
} as Definitions;
@@ -3,8 +3,6 @@
import type { DefinitionsCall, DefinitionsCallEntry } from '../../types/index.js';
import { objectSpread } from '@polkadot/util';
const META_V1_TO_V2: DefinitionsCallEntry['methods'] = {
metadata: {
description: 'Returns the metadata of a runtime',
@@ -16,7 +14,7 @@ const META_V1_TO_V2: DefinitionsCallEntry['methods'] = {
export const runtime: DefinitionsCall = {
Metadata: [
{
methods: objectSpread({
methods: {
metadata_at_version: {
description: 'Returns the metadata at a given version.',
params: [
@@ -31,12 +29,15 @@ export const runtime: DefinitionsCall = {
description: 'Returns the supported metadata versions.',
params: [],
type: 'Vec<u32>'
}
}, META_V1_TO_V2),
},
...META_V1_TO_V2
},
version: 2
},
{
methods: objectSpread({}, META_V1_TO_V2),
methods: {
...META_V1_TO_V2
},
version: 1
}
]
+13 -6
View File
@@ -4,9 +4,7 @@
// order important in structs... :)
/* eslint-disable sort-keys */
import type { DefinitionsTypes, DefinitionTypeStruct } from '../../types/index.js';
import { objectSpread } from '@polkadot/util';
import type { DefinitionsTypes } from '../../types/index.js';
import { Si1Variant } from '../scaleInfo/v1.js';
@@ -18,14 +16,23 @@ export const v14: DefinitionsTypes = {
},
// compatibility with earlier layouts, i.e. don't break previous users
ErrorMetadataV14: objectSpread<DefinitionTypeStruct>({}, Si1Variant, { args: 'Vec<Type>' }),
EventMetadataV14: objectSpread<DefinitionTypeStruct>({}, Si1Variant, { args: 'Vec<Type>' }),
ErrorMetadataV14: {
...Si1Variant,
args: 'Vec<Type>'
},
EventMetadataV14: {
...Si1Variant,
args: 'Vec<Type>'
},
FunctionArgumentMetadataV14: {
name: 'Text',
type: 'Type',
typeName: 'Option<Type>'
},
FunctionMetadataV14: objectSpread<DefinitionTypeStruct>({}, Si1Variant, { args: 'Vec<FunctionArgumentMetadataV14>' }),
FunctionMetadataV14: {
...Si1Variant,
args: 'Vec<FunctionArgumentMetadataV14>'
},
// V14
ExtrinsicMetadataV14: {
@@ -6,8 +6,6 @@
import type { Definitions } from '../../types/index.js';
import { objectSpread } from '@polkadot/util';
import hrmpTypes from './hrmp.js';
import { runtime } from './runtime.js';
import slotTypes from './slots.js';
@@ -98,7 +96,12 @@ const disputeTypes = {
export default {
rpc: {},
runtime,
types: objectSpread({}, cumulusTypes, disputeTypes, hrmpTypes, proposeTypes, slotTypes, {
types: {
...cumulusTypes,
...disputeTypes,
...hrmpTypes,
...proposeTypes,
...slotTypes,
AbridgedCandidateReceipt: {
parachainIndex: 'ParaId',
relayParent: 'Hash',
@@ -509,5 +512,5 @@ export default {
MessagingStateSnapshotEgressEntry: '(ParaId, AbridgedHrmpChannel)',
SystemInherentData: 'ParachainInherentData',
VecInboundHrmpMessage: 'Vec<InboundHrmpMessage>'
})
}
} as Definitions;
@@ -3,8 +3,6 @@
import type { DefinitionsCall, DefinitionsCallEntry } from '../../types/index.js';
import { objectSpread } from '@polkadot/util';
const PH_V1_TO_V2: DefinitionsCallEntry['methods'] = {
assumed_validation_data: {
description: 'Returns the persisted validation data for the given `ParaId` along with the corresponding validation code hash.',
@@ -204,19 +202,31 @@ const PH_V4: DefinitionsCallEntry['methods'] = {
export const runtime: DefinitionsCall = {
ParachainHost: [
{
methods: objectSpread({}, PH_V1_TO_V2, PH_V2_TO_V3, PH_V3, PH_V4),
methods: {
...PH_V1_TO_V2,
...PH_V2_TO_V3,
...PH_V3,
...PH_V4
},
version: 4
},
{
methods: objectSpread({}, PH_V1_TO_V2, PH_V2_TO_V3, PH_V3),
methods: {
...PH_V1_TO_V2,
...PH_V2_TO_V3,
...PH_V3
},
version: 3
},
{
methods: objectSpread({}, PH_V1_TO_V2, PH_V2_TO_V3),
methods: {
...PH_V1_TO_V2,
...PH_V2_TO_V3
},
version: 2
},
{
methods: objectSpread({
methods: {
session_info: {
description: 'Get the session info for the given session, if stored.',
params: [
@@ -226,8 +236,9 @@ export const runtime: DefinitionsCall = {
}
],
type: 'Option<OldV1SessionInfo>'
}
}, PH_V1_TO_V2),
},
...PH_V1_TO_V2
},
version: 1
}
]
@@ -1,8 +1,6 @@
// Copyright 2017-2023 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { objectSpread } from '@polkadot/util';
// order important in structs... :)
/* eslint-disable sort-keys */
@@ -44,7 +42,8 @@ const oldTypes = {
SubId: 'u32'
};
export default objectSpread({}, oldTypes, {
export default {
...oldTypes,
AuctionIndex: 'u32',
LeasePeriod: 'BlockNumber',
LeasePeriodOf: 'BlockNumber',
@@ -57,4 +56,4 @@ export default objectSpread({}, oldTypes, {
WinnersData: 'Vec<WinnersDataTuple>',
WinnersDataTuple10: '(AccountId, ParaId, BalanceOf, SlotRange10)',
WinnersDataTuple: '(AccountId, ParaId, BalanceOf, SlotRange)'
});
};
@@ -3,8 +3,6 @@
import type { DefinitionCall, DefinitionsCall } from '../../types/index.js';
import { objectSpread } from '@polkadot/util';
const V1_TO_V4_SHARED_PAY: Record<string, DefinitionCall> = {
query_fee_details: {
description: 'The transaction fee details',
@@ -100,33 +98,30 @@ export const runtime: DefinitionsCall = {
TransactionPaymentApi: [
{
// V4 is equivalent to V3 (V4 just dropped all V1 references)
methods: objectSpread(
{},
V3_SHARED_PAY_CALL,
V2_TO_V4_SHARED_PAY,
V1_TO_V4_SHARED_PAY
),
methods: {
...V3_SHARED_PAY_CALL,
...V2_TO_V4_SHARED_PAY,
...V1_TO_V4_SHARED_PAY
},
version: 4
},
{
methods: objectSpread(
{},
V3_SHARED_PAY_CALL,
V2_TO_V4_SHARED_PAY,
V1_TO_V4_SHARED_PAY
),
methods: {
...V3_SHARED_PAY_CALL,
...V2_TO_V4_SHARED_PAY,
...V1_TO_V4_SHARED_PAY
},
version: 3
},
{
methods: objectSpread(
{},
V2_TO_V4_SHARED_PAY,
V1_TO_V4_SHARED_PAY
),
methods: {
...V2_TO_V4_SHARED_PAY,
...V1_TO_V4_SHARED_PAY
},
version: 2
},
{
methods: objectSpread({
methods: {
query_info: {
description: 'The transaction info',
params: [
@@ -143,31 +138,30 @@ export const runtime: DefinitionsCall = {
// changed mid-flight between versions. So we have some of each depending on
// runtime. (We do detect the weight type, so correct)
type: 'RuntimeDispatchInfo'
}
}, V1_TO_V4_SHARED_PAY),
},
...V1_TO_V4_SHARED_PAY
},
version: 1
}
],
TransactionPaymentCallApi: [
{
methods: objectSpread(
{},
V3_SHARED_PAY_CALL,
V2_V3_SHARED_CALL,
V1_TO_V3_SHARED_CALL
),
methods: {
...V3_SHARED_PAY_CALL,
...V2_V3_SHARED_CALL,
...V1_TO_V3_SHARED_CALL
},
version: 3
},
{
methods: objectSpread(
{},
V2_V3_SHARED_CALL,
V1_TO_V3_SHARED_CALL
),
methods: {
...V2_V3_SHARED_CALL,
...V1_TO_V3_SHARED_CALL
},
version: 2
},
{
methods: objectSpread({
methods: {
CALL: {
description: 'The call info',
params: [
@@ -183,8 +177,9 @@ export const runtime: DefinitionsCall = {
// NOTE: As per the above comment, the below is correct according to Substrate, but
// _may_ yield fallback decoding on some versions of the runtime
type: 'RuntimeDispatchInfo'
}
}, V1_TO_V3_SHARED_CALL),
},
...V1_TO_V3_SHARED_CALL
},
version: 1
}
]
@@ -6,8 +6,6 @@
import type { Definitions } from '../../types/index.js';
import { objectSpread } from '@polkadot/util';
import { runtime } from './runtime.js';
const numberTypes = {
@@ -50,7 +48,8 @@ export const knownOrigins: Record<string, string> = {
export default {
rpc: {},
runtime,
types: objectSpread({}, numberTypes, {
types: {
...numberTypes,
AccountId: 'AccountId32',
AccountId20: 'GenericEthereumAccountId',
AccountId32: 'GenericAccountId32',
@@ -228,5 +227,5 @@ export default {
SealV0: '(u64, Signature)',
Seal: '(ConsensusEngineId, Bytes)',
Consensus: '(ConsensusEngineId, Bytes)'
})
}
} as Definitions;
@@ -3,8 +3,6 @@
import type { DefinitionsCall, DefinitionsCallEntry } from '../../types/index.js';
import { objectSpread } from '@polkadot/util';
const CORE_V1_TO_V4: DefinitionsCallEntry['methods'] = {
execute_block: {
description: 'Execute the given block.',
@@ -42,31 +40,39 @@ const CORE_V2_TO_V4: DefinitionsCallEntry['methods'] = {
export const runtime: DefinitionsCall = {
Core: [
{
methods: objectSpread({
methods: {
version: {
description: 'Returns the version of the runtime.',
params: [],
type: 'RuntimeVersion'
}
}, CORE_V1_TO_V4, CORE_V2_TO_V4),
},
...CORE_V1_TO_V4,
...CORE_V2_TO_V4
},
version: 4
},
{
methods: objectSpread({
methods: {
version: {
description: 'Returns the version of the runtime.',
params: [],
type: 'RuntimeVersionPre4'
}
}, CORE_V1_TO_V4, CORE_V2_TO_V4),
},
...CORE_V1_TO_V4,
...CORE_V2_TO_V4
},
version: 3
},
{
methods: objectSpread({}, CORE_V1_TO_V2, CORE_V1_TO_V4, CORE_V2_TO_V4),
methods: {
...CORE_V1_TO_V2,
...CORE_V1_TO_V4,
...CORE_V2_TO_V4
},
version: 2
},
{
methods: objectSpread({
methods: {
initialise_block: {
description: 'Initialize a block with the given header.',
params: [
@@ -76,8 +82,10 @@ export const runtime: DefinitionsCall = {
}
],
type: 'Null'
}
}, CORE_V1_TO_V2, CORE_V1_TO_V4),
},
...CORE_V1_TO_V2,
...CORE_V1_TO_V4
},
version: 1
}
]
@@ -3,8 +3,6 @@
import type { Definitions } from '../../types/index.js';
import { objectSpread } from '@polkadot/util';
import { v0 } from './v0.js';
import { v1 } from './v1.js';
@@ -13,7 +11,9 @@ import { v1 } from './v1.js';
export default {
rpc: {},
types: objectSpread({}, v0, v1, {
types: {
...v0,
...v1,
// latest mappings
SiField: 'Si1Field',
SiLookupTypeId: 'Si1LookupTypeId',
@@ -30,5 +30,5 @@ export default {
SiTypeParameter: 'Si1TypeParameter',
SiTypeDefVariant: 'Si1TypeDefVariant',
SiVariant: 'Si1Variant'
})
}
} as Definitions;
@@ -6,8 +6,6 @@
import type { Definitions } from '../../types/index.js';
import { objectSpread } from '@polkadot/util';
import { runtime } from './runtime.js';
// The runtime definition of SessionKeys are passed as a Trait to session
@@ -42,7 +40,8 @@ const keyTypes = {
export default {
rpc: {},
runtime,
types: objectSpread({}, keyTypes, {
types: {
...keyTypes,
FullIdentification: 'Exposure',
IdentificationTuple: '(ValidatorId, FullIdentification)',
MembershipProof: {
@@ -52,5 +51,5 @@ export default {
},
SessionIndex: 'u32',
ValidatorCount: 'u32'
})
}
} as Definitions;
@@ -6,8 +6,6 @@
import type { Definitions } from '../../types/index.js';
import { objectSpread } from '@polkadot/util';
import { runtime } from './runtime.js';
const deprecated = {
@@ -177,7 +175,9 @@ const phragmen = {
export default {
rpc: {},
runtime,
types: objectSpread({}, deprecated, phragmen, {
types: {
...deprecated,
...phragmen,
ActiveEraInfo: {
index: 'EraIndex',
start: 'Option<Moment>'
@@ -302,5 +302,5 @@ export default {
unstakeThreshold: 'Compact<u32>',
validatorPayment: 'Compact<Balance>'
}
})
}
} as Definitions;
@@ -7,7 +7,6 @@
import type { Definitions } from '../../types/index.js';
import { mapXcmTypes } from '@polkadot/types-create';
import { objectSpread } from '@polkadot/util';
import { v0 } from './v0.js';
import { v1 } from './v1.js';
@@ -82,7 +81,13 @@ const location = {
export default {
rpc: {},
types: objectSpread({}, location, xcm, v0, v1, v2, mapXcmTypes(XCM_LATEST), {
types: {
...location,
...xcm,
...v0,
...v1,
...v2,
...mapXcmTypes(XCM_LATEST),
DoubleEncodedCall: {
encoded: 'Vec<u8>'
},
@@ -159,5 +164,5 @@ export default {
}
},
XcmVersion: 'u32'
})
}
} as Definitions;