AccountInfo with provider/consumers (#2975)
This commit is contained in:
@@ -7,6 +7,7 @@ import type { OverrideVersionedType } from '@polkadot/types/types';
|
||||
|
||||
const sharedTypes = {
|
||||
// substrate
|
||||
AccountInfo: 'AccountInfoWithRefCount',
|
||||
Address: 'LookupSource',
|
||||
LookupSource: 'IndicesLookupSource',
|
||||
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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'
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
import type { OverrideVersionedType } from '@polkadot/types/types';
|
||||
|
||||
const sharedTypes = {
|
||||
AccountInfo: 'AccountInfoWithRefCount',
|
||||
Address: 'AccountId',
|
||||
Keys: 'SessionKeys5',
|
||||
LookupSource: 'AccountId',
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
import type { OverrideVersionedType } from '@polkadot/types/types';
|
||||
|
||||
const sharedTypes = {
|
||||
AccountInfo: 'AccountInfoWithRefCount',
|
||||
Address: 'AccountId',
|
||||
Keys: 'SessionKeys5',
|
||||
LookupSource: 'AccountId',
|
||||
|
||||
@@ -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<DispatchOutcome, TransactionValidityError>',
|
||||
BlockWeights: {
|
||||
baseBlock: 'Weight',
|
||||
|
||||
@@ -39,7 +39,11 @@ export interface DefinitionRpcSub extends DefinitionRpc {
|
||||
pubsub: [string, string, string];
|
||||
}
|
||||
|
||||
export type DefinitionsRpc = Record<string, DefinitionRpc | DefinitionRpcSub>;
|
||||
|
||||
export type DefinitionsTypes = Record<string, DefinitionType>;
|
||||
|
||||
export interface Definitions {
|
||||
rpc: Record<string, DefinitionRpc | DefinitionRpcSub>;
|
||||
types: Record<string, DefinitionType>;
|
||||
rpc: DefinitionsRpc;
|
||||
types: DefinitionsTypes;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user