diff --git a/packages/types-known/src/spec/kusama.ts b/packages/types-known/src/spec/kusama.ts index b303ca64b0..14dae864e4 100644 --- a/packages/types-known/src/spec/kusama.ts +++ b/packages/types-known/src/spec/kusama.ts @@ -6,27 +6,33 @@ import type { OverrideVersionedType } from '@polkadot/types/types'; const sharedTypes = { - AccountInfo: 'AccountInfoWithRefCount', - Address: 'AccountId', + AccountInfo: 'AccountInfoWithProviders', + Address: 'MultiAddress', Keys: 'SessionKeys5', - LookupSource: 'AccountId', + LookupSource: 'MultiAddress', ProxyType: { _enum: ['Any', 'NonTransfer', 'Governance', 'Staking', 'IdentityJudgement'] } }; -const indicesTypes = { +const addrIndicesTypes = { AccountInfo: 'AccountInfoWithRefCount', Address: 'LookupSource', LookupSource: 'IndicesLookupSource' }; +const addrAccountIdTypes = { + AccountInfo: 'AccountInfoWithRefCount', + Address: 'AccountId', + LookupSource: 'AccountId' +}; + const versioned: OverrideVersionedType[] = [ { // 1020 is first CC3 minmax: [1019, 1031], types: { - ...indicesTypes, + ...addrIndicesTypes, BalanceLock: 'BalanceLockTo212', CompactAssignments: 'CompactAssignmentsTo257', DispatchError: 'DispatchErrorTo198', @@ -46,7 +52,7 @@ const versioned: OverrideVersionedType[] = [ { minmax: [1032, 1042], types: { - ...indicesTypes, + ...addrIndicesTypes, BalanceLock: 'BalanceLockTo212', CompactAssignments: 'CompactAssignmentsTo257', DispatchInfo: 'DispatchInfoTo244', @@ -66,7 +72,7 @@ const versioned: OverrideVersionedType[] = [ // actual at 1045 (1043-1044 is dev) minmax: [1043, 1045], types: { - ...indicesTypes, + ...addrIndicesTypes, BalanceLock: 'BalanceLockTo212', CompactAssignments: 'CompactAssignmentsTo257', DispatchInfo: 'DispatchInfoTo244', @@ -86,6 +92,7 @@ const versioned: OverrideVersionedType[] = [ types: { // Indices optional, not in transaction ...sharedTypes, + ...addrAccountIdTypes, CompactAssignments: 'CompactAssignmentsTo257', DispatchInfo: 'DispatchInfoTo244', Multiplier: 'Fixed64', @@ -101,6 +108,7 @@ const versioned: OverrideVersionedType[] = [ minmax: [1055, 1056], types: { ...sharedTypes, + ...addrAccountIdTypes, CompactAssignments: 'CompactAssignmentsTo257', DispatchInfo: 'DispatchInfoTo244', Multiplier: 'Fixed64', @@ -115,6 +123,7 @@ const versioned: OverrideVersionedType[] = [ minmax: [1057, 1061], types: { ...sharedTypes, + ...addrAccountIdTypes, CompactAssignments: 'CompactAssignmentsTo257', DispatchInfo: 'DispatchInfoTo244', OpenTip: 'OpenTipTo225', @@ -126,6 +135,7 @@ const versioned: OverrideVersionedType[] = [ minmax: [1062, 2012], types: { ...sharedTypes, + ...addrAccountIdTypes, CompactAssignments: 'CompactAssignmentsTo257', OpenTip: 'OpenTipTo225', RefCount: 'RefCountTo259', @@ -136,6 +146,7 @@ const versioned: OverrideVersionedType[] = [ minmax: [2013, 2022], types: { ...sharedTypes, + ...addrAccountIdTypes, CompactAssignments: 'CompactAssignmentsTo257', RefCount: 'RefCountTo259', RewardDestination: 'RewardDestinationTo257' @@ -145,11 +156,19 @@ const versioned: OverrideVersionedType[] = [ minmax: [2023, 2024], types: { ...sharedTypes, + ...addrAccountIdTypes, RefCount: 'RefCountTo259' } }, { - minmax: [2025, undefined], + minmax: [2025, 2027], + types: { + ...addrAccountIdTypes, + ...sharedTypes + } + }, + { + minmax: [2028, undefined], types: { ...sharedTypes } diff --git a/packages/types-known/src/spec/node-template.ts b/packages/types-known/src/spec/node-template.ts index 3668198f8b..5824e80373 100644 --- a/packages/types-known/src/spec/node-template.ts +++ b/packages/types-known/src/spec/node-template.ts @@ -7,14 +7,7 @@ import type { OverrideVersionedType } from '@polkadot/types/types'; const versioned: OverrideVersionedType[] = [ { - minmax: [0, 99], - types: { - Address: 'AccountId', - LookupSource: 'AccountId' - } - }, - { - minmax: [100, undefined], + minmax: [0, undefined], types: { Address: 'MultiAddress', LookupSource: 'MultiAddress' diff --git a/packages/types-known/src/spec/polkadot.ts b/packages/types-known/src/spec/polkadot.ts index ecd4a84a08..13af5864a8 100644 --- a/packages/types-known/src/spec/polkadot.ts +++ b/packages/types-known/src/spec/polkadot.ts @@ -6,22 +6,29 @@ import type { OverrideVersionedType } from '@polkadot/types/types'; const sharedTypes = { - AccountInfo: 'AccountInfoWithRefCount', - Address: 'AccountId', + AccountInfo: 'AccountInfoWithProviders', + Address: 'MultiAddress', Keys: 'SessionKeys5', - LookupSource: 'AccountId', + LookupSource: 'MultiAddress', ProxyType: { // was: SudoBalances _enum: ['Any', 'NonTransfer', 'Governance', 'Staking', 'Unused', 'IdentityJudgement'] } }; +const addrAccountIdTypes = { + AccountInfo: 'AccountInfoWithRefCount', + Address: 'AccountId', + LookupSource: 'AccountId' +}; + // these are override types for Polkadot const versioned: OverrideVersionedType[] = [ { minmax: [0, 12], types: { ...sharedTypes, + ...addrAccountIdTypes, CompactAssignments: 'CompactAssignmentsTo257', OpenTip: 'OpenTipTo225', RefCount: 'RefCountTo259', @@ -32,6 +39,7 @@ const versioned: OverrideVersionedType[] = [ minmax: [13, 22], types: { ...sharedTypes, + ...addrAccountIdTypes, CompactAssignments: 'CompactAssignmentsTo257', RefCount: 'RefCountTo259', RewardDestination: 'RewardDestinationTo257' @@ -41,11 +49,19 @@ const versioned: OverrideVersionedType[] = [ minmax: [23, 24], types: { ...sharedTypes, + ...addrAccountIdTypes, RefCount: 'RefCountTo259' } }, { - minmax: [25, undefined], + minmax: [25, 27], + types: { + ...sharedTypes, + ...addrAccountIdTypes + } + }, + { + minmax: [28, undefined], types: { ...sharedTypes } diff --git a/packages/types-known/src/spec/rococo.ts b/packages/types-known/src/spec/rococo.ts index 70497edc0f..d430aa9f62 100644 --- a/packages/types-known/src/spec/rococo.ts +++ b/packages/types-known/src/spec/rococo.ts @@ -9,7 +9,7 @@ import type { OverrideVersionedType } from '@polkadot/types/types'; /* eslint-disable sort-keys */ const sharedTypes = { - AccountInfo: 'AccountInfoWithRefCount', + AccountInfo: 'AccountInfoWithProviders', Address: 'MultiAddress', FullIdentification: '()', // No staking, only session (as per config) LookupSource: 'MultiAddress', @@ -21,6 +21,7 @@ const versioned: OverrideVersionedType[] = [ minmax: [0, 9], types: { ...sharedTypes, + AccountInfo: 'AccountInfoWithRefCount', Address: 'AccountId', CompactAssignments: 'CompactAssignmentsTo257', LookupSource: 'AccountId', @@ -33,6 +34,7 @@ const versioned: OverrideVersionedType[] = [ minmax: [10, 12], types: { ...sharedTypes, + AccountInfo: 'AccountInfoWithRefCount', Address: 'AccountId', Keys: 'SessionKeys5', LookupSource: 'AccountId' @@ -42,6 +44,7 @@ const versioned: OverrideVersionedType[] = [ minmax: [13, 201], types: { ...sharedTypes, + AccountInfo: 'AccountInfoWithRefCount', Address: 'AccountId', LookupSource: 'AccountId' } diff --git a/packages/types-known/src/spec/westend.ts b/packages/types-known/src/spec/westend.ts index aa3b91bf97..7f29862db4 100644 --- a/packages/types-known/src/spec/westend.ts +++ b/packages/types-known/src/spec/westend.ts @@ -6,21 +6,28 @@ import type { OverrideVersionedType } from '@polkadot/types/types'; const sharedTypes = { - AccountInfo: 'AccountInfoWithRefCount', - Address: 'AccountId', + AccountInfo: 'AccountInfoWithProviders', + Address: 'MultiAddress', Keys: 'SessionKeys5', - LookupSource: 'AccountId', + LookupSource: 'MultiAddress', ProxyType: { // was: SudoBalances _enum: ['Any', 'NonTransfer', 'Staking', 'Unused', 'IdentityJudgement'] } }; +const addrAccountIdTypes = { + AccountInfo: 'AccountInfoWithRefCount', + Address: 'AccountId', + LookupSource: 'AccountId' +}; + const versioned: OverrideVersionedType[] = [ { minmax: [1, 2], types: { ...sharedTypes, + ...addrAccountIdTypes, CompactAssignments: 'CompactAssignmentsTo257', Multiplier: 'Fixed64', OpenTip: 'OpenTipTo225', @@ -33,6 +40,7 @@ const versioned: OverrideVersionedType[] = [ minmax: [3, 22], types: { ...sharedTypes, + ...addrAccountIdTypes, CompactAssignments: 'CompactAssignmentsTo257', OpenTip: 'OpenTipTo225', RefCount: 'RefCountTo259', @@ -43,6 +51,7 @@ const versioned: OverrideVersionedType[] = [ minmax: [23, 42], types: { ...sharedTypes, + ...addrAccountIdTypes, CompactAssignments: 'CompactAssignmentsTo257', RefCount: 'RefCountTo259', RewardDestination: 'RewardDestinationTo257' @@ -52,11 +61,19 @@ const versioned: OverrideVersionedType[] = [ minmax: [43, 44], types: { ...sharedTypes, + ...addrAccountIdTypes, RefCount: 'RefCountTo259' } }, { - minmax: [45, undefined], + minmax: [45, 47], + types: { + ...sharedTypes, + ...addrAccountIdTypes + } + }, + { + minmax: [48, undefined], types: { ...sharedTypes }