Skip to content

Commit

Permalink
Merge branch 'master' into reorg-community
Browse files Browse the repository at this point in the history
  • Loading branch information
filippoweb3 authored Aug 5, 2024
2 parents 43118fd + e0e8ceb commit 79fbd45
Show file tree
Hide file tree
Showing 20 changed files with 336 additions and 424 deletions.
Binary file added docs/assets/fee-details.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 7 additions & 5 deletions docs/build/build-client-side.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,19 @@ For front-end applications, several options exist for interfacing with Substrate
Substrate node:

<!-- prettier-ignore -->
<Tabs groupId="clients" values={[ {label: 'Polkadot.js', value: 'pjs'}, { label: 'Polkadot API (under development)', value: 'papi'}, {label: 'Subxt', value: 'subxt'}, {label: 'React Hooks for ink!', value: 'useink'}, {label: 'ink!athon Boilerplate', value: 'inkathon'}, { label: 'Polkadot Cloud', value: 'pcloud'} ]}>
<Tabs groupId="clients" values={[ {label: 'Polkadot.js', value: 'pjs'}, { label: 'Polkadot-API', value: 'papi'}, {label: 'Reactive DOT', value: 'reactive-dot'}, {label: 'Subxt', value: 'subxt'}, {label: 'React Hooks for ink!', value: 'useink'}, {label: 'ink!athon Boilerplate', value: 'inkathon'}, { label: 'Polkadot Cloud', value: 'pcloud'} ]}>

<TabItem value="pjs"> Promise and RxJS APIs around Polkadot, Kusama, and other Substrate-based
chains via RPC calls. It is dynamically generated based on what the Substrate runtime provides
regarding metadata. Full documentation & examples
available&nbsp;<a href="https://polkadot.js.org/docs" target="_blank">here</a>. </TabItem>

<TabItem value="papi"> The Polkadot API (formerly known as "CAPI") is currently under development,
but will serve as a replacement for Polkadot JS. While still under construction, you may view the
current progress on GitHub
&nbsp;<a href="https://github.com/paritytech/polkadot-api/" target="_blank">here</a>. </TabItem>
<TabItem value="papi"> Polkadot-API will serve as a replacement for Polkadot JS. Full documentation
& examples available&nbsp;<a href="https://papi.how/" target="_blank">here</a>. </TabItem>

<TabItem value="reactive-dot"> A reactive library for building Substrate front-ends. Full
documentation & examples available&nbsp;<a href="https://reactivedot.dev/" target="_blank">here</a>.
</TabItem>

<TabItem value="subxt"> Query and submit extrinsics (transactions) to a Substrate node via RPC using
Rust. Also referred to as Rust Parity. Full documentation & examples
Expand Down
12 changes: 7 additions & 5 deletions docs/build/build-dapp.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,19 @@ For front-end applications, several options exist for interfacing with Substrate
Substrate node:

<!-- prettier-ignore -->
<Tabs groupId="clients" values={[ {label: 'Polkadot.js', value: 'pjs'}, { label: 'Polkadot API (under development)', value: 'papi'}, {label: 'Subxt', value: 'subxt'}, {label: 'React Hooks for ink!', value: 'useink'}, {label: 'ink!athon Boilerplate', value: 'inkathon'}, { label: 'Polkadot Cloud', value: 'pcloud'} ]}>
<Tabs groupId="clients" values={[ {label: 'Polkadot.js', value: 'pjs'}, { label: 'Polkadot-API', value: 'papi'}, {label: 'Reactive DOT', value: 'reactive-dot'}, {label: 'Subxt', value: 'subxt'}, {label: 'React Hooks for ink!', value: 'useink'}, {label: 'ink!athon Boilerplate', value: 'inkathon'}, { label: 'Polkadot Cloud', value: 'pcloud'} ]}>

<TabItem value="pjs"> Promise and RxJS APIs around Polkadot and Substrate-based chains via RPC
calls. It is dynamically generated based on what the Substrate runtime provides regarding metadata.
Full documentation & examples
available&nbsp;<a href="https://polkadot.js.org/docs" target="_blank">here</a>. </TabItem>

<TabItem value="papi"> The Polkadot API (formerly known as "CAPI") is currently under development,
but will serve as a replacement for Polkadot JS. While still under construction, you may view the
current progress on GitHub
&nbsp;<a href="https://github.com/paritytech/polkadot-api/" target="_blank">here</a>. </TabItem>
<TabItem value="papi"> Polkadot-API will serve as a replacement for Polkadot JS. Full documentation
& examples available&nbsp;<a href="https://papi.how/" target="_blank">here</a>. </TabItem>

<TabItem value="reactive-dot"> A reactive library for building Substrate front-ends. Full
documentation & examples available&nbsp;<a href="https://reactivedot.dev/" target="_blank">here</a>.
</TabItem>

<TabItem value="subxt"> Query and submit extrinsics (transactions) to a Substrate node via RPC using
Rust. Also referred to as Rust Parity. Full documentation & examples
Expand Down
13 changes: 4 additions & 9 deletions docs/build/build-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,11 @@ subgraphs using [GraphQL](https://graphql.org/).

## Analytics platform

### Dolpha Analytics
### DIN

[Dolpha Analytics](https://dolpha.com/) is an on-chain data analytics and insights platform for the
Polkadot and Kusama ecosystems. Dolpha empowers casual and power users to get a pulse on the
ecosystems, perform due diligence, surface signals, and make informed data-driven decisions.

### Web3Go

[Web3GO](https://web3go.xyz/) is a Polkadot-based open data analytics platform that provides
infrastructure and tooling to help users visualize, curate, share, and analyze on-chain data.
[DIN](https://din.lol/)(formally named Web3Go) is a Polkadot-based open data analytics platform that
provides infrastructure and tooling to help users visualize, curate, share, and analyze on-chain
data.

### Covalent

Expand Down
5 changes: 4 additions & 1 deletion docs/build/build-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ flowchart TB
subgraph CS ["Client/User Land (dApps/uApps)"]
LC["Light Clients (Smoldot)"]
UA[uApp]
UA --> PAPI[Polkadot API]
ReDot[Reactive DOT]
UA --> PAPI[Polkadot-API]
UA --> ReDot
ReDot --> PAPI[Polkadot API]
UA --> PJS[Polkadot JS]
UA --> SubXT
PAPI --> LC
Expand Down
40 changes: 20 additions & 20 deletions docs/build/build-open-source.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/build/build-protocol-info.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ Monitor events instead of transaction names to ensure that you can properly cred

Polkadot uses weight-based fees that, unlike gas, are charged _pre-dispatch._ Users can also add a
"tip" to increase transaction priority during congested periods. See the
[transaction fee](../learn/learn-transaction-fees.md) page for more info.
[transaction fee](../learn/learn-transactions.md#transaction-fees) page for more info.

### Encoding

Expand Down
4 changes: 2 additions & 2 deletions docs/general/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ validators if they apply and fit the requirements.
### How are validators rewarded?

Validators are rewarded from the [inflation of the Relay Chain](../learn/learn-inflation.md),
[transaction fees](../learn/learn-transaction-fees.md), and tips. However, they only take a
percentage of the former two. More details can be read on the page for
[transaction fees](../learn/learn-transactions.md#transaction-fees), and tips. However, they only
take a percentage of the former two. More details can be read on the page for
[validator payouts](../maintain/maintain-guides-validator-payout.md).

### What is the minimum stake necessary to be elected as an active validator?
Expand Down
5 changes: 3 additions & 2 deletions docs/general/staking-dashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ wallets or extensions can be imported from [Ledger](./ledger.md) or
[Polkadot Vault](./polkadot-vault.md).

On top of the [existential deposit](../learn/learn-accounts.md#existential-deposit-and-reaping), you
need some free balance to pay for [transaction fees](../learn/learn-transaction-fees.md) and the
minimum amount to place your nominations (only for nominators, currently
need some free balance to pay for
[transaction fees](../learn/learn-transactions.md#transaction-fees) and the minimum amount to place
your nominations (only for nominators, currently
{{ polkadot: __<RPC network="polkadot" path="query.staking.minNominatorBond" defaultValue={2500000000000} filter="humanReadable"/>__ :polkadot }}{{ kusama: __<RPC network="kusama" path="query.staking.minNominatorBond" defaultValue={100000000000} filter="humanReadable"/>__ :kusama }})
or join a nomination pool (only for pool members, currently
{{ polkadot: __<RPC network="polkadot" path="query.nominationPools.minJoinBond" defaultValue={10000000000} filter="humanReadable"/>__ :polkadot }}{{ kusama: __<RPC network="kusama" path="query.nominationPools.minJoinBond" defaultValue={1667000000} filter="humanReadable"/>__ :kusama }}).
Expand Down
2 changes: 1 addition & 1 deletion docs/learn/archive/learn-treasury.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import MessageBox from "../../../components/MessageBox"; import
[Polkadot OpenGov Treasury page](../../learn/learn-polkadot-opengov-treasury.md)." />

The Treasury is a pot of funds collected through a portion of block production rewards,
[transaction fees](../learn-transaction-fees.md), [slashing](../learn-offenses.md),
[transaction fees](../learn-transactions.md#transaction-fees), [slashing](../learn-offenses.md),
[staking inefficiencies](../learn-staking.md#inflation), etc.

The Treasury funds are held in a [system account](../learn-account-advanced.md#system-accounts) not
Expand Down
11 changes: 11 additions & 0 deletions docs/learn/learn-guides-transfers.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,17 @@ selected does not support teleportation yet.

## Calculating Fees with Polkadot-JS

To calculate fees you can go to Developer > Runtime Calls and select the following extrinsics:

- `transactionPaymentApi.queryInfo`
- `transactionPaymentApi.queryFeeDetails`

and specify the `0x` prefixed hex call data and its length.

![Fee details](../assets/fee-details.png)

The sum of `baseFee`, `lenFee` and `adjustedWeightFee` will yield the `partialFee`.

One useful utility for estimating transaction fees programmatically is the via the
[@polkadot/api](https://www.npmjs.com/package/@polkadot/api). Check out the following script that
logs some relevant fee information:
Expand Down
2 changes: 1 addition & 1 deletion docs/learn/learn-polkadot-opengov-treasury.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ slug: ../learn-polkadot-opengov-treasury
import RPC from "./../../components/RPC-Connection";

The Treasury is a pot of funds collected through a portion of block production rewards,
[transaction fees](./learn-transaction-fees.md), [slashing](./learn-offenses.md), and
[transaction fees](./learn-transactions.md#transaction-fees), [slashing](./learn-offenses.md), and
[staking inefficiencies](./learn-inflation.md). Treasury funds are held in a
[system account](./learn-account-advanced.md#system-accounts) that cannot be controlled by any
external account; only the system internal logic can access it.
Expand Down
3 changes: 2 additions & 1 deletion docs/learn/learn-staking-advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ The general rule for rewards across validators is that two validators get paid e
amount of tokens for equal work, i.e. they are not paid proportional to their total stakes. There is
a probabilistic component to staking rewards in the form of
[era points](../maintain/maintain-guides-validator-payout.md##era-points) and
[tips](learn-transaction-fees.md#fee-calculation) but these should average out over time.
[tips](./learn-guides-transfers.md#calculating-fees-with-polkadot-js) but these should average out
over time.

:::

Expand Down
Loading

0 comments on commit 79fbd45

Please sign in to comment.