Add Polymesh ITN Provider (#5242)

* NCBD-259 Add polymesh to polkadot apps (#1)

* NCBD-259 Add polymesh to polkadot apps

* NCBD-259 Add polymesh

* NCBD-259 Fixed schema definitions

* fix hosted owner

* fix linting

Co-authored-by: Tamir Malas <71516979+Tamir-Polymath@users.noreply.github.com>
This commit is contained in:
Satyam Agrawal 2021-05-10 12:30:59 +05:30 committed by GitHub
parent 7e8628ef09
commit 15d68ccfe8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 47 additions and 1 deletions

View File

@ -18,6 +18,7 @@
"@laminar/type-definitions": "^0.3.1",
"@phala/typedefs": "0.1.0",
"@polkadot/networks": "^6.3.2-9",
"@polymathnetwork/polymesh-types": "^0.0.2",
"@snowfork/snowbridge-types": "^0.2.3",
"@sora-substrate/type-definitions": "^1.2.1",
"@subsocial/types": "^0.5.0-substrate2.0",

View File

@ -61,6 +61,7 @@ import plasmParachain from './plasm-parachain';
import polkabtc from './polkabtc';
import polkadex from './polkadex';
import polkafoundry from './polkafoundry';
import polymesh from './polymesh';
import prism from './prism';
import realis from './realis';
import riochain from './riochain';
@ -160,6 +161,7 @@ const spec: Record<string, OverrideBundleDefinition> = {
plasm,
'plasm-parachain': plasmParachain,
polkafoundry,
polymesh,
prism,
realis,
'riochain-runtime': riochain,

View File

@ -0,0 +1,19 @@
// Copyright 2017-2021 @polkadot/apps-config authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { OverrideBundleDefinition } from '@polkadot/types/types';
import schema from '@polymathnetwork/polymesh-types';
const definitions: OverrideBundleDefinition = {
rpc: schema.rpc,
types: [
{
// on all versions
minmax: [0, undefined],
types: schema.types
}
]
};
export default definitions;

View File

@ -229,6 +229,13 @@ export function createTesting (t: TFunction): LinkOption[] {
Interlay: 'wss://beta.polkabtc.io/api/parachain'
}
},
{
info: 'polymesh',
text: t('rpc.polymesh', 'Polymesh ITN', { ns: 'apps-config' }),
providers: {
Polymath: 'wss://itn-rpc.polymesh.live'
}
},
{
info: 'prism',
text: t('rpc.prism', 'Prism', { ns: 'apps-config' }),

View File

@ -95,6 +95,7 @@ const nodeNFTMart = '#307182';
const nodeNodle = '#1ab394';
const nodeParami = '#ee06e2';
const nodePolkadex = '#7C30DD';
const nodePolymesh = '#1348e4';
const nodePrism = 'linear-gradient(45deg, rgba(63,94,251,1) 0%, rgba(252,70,107,1) 100%)';
const nodeRealis = 'linear-gradient(45deg, #E8AAC9 0%, #C4D9E7 50%, #EFD6E0 100%)';
const nodeRiochain = '#1A3BB3';
@ -235,6 +236,7 @@ export const nodeColors: Record<string, any> = [
['Parami Collator', nodeParami],
['Patract Node', nodeJupiter],
['Polkadex Node', nodePolkadex],
['Polymesh Node', nodePolymesh],
['Prism Node', nodePrism],
['Prism Collator', nodePrism],
['ReAlis Network', nodeRealis],

View File

@ -13,7 +13,8 @@ export const identityNodes: Record<string, string> = [
['phala-substrate-node', 'substrate'],
['polkadot-js', 'polkadot'],
['subsocial-node', 'substrate'],
['substrate-node', 'substrate']
['substrate-node', 'substrate'],
['polymesh-node', 'substrate']
].reduce((icons, [spec, icon]): Record<string, string> => ({
...icons,
[spec.toLowerCase().replace(/-/g, ' ')]: icon

View File

@ -73,6 +73,7 @@ import nodePolkadex from './nodes/polkadex.svg';
import nodePolkadot from './nodes/polkadot-circle.svg';
import nodePolkadotJs from './nodes/polkadot-js.svg';
import nodePolkaFoundry from './nodes/polkafoundry.svg';
import nodePolymesh from './nodes/polymesh.svg';
import nodePrism from './nodes/prism.png';
import nodeRealis from './nodes/realis.png';
import nodeRiochain from './nodes/riochain.svg';
@ -143,6 +144,7 @@ export const chainLogos: Record<string, unknown> = [
['PolkaBTC Staging', nodePolkaBTC],
['Polkadex Testnet', nodePolkadex],
['PolkaFoundry PC1', nodePolkaFoundry],
['Polymesh', nodePolymesh],
['Prism Testnet', nodePrism],
['Prism PC1', nodePrism],
['Phala PC1', nodePhala],
@ -333,6 +335,7 @@ export const namedLogos: Record<string, unknown> = {
polkadex: nodePolkadex,
polkadot: nodePolkadot,
polkafoundry: nodePolkaFoundry,
polymesh: nodePolymesh,
prism: nodePrism,
realis: nodeRealis,
riochain: nodeRiochain,

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1024" height="1024" preserveAspectRatio="xMidYMid meet"><circle cx="512" cy="512" r="450" fill="#fff"/><path d="M477 .6C405.3 6.7 346.2 22.7 286.5 52c-58.3 28.6-104.3 62.7-149.7 111-50.4 53.6-89.5 120.4-112.7 192.4-11 34.1-18 67.7-22.3 107.1-1.8 16.3-1.8 82.8 0 99C9 627 24.7 681.8 52 737.5c11.2 22.9 19.5 37.4 31.7 56 22.6 34.3 47.7 64 78.8 93.2 71.6 67.4 165.4 113.9 262.5 130.2 34.6 5.9 44 6.6 87 6.6 42.3 0 52.9-.8 84.3-6 163.8-27.4 303.9-132 376.3-281 26-53.6 41.6-107.6 49.1-170 2.6-21.6 2.6-87.4 0-109-5.9-48.9-16.5-91.6-33.4-134.5C936.8 192.7 832.9 88.4 702.5 36.2 660.7 19.5 615.2 8.1 567 2.4 554.2.9 489.1-.4 477 .6zm152.8 339.8l41.7 20.4 25 1.6 29.5 2.1c4.5.5 4.5.5 35.9-21.4l31.4-22 7.1-.6c3.9-.3 13.8-.5 22-.3l14.9.3-18.9 5.4-20.1 6c-1.4.8-39.3 50.8-39.3 52 0 .5 2.9 3.5 6.4 6.6l6.4 5.6 22.2-3.3 22.2-3.2 19.6-16.6 19.7-16.5 7-19 .6 6c.4 3.3.7 8.5.8 11.7l.1 5.6-33.5 39.7-24 5.9-24.5 6.3c-.2.2 2 7.7 4.9 16.6l5.4 16.1.9 31.8.6 42.4-.3 10.6-18.4 8.4-18.4 8.3-32.6-19.5c-32.5-19.5-32.6-19.6-44.3-31.1-13.5-13.4-12.1-14-13.7 5.5l-1 12.4-20.8 31.5c-11.4 17.4-21.7 32.1-22.8 32.9-1.1.7-13.7 6.2-28 12.1-22.9 9.6-27.9 12.1-41.9 21.1l-16.2 10c-.4-.5 10.4-45.9 11.1-46.6.3-.4 9-1.4 19.1-2.3 10.2-.9 18.6-1.8 18.8-2 .7-.9 14.1-55.9 13.6-55.9-.3 0-19.5 8-42.7 17.8l-42.2 17.8-40.8-5.8-43-5.8c-1.2 0-11.6 6.6-23.5 14.9l-21.3 15-25.4 40.6-65.2 25-16.9 33.2c-9.4 18.2-17 34.2-17 35.5 0 1.2.9 7.2 2.1 13.2 1.1 5.9 1.9 11 1.7 11.2-.7.7-39.1 8.4-39.6 8-.2-.3 2.8-5.3 6.6-11.3 3.9-5.9 7.5-11.9 8.1-13.3s4.2-15.8 8-32c6.7-28.4 7.5-30.8 20-63l12.9-33.5.4-22.8c.3-22.1.2-22.8-1.7-23.3-5.4-1.2-47-9.4-48.1-9.4-.7 0-8.8 9.7-17.9 21.6-15.4 19.9-16.9 21.5-19.3 21-1.5-.3-8.8-1.3-16.2-2.2s-14.1-2-14.8-2.3c-.7-.4 6.7-2.9 16.5-5.5 9.8-2.7 18.3-5.4 19-6 .6-.6 6.6-11 13.4-23.1l13.3-23.2c.8-.8 9.6-1.4 28.2-1.9l27-.7 15.5-14.7 15.4-14.8 36.8-11.3 36.8-11.4 76.7-61.4 77.7-61.7c1.6-.6 45.8-9.2 47.8-9.3 1-.1 20.6 9.1 43.5 20.3z" fill="#1348e4"/></svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -70,6 +70,7 @@
"rpc.polkadot.parity": "Polkadot",
"rpc.polkadot.patractlabs": "Polkadot",
"rpc.polkadot.w3f": "Polkadot",
"rpc.polymesh": "Polymesh ITN",
"rpc.prism": "Prism",
"rpc.realis": "Realis Network",
"rpc.riochain": "RioChain",

View File

@ -1325,6 +1325,7 @@
"rpc.polkabtc": "PolkaBTC",
"rpc.polkadot.parity": "Polkadot",
"rpc.polkadot.w3f": "Polkadot",
"rpc.polymesh": "Polymesh",
"rpc.rococo": "Rococo",
"rpc.rococo.acala": "Mandala PC1",
"rpc.rococo.clover": "Clover PC1",

View File

@ -2513,6 +2513,7 @@ __metadata:
"@laminar/type-definitions": ^0.3.1
"@phala/typedefs": 0.1.0
"@polkadot/networks": ^6.3.2-9
"@polymathnetwork/polymesh-types": ^0.0.2
"@snowfork/snowbridge-types": ^0.2.3
"@sora-substrate/type-definitions": ^1.2.1
"@subsocial/types": ^0.5.0-substrate2.0
@ -3236,6 +3237,13 @@ __metadata:
languageName: node
linkType: hard
"@polymathnetwork/polymesh-types@npm:^0.0.2":
version: 0.0.2
resolution: "@polymathnetwork/polymesh-types@npm:0.0.2"
checksum: 5dd78f39c4a1216e34dfe311c46bd892de2061db16899c8d8d9345d31f607ecec63a1a65bd9d79b6bacb7ae105597fefd7187f039216adc4d81049018f2e0f8b
languageName: node
linkType: hard
"@rushstack/eslint-patch@npm:^1.0.6":
version: 1.0.6
resolution: "@rushstack/eslint-patch@npm:1.0.6"