From 8acceef55f73dbb0b8af58f44fbe2a52718cd324 Mon Sep 17 00:00:00 2001 From: al3mart <11448715+al3mart@users.noreply.github.com> Date: Fri, 19 Jan 2024 08:48:25 +0100 Subject: [PATCH 1/5] Add Paseo Testnet --- packages/apps-config/src/api/constants.ts | 4 +- packages/apps-config/src/endpoints/index.ts | 11 +++ .../src/endpoints/testingRelayPaseo.ts | 70 +++++++++++++++++++ 3 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 packages/apps-config/src/endpoints/testingRelayPaseo.ts diff --git a/packages/apps-config/src/api/constants.ts b/packages/apps-config/src/api/constants.ts index 05e313f82f00..b95b84948a2f 100644 --- a/packages/apps-config/src/api/constants.ts +++ b/packages/apps-config/src/api/constants.ts @@ -23,6 +23,8 @@ export const POLKADOT_DENOM_BLOCK = new BN(1248328); export const ROCOCO_GENESIS = getGenesis('rococo'); +export const PASEO_GENESIS = getGenesis('paseo'); + export const WESTEND_GENESIS = getGenesis('westend'); export const NEATCOIN_GENESIS = '0xfbb541421d30423c9a753ffa844b64fd44d823f513bf49e3b73b3a656309a595'; @@ -39,4 +41,4 @@ export const CERE_NETWORK_TESTNET_GENESIS = '0x42b9b44b4950b6c1edae543a7696caf8d export const VARA_NETWORK_GENESIS = '0xfe1b4c55fd4d668101126434206571a7838a8b6b93a6d1b95d607e78e6c53763'; -export const VARA_NETWORK_TESTNET_GENESIS = '0x525639f713f397dcf839bd022cd821f367ebcf179de7b9253531f8adbe5436d6'; +export const VARA_NETWORK_TESTNET_GENESIS = '0x525639f713f397dcf839bd022cd821f367ebcf179de7b9253531f8adbe5436d6'; \ No newline at end of file diff --git a/packages/apps-config/src/endpoints/index.ts b/packages/apps-config/src/endpoints/index.ts index e17bab0db779..6fac307b855e 100644 --- a/packages/apps-config/src/endpoints/index.ts +++ b/packages/apps-config/src/endpoints/index.ts @@ -8,6 +8,7 @@ import { createCustom, createDev, createOwn } from './development.js'; import { prodChains, prodRelayKusama, prodRelayPolkadot } from './production.js'; import { testChains, testRelayRococo, testRelayWestend } from './testing.js'; import { expandEndpoints } from './util.js'; +import { testRelayPaseo } from './testingRelayPaseo.js'; export { CUSTOM_ENDPOINT_KEY } from './development.js'; export * from './production.js'; @@ -71,6 +72,16 @@ export function createWsEndpoints (t: TFunction = defaultT, firstOnly = false, w ui: {}, value: '' }, + ...expandEndpoints(t, [testRelayPaseo], firstOnly, withSort), + { + isDisabled: false, + isHeader: true, + isSpaced: true, + text: t('rpc.header.live', 'Live networks', { ns: 'apps-config' }), + textBy: '', + ui: {}, + value: '' + }, ...expandEndpoints(t, prodChains, firstOnly, withSort), { isDisabled: false, diff --git a/packages/apps-config/src/endpoints/testingRelayPaseo.ts b/packages/apps-config/src/endpoints/testingRelayPaseo.ts new file mode 100644 index 000000000000..c1f5645692dd --- /dev/null +++ b/packages/apps-config/src/endpoints/testingRelayPaseo.ts @@ -0,0 +1,70 @@ +// Copyright 2017-2024 @polkadot/apps-config authors & contributors +// SPDX-License-Identifier: Apache-2.0 + +import type { EndpointOption } from './types.js'; + +import { PASEO_GENESIS } from '../api/constants.js'; +import { } from '../ui/logos/chains/index.js'; +// import { testnetParachainSVG } from '../ui/logos/nodes/index.js'; +import { getTeleports } from './util.js'; + +// The available endpoints that will show in the dropdown. For the most part (with the exception of +// Polkadot) we try to keep this to live chains only, with RPCs hosted by the community/chain vendor +// info: The chain logo name as defined in ../ui/logos/index.ts in namedLogos (this also needs to align with @polkadot/networks) +// text: The text to display on the dropdown +// providers: The actual hosted secure websocket endpoint +// +// IMPORTANT: Alphabetical based on text +export const testParasPaseo: Omit[] = [ + // { + // homepage: 'https://testPaseoParachainExample.com', + // info: 'paseoparachain', + // paraId: 2345, + // providers: { + // Acurast: 'wss://paseo-parachain-testnet-ws.prod.gke.papers.tech' + // }, + // text: 'Testnet Parachain', + // ui: { + // color: '#000000', + // logo: testnetParachainSVG + // } + // } +]; + +export const testParasPaseoCommon: EndpointOption[] = [ + // { + // info: 'PaseoAssetHub', + // paraId: 1000, + // providers: { + // Dwellir: 'wss://paseo-asset-hub-rpc.dwellir.com', + // Parity: 'wss://paseo-asset-hub-rpc.polkadot.io' + // }, + // teleport: [-1], + // text: 'AssetHub', + // ui: { + // color: '#77bb77', + // logo: nodesAssetHubSVG + // } + // } +]; + +export const testRelayPaseo: EndpointOption = { + dnslink: 'paseo', + genesisHash: PASEO_GENESIS, + info: 'paseo', + linked: [ + ...testParasPaseoCommon, + ...testParasPaseo + ], + providers: { + Amforc: 'wss://paseo.rpc.amforc.com', + + //'light client': 'light://substrate-connect/paseo' + }, + teleport: getTeleports(testParasPaseoCommon), + text: 'Paseo', + ui: { + color: '#e6007a', + identityIcon: 'polkadot' + } +}; \ No newline at end of file From 66fb39bda0963ffaf0ae029163e843f27418cb80 Mon Sep 17 00:00:00 2001 From: al3mart <11448715+al3mart@users.noreply.github.com> Date: Fri, 19 Jan 2024 14:04:29 +0100 Subject: [PATCH 2/5] include locale --- packages/apps-config/src/endpoints/index.ts | 2 +- packages/apps/public/locales/en/apps-config.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/apps-config/src/endpoints/index.ts b/packages/apps-config/src/endpoints/index.ts index 6fac307b855e..b8360ad07c22 100644 --- a/packages/apps-config/src/endpoints/index.ts +++ b/packages/apps-config/src/endpoints/index.ts @@ -67,7 +67,7 @@ export function createWsEndpoints (t: TFunction = defaultT, firstOnly = false, w isDisabled: false, isHeader: true, isSpaced: true, - text: t('rpc.header.live', 'Live networks', { ns: 'apps-config' }), + text: t('rpc.header.paseo.relay', 'Test Paseo & parachains', { ns: 'apps-config' }), textBy: '', ui: {}, value: '' diff --git a/packages/apps/public/locales/en/apps-config.json b/packages/apps/public/locales/en/apps-config.json index 378309037e22..3bef3eb63b13 100644 --- a/packages/apps/public/locales/en/apps-config.json +++ b/packages/apps/public/locales/en/apps-config.json @@ -10,6 +10,7 @@ "rpc.header.live": "Live networks", "rpc.header.polkadot.relay": "Polkadot & parachains", "rpc.header.rococo.relay": "Test Rococo & parachains", + "rpc.header.paseo.relay": "Test Paseo & parachains", "rpc.header.test": "Test networks", "rpc.header.westend.relay": "Test Westend & parachains", "rpc.hosted.via": "via {{host}}", From 62e8a76aadcdf653b454ee1b6af661a6b852fd75 Mon Sep 17 00:00:00 2001 From: Alejandro Martinez Andres <11448715+al3mart@users.noreply.github.com> Date: Tue, 23 Jan 2024 05:05:56 +0100 Subject: [PATCH 3/5] Update packages/apps-config/src/api/constants.ts Co-authored-by: Jaco --- packages/apps-config/src/api/constants.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/apps-config/src/api/constants.ts b/packages/apps-config/src/api/constants.ts index b95b84948a2f..226b96fff523 100644 --- a/packages/apps-config/src/api/constants.ts +++ b/packages/apps-config/src/api/constants.ts @@ -23,7 +23,7 @@ export const POLKADOT_DENOM_BLOCK = new BN(1248328); export const ROCOCO_GENESIS = getGenesis('rococo'); -export const PASEO_GENESIS = getGenesis('paseo'); +export const PASEO_GENESIS = '0x74300973617e2936e22d46e94fee5016a1a514747ae108277b770d02b47d37d9'; export const WESTEND_GENESIS = getGenesis('westend'); From 0ac865fc94aec43a8d259baae26fbd675de34d9b Mon Sep 17 00:00:00 2001 From: al3mart <11448715+al3mart@users.noreply.github.com> Date: Tue, 23 Jan 2024 05:55:24 +0100 Subject: [PATCH 4/5] lint --- packages/apps-config/src/api/constants.ts | 2 +- packages/apps-config/src/endpoints/testingRelayPaseo.ts | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/apps-config/src/api/constants.ts b/packages/apps-config/src/api/constants.ts index 226b96fff523..1d918da362f9 100644 --- a/packages/apps-config/src/api/constants.ts +++ b/packages/apps-config/src/api/constants.ts @@ -41,4 +41,4 @@ export const CERE_NETWORK_TESTNET_GENESIS = '0x42b9b44b4950b6c1edae543a7696caf8d export const VARA_NETWORK_GENESIS = '0xfe1b4c55fd4d668101126434206571a7838a8b6b93a6d1b95d607e78e6c53763'; -export const VARA_NETWORK_TESTNET_GENESIS = '0x525639f713f397dcf839bd022cd821f367ebcf179de7b9253531f8adbe5436d6'; \ No newline at end of file +export const VARA_NETWORK_TESTNET_GENESIS = '0x525639f713f397dcf839bd022cd821f367ebcf179de7b9253531f8adbe5436d6'; diff --git a/packages/apps-config/src/endpoints/testingRelayPaseo.ts b/packages/apps-config/src/endpoints/testingRelayPaseo.ts index c1f5645692dd..eba2cbf1d076 100644 --- a/packages/apps-config/src/endpoints/testingRelayPaseo.ts +++ b/packages/apps-config/src/endpoints/testingRelayPaseo.ts @@ -57,9 +57,8 @@ export const testRelayPaseo: EndpointOption = { ...testParasPaseo ], providers: { - Amforc: 'wss://paseo.rpc.amforc.com', - - //'light client': 'light://substrate-connect/paseo' + Amforc: 'wss://paseo.rpc.amforc.com' + // 'light client': 'light://substrate-connect/paseo' }, teleport: getTeleports(testParasPaseoCommon), text: 'Paseo', @@ -67,4 +66,4 @@ export const testRelayPaseo: EndpointOption = { color: '#e6007a', identityIcon: 'polkadot' } -}; \ No newline at end of file +}; From fb2726df62f9d691ac8d8bf7927bb8675f3f75e3 Mon Sep 17 00:00:00 2001 From: Alejandro Martinez Andres <11448715+al3mart@users.noreply.github.com> Date: Thu, 25 Jan 2024 02:27:09 +0100 Subject: [PATCH 5/5] Update packages/apps-config/src/endpoints/index.ts Co-authored-by: Jaco --- packages/apps-config/src/endpoints/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/apps-config/src/endpoints/index.ts b/packages/apps-config/src/endpoints/index.ts index b8360ad07c22..3e9988d4f59d 100644 --- a/packages/apps-config/src/endpoints/index.ts +++ b/packages/apps-config/src/endpoints/index.ts @@ -7,8 +7,8 @@ import type { LinkOption } from './types.js'; import { createCustom, createDev, createOwn } from './development.js'; import { prodChains, prodRelayKusama, prodRelayPolkadot } from './production.js'; import { testChains, testRelayRococo, testRelayWestend } from './testing.js'; -import { expandEndpoints } from './util.js'; import { testRelayPaseo } from './testingRelayPaseo.js'; +import { expandEndpoints } from './util.js'; export { CUSTOM_ENDPOINT_KEY } from './development.js'; export * from './production.js';