Add OriginTrail Parachain to polkadotjs (#5552)
* OriginTrail parachain changes * Add OriginTrail Parachain to polkadotjs * Rename assets * Resolve lint issues * Change order Co-authored-by: Nikola Todorovic <nikolaztodorovic26@gmail.com>
This commit is contained in:
parent
a39a25bac2
commit
ff84b5c110
@ -55,6 +55,7 @@ import neatcoin from './neatcoin';
|
||||
import nftmart from './nftmart';
|
||||
import nodle from './nodle';
|
||||
import oakTestnet from './oak-testnet';
|
||||
import origintrail from './origintrail';
|
||||
import pangolin from './pangolin';
|
||||
import parami from './parami';
|
||||
import phala from './phala';
|
||||
@ -166,6 +167,7 @@ const spec: Record<string, OverrideBundleDefinition> = {
|
||||
'node-polkadex': polkadex,
|
||||
'nodle-chain': nodle,
|
||||
'oak-testnet': oakTestnet,
|
||||
'origintrail-parachain': origintrail,
|
||||
parami,
|
||||
'phala-collator': phalaParachain,
|
||||
'phala-node': phala,
|
||||
|
||||
164
packages/apps-config/src/api/spec/origintrail.ts
Normal file
164
packages/apps-config/src/api/spec/origintrail.ts
Normal file
@ -0,0 +1,164 @@
|
||||
// Copyright 2017-2021 @polkadot/apps-config authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { DefinitionRpc, DefinitionRpcSub, OverrideBundleDefinition, OverrideBundleType } from '@polkadot/types/types';
|
||||
|
||||
// structs need to be in order
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
export const rpcDefinitions: Record<string, Record<string, DefinitionRpc | DefinitionRpcSub>> = {
|
||||
txpool: {
|
||||
content: {
|
||||
aliasSection: 'txpool',
|
||||
description:
|
||||
'The detailed information regarding Ethereum transactions that are currently in the ' +
|
||||
'Substrate transaction pool.',
|
||||
params: [],
|
||||
type: 'TxPoolResultContent'
|
||||
},
|
||||
inspect: {
|
||||
aliasSection: 'txpool',
|
||||
description:
|
||||
'Summarized information of the Ethereum transactions that are currently in the Substrate' +
|
||||
' transaction pool.',
|
||||
params: [],
|
||||
type: 'TxPoolResultInspect'
|
||||
},
|
||||
status: {
|
||||
aliasSection: 'txpool',
|
||||
description:
|
||||
'The number of Ethereum transaction that are currently in the Substrate transaction pool.',
|
||||
params: [],
|
||||
type: 'TxPoolResultStatus'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// structs need to be in order
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
const origintrailDefinitions = {
|
||||
rpc: rpcDefinitions,
|
||||
types: [
|
||||
{
|
||||
minmax: [0, undefined],
|
||||
types: {
|
||||
AccountId: 'EthereumAccountId',
|
||||
AccountId32: 'H256',
|
||||
AccountInfo: 'AccountInfoWithTripleRefCount',
|
||||
Address: 'AccountId',
|
||||
AuthorId: 'AccountId32',
|
||||
Balance: 'u128',
|
||||
LookupSource: 'AccountId',
|
||||
Account: {
|
||||
nonce: 'U256',
|
||||
balance: 'u128'
|
||||
},
|
||||
ExtrinsicSignature: 'EthereumSignature',
|
||||
RoundIndex: 'u32',
|
||||
Candidate: {
|
||||
id: 'AccountId',
|
||||
fee: 'Perbill',
|
||||
bond: 'Balance',
|
||||
nominators: 'Vec<Bond>',
|
||||
total: 'Balance',
|
||||
state: 'CollatorStatus'
|
||||
},
|
||||
Nominator: {
|
||||
nominations: 'Vec<Bond>',
|
||||
total: 'Balance'
|
||||
},
|
||||
Bond: {
|
||||
owner: 'AccountId',
|
||||
amount: 'Balance'
|
||||
},
|
||||
CollatorStatus: {
|
||||
_enum: ['Active', 'Idle', { Leaving: 'RoundIndex' }]
|
||||
},
|
||||
TxPoolResultContent: {
|
||||
pending: 'HashMap<H160, HashMap<U256, PoolTransaction>>',
|
||||
queued: 'HashMap<H160, HashMap<U256, PoolTransaction>>'
|
||||
},
|
||||
TxPoolResultInspect: {
|
||||
pending: 'HashMap<H160, HashMap<U256, Summary>>',
|
||||
queued: 'HashMap<H160, HashMap<U256, Summary>>'
|
||||
},
|
||||
TxPoolResultStatus: {
|
||||
pending: 'U256',
|
||||
queued: 'U256'
|
||||
},
|
||||
Summary: 'Bytes',
|
||||
PoolTransaction: {
|
||||
hash: 'H256',
|
||||
nonce: 'U256',
|
||||
block_hash: 'Option<H256>',
|
||||
block_number: 'Option<U256>',
|
||||
from: 'H160',
|
||||
to: 'Option<H160>',
|
||||
value: 'U256',
|
||||
gas_price: 'U256',
|
||||
gas: 'U256',
|
||||
input: 'Bytes'
|
||||
},
|
||||
// Staking inflation
|
||||
Range: 'RangeBalance',
|
||||
RangeBalance: {
|
||||
min: 'Balance',
|
||||
ideal: 'Balance',
|
||||
max: 'Balance'
|
||||
},
|
||||
RangePerbill: {
|
||||
min: 'Perbill',
|
||||
ideal: 'Perbill',
|
||||
max: 'Perbill'
|
||||
},
|
||||
InflationInfo: {
|
||||
expect: 'RangeBalance',
|
||||
annual: 'RangePerbill',
|
||||
round: 'RangePerbill'
|
||||
},
|
||||
OrderedSet: 'Vec<Bond>',
|
||||
Collator: {
|
||||
id: 'AccountId',
|
||||
bond: 'Balance',
|
||||
nominators: 'Vec<Bond>',
|
||||
total: 'Balance',
|
||||
state: 'CollatorStatus'
|
||||
},
|
||||
CollatorSnapshot: {
|
||||
bond: 'Balance',
|
||||
nominators: 'Vec<Bond>',
|
||||
total: 'Balance'
|
||||
},
|
||||
SystemInherentData: {
|
||||
validation_data: 'PersistedValidationData',
|
||||
relay_chain_state: 'StorageProof',
|
||||
downward_messages: 'Vec<InboundDownwardMessage>',
|
||||
horizontal_messages: 'BTreeMap<ParaId, Vec<InboundHrmpMessage>>'
|
||||
},
|
||||
RelayChainAccountId: 'AccountId32',
|
||||
RoundInfo: {
|
||||
current: 'RoundIndex',
|
||||
first: 'BlockNumber',
|
||||
length: 'u32'
|
||||
},
|
||||
RewardInfo: {
|
||||
total_reward: 'Balance',
|
||||
claimed_reward: 'Balance'
|
||||
},
|
||||
RegistrationInfo: {
|
||||
account: 'AccountId',
|
||||
deposit: 'Balance'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
} as OverrideBundleDefinition;
|
||||
|
||||
export default origintrailDefinitions;
|
||||
|
||||
export const typesBundle = {
|
||||
spec: {
|
||||
'origintrail-parachain': origintrailDefinitions
|
||||
}
|
||||
} as OverrideBundleType;
|
||||
@ -294,6 +294,14 @@ export function createRococo (t: TFunction): EndpointOption {
|
||||
Moonrock: 'wss://wss-moonrock.gcp.purestake.run'
|
||||
}
|
||||
},
|
||||
{
|
||||
info: 'rococoOriginTrail',
|
||||
paraId: 2024,
|
||||
text: t('rpc.origintrail', 'OriginTrail Parachain', { ns: 'apps-config' }),
|
||||
providers: {
|
||||
'Trace Labs': 'wss://parachain-rpc.origin-trail.network'
|
||||
}
|
||||
},
|
||||
{
|
||||
info: 'rococoParami',
|
||||
isDisabled: true, // Rococo reset
|
||||
|
||||
@ -7,5 +7,6 @@ export const ethereumChains = [
|
||||
'moonbase',
|
||||
'moonbeam',
|
||||
'moonriver',
|
||||
'moonshadow'
|
||||
'moonshadow',
|
||||
'origintrail-parachain'
|
||||
];
|
||||
|
||||
@ -112,6 +112,7 @@ const nodeMybank = '#282736';
|
||||
const nodeNFTMart = '#307182';
|
||||
const nodeNodle = '#1ab394';
|
||||
const nodeOakTestnet = '#E38985';
|
||||
const nodeOriginTrail = '#131415';
|
||||
const nodePangolin = '#5744ff';
|
||||
const nodeParami = '#ee06e2';
|
||||
const nodePolkadex = '#7C30DD';
|
||||
@ -212,6 +213,7 @@ export const chainColors: Record<string, string> = [
|
||||
['NFTMart Testnet', chainNFTMart],
|
||||
['NFTMart Staging', chainNFTMart],
|
||||
['OAK Testnet', chainOakTestnet],
|
||||
['OriginTrail Parachain', nodeOriginTrail],
|
||||
['Pangolin', chainPangolin],
|
||||
['Parami PC2', chainParami],
|
||||
['Phala PC1', chainPhala],
|
||||
@ -297,6 +299,7 @@ export const nodeColors: Record<string, string> = [
|
||||
['NFTMart Staging', nodeNFTMart],
|
||||
['nodle chain node', nodeNodle],
|
||||
['OAK Testnet', nodeOakTestnet],
|
||||
['OriginTrail Parachain', nodeOriginTrail],
|
||||
['Pangolin', nodePangolin],
|
||||
['Parami Collator', nodeParami],
|
||||
['Patract Node', nodeJupiter],
|
||||
|
||||
@ -76,6 +76,7 @@ import mybank from './nodes/mybank.png';
|
||||
import nodeNFTMart from './nodes/nftmart.png';
|
||||
import nodeNodle from './nodes/nodle.svg';
|
||||
import oakTestnet from './nodes/oak-testnet.png';
|
||||
import nodeOriginTrail from './nodes/origintrail.png';
|
||||
import nodePangolin from './nodes/pangolin.svg';
|
||||
import nodeParami from './nodes/parami.png';
|
||||
import nodePhala from './nodes/phala.svg';
|
||||
@ -176,6 +177,7 @@ export const chainLogos: Record<string, unknown> = [
|
||||
['NFTMart Testnet', nodeNFTMart],
|
||||
['NFTMart Staging', nodeNFTMart],
|
||||
['OAK Testnet', oakTestnet],
|
||||
['OriginTrail Parachain', nodeOriginTrail],
|
||||
['Pangolin', nodePangolin],
|
||||
['Parami PC2', nodeParami],
|
||||
['PHOENIX PC1', nodePhoenix],
|
||||
@ -287,6 +289,7 @@ export const nodeLogos: Record<string, unknown> = [
|
||||
['node-template', nodeSubstrate],
|
||||
['Nodle Chain Node', nodeNodle],
|
||||
['OAK Testnet', oakTestnet],
|
||||
['OriginTrail Parachain', nodeOriginTrail],
|
||||
['Pangolin', nodePangolin],
|
||||
['Patract Node', nodeJupiter],
|
||||
['Polkadex Node', nodePolkadex],
|
||||
@ -423,6 +426,7 @@ export const namedLogos: Record<string, unknown> = {
|
||||
nftmart: nodeNFTMart,
|
||||
nodle: nodeNodle,
|
||||
'oak-testnet': oakTestnet,
|
||||
origintrail: nodeOriginTrail,
|
||||
pangolin: nodePangolin,
|
||||
phala: nodePhala,
|
||||
phoenix: nodePhoenix,
|
||||
|
||||
BIN
packages/apps-config/src/ui/logos/nodes/origintrail.png
Normal file
BIN
packages/apps-config/src/ui/logos/nodes/origintrail.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
@ -31,6 +31,7 @@
|
||||
"rpc.kusama.statemine": "Statemine",
|
||||
"rpc.kylin-node.co.uk": "Kylin Network",
|
||||
"rpc.manta": "Manta Testnet",
|
||||
"rpc.origintrail": "OriginTrail Parachain",
|
||||
"rpc.polkadot.parity": "Polkadot",
|
||||
"rpc.polkadot.patractlabs": "Polkadot",
|
||||
"rpc.polkadot.w3f": "Polkadot",
|
||||
@ -167,4 +168,4 @@
|
||||
"rpc.westend.whala": "Whala Network",
|
||||
"ss58.default": "Default for the connected node",
|
||||
"testnet.kylin-node.co.uk": "Kylin Testnet"
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user