Skip to content

Commit

Permalink
change(pallet-assets): document the balance field of AssetAccount
Browse files Browse the repository at this point in the history
… to reflect the changes in the balance model, so a first reader can understand the differences between _free_ balance, _reducible_ balance and balance _on hold_.
  • Loading branch information
pandres95 committed Nov 4, 2024
1 parent f7d0a41 commit 6bebe7e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion substrate/frame/assets/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,13 @@ impl AccountStatus {

#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, MaxEncodedLen, TypeInfo)]
pub struct AssetAccount<Balance, DepositBalance, Extra, AccountId> {
/// The balance.
/// The `free` balance of an asset account, which can be potentially used for an account, if
/// certain constraints are met.
///
/// This balance is not the same as the _reducible_/_spendable_ balance of the asset account
/// (calculated on [`Pallet::reducible_balance`], and depends on freezes, defined on
/// [`Config::Freezer`], if any), and it's not the same as the _balance on hold_ (which depends
/// on [`Config::Holder`], if any).
pub(super) balance: Balance,
/// The status of the account.
pub(super) status: AccountStatus,
Expand Down

0 comments on commit 6bebe7e

Please sign in to comment.