Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Assets] Implement pallet-assets-holder #4530

Open
wants to merge 78 commits into
base: master
Choose a base branch
from

Commits on May 21, 2024

  1. Configuration menu
    Copy the full SHA
    a0f5015 View commit details
    Browse the repository at this point in the history

Commits on Jun 10, 2024

  1. change(pallet-assets): implement Holder to calculate reducible bala…

    …nce based on whether there's held assets or not
    pandres95 committed Jun 10, 2024
    Configuration menu
    Copy the full SHA
    6d2aa57 View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2024

  1. Configuration menu
    Copy the full SHA
    029e887 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bf376a5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fe951fa View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    89ea43a View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2024

  1. change(pallet-assets): adjust reducible/can_decrease to be in line wi…

    …th the tokens' _balance components_ model.
    
    On the most recent documentation about tokens (both _fungible_ and _fungibles_ (sets)), the model for calculating the different balance components is explained. The prior implementation of `pallet-assets` featured a weird definition of how to handle them that was not in line with the expected (see <https://paritytech.github.io/polkadot-sdk/master/frame_support/traits/tokens/fungible/index.html#holds-and-freezes>) definition of tokens.
    
    This commit changes this implementation for methods `reducible_balance` and `can_decrease` to introduce the calculation of `spendable` balance, and the consequences derived of decreasing a balance that may include both `frozen` and `held` balances.
    pandres95 committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    2ab3535 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9d326b8 View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2024

  1. Configuration menu
    Copy the full SHA
    c76b654 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c5690e1 View commit details
    Browse the repository at this point in the history

Commits on Jul 29, 2024

  1. Configuration menu
    Copy the full SHA
    a4bb10c View commit details
    Browse the repository at this point in the history

Commits on Aug 1, 2024

  1. Configuration menu
    Copy the full SHA
    32fa5c1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fe0a5e5 View commit details
    Browse the repository at this point in the history
  3. fix: fmt / cargo fmt

    pandres95 committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    b93337e View commit details
    Browse the repository at this point in the history
  4. chore: umbrella

    pandres95 committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    4e0ced7 View commit details
    Browse the repository at this point in the history
  5. chore: pr doc

    pandres95 committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    c5b103a View commit details
    Browse the repository at this point in the history

Commits on Aug 8, 2024

  1. Configuration menu
    Copy the full SHA
    9cdb256 View commit details
    Browse the repository at this point in the history
  2. fix(staging-xcm-builder): missing references to Holder

    Note: these mocks were introduced after the latest merge from `master`.
    pandres95 committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    f36b540 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5829558 View commit details
    Browse the repository at this point in the history
  4. change(pallet-assets-holder): apply @gui1117's suggestion of tightly …

    …coupling `pallet-assets-holder` with `pallet-assets`
    pandres95 committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    17ce1d9 View commit details
    Browse the repository at this point in the history
  5. change(pallet-assets): account for held_balance when calculating `t…

    …otal_balance`.
    
    Note: `transfer_all_works_3` changes, due to the change in the balance model
    pandres95 committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    f2a9e96 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    fc41634 View commit details
    Browse the repository at this point in the history
  7. change(pallet-assets-holder): resolve VARIANT_COUNT to match number…

    … of enum variants in mock
    pandres95 committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    9e9edfb View commit details
    Browse the repository at this point in the history

Commits on Aug 9, 2024

  1. change(pallet-assets-holder): remove assertion in test that fails aft…

    …er changing variant count for `DummyHoldReason`.
    pandres95 committed Aug 9, 2024
    Configuration menu
    Copy the full SHA
    e7155eb View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2024

  1. Configuration menu
    Copy the full SHA
    4268b76 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    818e590 View commit details
    Browse the repository at this point in the history
  3. minor(pallet-assets-holder): small adjustments

    - `impls`: Minor codebase improvements
    - `lib`: Rename `HeldBalances` to `BalancesOnHold`.
    pandres95 committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    06db701 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    be7576e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0a0487e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7dff111 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    5d04950 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    44e8f62 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    bb1a98d View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    aab6498 View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2024

  1. Configuration menu
    Copy the full SHA
    3688f89 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    900dbaa View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2024

  1. Configuration menu
    Copy the full SHA
    b689e2e View commit details
    Browse the repository at this point in the history
  2. change(pallet-assets-holder): make died burn balance on hold (if any).

    - now it returns a `DispatchResult`.
    - apply changes on usages and traits impls.
    - change tests to assert calling the method returns `Ok`.
    pandres95 committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    2f14b32 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    548eee1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5d7d874 View commit details
    Browse the repository at this point in the history

Commits on Sep 6, 2024

  1. Configuration menu
    Copy the full SHA
    427a29b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7c28175 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9ccc35c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c65a4c2 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    174b3d5 View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2024

  1. Configuration menu
    Copy the full SHA
    f1c0983 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ae2f67a View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2024

  1. Configuration menu
    Copy the full SHA
    92769f1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a02904d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b559bda View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0e848ac View commit details
    Browse the repository at this point in the history

Commits on Sep 13, 2024

  1. change(pallet-assets): disallow refund/refund_other for an accoun…

    …t's deposit if there are holds or freezes in place / update documentation for `start_destroy`
    pandres95 committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    3bd7241 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4e25e73 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3233d48 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a80e6e3 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    668c148 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    4f27725 View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2024

  1. Configuration menu
    Copy the full SHA
    9d2256d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dec2a4c View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2024

  1. change(pallet-assets): make dead_account return either `DeadConsequ…

    …ence` or fail if account cannot die.
    pandres95 committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    25d9bb0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    de4702e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c81ad85 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    bd72de1 View commit details
    Browse the repository at this point in the history
  5. make ci happy

    pandres95 committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    4bab6f1 View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2024

  1. Configuration menu
    Copy the full SHA
    f1e5b9b View commit details
    Browse the repository at this point in the history

Commits on Oct 7, 2024

  1. Configuration menu
    Copy the full SHA
    8d46fa3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8b9b6db View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ba8c452 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7d84bee View commit details
    Browse the repository at this point in the history

Commits on Nov 3, 2024

  1. Configuration menu
    Copy the full SHA
    608b688 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f12acd2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6ce2b83 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    189d8d4 View commit details
    Browse the repository at this point in the history

Commits on Nov 4, 2024

  1. fix(pallet-assets): on can_decrease, return WouldDie if there's b…

    …alance on hold, but frozen value is zero, as the account would need to exist
    pandres95 committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    6130c60 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f7d0a41 View commit details
    Browse the repository at this point in the history
  3. change(pallet-assets): document the balance field of AssetAccount

    … 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_.
    pandres95 committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    6bebe7e View commit details
    Browse the repository at this point in the history

Commits on Nov 5, 2024

  1. Configuration menu
    Copy the full SHA
    3e797b1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    595b838 View commit details
    Browse the repository at this point in the history