forked from polkadot-cloud/polkadot-staking-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
83 changed files
with
19,931 additions
and
897 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Release to dev | ||
on: | ||
push: | ||
branches: | ||
- dev-cere | ||
workflow_dispatch: | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
jobs: | ||
build-and-deploy: | ||
uses: Cerebellum-Network/reusable-workflows/.github/workflows/deploy-to-cloudfront.yaml@master | ||
with: | ||
build_container: 'node:16-buster' | ||
install_packages_command: 'yarn' | ||
build_command: 'export REACT_APP_INCLUDE_TESTNET=true; yarn run build' | ||
path_to_static_files_to_upload: 'build' | ||
aws_account_id: ${{ vars.DEV_NETWORK_AWS_ACCOUNT_ID }} | ||
s3_bucket_name: "staking-dev.network-dev.aws.cere.io" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Release to prod | ||
on: | ||
push: | ||
branches: | ||
- master-cere | ||
workflow_dispatch: | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
jobs: | ||
build-and-deploy: | ||
uses: Cerebellum-Network/reusable-workflows/.github/workflows/deploy-to-cloudfront.yaml@master | ||
with: | ||
build_container: 'node:16-buster' | ||
install_packages_command: 'yarn' | ||
build_command: 'export REACT_APP_INCLUDE_TESTNET=false; yarn run build' | ||
path_to_static_files_to_upload: 'build' | ||
aws_account_id: ${{ vars.PRD_NETWORK_AWS_ACCOUNT_ID }} | ||
s3_bucket_name: "staking.network.aws.cere.io" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Release to stage | ||
on: | ||
push: | ||
branches: | ||
- 'release/**' | ||
- 'hotfix/**' | ||
workflow_dispatch: | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
jobs: | ||
build-and-deploy: | ||
uses: Cerebellum-Network/reusable-workflows/.github/workflows/deploy-to-cloudfront.yaml@master | ||
with: | ||
build_container: 'node:16-buster' | ||
install_packages_command: 'yarn' | ||
build_command: 'export REACT_APP_INCLUDE_TESTNET=false; yarn run build' | ||
path_to_static_files_to_upload: 'build' | ||
aws_account_id: ${{ vars.STG_NETWORK_AWS_ACCOUNT_ID }} | ||
s3_bucket_name: "staking-stg.network-stage.aws.cere.io" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [1.5.0] - 2023-11-27 | ||
|
||
## Added | ||
|
||
- Validators Community List Update. The following validators have been added: | ||
- Medium | ||
- Jinogami | ||
- EdgeServices | ||
- Wombat | ||
- Brightlystake | ||
- Garm99 | ||
- 4T2CAPITAL | ||
- TRK | ||
- Testnetrun | ||
- Tokem | ||
|
||
|
||
## [1.4.0] - 2023-10-11 | ||
|
||
## Added | ||
|
||
- Validators Community List Update: Added AnyValid, SerGo and Xameyz | ||
|
||
## [1.3.0] - 2023-07-13 | ||
|
||
## Added | ||
|
||
- Comprehensive application of a custom UI/UX theme, encompassing: | ||
- Incorporation of specific colors for graph representation | ||
- Accentuation of color for PayoutBar and PayoutLine elements | ||
- Integration of the HumanSans typography | ||
- Refinement of colors assigned to BalanceGraph and Bounded components | ||
- Modification of the primary color dedicated to the light theme | ||
- Refreshment of the Cere Icon and Logo aesthetics | ||
|
||
## Changed | ||
|
||
- The functionality to toggle between light and dark themes has been reinstated | ||
- Cere icon in the validator configuration has been updated | ||
|
||
## [1.2.1] - 2023-07-12 | ||
|
||
## Changed | ||
|
||
- Updated README: Revised the instructions for Liveness under General Requirements and updated the Contribution Guide. | ||
Additionally, included a feedback email for any questions or concerns regarding the content within the project. | ||
|
||
## [1.2.0] - 2023-07-11 | ||
|
||
## Changed | ||
|
||
- Enabled the Community Page. | ||
- Updated the instructions for setting up the **Validator Entity** in the README. | ||
- Improved the display of validators' identities. | ||
|
||
## Added | ||
|
||
- Added validators for Cere. | ||
|
||
## [1.1.1] - 2023-06-01 | ||
|
||
## Changed | ||
|
||
- Fix payout history date range. The dates were initially reversed and displayed the wrong date range. | ||
|
||
## [1.1.0] - 2023-05-31 | ||
|
||
## Added | ||
|
||
- Added `CereStatsProvider` feature to fetch data from CereStats API, providing reward history and era points for | ||
validators. | ||
- Implemented custom hooks, `useFetchEraPoints` and `usePayouts`, to manage data from CereStats API. `useFetchEraPoints` | ||
retrieves era points for a specific validator, while `usePayouts` manages reward history. | ||
|
||
## Changed | ||
|
||
- The `useSubscan` hook has been replaced with the `useCereStats` hook for the Reward History and Era Point Charts data | ||
source. | ||
|
||
## Removed | ||
|
||
- Removed dependency on `Subscan API` and simplified data management strategy by using `CereStats` API as primary data | ||
source. | ||
|
||
## [1.0.1] - 2023-05-18 | ||
|
||
## Added | ||
|
||
- Improved network initialization and error handling. Prevents application crashes caused by incorrect localStorage | ||
network. Added default network for this scenario. | ||
|
||
### Changed | ||
|
||
- Improved workflow for deploying to development, staging, and production environments. Fixed issue | ||
with `REACT_APP_INCLUDE_TESTNET` variable. | ||
- Set the `REACT_APP_INCLUDE_TESTNET` environment variable to `false` for the Stage environment. | ||
|
||
## [1.0.0] - 2023-05-17 | ||
|
||
### Added | ||
|
||
- Google Tag Manager script | ||
- Cere Logo and Icon | ||
- Cere Mainnet and Testnet configurations | ||
- Cere Network favicons | ||
|
||
### Changed | ||
|
||
- Refactored testnet inclusion condition in build-and-deploy job | ||
- Updated branches for Stage and Prod | ||
- Updated information about Inflation | ||
- Fixed HTML page formatting, ChangeNominations, and CERE_URL | ||
- Updated README.md, prod.yaml, Favicons, units, and URI Prefix | ||
- Adjusted constants and networks for Cere | ||
- Updated default Network and active networks fields | ||
|
||
### Removed | ||
|
||
- Binance fetch | ||
- maxNominatorsCount from TotalNominations | ||
- Feedback and Community pages | ||
- Settings Modal | ||
- UseInflation hook | ||
- Removed auctionCounter field |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,61 @@ | ||
# Polkadot Staking Dashboard | ||
|
||
## Deployment | ||
Staking dashboard is live on [staking.polkadot.network](https://staking.polkadot.network/dashboard) | ||
|
||
<img width="1737" alt="Screenshot 2022-09-15 at 11 23 14" src="https://user-images.githubusercontent.com/13929023/190313914-ec750ca4-1be0-4d46-b2c5-2968dbe98fb4.png"> | ||
# Cere Staking Dashboard [Beta] | ||
|
||
# Validator Entity Setup Guide | ||
|
||
Validators can add their identity, contact information and validator list to the dashboard’s Community section. The Community feature is designed to give non-biased exposure to validator entities, and to host a fully-featured validator browser just for that entity's validators. | ||
|
||
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 | ||
|
||
The following table outlines the structure of a `VALIDATOR_COMMUNITY` entry: | ||
|
||
| Element | Key | Required | Notes | Example | ||
| ------- | --- | -------- | ----- | ------- | | ||
| Entity Name | `name` | Yes | The chosen name of your entity. | `Validator Central` | | ||
| Thumbnail SVG | `Thumbnail` | Yes | Must be a square SVG file with a non-transparent background, to ensure compatibility with both light and dark theming. | *See Below* | | ||
| Bio | `bio` | No | A short description of your entity. Maximum 300 characters. | `Summing up my validator identity in a sentence or so.` | | ||
| Email Address | `email` | No | A public email address representing your entity. | `[email protected]` | | ||
| Twitter Handle | `twitter` | No | The Twitter handle representing your entity. | `@ParityTech` | | ||
| Website URL | `website` | No | A live and vlid secure URL to your website. | `https://parity.io` | | ||
| Validator List | `validators` | Yes | A list of validators grouped by network. At least 1 validator in 1 network must be defined. | *See Below* | | ||
| Element | Key | Required | Notes | Example | | ||
|----------------|--------------|----------|------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------| | ||
| Entity Name | `name` | Yes | The chosen name of your entity. | `Validator Central` | | ||
| Thumbnail SVG | `Thumbnail` | Yes | Must be a square SVG file with a non-transparent background, to ensure compatibility with both light and dark theming. | *See Below* | | ||
| Bio | `bio` | No | A short description of your entity. Maximum 300 characters. | `Summing up my validator identity in a sentence or so.` | | ||
| Email Address | `email` | No | A public email address representing your entity. | `[email protected]` | | ||
| Twitter Handle | `twitter` | No | The Twitter handle representing your entity. | `@CereNetwork'` | | ||
| Website URL | `website` | No | A live and vlid secure URL to your website. | `https://cere.network` | | ||
| Validator List | `validators` | Yes | A list of validators grouped by network. At least 1 validator in 1 network must be defined. | *See Below* | | ||
|
||
## Example Entity | ||
|
||
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: '[email protected]', | ||
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: '[email protected]', | ||
website: 'https://cere.network', | ||
twitter: '@CereNetwork', | ||
validators: { | ||
polkadot: [ | ||
'1hYiMW8KSfUYChzCQSPGXvMSyKVqmyvMXqohjKr3oU5PCXF', | ||
'14QSBoJMHF2Zn2XEoLNSeWgqBRr8XoKPy4BxToD6yLSeFFYe' | ||
cere: [ | ||
'6S4mrsCrqWoBAYrp2PKQNh7CYcCtyEtYpx5J626Kj5vszSyy', | ||
'6QhzyvZQm3dLjDmeaoUnLPXzfuTi6X1HEo6AX6gfVbC3shzD', | ||
'6RgfwDiQTLjgbkQ5CorrKtRtCaDABQKYsibk9MeyvzmKFrk2', | ||
'6TBhZAgtFc3Wr8BeNu5tdMJG1NDpxKbG2Hwf2UbVtMGyFxzN', | ||
'6Pyh9zZgp4XCP338VDG7oshK7PvsAdyuBN6S2NNm7CBoCXx8', | ||
'6S9tXQmPYoeBXYey8vKYi9BMbNMD8Zgqb62k7SYMNQLUbydZ', | ||
'6PwAv2L43zGPEwHTb1L7LyCWv7yq2Hc4dSVYHvvi1kscCR91', | ||
'6Qshjra42mLDtc9ouHzUz1bMmYXg2qasmW2xSLgendRdsYED', | ||
], | ||
kusama: ['FykhnPA3pn269LAcQ8VQKDgUQ8ieAaSLwJDhAVhu3dcokVR'], | ||
}, | ||
}, | ||
... | ||
|
@@ -65,20 +65,20 @@ export const VALIDATOR_COMMUNITY = [ | |
|
||
## General Requirements | ||
|
||
| Requirement | Notes | ||
| ----------- | ----- | | ||
| Accuracy | Entity contact details must be working and valid. | | ||
| Liveness | All submitted validator addresses must be discoverable as a validator on the network in question - whether Polkadot or Kusama. | | ||
| Ordering | Please place your entity in alphabetical order within `VALIDATOR_COMMUNITY`. Validator entities (and their validators) are shuffled before being displayed in the dashboard, removing any bias associated with ordering methods. | | ||
| Requirement | Notes | | ||
|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| Accuracy | Entity contact details must be working and valid. | | ||
| Liveness | All submitted validator addresses must be discoverable as a validator on Cere Network. | | ||
| Ordering | Please place your entity in alphabetical order within `VALIDATOR_COMMUNITY`. Validator entities (and their validators) are shuffled before being displayed in the dashboard, removing any bias associated with ordering methods. | | ||
|
||
Please submit an issue for any queries around adding your validator entity. | ||
|
||
# Contribution Guide | ||
|
||
## Introduction | ||
This section aims to familiarise developers to the Polkadot Staking Dashboard [[GitHub](https://github.com/paritytech/polkadot-staking-dashboard), [Demo](https://paritytech.github.io/polkadot-staking-dashboard/#/overview)] for the purpose of contributing to the project. | ||
This section aims to familiarise developers to the Cere Staking Dashboard [[GitHub](https://github.com/Cerebellum-Network/staking-dashboard), [Demo](https://paritytech.github.io/polkadot-staking-dashboard/#/overview)] for the purpose of contributing to the project. | ||
|
||
Reach out to ross@parity.io for clarification of any content within this document. | ||
Reach out to community@cere.io for clarification of any content within this document. | ||
|
||
## Major Packages Used | ||
|
||
|
@@ -101,6 +101,9 @@ REACT_APP_ORGANISATION="© Parity Technologies" | |
# provide a privacy policy url in the network bar | ||
REACT_APP_PRIVACY_URL=https://www.parity.io/privacy/ | ||
# include the testnet configuration | ||
REACT_APP_INCLUDE_TESTNET=true | ||
``` | ||
## Config Files | ||
There are some ad-hoc files defining app configuration where needed. These just provide a means of bootstrapping app data, and further abstraction could be explored in the future. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.