diff --git a/packages/types-known/src/spec/centrifuge-chain.ts b/packages/types-known/src/spec/centrifuge-chain.ts index 4d97715f51..5fb4b013c1 100644 --- a/packages/types-known/src/spec/centrifuge-chain.ts +++ b/packages/types-known/src/spec/centrifuge-chain.ts @@ -7,6 +7,7 @@ import type { OverrideVersionedType } from '@polkadot/types/types'; const sharedTypes = { // substrate + AccountInfo: 'AccountInfoWithRefCount', Address: 'LookupSource', LookupSource: 'IndicesLookupSource', diff --git a/packages/types-known/src/spec/kusama.ts b/packages/types-known/src/spec/kusama.ts index c5f0406b69..300757c349 100644 --- a/packages/types-known/src/spec/kusama.ts +++ b/packages/types-known/src/spec/kusama.ts @@ -6,6 +6,7 @@ import type { OverrideVersionedType } from '@polkadot/types/types'; const sharedTypes = { + AccountInfo: 'AccountInfoWithRefCount', Address: 'AccountId', Keys: 'SessionKeys5', LookupSource: 'AccountId', @@ -14,18 +15,23 @@ const sharedTypes = { } }; +const indicesTypes = { + AccountInfo: 'AccountInfoWithRefCount', + Address: 'LookupSource', + LookupSource: 'IndicesLookupSource' +}; + const versioned: OverrideVersionedType[] = [ { // 1020 is first CC3 minmax: [1019, 1031], types: { - Address: 'LookupSource', + ...indicesTypes, BalanceLock: 'BalanceLockTo212', CompactAssignments: 'CompactAssignmentsTo257', DispatchError: 'DispatchErrorTo198', DispatchInfo: 'DispatchInfoTo244', Keys: 'SessionKeys5', - LookupSource: 'IndicesLookupSource', Multiplier: 'Fixed64', OpenTip: 'OpenTipTo225', RefCount: 'RefCountTo259', @@ -40,12 +46,11 @@ const versioned: OverrideVersionedType[] = [ { minmax: [1032, 1042], types: { - Address: 'LookupSource', + ...indicesTypes, BalanceLock: 'BalanceLockTo212', CompactAssignments: 'CompactAssignmentsTo257', DispatchInfo: 'DispatchInfoTo244', Keys: 'SessionKeys5', - LookupSource: 'IndicesLookupSource', Multiplier: 'Fixed64', OpenTip: 'OpenTipTo225', RefCount: 'RefCountTo259', @@ -61,12 +66,11 @@ const versioned: OverrideVersionedType[] = [ // actual at 1045 (1043-1044 is dev) minmax: [1043, 1045], types: { - Address: 'LookupSource', + ...indicesTypes, BalanceLock: 'BalanceLockTo212', CompactAssignments: 'CompactAssignmentsTo257', DispatchInfo: 'DispatchInfoTo244', Keys: 'SessionKeys5', - LookupSource: 'IndicesLookupSource', Multiplier: 'Fixed64', OpenTip: 'OpenTipTo225', RefCount: 'RefCountTo259', diff --git a/packages/types-known/src/spec/node.ts b/packages/types-known/src/spec/node.ts index cc3cda4918..336f694494 100644 --- a/packages/types-known/src/spec/node.ts +++ b/packages/types-known/src/spec/node.ts @@ -10,6 +10,7 @@ const versioned: OverrideVersionedType[] = [ { minmax: [0, 259], types: { + AccountInfo: 'AccountInfoWithRefCount', Address: 'LookupSource', LookupSource: 'IndicesLookupSource' } @@ -17,6 +18,7 @@ const versioned: OverrideVersionedType[] = [ { minmax: [260, undefined], types: { + AccountInfo: 'AccountInfoWithRefCount', Address: 'MultiAddress', LookupSource: 'MultiAddress' } diff --git a/packages/types-known/src/spec/polkadot.ts b/packages/types-known/src/spec/polkadot.ts index dc839e6a6e..9c9906a7b9 100644 --- a/packages/types-known/src/spec/polkadot.ts +++ b/packages/types-known/src/spec/polkadot.ts @@ -6,6 +6,7 @@ import type { OverrideVersionedType } from '@polkadot/types/types'; const sharedTypes = { + AccountInfo: 'AccountInfoWithRefCount', Address: 'AccountId', Keys: 'SessionKeys5', LookupSource: 'AccountId', diff --git a/packages/types-known/src/spec/rococo.ts b/packages/types-known/src/spec/rococo.ts index f145e13a64..0ff688ee09 100644 --- a/packages/types-known/src/spec/rococo.ts +++ b/packages/types-known/src/spec/rococo.ts @@ -9,6 +9,7 @@ import type { OverrideVersionedType } from '@polkadot/types/types'; /* eslint-disable sort-keys */ const sharedTypes = { + AccountInfo: 'AccountInfoWithRefCount', Address: 'AccountId', Keys: 'SessionKeys5', LookupSource: 'AccountId' diff --git a/packages/types-known/src/spec/westend.ts b/packages/types-known/src/spec/westend.ts index ccddebd2dc..864443bca4 100644 --- a/packages/types-known/src/spec/westend.ts +++ b/packages/types-known/src/spec/westend.ts @@ -6,6 +6,7 @@ import type { OverrideVersionedType } from '@polkadot/types/types'; const sharedTypes = { + AccountInfo: 'AccountInfoWithRefCount', Address: 'AccountId', Keys: 'SessionKeys5', LookupSource: 'AccountId', diff --git a/packages/types/src/interfaces/system/definitions.ts b/packages/types/src/interfaces/system/definitions.ts index bc7ec2d2c2..2dcc5ef76f 100644 --- a/packages/types/src/interfaces/system/definitions.ts +++ b/packages/types/src/interfaces/system/definitions.ts @@ -133,11 +133,18 @@ export default { } }, types: { - AccountInfo: { + AccountInfo: 'AccountInfoWithRefCount', + AccountInfoWithRefCount: { nonce: 'Index', refcount: 'RefCount', data: 'AccountData' }, + AccountInfoWithProviders: { + nonce: 'Index', + consumers: 'RefCount', + providers: 'RefCount', + data: 'AccountData' + }, ApplyExtrinsicResult: 'Result', BlockWeights: { baseBlock: 'Weight', diff --git a/packages/types/src/types/definitions.ts b/packages/types/src/types/definitions.ts index 4399c69eb1..9f3e92965a 100644 --- a/packages/types/src/types/definitions.ts +++ b/packages/types/src/types/definitions.ts @@ -39,7 +39,11 @@ export interface DefinitionRpcSub extends DefinitionRpc { pubsub: [string, string, string]; } +export type DefinitionsRpc = Record; + +export type DefinitionsTypes = Record; + export interface Definitions { - rpc: Record; - types: Record; + rpc: DefinitionsRpc; + types: DefinitionsTypes; }