Add typeBundle for Cere Network (#9789)
* Add typeBundle for Cere Network * Add auto generation of Cere Network type bundle.
This commit is contained in:
parent
b8ed57ab37
commit
2e5b0a2213
83
packages/apps-config/src/api/chain/cere.ts
Normal file
83
packages/apps-config/src/api/chain/cere.ts
Normal file
@ -0,0 +1,83 @@
|
||||
// Copyright 2017-2023 @polkadot/apps-config authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { OverrideBundleDefinition } from '@polkadot/types/types';
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
const definitions: OverrideBundleDefinition = {
|
||||
types: [
|
||||
{
|
||||
minmax: [
|
||||
266,
|
||||
281
|
||||
],
|
||||
types: {
|
||||
ChainId: 'u8',
|
||||
DepositNonce: 'u64',
|
||||
ResourceId: '[u8; 32]',
|
||||
ProposalStatus: {
|
||||
_enum: [
|
||||
'Initiated',
|
||||
'Approved',
|
||||
'Rejected'
|
||||
]
|
||||
},
|
||||
ProposalVotes: {
|
||||
votes_for: 'Vec<AccountId>',
|
||||
votes_against: 'Vec<AccountId>',
|
||||
status: 'ProposalStatus',
|
||||
expiry: 'BlockNumber'
|
||||
},
|
||||
TokenId: 'u256',
|
||||
Erc721Token: {
|
||||
id: 'TokenId',
|
||||
metadata: 'Vec<u8>'
|
||||
},
|
||||
Address: 'IndicesLookupSource',
|
||||
LookupSource: 'IndicesLookupSource',
|
||||
AccountInfo: 'AccountInfoWithDualRefCount',
|
||||
ValidatorPrefs: {
|
||||
commission: 'Compact<Perbill>'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
minmax: [
|
||||
282,
|
||||
294
|
||||
],
|
||||
types: {
|
||||
ChainId: 'u8',
|
||||
DepositNonce: 'u64',
|
||||
ResourceId: '[u8; 32]',
|
||||
ProposalStatus: {
|
||||
_enum: [
|
||||
'Initiated',
|
||||
'Approved',
|
||||
'Rejected'
|
||||
]
|
||||
},
|
||||
ProposalVotes: {
|
||||
votes_for: 'Vec<AccountId>',
|
||||
votes_against: 'Vec<AccountId>',
|
||||
status: 'ProposalStatus',
|
||||
expiry: 'BlockNumber'
|
||||
},
|
||||
TokenId: 'u256',
|
||||
Erc721Token: {
|
||||
id: 'TokenId',
|
||||
metadata: 'Vec<u8>'
|
||||
},
|
||||
Address: 'MultiAddress',
|
||||
LookupSource: 'MultiAddress',
|
||||
AccountInfo: 'AccountInfoWithDualRefCount'
|
||||
}
|
||||
},
|
||||
{
|
||||
minmax: [295, null],
|
||||
types: {}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
export default definitions;
|
||||
@ -3,10 +3,12 @@
|
||||
|
||||
import type { OverrideBundleDefinition } from '@polkadot/types/types';
|
||||
|
||||
import cere from './cere.js';
|
||||
import kilt from './kilt.js';
|
||||
|
||||
// NOTE: The mapping is done from chain name in system.chain
|
||||
const chain: Record<string, OverrideBundleDefinition> = {
|
||||
'Cere Mainnet Beta': cere,
|
||||
'KILT Mashnet': kilt['KILT Mashnet'],
|
||||
'KILT Peregrine': kilt['KILT Peregrine'],
|
||||
'KILT Peregrine Stagenet': kilt['KILT Peregrine Stagenet'],
|
||||
|
||||
@ -11,6 +11,84 @@ import type { OverrideBundleType } from '@polkadot/types/types';
|
||||
|
||||
export const typesBundle = {
|
||||
"chain": {
|
||||
"Cere Mainnet Beta": {
|
||||
"types": [
|
||||
{
|
||||
"minmax": [
|
||||
266,
|
||||
281
|
||||
],
|
||||
"types": {
|
||||
"ChainId": "u8",
|
||||
"DepositNonce": "u64",
|
||||
"ResourceId": "[u8; 32]",
|
||||
"ProposalStatus": {
|
||||
"_enum": [
|
||||
"Initiated",
|
||||
"Approved",
|
||||
"Rejected"
|
||||
]
|
||||
},
|
||||
"ProposalVotes": {
|
||||
"votes_for": "Vec<AccountId>",
|
||||
"votes_against": "Vec<AccountId>",
|
||||
"status": "ProposalStatus",
|
||||
"expiry": "BlockNumber"
|
||||
},
|
||||
"TokenId": "u256",
|
||||
"Erc721Token": {
|
||||
"id": "TokenId",
|
||||
"metadata": "Vec<u8>"
|
||||
},
|
||||
"Address": "IndicesLookupSource",
|
||||
"LookupSource": "IndicesLookupSource",
|
||||
"AccountInfo": "AccountInfoWithDualRefCount",
|
||||
"ValidatorPrefs": {
|
||||
"commission": "Compact<Perbill>"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"minmax": [
|
||||
282,
|
||||
294
|
||||
],
|
||||
"types": {
|
||||
"ChainId": "u8",
|
||||
"DepositNonce": "u64",
|
||||
"ResourceId": "[u8; 32]",
|
||||
"ProposalStatus": {
|
||||
"_enum": [
|
||||
"Initiated",
|
||||
"Approved",
|
||||
"Rejected"
|
||||
]
|
||||
},
|
||||
"ProposalVotes": {
|
||||
"votes_for": "Vec<AccountId>",
|
||||
"votes_against": "Vec<AccountId>",
|
||||
"status": "ProposalStatus",
|
||||
"expiry": "BlockNumber"
|
||||
},
|
||||
"TokenId": "u256",
|
||||
"Erc721Token": {
|
||||
"id": "TokenId",
|
||||
"metadata": "Vec<u8>"
|
||||
},
|
||||
"Address": "MultiAddress",
|
||||
"LookupSource": "MultiAddress",
|
||||
"AccountInfo": "AccountInfoWithDualRefCount"
|
||||
}
|
||||
},
|
||||
{
|
||||
"minmax": [
|
||||
295,
|
||||
null
|
||||
],
|
||||
"types": {}
|
||||
}
|
||||
]
|
||||
},
|
||||
"KILT Mashnet": {
|
||||
"runtime": {
|
||||
"DidApi": [
|
||||
|
||||
Loading…
Reference in New Issue
Block a user