mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 06:21:11 +00:00
Markdown linter (#1309)
* Add markdown linting - add linter default rules - adapt rules to current code - fix the code for linting to pass - add CI check fix #1243 * Fix markdown for Substrate * Fix tooling install * Fix workflow * Add documentation * Remove trailing spaces * Update .github/.markdownlint.yaml Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix mangled markdown/lists * Fix captalization issues on known words
This commit is contained in:
@@ -21,49 +21,48 @@ The Balances module provides functions for:
|
||||
|
||||
### Terminology
|
||||
|
||||
- **Existential Deposit:** The minimum balance required to create or keep an account open. This prevents
|
||||
"dust accounts" from filling storage. When the free plus the reserved balance (i.e. the total balance)
|
||||
fall below this, then the account is said to be dead; and it loses its functionality as well as any
|
||||
prior history and all information on it is removed from the chain's state.
|
||||
No account should ever have a total balance that is strictly between 0 and the existential
|
||||
deposit (exclusive). If this ever happens, it indicates either a bug in this module or an
|
||||
erroneous raw mutation of storage.
|
||||
- **Existential Deposit:** The minimum balance required to create or keep an account open. This prevents "dust accounts"
|
||||
from filling storage. When the free plus the reserved balance (i.e. the total balance) fall below this, then the account
|
||||
is said to be dead; and it loses its functionality as well as any prior history and all information on it is removed
|
||||
from the chain's state. No account should ever have a total balance that is strictly between 0 and the existential
|
||||
deposit (exclusive). If this ever happens, it indicates either a bug in this module or an erroneous raw mutation of
|
||||
storage.
|
||||
|
||||
- **Total Issuance:** The total number of units in existence in a system.
|
||||
|
||||
- **Reaping an account:** The act of removing an account by resetting its nonce. Happens after its
|
||||
total balance has become zero (or, strictly speaking, less than the Existential Deposit).
|
||||
- **Reaping an account:** The act of removing an account by resetting its nonce. Happens after its total balance has
|
||||
become zero (or, strictly speaking, less than the Existential Deposit).
|
||||
|
||||
- **Free Balance:** The portion of a balance that is not reserved. The free balance is the only
|
||||
balance that matters for most operations.
|
||||
- **Free Balance:** The portion of a balance that is not reserved. The free balance is the only balance that matters for
|
||||
most operations.
|
||||
|
||||
- **Reserved Balance:** Reserved balance still belongs to the account holder, but is suspended.
|
||||
Reserved balance can still be slashed, but only after all the free balance has been slashed.
|
||||
- **Reserved Balance:** Reserved balance still belongs to the account holder, but is suspended. Reserved balance can
|
||||
still be slashed, but only after all the free balance has been slashed.
|
||||
|
||||
- **Imbalance:** A condition when some funds were credited or debited without equal and opposite accounting
|
||||
(i.e. a difference between total issuance and account balances). Functions that result in an imbalance will
|
||||
return an object of the `Imbalance` trait that can be managed within your runtime logic. (If an imbalance is
|
||||
simply dropped, it should automatically maintain any book-keeping such as total issuance.)
|
||||
- **Imbalance:** A condition when some funds were credited or debited without equal and opposite accounting (i.e. a
|
||||
difference between total issuance and account balances). Functions that result in an imbalance will return an object of
|
||||
the `Imbalance` trait that can be managed within your runtime logic. (If an imbalance is simply dropped, it should
|
||||
automatically maintain any book-keeping such as total issuance.)
|
||||
|
||||
- **Lock:** A freeze on a specified amount of an account's free balance until a specified block number. Multiple
|
||||
locks always operate over the same funds, so they "overlay" rather than "stack".
|
||||
- **Lock:** A freeze on a specified amount of an account's free balance until a specified block number. Multiple locks
|
||||
always operate over the same funds, so they "overlay" rather than "stack".
|
||||
|
||||
### Implementations
|
||||
|
||||
The Balances module provides implementations for the following traits. If these traits provide the functionality
|
||||
that you need, then you can avoid coupling with the Balances module.
|
||||
The Balances module provides implementations for the following traits. If these traits provide the functionality that
|
||||
you need, then you can avoid coupling with the Balances module.
|
||||
|
||||
- [`Currency`](https://docs.rs/frame-support/latest/frame_support/traits/trait.Currency.html): Functions for dealing with a
|
||||
fungible assets system.
|
||||
- [`Currency`](https://docs.rs/frame-support/latest/frame_support/traits/trait.Currency.html): Functions for dealing
|
||||
with a fungible assets system.
|
||||
- [`ReservableCurrency`](https://docs.rs/frame-support/latest/frame_support/traits/trait.ReservableCurrency.html):
|
||||
Functions for dealing with assets that can be reserved from an account.
|
||||
- [`LockableCurrency`](https://docs.rs/frame-support/latest/frame_support/traits/trait.LockableCurrency.html): Functions for
|
||||
dealing with accounts that allow liquidity restrictions.
|
||||
- [`LockableCurrency`](https://docs.rs/frame-support/latest/frame_support/traits/trait.LockableCurrency.html): Functions
|
||||
for dealing with accounts that allow liquidity restrictions.
|
||||
- [`Imbalance`](https://docs.rs/frame-support/latest/frame_support/traits/trait.Imbalance.html): Functions for handling
|
||||
imbalances between total issuance in the system and account balances. Must be used when a function
|
||||
creates new funds (e.g. a reward) or destroys some funds (e.g. a system fee).
|
||||
- [`IsDeadAccount`](https://docs.rs/frame-support/latest/frame_support/traits/trait.IsDeadAccount.html): Determiner to say whether a
|
||||
given account is unused.
|
||||
imbalances between total issuance in the system and account balances. Must be used when a function creates new funds
|
||||
(e.g. a reward) or destroys some funds (e.g. a system fee).
|
||||
- [`IsDeadAccount`](https://docs.rs/frame-support/latest/frame_support/traits/trait.IsDeadAccount.html): Determiner to
|
||||
say whether a given account is unused.
|
||||
|
||||
## Interface
|
||||
|
||||
@@ -113,10 +112,11 @@ fn update_ledger<T: Config>(
|
||||
|
||||
## Genesis config
|
||||
|
||||
The Balances module depends on the [`GenesisConfig`](https://docs.rs/pallet-balances/latest/pallet_balances/pallet/struct.GenesisConfig.html).
|
||||
The Balances module depends on the
|
||||
[`GenesisConfig`](https://docs.rs/pallet-balances/latest/pallet_balances/pallet/struct.GenesisConfig.html).
|
||||
|
||||
## Assumptions
|
||||
|
||||
* Total issued balanced of all accounts should be less than `Config::Balance::max_value()`.
|
||||
- Total issued balanced of all accounts should be less than `Config::Balance::max_value()`.
|
||||
|
||||
License: Apache-2.0
|
||||
|
||||
Reference in New Issue
Block a user