Add MathChain mainnet support (#6214)
* add mathchain support * fix lint
This commit is contained in:
parent
9a7d91a144
commit
d933ae9a4f
@ -20,21 +20,6 @@ const definitions: OverrideBundleDefinition = {
|
||||
nonce: 'U256',
|
||||
balance: 'U256'
|
||||
},
|
||||
Transaction: {
|
||||
nonce: 'U256',
|
||||
action: 'String',
|
||||
gas_price: 'u64',
|
||||
gas_limit: 'u64',
|
||||
value: 'U256',
|
||||
input: 'Vec<u8>',
|
||||
signature: 'Signature'
|
||||
},
|
||||
Signature: {
|
||||
v: 'u64',
|
||||
r: 'H256',
|
||||
s: 'H256'
|
||||
},
|
||||
ExitReason: 'U256',
|
||||
AccountServiceEnum: {
|
||||
_enum: {
|
||||
Nickname: 'String',
|
||||
|
||||
@ -57,6 +57,7 @@ import kylin from './kylin';
|
||||
import laminar from './laminar';
|
||||
import litentry from './litentry';
|
||||
import manta from './manta';
|
||||
import mathchain from './mathchain';
|
||||
import moonbeam from './moonbeam';
|
||||
import mybank from './mybank';
|
||||
import neatcoin from './neatcoin';
|
||||
@ -179,6 +180,7 @@ const spec: Record<string, OverrideBundleDefinition> = {
|
||||
litentry,
|
||||
'manta-node': manta,
|
||||
'mashnet-node': kilt,
|
||||
mathchain,
|
||||
'mathchain-galois': galois,
|
||||
moonbase: moonbeam,
|
||||
moonbeam,
|
||||
|
||||
52
packages/apps-config/src/api/spec/mathchain.ts
Normal file
52
packages/apps-config/src/api/spec/mathchain.ts
Normal file
@ -0,0 +1,52 @@
|
||||
// Copyright 2017-2021 @polkadot/apps-config authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { OverrideBundleDefinition } from '@polkadot/types/types';
|
||||
|
||||
// structs need to be in order
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
const definitions: OverrideBundleDefinition = {
|
||||
types: [
|
||||
{
|
||||
// on all versions
|
||||
minmax: [0, undefined],
|
||||
types: {
|
||||
Address: 'MultiAddress',
|
||||
LookupSource: 'MultiAddress',
|
||||
Balance: 'u128',
|
||||
RefCount: 'u32',
|
||||
Account: {
|
||||
nonce: 'U256',
|
||||
balance: 'U256'
|
||||
},
|
||||
AccountServiceEnum: {
|
||||
_enum: {
|
||||
Nickname: 'String',
|
||||
Ethereum: 'H160'
|
||||
}
|
||||
},
|
||||
MultiAddressDetails: {
|
||||
nickname: 'AccountServiceEnum',
|
||||
ethereum: 'AccountServiceEnum'
|
||||
},
|
||||
Nickname: 'String',
|
||||
Ethereum: 'H160',
|
||||
TransferAmountInfo: {
|
||||
date: 'u64',
|
||||
daily_info: 'Balance',
|
||||
monthly_info: 'Balance',
|
||||
yearly_info: 'Balance'
|
||||
},
|
||||
AccountLimit: {
|
||||
daily_limit: 'Balance',
|
||||
monthly_limit: 'Balance',
|
||||
yearly_limit: 'Balance'
|
||||
},
|
||||
Keys: 'SessionKeys2'
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
export default definitions;
|
||||
@ -120,6 +120,14 @@ export function createProduction (t: TFunction, firstOnly: boolean, withSort: bo
|
||||
'Patract Elara': 'wss://pub.elara.patract.io/kulupu'
|
||||
}
|
||||
},
|
||||
{
|
||||
info: 'mathchain',
|
||||
text: t('rpc.prod.mathchain', 'MathChain', { ns: 'apps-config' }),
|
||||
providers: {
|
||||
MathWallet: 'wss://mathchain-asia.maiziqianbao.net/ws',
|
||||
'MathWallet Backup': 'wss://mathchain-us.maiziqianbao.net/ws'
|
||||
}
|
||||
},
|
||||
{
|
||||
info: 'neatcoin',
|
||||
text: t('rpc.prod.neatcoin', 'Neatcoin', { ns: 'apps-config' }),
|
||||
|
||||
@ -127,6 +127,7 @@ const nodeKylin = '#ed007e';
|
||||
const nodeKlug = '#663399';
|
||||
const nodeLitentry = 'linear-gradient(45deg, #5cc27c 0%, #6de98f 100%)';
|
||||
const nodeManta = '#2070a6';
|
||||
const nodeMathChain = '#000000';
|
||||
const nodeMoonbeam = '#53cbc9';
|
||||
const nodeMoonriver = '#0E132E';
|
||||
const nodeMybank = '#282736';
|
||||
@ -202,7 +203,7 @@ export const chainColors: Record<string, string> = Object.entries({
|
||||
EquilibriumTestnet: chainGenshiro,
|
||||
'Fantour Development': chainFantour,
|
||||
Galital: chainGalital,
|
||||
Galois: chainGalois,
|
||||
'Galois-PoC-1': chainGalois,
|
||||
'GamePower Network': chainGamePower,
|
||||
Genshiro: chainGenshiro,
|
||||
'Genshiro Rococo Testnet': chainGenshiro,
|
||||
@ -240,6 +241,7 @@ export const chainColors: Record<string, string> = Object.entries({
|
||||
'Manta Testnet': chainManta,
|
||||
'MantaChain PC1': chainManta,
|
||||
Mars: nodeAres,
|
||||
MathChain: nodeMathChain,
|
||||
'MathChain PC1': chainGalois,
|
||||
'Moonbase Alpha': nodeMoonbeam,
|
||||
'Moonbase Development Testnet': nodeMoonbeam,
|
||||
@ -347,6 +349,7 @@ export const nodeColors = Object.entries({
|
||||
'Litentry Collator': nodeLitentry,
|
||||
'Manta Collator': nodeManta,
|
||||
'Manta Node': nodeManta,
|
||||
MathChain: nodeMathChain,
|
||||
'mybank.network node': nodeMybank,
|
||||
'NFTMart Staging': nodeNFTMart,
|
||||
'NFTMart Testnet': nodeNFTMart,
|
||||
|
||||
@ -174,7 +174,6 @@ export const chainLogos = Object.entries({
|
||||
Equilibrium: chainEquilibrium,
|
||||
EquilibriumTestnet: chainEquilibrium,
|
||||
Galital: nodeGalital,
|
||||
Galois: nodeMath,
|
||||
'GamePower Network': nodeGamePower,
|
||||
GEEK: nodeGeek,
|
||||
Genshiro: chainGenshiro,
|
||||
@ -208,7 +207,9 @@ export const chainLogos = Object.entries({
|
||||
LoomNetwork: nodeLoomNetwork,
|
||||
'Manta Testnet': nodeManta,
|
||||
Mars: nodeAres,
|
||||
MathChain: nodeMath,
|
||||
'MathChain PC1': nodeMath,
|
||||
'mathchain-galois': nodeMath,
|
||||
'Moonbase Alpha': moonbeam,
|
||||
'Moonbase Development Testnet': moonbeam,
|
||||
'Moonbase Stage': moonbeam,
|
||||
@ -321,7 +322,6 @@ export const nodeLogos = Object.entries({
|
||||
'Encointer Node TEE proxy': nodeEncointerTeeproxy,
|
||||
'Fantour Node': nodeFantour,
|
||||
'Galital Parachain Collator': nodeGalital,
|
||||
Galois: nodeMath,
|
||||
'GamePower Node': nodeGamePower,
|
||||
GEEK: nodeGeek,
|
||||
'Halongbay Parachain Collator': nodePolkaFoundry,
|
||||
@ -345,6 +345,8 @@ export const nodeLogos = Object.entries({
|
||||
'mandala node': nodeAcala,
|
||||
'Manta Node': nodeManta,
|
||||
'Manta Parachain Collator': nodeManta,
|
||||
MathChain: nodeMath,
|
||||
'mathChain-galois': nodeMath,
|
||||
Moonrock: nodeMoonrock,
|
||||
'mybank.network': mybank,
|
||||
NFTMart: nodeNFTMart,
|
||||
@ -505,6 +507,7 @@ export const namedLogos: Record<string, unknown> = {
|
||||
loomNetwork: nodeLoomNetwork,
|
||||
manta: nodeManta,
|
||||
mars: nodeAres,
|
||||
mathchain: nodeMath,
|
||||
moonbaseAlpha: moonbeam,
|
||||
moonriver: moonriver,
|
||||
moonrock: nodeMoonrock,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user