diff --git a/README.md b/README.md
index 5ca3d82345..72d14e79d3 100644
--- a/README.md
+++ b/README.md
@@ -6,8 +6,8 @@ Validators can add their identity, contact information and validator list to the
To add your entity, submit a PR with the following changes:
-- **Thumbnail SVG:** Add your entity's thumbnail as an SVG file to [this folder](https://github.com/paritytech/polkadot-staking-dashboard/tree/master/src/config/validators/thumbnails).
-- **Entity details:** Add your entity details to the `VALIDATORS_COMMUNITY`JSON object in [this file](https://github.com/paritytech/polkadot-staking-dashboard/blob/master/src/config/validators/index.ts).
+- **Thumbnail SVG:** Add your entity's thumbnail as an SVG file to [this folder](https://github.com/Cerebellum-Network/staking-dashboard/tree/dev-cere/src/config/validators/thumbnails).
+- **Entity details:** Add your entity details to the `VALIDATORS_COMMUNITY`JSON object in [this file](https://github.com/Cerebellum-Network/staking-dashboard/blob/dev-cere/src/config/validators/index.ts).
## Entity Structure
@@ -28,29 +28,34 @@ The following table outlines the structure of a `VALIDATOR_COMMUNITY` entry:
At the top of `config/validators/index.ts`, import the SVG you added in the corresponding `./thumbnails` folder as a React component:
```
-import { ReactComponent as ValidatorCentral } from './thumbnails/validatorCentral.svg';
+import { ReactComponent as Cere } from './thumbnails/cere.svg';
```
-Then add your entity details to the `VALIDATOR_COMMUNITY` object. Only provide the validator(s) for the particular network(s) you are operating in. If you have no operating validators on Kusama, for example, the `kusama` key can be omitted.
+Then add your entity details to the `VALIDATOR_COMMUNITY` object. Only provide the validator(s) for the particular network(s) you are operating in.
-The following example defines 2 validators on the Polkadot network, and 1 on Kusama:
+The following example defines 8 validators on the Cere Network
```
export const VALIDATOR_COMMUNITY = [
...
{
- name: 'Validator Central',
- Thumbnail: ValidatorCentral,
- bio: 'Summing up my validator identity in a sentence or so. Maximum 300 characters.',
- email: 'validatorcentral@parity.io',
- twitter: '@ParityTech',
- website: 'https://parity.io',
+ name: 'CERE',
+ Thumbnail: Cere,
+ bio: `Official Validators from Cere Network, the world's first Decentralized Data Cloud platform.`,
+ email: 'team@cere.network',
+ website: 'https://cere.network',
+ twitter: '@CereNetwork',
validators: {
- polkadot: [
- '1hYiMW8KSfUYChzCQSPGXvMSyKVqmyvMXqohjKr3oU5PCXF',
- '14QSBoJMHF2Zn2XEoLNSeWgqBRr8XoKPy4BxToD6yLSeFFYe'
+ cere: [
+ '6S4mrsCrqWoBAYrp2PKQNh7CYcCtyEtYpx5J626Kj5vszSyy',
+ '6QhzyvZQm3dLjDmeaoUnLPXzfuTi6X1HEo6AX6gfVbC3shzD',
+ '6RgfwDiQTLjgbkQ5CorrKtRtCaDABQKYsibk9MeyvzmKFrk2',
+ '6TBhZAgtFc3Wr8BeNu5tdMJG1NDpxKbG2Hwf2UbVtMGyFxzN',
+ '6Pyh9zZgp4XCP338VDG7oshK7PvsAdyuBN6S2NNm7CBoCXx8',
+ '6S9tXQmPYoeBXYey8vKYi9BMbNMD8Zgqb62k7SYMNQLUbydZ',
+ '6PwAv2L43zGPEwHTb1L7LyCWv7yq2Hc4dSVYHvvi1kscCR91',
+ '6Qshjra42mLDtc9ouHzUz1bMmYXg2qasmW2xSLgendRdsYED',
],
- kusama: ['FykhnPA3pn269LAcQ8VQKDgUQ8ieAaSLwJDhAVhu3dcokVR'],
},
},
...
diff --git a/src/config/networks.ts b/src/config/networks.ts
index 2de9ba1139..bccad9a1c8 100644
--- a/src/config/networks.ts
+++ b/src/config/networks.ts
@@ -5,7 +5,7 @@ import { ReactComponent as CereLogoSvg } from 'img/cere_logo.svg';
import { ReactComponent as CereIconSvg } from 'img/cere_icon.svg';
const cereMainnet = {
- name: 'Cere Mainnet',
+ name: 'Cere',
colors: {
primary: {
light: 'rgb(183, 174, 255)',
diff --git a/src/config/pages.ts b/src/config/pages.ts
index 006a5bb0de..9421d8b716 100644
--- a/src/config/pages.ts
+++ b/src/config/pages.ts
@@ -17,6 +17,7 @@ import Pools from 'pages/Pools';
import Browse from 'pages/Validators';
import Favourites from 'pages/Favourites';
import Payouts from 'pages/Payouts';
+import Community from 'pages/Community';
import { URI_PREFIX } from 'consts';
import { PageCategories, PagesConfig } from 'types';
@@ -76,6 +77,14 @@ export const PAGES_CONFIG: PagesConfig = [
Entry: Browse,
icon: faServer,
},
+ {
+ category: 3,
+ title: 'Community',
+ uri: `${URI_PREFIX}/community`,
+ hash: '/community',
+ Entry: Community,
+ icon: faHashtag,
+ },
{
category: 3,
title: 'Favourites',
diff --git a/src/config/validators/index.ts b/src/config/validators/index.ts
index 082b525f4e..4d4a53087f 100644
--- a/src/config/validators/index.ts
+++ b/src/config/validators/index.ts
@@ -5,139 +5,27 @@
* Use upper camel-case for your SVG import, lower camel case for the svg.
* import { ReactComponent as ValidatorEntityName } from './thumbnails/validatorEntityName.svg';
*/
-import { ReactComponent as Amforc } from './thumbnails/amforc.svg';
-import { ReactComponent as Crifferent } from './thumbnails/crifferent.svg';
-import { ReactComponent as HighStake } from './thumbnails/highstake.svg';
-import { ReactComponent as Polkachu } from './thumbnails/polkachu.svg';
-import { ReactComponent as Polkadotters } from './thumbnails/polkadotters.svg';
-import { ReactComponent as Stakerspace } from './thumbnails/stakerspace.svg';
-import { ReactComponent as TurboFlakes } from './thumbnails/turboflakes.svg';
-import { ReactComponent as Wojdot } from './thumbnails/wojdot.svg';
+import { ReactComponent as Cere } from './thumbnails/cere.svg';
export const VALIDATOR_COMMUNITY = [
{
- name: '🍁 HIGH/STAKE 🥩',
- Thumbnail: HighStake,
- bio: 'We came for the memes, we stay for the tech. Located in Switzerland with 15+ years of experience in running reliable online services. We are exclusively running our validators on dedicated hardware in datacenters across Europe.',
- email: 'highstake@nexus-informatik.ch',
- website: 'https://highstake.tech/',
- validators: {
- polkadot: [
- '12bget8jJWnyjqYPiCwkXZjDh5tDBkta1WUcDYyndbXVDmQ1',
- '12Dw4SzhsxX3fpDiLUYXm9oGbfxcbg1Peq67gc5jkkEo1TKr',
- ],
- kusama: [
- 'DbRgw96nMQcFEFZWTLd6LSPNdh8u3NBuUDfAhDmB6UU8cJC',
- 'HQuPha82sRy91zZn73XRGJVV3ernBh5HZKftUcoDT8CSUwK',
- ],
- },
- },
- {
- name: 'Amforc',
- Thumbnail: Amforc,
- bio: 'We are a independent and experienced staking provider from Switzerland. We run our validators in a hybrid cloud setup across multiple geographical locations. Our validators run significantly above average and close to no blocks are missed as para-validator.',
- email: 'staking@amforc.com',
- twitter: '@amforcag',
- website: 'https://amforc.com/',
- validators: {
- polkadot: ['1y6CPLgccsysCEii3M7jQF834GZsz9A3HMcZz3w7RjGPpBL'],
- kusama: [
- 'DVUNoinHdSNfismcrFaBwdJfysxc7A48QkNvTDnTSPXPw3q',
- 'DpLatoXXBiSAPooF17bzUZGo7huNB7USfRqd2SgL6RBy2zr',
- 'E8zY6KdAH1vuKKMaPdHYLAziht32v2BLqXk6qBw7WtiV2Dv',
- 'Ff3xdNrXA47svhiTJHj9uNhxLo29PYjYcJ9cUseAd9FK6iQ',
- ],
- },
- },
- {
- name: 'polkachu.com',
- Thumbnail: Polkachu,
- bio: 'Polkachu Validators helps investors compound their crypto investments with low commission and advanced support.',
- email: 'hello@polkachu.com',
- twitter: '@polka_chu',
- website: 'https://polkachu.com/',
- validators: {
- polkadot: ['15ym3MDSG4WPABNoEtx2rAzBB1EYWJDWbWYpNg1BwuWRAQcY'],
- kusama: [
- 'CsKvJ4fdesaRALc5swo5iknFDpop7YUwKPJHdmUvBsUcMGb',
- 'GpyTMuLmG3ADWRxhZpHQh5rqMgNpFoNUyxA1DJAXfvsQ2Ly',
- 'CeD8Kk3QLzp2HDRSciF6YQAc2xYAPurMsHAQUGwEJgCWAf2',
- 'GZmbAW7rRi2qkMrHYzmeG2a3fS7nTaAZpjdum8QZ7CvmM7H',
- 'G1qbViqnm6yCZwEbfB4oE38ro8VqJx21zyvW7QN8zAJC2B7',
- ],
- },
- },
- {
- name: 'Polkadotters',
- Thumbnail: Polkadotters,
- bio: 'We are Polkadot focused node operators and community builders from Czechia.',
- email: 'polkadotters@protonmail.com',
- twitter: '@Polkadotters1',
- website: 'https://polkadotters.com/',
- validators: {
- polkadot: ['16A4n4UQqgxw5ndeehPjUAobDNmuX2bBoPXVKj4xTe16ktRN'],
- kusama: ['FVAFUJhJy9tj1X4PaEXX3tDzjaBEVsVunABAdsDMD4ZYmWA'],
- },
- },
- {
- name: 'Sik | crifferent.de',
- Thumbnail: Crifferent,
- bio: 'Crifferent offers reliable and secure staking services made in Germany. Combining professionals from IT, marketing, and finance, they evaluate the best projects and offer services to its full extent.',
- email: 'simon.kraus@crifferent.de',
- twitter: '@dev0_sik',
- website: 'https://crifferent.de/',
- validators: {
- polkadot: ['15wepZh1jWNqxBjsgErm8HmYiE21n79c5krQJeTsYAjHddeM'],
- kusama: [
- 'HWyLYmpW68JGJYoVJcot6JQ1CJbtUQeTdxfY1kUTsvGCB1r',
- 'GLSikJaXTVWvWtUhzB3Bj6xb5TcnhTUp6EuAkxaCohT9UBv',
- ],
- },
- },
- {
- name: 'Staker Space',
- Thumbnail: Stakerspace,
- bio: 'Hi! We are an independent and experienced staking provider. Our homebase is the Netherlands, but we have a run across multiple geographical locations dedicated hardware for our validators. We have been running Kusama and Polkadot validators since the start of the network are highly experienced in doing so. If you have any questions, please get in touch with us.',
- email: 'hello@staker.space',
- twitter: '@stakerspace',
- website: 'https://staker.space',
- validators: {
- polkadot: [
- '16SpacegeUTft9v3ts27CEC3tJaxgvE4uZeCctThFH3Vb24p',
- '14N5nJ4oR4Wj36DsBcPLh1JqjvrM2Uf23No2yc2ojjCvSC24',
- '1NqVmUJCyaj5yZ9jp7ZZa58hbUx2QaBZ4eSCu9bqAdZXgAm',
- ],
- kusama: [
- 'FcjmeNzPk3vgdENm1rHeiMCxFK96beUoi2kb59FmCoZtkGF',
- 'Eksma7JmWh8DenpNKi2uCavwaKJ9QrJJbtcnmwJr3hbHSmC',
- 'Dm64aaAUyy5dvYCSmyzz3njGrWrVaki9F6BvUDSYjDDoqR2',
- 'DfHkfoKa6xzNMWTNGL8SH8VyY69gajen4ijgmegeU4cZm1H',
+ name: 'CERE',
+ Thumbnail: Cere,
+ bio: `Official Validators from Cere Network, the world's first Decentralized Data Cloud platform.`,
+ email: 'team@cere.network',
+ website: 'https://cere.network',
+ twitter: '@CereNetwork',
+ validators: {
+ cere: [
+ '6S4mrsCrqWoBAYrp2PKQNh7CYcCtyEtYpx5J626Kj5vszSyy',
+ '6QhzyvZQm3dLjDmeaoUnLPXzfuTi6X1HEo6AX6gfVbC3shzD',
+ '6RgfwDiQTLjgbkQ5CorrKtRtCaDABQKYsibk9MeyvzmKFrk2',
+ '6TBhZAgtFc3Wr8BeNu5tdMJG1NDpxKbG2Hwf2UbVtMGyFxzN',
+ '6Pyh9zZgp4XCP338VDG7oshK7PvsAdyuBN6S2NNm7CBoCXx8',
+ '6S9tXQmPYoeBXYey8vKYi9BMbNMD8Zgqb62k7SYMNQLUbydZ',
+ '6PwAv2L43zGPEwHTb1L7LyCWv7yq2Hc4dSVYHvvi1kscCR91',
+ '6Qshjra42mLDtc9ouHzUz1bMmYXg2qasmW2xSLgendRdsYED',
],
},
},
- {
- name: 'TurboFlakes',
- Thumbnail: TurboFlakes,
- bio: 'TurboFlakes provides validators with character running on top of dedicated and high performance servers. Raiden, Coco and Momo are our named validators serving non-stop Polkadot and Kusama. We also provide end-user tooling to help you to interact with substrate blockchain networks. Feel free to reach out.',
- email: 'hey@turboflakes.io',
- twitter: '@turboflakes',
- website: 'https://turboflakes.io',
- validators: {
- polkadot: ['12gPFmRqnsDhc9C5DuXyXBFA23io5fSGtKTSAimQtAWgueD2'],
- kusama: [
- 'FZsMKYHoQG1dAVhXBMyC7aYFYpASoBrrMYsAn1gJJUAueZX',
- 'GA7j1FHWXpEU4kavowEte6LWR3NgZ8bkv4spWa9joiQF5R2',
- ],
- },
- },
- {
- name: 'WOJDOT ʕ •ᴥ•ʔ',
- Thumbnail: Wojdot,
- bio: 'Independent Polkadot Validator. We run our service on bare metal machines via a cloud service with the ability to spin up validator nodes in different regions within a matter of minutes.',
- email: 'wojdot@wojdot.com',
- twitter: '@wojdot',
- validators: {
- polkadot: ['13kz33kotYa3M75u5avMS367zJY3Fx2y5ZYASEPunqfEeCjD'],
- },
- },
];
diff --git a/src/config/validators/thumbnails/cere.svg b/src/config/validators/thumbnails/cere.svg
new file mode 100644
index 0000000000..91e47cfc9f
--- /dev/null
+++ b/src/config/validators/thumbnails/cere.svg
@@ -0,0 +1,15 @@
+
diff --git a/src/library/ValidatorList/Validator/Utils.tsx b/src/library/ValidatorList/Validator/Utils.tsx
index 4a5351072e..d768d4f127 100644
--- a/src/library/ValidatorList/Validator/Utils.tsx
+++ b/src/library/ValidatorList/Validator/Utils.tsx
@@ -1,43 +1,56 @@
-// Copyright 2022 @paritytech/polkadot-staking-dashboard authors & contributors
+// Copyright 2023 @paritytech/polkadot-staking-dashboard authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { u8aToString, u8aUnwrapBytes } from '@polkadot/util';
-export const getIdentityDisplay = (identity: any, _superIdentity: any) => {
- // first check identity of validator
+export const getIdentityDisplay = (_identity: any, _superIdentity: any) => {
+ let displayFinal = '';
+ let foundSuper = false;
- // display.Raw
- let display = identity?.info?.display?.Raw ?? null;
- // legal.Raw
- display = display === null ? identity?.info?.legal.Raw ?? null : display;
-
- // check if identity has been byte encoded
- const displayAsBytes = u8aToString(u8aUnwrapBytes(display));
-
- if (displayAsBytes !== '') {
- return displayAsBytes;
- }
- if (display !== null) {
- return display;
- }
-
- // if still null, check super identity
+ // check super identity exists, get display.Raw if it does
const superIdentity = _superIdentity?.identity ?? null;
+ const superRaw = _superIdentity?.[1]?.Raw ?? null;
+ const superDisplay = superIdentity?.info?.display?.Raw ?? null;
- // display.Raw
- display = superIdentity?.info?.display?.Raw ?? null;
- // legal.Raw
- display = display === null ? superIdentity?.info?.legal.Raw ?? null : display;
+ // check if super raw has been encoded
+ const superRawAsBytes = u8aToString(u8aUnwrapBytes(superRaw));
// check if super identity has been byte encoded
- const superIdentityAsBytes = u8aToString(u8aUnwrapBytes(display));
+ const superIdentityAsBytes = u8aToString(u8aUnwrapBytes(superDisplay));
if (superIdentityAsBytes !== '') {
- return superIdentityAsBytes;
+ displayFinal = superIdentityAsBytes;
+ foundSuper = true;
+ } else if (superDisplay !== null) {
+ displayFinal = superDisplay;
+ foundSuper = true;
+ }
+
+ if (!foundSuper) {
+ // cehck sub identity exists, get display.Raw if it does
+ const identity = _identity?.info?.display?.Raw ?? null;
+
+ // check if identity has been byte encoded
+ const subIdentityAsBytes = u8aToString(u8aUnwrapBytes(identity));
+
+ if (subIdentityAsBytes !== '') {
+ displayFinal = subIdentityAsBytes;
+ } else if (identity !== null) {
+ displayFinal = identity;
+ }
}
- if (display !== null) {
- return display;
+ if (displayFinal === '') {
+ return null;
}
- return display;
+ return (
+ <>
+ {displayFinal}
+ {superRawAsBytes !== '' ? (
+ / {superRawAsBytes}
+ ) : superRaw !== null ? (
+ / {superRaw}
+ ) : null}
+ >
+ );
};
diff --git a/src/library/ValidatorList/Validator/types.ts b/src/library/ValidatorList/Validator/types.ts
index fa00689968..7eb0902f55 100644
--- a/src/library/ValidatorList/Validator/types.ts
+++ b/src/library/ValidatorList/Validator/types.ts
@@ -20,7 +20,7 @@ export interface IdentityProps {
}
export interface MetricsProps {
- display: string;
+ display: any;
address: string;
}