Remove unmaintained HelpOverlay (#8765)

This commit is contained in:
Jaco 2023-01-11 20:26:32 +02:00 committed by GitHub
parent 9410f2dab4
commit ff28428ff0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 7 additions and 212 deletions

View File

@ -6,10 +6,9 @@ import type { AppProps as Props } from '@polkadot/react-components/types';
import React, { useRef } from 'react';
import { Route, Switch } from 'react-router';
import { HelpOverlay, Tabs } from '@polkadot/react-components';
import { Tabs } from '@polkadot/react-components';
import { useAccounts, useIpfs } from '@polkadot/react-hooks';
import basicMd from './md/basic.md';
import Accounts from './Accounts';
import { useTranslation } from './translate';
import useCounter from './useCounter';
@ -38,7 +37,6 @@ function AccountsApp ({ basePath, onStatusChange }: Props): React.ReactElement<P
return (
<main className='accounts--App'>
<HelpOverlay md={basicMd as string} />
<Tabs
basePath={basePath}
hidden={(hasAccounts && !isIpfs) ? undefined : HIDDEN_ACC}

View File

@ -1,65 +0,0 @@
# Account
An account is identified by its public address on the network. It is totally fine to give away this address, this is also the only information needed to receive funds. The network will **not** know about the name you give to this account in this application.
# Balances
The balances for each account is broken down into a number of areas, giving an overview of the totals, transferable and bonded funds as well as the funds currently being unbonded or redeemable. These are -
- **total**: The overall amount of funds in the account, this includes the vested balance, available for transfer and locked.
- **available**: The funds that can be transferred or bonded, i.e. the funds that are available for any transaction.
- **bonded**: The funds bonded for validating or nominating. They are locked and cannot be transferred, although it can be unlocked for future actions.
- **redeemable**: The funds that can get redeemed, e.g made available for withdrawal, by clicking on the "lock" icon.
- **unbonding**: The funds that are being unbonded. The funds will be redeemable after the bonding period has passed. These funds can still be slashed. The information icon tells the amount of blocks left before the funds can be redeemed.
# Security
The public address is generated from a private key, itself generated from a seed or a mnemonic phrase. The seed or the mnemonic phrase should **never be shared with anybody** as they give access to your funds. It must be stored securely.
The password needed to create an account is used to encrypt your private key. You must choose a strong and unique password.
This password is also used to encrypt the private key in the backup file downloaded upon account creation. Thanks to this file together with your account password, you can recover your account.
# Account recovery
You can recover an account from its:
- seed or mnemonic:
Click on the "Add account" button, type your seed or mnemonic in the associated field.
- backup file (also called JSON keystore file) and the account's password:
Click on "Restore JSON" button. Upload your backup file and type in the password associated.
# Minimum Account Balances - Essential Deposit & Reaping
Accounts with a balance lower than the minimal amount (existential deposit) will be reaped
(All remaining funds lost, and the account's state removed from the network). Learn more on the polkadot wiki.
Accounts with under 1 DOT for Polkadot are considered as nonexistent for the network. If an account's
balance ever drops below this amount, it is removed from the network's state. In this web application,
that account will still be visible, but with a balance of 0.
For a fund transfer to a new account (balance of 0), if the amount transferred is less than
the minimum allowed balance, then the transfer will "succeed" but the destination account will
not be created (its balance will remain 0); this essentially burns the transfer balance from the sender,
because the receiver's balance never exceed the minimum allowed balance. Note that the new account could
be a previously active, but reaped account with a balance of 0 before the transfer. A transfer of over
the existential deposit amount to it will succeed as expected and make a new account with the same address.
If the receiver already exists (read it has a balance greater than 0), it is perfectly possible to transfer very low amounts.
# Cryptography
Substrate and Polkadot use Schnorrkel/Ristretto x25519 ("sr25519") as its key derivation and signing algorithm.
Sr25519 is based on the same underlying Curve25519 as its EdDSA counterpart, Ed25519. However, it uses Schnorr signatures instead of the EdDSA scheme. Schnorr signatures bring some noticeable benefits over the ECDSA/EdDSA schemes. For one, it is more efficient and still retains the same feature set and security assumptions. Additionally, it allows for native multisignature through signature aggregation.
If you wish to validate, the `session` account needs to use "ed25519" cryptography.
# Contacts
You can store and get quick access to the most commonly used address, such as a friends' account.
Any contact you create in this interface will be reflected in the application.
You can edit the name of a contact by clicking on it. To remove a contact from the list, click on the trash icon to "Forget" it.

View File

@ -6,9 +6,8 @@ import type { AppProps as Props } from '@polkadot/react-components/types';
import React, { useRef } from 'react';
import { useTranslation } from '@polkadot/app-contracts/translate';
import { HelpOverlay, Tabs } from '@polkadot/react-components';
import { Tabs } from '@polkadot/react-components';
import introMd from './md/intro.md';
import Contracts from './Contracts';
function ContractsApp ({ basePath, className = '' }: Props): React.ReactElement<Props> {
@ -24,7 +23,6 @@ function ContractsApp ({ basePath, className = '' }: Props): React.ReactElement<
return (
<main className={`contracts--App ${className}`}>
<HelpOverlay md={introMd as string} />
<Tabs
basePath={basePath}
items={itemsRef.current}

View File

@ -1,17 +0,0 @@
# contracts
This contract management interface allows you to deploy WASM code for contracts, deploy contracts based on on-chain code and allows you to interact with contracts by sending messages.
## warning
Please be aware that this interface is very new and has not been thoroughly tested against all kinds of combinations of inputs - there are no doubt bugs lurking inside these sections. Additionally, the substrate contracts ABI is a very recent addition, and while stabilizing there may be changes and or-breakages while using this UI to interact.
With all that said - if you do find issues, please log them.
## basic operations
The interface has 3 main areas -
- **Code** This allows you to deploy WASM code on-chain or attach on-chain code into your local registry. Each code blob is identified by a unique hash, when deploying this will be saved, when attaching you would need to know the unique hash. From these bundles you can then move to the next step,
- **Instance** This allows you to create contract instances using on-chain WASM code. Select the code to use, attach the ABI, specify the contract values and the contract can be deployed. As with the Code section, you can also attach on-chain instances when you know the address.
- **Call** This allows you to send messages to contracts, via the address and attached ABIs.

View File

@ -4,9 +4,8 @@
import React, { useMemo } from 'react';
import { Route, Switch } from 'react-router';
import { HelpOverlay, Tabs } from '@polkadot/react-components';
import { Tabs } from '@polkadot/react-components';
import basicMd from './md/basic.md';
import Overview from './Overview';
import { useTranslation } from './translate';
@ -29,7 +28,6 @@ function DemocracyApp ({ basePath }: Props): React.ReactElement<Props> {
return (
<main className='democracy--App'>
<HelpOverlay md={basicMd as string} />
<Tabs
basePath={basePath}
items={items}

View File

@ -1,13 +0,0 @@
# Democracy
This application lets you view proposals and vote for or against a referendum.
Anyone can create a proposal by bonding the minimum deposit for a certain period of time (No. of Blocks). If someone likes the proposal, they could deposit the same amount of tokens to support it. The minimum deposit is currently 5 Units/DOTs.
# Proposals
This lists the proposals that you can not vote on yet. The proposal with the highest amount of Units/DOTs supporting it will be selected in the next launch period for everyone to vote. This selected proposal evolved in a referendum. The tokens locked to support each proposal will be released once the proposal is tabled.
# Referendum
This lists the proposal that you can now vote for "aye" or against "nay".
At the end of the launch period, and depending on the outcome of the referendum, the action that was subjected to vote will be executed or rejected.

View File

@ -5,9 +5,8 @@ import type { KeyedEvent } from '@polkadot/react-hooks/ctx/types';
import React, { useRef } from 'react';
import { HelpOverlay, Tabs } from '@polkadot/react-components';
import { Tabs } from '@polkadot/react-components';
import basicMd from '../README.md';
import CrustFiles from './CrustFiles';
import { useTranslation } from './translate';
@ -29,7 +28,6 @@ function FilesApp ({ basePath, className }: Props): React.ReactElement<Props> {
return (
<main className={className}>
<HelpOverlay md={basicMd as string} />
<Tabs
basePath={basePath}
items={itemsRef.current}

View File

@ -6,10 +6,9 @@ import type { AppProps as Props } from '@polkadot/react-components/types';
import React, { useMemo } from 'react';
import { Route, Switch } from 'react-router';
import { HelpOverlay, Tabs } from '@polkadot/react-components';
import { Tabs } from '@polkadot/react-components';
import { useApi } from '@polkadot/react-hooks';
import md from './md/basics.md';
import Developer from './Developer';
import General from './General';
import I18n from './I18n';
@ -56,7 +55,6 @@ function SettingsApp ({ basePath, onStatusChange }: Props): React.ReactElement<P
return (
<main className='settings--App'>
<HelpOverlay md={md as string} />
<Tabs
basePath={basePath}
hidden={hidden}

View File

@ -1,61 +0,0 @@
# Settings
Here you are able to tweak a number of the settings for your interface - where it connects to, the actual theme and if you are a developer, have access to some additional features to allow for a stress-free connection to a (possibly) custom chain.
# General
In the general section you can setup the basic operation for your UI.
- **endpoint** Defines the node to connect to. Select from one of the available hosted RPCs or connect to your own by specifying a custom URL. (Be aware that custom URLs should be behind secure WebSockets if you are using a UI hosted on a https endpoint)
- **theme** Swap between a Polkadot or Substrate themed interface.
- **mode** By default the UI appears in a fully-featured mode. You can select to only have the core features (which provides all the basics, unless you are a power user).
# Developer
In this section, you are able to define custom types to be added to the underlying API. When developing a custom chain, it is typical that additional types are added. Defining them here allows the underlying API (and therefore the UI) have an understanding how to encode and decode these types.
Types are saved across refreshes, so it is a single operation for all future usages of the UI. For the definitions, a simple JSON format is used, and example could be -
```
{
"TransactionInput": {
"parent_output": "Hash",
"signature": "Signature"
},
"TransactionOutput": {
"value": "u128",
"pubkey": "Hash",
"sale": "u32"
},
"Transaction": {
"inputs": "Vec<TransactionInput>",
"outputs": "Vec<TransactionOutput>"
}
}
```
Be aware that the types are registered in the order they appear here, however it does support resolution independent of the order. (Circular deps are not supported here). For a slightly more complex example, using both types, enums, tuples and Compact numbers, the following would be used -
```
{
"ArrayThing": "Vec<Thing>",
"MyNumber": "u32",
"Thing": {
"count_enum": "SimpleEnum",
"type_enum": "TypeEnum",
"counter": "MyNumber",
"tuple": "(u32, u64)",
"ids": "Vec<AccountId>"
},
"SimpleEnum": {
"_enum": ["One", "Two", "Three"]
},
"TypeEnum": {
"_enum": {
"One": "u32",
"Two": "Compact<u64>",
"Three": null
}
}
}
```

View File

@ -11,11 +11,10 @@ import { Route, Switch } from 'react-router';
import { useLocation } from 'react-router-dom';
import styled from 'styled-components';
import { HelpOverlay, Tabs } from '@polkadot/react-components';
import { Tabs } from '@polkadot/react-components';
import { useAccounts, useApi, useAvailableSlashes, useCall, useCallMulti, useFavorites, useOwnStashInfos } from '@polkadot/react-hooks';
import { isFunction } from '@polkadot/util';
import basicMd from './md/basic.md';
import Actions from './Actions';
import Bags from './Bags';
import { STORE_FAVS_BASE } from './constants';
@ -147,7 +146,6 @@ function StakingApp ({ basePath, className = '' }: Props): React.ReactElement<Pr
return (
<main className={`staking--App ${className}`}>
<HelpOverlay md={basicMd as string} />
<Tabs
basePath={basePath}
hidden={

View File

@ -1,32 +0,0 @@
# Staking
Welcome to the staking module. Here you can see an overview of all the validators on the network and participate in the network either a validator (running a node that helps secure the network), or as a nominator (adding funds to help secure the network).
Validators and nominators earn rewards at the end of each era. The rewards are split between the validators and its nominators, in proportion to the amount bonded.
# Bonding
Bonding funds is the first step to validate or nominate. It locks up a portion of funds that is used to secure the network. These funds are placed at risk, i.e. you can be slashed and lose a portion if the validator node misbehaves. Validators and nominators share both rewards and the slashing effects. Choosing a well behaving validator to nominate is crucial.
For bonding (with an intention to either validate or nominate), you need to have 2 accounts -
- **Stash** This is the primary account that holds the funds and has a portion bonded for participation;
- **Controller** This is used to control the operation of the validator or nominator, switching between validating, nominating and idle; (It only needs enough funds to send transactions when actions are taken)
To bond, you select the stash account, bond from it and designate a controller. Additionally you can select the amount of funds to bond and set your payout preferences.
# Nominating
Nomination (using the controller account as set as part of the bonding) is a process of selecting a number of validators (or potential validators) that you deem trustworthy. Once the validators are selected, the bonded value is assigned to participate in the network security.
You can stop nominating at any point in time, using the controller account. You can also bond more funds using the stash account.
# Validating
Validators run nodes that author blocks. The primary requirement here is the ability to run a node that is available 24/7 and is well-connected to the network.
In addition to the stash and controller account described above, a validator has to indicate an additional account called `Session key` -
- **Session** The seed of this account should be passed to the node using the `--key` parameter. The session account does not need to have funds as it does not need to send any transaction. The best practice is to create a dedicated account to be used as session account. Although a single account can theoretically be used as both session and controller, it is not recommended to do so. Having a dedicated session account would prevent the theft of funds should the validator node be compromised and the `--key` leaked.
As with the nomination operations, you can stop validation at any time using the controller. (Be it for maintenance, upgrades, or any other reason)

View File

@ -4,11 +4,10 @@
import React, { useMemo } from 'react';
import { Route, Switch } from 'react-router';
import { HelpOverlay, Tabs } from '@polkadot/react-components';
import { Tabs } from '@polkadot/react-components';
import { useApi, useCollectiveMembers } from '@polkadot/react-hooks';
import { isFunction } from '@polkadot/util';
import basicMd from './md/basic.md';
import Overview from './Overview';
import Tips from './Tips';
import { useTranslation } from './translate';
@ -48,7 +47,6 @@ function TreasuryApp ({ basePath }: Props): React.ReactElement<Props> {
return (
<main className='treasury--App'>
<HelpOverlay md={basicMd as string} />
<Tabs
basePath={basePath}
items={items}

View File

@ -1,3 +0,0 @@
# Treasury
This application lets you view and vote to approve or deny treasury spend proposals.