AccountInfo with provider/consumers (#2975)

This commit is contained in:
Jaco Greeff
2020-12-22 11:42:47 +01:00
committed by GitHub
parent 5490947384
commit 9ee1c0bf13
8 changed files with 30 additions and 9 deletions
@@ -7,6 +7,7 @@ import type { OverrideVersionedType } from '@polkadot/types/types';
const sharedTypes = {
// substrate
AccountInfo: 'AccountInfoWithRefCount',
Address: 'LookupSource',
LookupSource: 'IndicesLookupSource',
+10 -6
View File
@@ -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',
+2
View File
@@ -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',
+1
View File
@@ -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'
+1
View File
@@ -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',
+6 -2
View File
@@ -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;
}