Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Paseo testnet #10200

Merged
merged 5 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/apps-config/src/api/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ export const POLKADOT_DENOM_BLOCK = new BN(1248328);

export const ROCOCO_GENESIS = getGenesis('rococo');

export const PASEO_GENESIS = '0x74300973617e2936e22d46e94fee5016a1a514747ae108277b770d02b47d37d9';

export const WESTEND_GENESIS = getGenesis('westend');

export const NEATCOIN_GENESIS = '0xfbb541421d30423c9a753ffa844b64fd44d823f513bf49e3b73b3a656309a595';
Expand Down
11 changes: 11 additions & 0 deletions packages/apps-config/src/endpoints/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ 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 { testRelayPaseo } from './testingRelayPaseo.js';
import { expandEndpoints } from './util.js';

export { CUSTOM_ENDPOINT_KEY } from './development.js';
Expand Down Expand Up @@ -62,6 +63,16 @@ export function createWsEndpoints (t: TFunction = defaultT, firstOnly = false, w
value: ''
},
...expandEndpoints(t, [testRelayRococo], firstOnly, withSort),
{
isDisabled: false,
isHeader: true,
isSpaced: true,
text: t('rpc.header.paseo.relay', 'Test Paseo & parachains', { ns: 'apps-config' }),
textBy: '',
ui: {},
value: ''
},
...expandEndpoints(t, [testRelayPaseo], firstOnly, withSort),
{
isDisabled: false,
isHeader: true,
Expand Down
69 changes: 69 additions & 0 deletions packages/apps-config/src/endpoints/testingRelayPaseo.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
// 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<EndpointOption, 'teleport'>[] = [
// {
// 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'
}
};
1 change: 1 addition & 0 deletions packages/apps/public/locales/en/apps-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}}",
Expand Down
Loading