1. Apr 26, 2024
    • Oliver Tale-Yazdi's avatar
      [balances] Safeguard against consumer ref underflow (#3865) · e8f7c81d
      Oliver Tale-Yazdi authored
      
      
      There are some accounts that do not have a consumer ref while having a
      reserve.
      This adds a fail-safe mechanism to trigger in the case that
      `does_consume` is true, but the assumption of `consumer>0` is not.
      
      This should prevent those accounts from loosing balance and the TI from
      getting messed up even more, but is not an "ideal" fix. TBH an ideal fix
      is not possible, since on-chain data is in an invalid state.
      
      ---------
      
      Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
      e8f7c81d
  2. Mar 31, 2024
  3. Mar 26, 2024
    • Dcompoze's avatar
      Fix spelling mistakes across the whole repository (#3808) · 002d9260
      Dcompoze authored
      **Update:** Pushed additional changes based on the review comments.
      
      **This pull request fixes various spelling mistakes in this
      repository.**
      
      Most of the changes are contained in the first **3** commits:
      
      - `Fix spelling mistakes in comments and docs`
      
      - `Fix spelling mistakes in test names`
      
      - `Fix spelling mistakes in error messages, panic messages, logs and
      tracing`
      
      Other source code spelling mistakes are separated into individual
      commits for easier reviewing:
      
      - `Fix the spelling of 'authority'`
      
      - `Fix the spelling of 'REASONABLE_HEADERS_IN_JUSTIFICATION_ANCESTRY'`
      
      - `Fix the spelling of 'prev_enqueud_messages'`
      
      - `Fix the spelling of 'endpoint'`
      
      - `Fix the spelling of 'children'`
      
      - `Fix the spelling of 'PenpalSiblingSovereignAccount'`
      
      - `Fix the spelling of 'PenpalSudoAccount'`
      
      - `Fix the spelling of 'insufficient'`
      
      - `Fix the spelling of 'PalletXcmExtrinsicsBenchmark'`
      
      - `Fix the spelling of 'subtracted'`
      
      - `Fix the spelling of 'CandidatePendingAvailability'`
      
      - `Fix the spelling of 'exclusive'`
      
      - `Fix the spelling of 'until'`
      
      - `Fix the spelling of 'discriminator'`
      
      - `Fix the spelling of 'nonexistent'`
      
      - `Fix the spelling of 'subsystem'`
      
      - `Fix the spelling of 'indices'`
      
      - `Fix the spelling of 'committed'`
      
      - `Fix the spelling of 'topology'`
      
      - `Fix the spelling of 'response'`
      
      - `Fix the spelling of 'beneficiary'`
      
      - `Fix the spelling of 'formatted'`
      
      - `Fix the spelling of 'UNKNOWN_PROOF_REQUEST'`
      
      - `Fix the spelling of 'succeeded'`
      
      - `Fix the spelling of 'reopened'`
      
      - `Fix the spelling of 'proposer'`
      
      - `Fix the spelling of 'InstantiationNonce'`
      
      - `Fix the spelling of 'depositor'`
      
      - `Fix the spelling of 'expiration'`
      
      - `Fix the spelling of 'phantom'`
      
      - `Fix the spelling of 'AggregatedKeyValue'`
      
      - `Fix the spelling of 'randomness'`
      
      - `Fix the spelling of 'defendant'`
      
      - `Fix the spelling of 'AquaticMammal'`
      
      - `Fix the spelling of 'transactions'`
      
      - `Fix the spelling of 'PassingTracingSubscriber'`
      
      - `Fix the spelling of 'TxSignaturePayload'`
      
      - `Fix the spelling of 'versioning'`
      
      - `Fix the spelling of 'descendant'`
      
      - `Fix the spelling of 'overridden'`
      
      - `Fix the spelling of 'network'`
      
      Let me know if this structure is adequate.
      
      **Note:** The usage of the words `Merkle`, `Merkelize`, `Merklization`,
      `Merkelization`, `Merkleization`, is somewhat inconsistent but I left it
      as it is.
      
      ~~**Note:** In some places the term `Receival` is used to refer to
      message reception, IMO `Reception` is the correct word here, but I left
      it as it is.~~
      
      ~~**Note:** In some places the term `Overlayed` is used instead of the
      more acceptable version `Overlaid` but I also left it as it is.~~
      
      ~~**Note:** In some places the term `Applyable` is used instead of the
      correct version `Applicable` but I also left it as it is.~~
      
      **Note:** Some usage of British vs American english e.g. `judgement` vs
      `judgment`, `initialise` vs `initialize`, `optimise` vs `optimize` etc.
      are both present in different places, but I suppose that's
      understandable given the number of contributors.
      
      ~~**Note:** There is a spelling mistake in `.github/CODEOWNERS` but it
      triggers errors in CI when I make changes to it, so I left it as it
      is.~~
      002d9260
  4. Mar 15, 2024
  5. Feb 28, 2024
  6. Jan 31, 2024
    • Branislav Kontur's avatar
      [frame] `#[pallet::composite_enum]` improved variant count handling + removed... · bb8ddc46
      Branislav Kontur authored
      [frame] `#[pallet::composite_enum]` improved variant count handling + removed `pallet_balances`'s `MaxHolds` config (#2657)
      
      I started this investigation/issue based on @liamaharon question
      [here](https://github.com/paritytech/polkadot-sdk/pull/1801#discussion_r1410452499).
      
      ## Problem
      
      The `pallet_balances` integrity test should correctly detect that the
      runtime has correct distinct `HoldReasons` variant count. I assume the
      same situation exists for RuntimeFreezeReason.
      
      It is not a critical problem, if we set `MaxHolds` with a sufficiently
      large value, everything should be ok. However, in this case, the
      integrity_test check becomes less useful.
      
      **Situation for "any" runtime:**
      - `HoldReason` enums from different pallets:
      ```rust
              /// from pallet_nis
              #[pallet::composite_enum]
      	pub enum HoldReason {
      		NftReceipt,
      	}
      
              /// from pallet_preimage
              #[pallet::composite_enum]
      	pub enum HoldReason {
      		Preimage,
      	}
      
              // from pallet_state-trie-migration
              #[pallet::composite_enum]
      	pub enum HoldReason {
      		SlashForContinueMigrate,
      		SlashForMigrateCustomTop,
      		SlashForMigrateCustomChild,
      	}
      ```
      
      - generated `RuntimeHoldReason` enum looks like:
      ```rust
      pub enum RuntimeHoldReason {
      
          #[codec(index = 32u8)]
          Preimage(pallet_preimage::HoldReason),
      
          #[codec(index = 38u8)]
          Nis(pallet_nis::HoldReason),
      
          #[codec(index = 42u8)]
          StateTrieMigration(pallet_state_trie_migration::HoldReason),
      }
      ```
      
      - composite enum `RuntimeHoldReason` variant count is detected as `3`
      - we set `type MaxHolds = ConstU32<3>`
      - `pallet_balances::integrity_test` is ok with `3`(at least 3)
      
      However, the real problem can occur in a live runtime where some
      functionality might stop working. This is due to a total of 5 distinct
      hold reasons (for pallets with multi-instance support, it is even more),
      and not all of them can be used because of an incorrect `MaxHolds`,
      which is deemed acceptable according to the `integrity_test`:
        ```
        // pseudo-code - if we try to call all of these:
      
      T::Currency::hold(&pallet_nis::HoldReason::NftReceipt.into(),
      &nft_owner, deposit)?;
      T::Currency::hold(&pallet_preimage::HoldReason::Preimage.into(),
      &nft_owner, deposit)?;
      
      T::Currency::hold(&pallet_state_trie_migration::HoldReason::SlashForContinueMigrate.into(),
      &nft_owner, deposit)?;
      
        // With `type MaxHolds = ConstU32<3>` these two will fail
      
      T::Currency::hold(&pallet_state_trie_migration::HoldReason::SlashForMigrateCustomTop.into(),
      &nft_owner, deposit)?;
      
      T::Currency::hold(&pallet_state_trie_migration::HoldReason::SlashForMigrateCustomChild.into(),
      &nft_owner, deposit)?;
        ```  
      
      
      ## Solutions
      
      A macro `#[pallet::*]` expansion is extended of `VariantCount`
      implementation for the `#[pallet::composite_enum]` enum type. This
      expansion generates the `VariantCount` implementation for pallets'
      `HoldReason`, `FreezeReason`, `LockId`, and `SlashReason`. Enum variants
      must be plain enum values without fields to ensure a deterministic
      count.
      
      The composite runtime enum, `RuntimeHoldReason` and
      `RuntimeFreezeReason`, now sets `VariantCount::VARIANT_COUNT` as the sum
      of pallets' enum `VariantCount::VARIANT_COUNT`:
      ```rust
      #[frame_support::pallet(dev_mode)]
      mod module_single_instance {
      
      	#[pallet::composite_enum]
      	pub enum HoldReason {
      		ModuleSingleInstanceReason1,
      		ModuleSingleInstanceReason2,
      	}
      ...
      }
      
      #[frame_support::pallet(dev_mode)]
      mod module_multi_instance {
      
      	#[pallet::composite_enum]
      	pub enum HoldReason<I: 'static = ()> {
      		ModuleMultiInstanceReason1,
      		ModuleMultiInstanceReason2,
      		ModuleMultiInstanceReason3,
      	}
      ...
      }
      
      
      impl self::sp_api_hidden_includes_construct_runtime::hidden_include::traits::VariantCount
          for RuntimeHoldReason
      {
          const VARIANT_COUNT: u32 = 0
              + module_single_instance::HoldReason::VARIANT_COUNT
              + module_multi_instance::HoldReason::<module_multi_instance::Instance1>::VARIANT_COUNT
              + module_multi_instance::HoldReason::<module_multi_instance::Instance2>::VARIANT_COUNT
              + module_multi_instance::HoldReason::<module_multi_instance::Instance3>::VARIANT_COUNT;
      }
      ```
      
      In addition, `MaxHolds` is removed (as suggested
      [here](https://github.com/paritytech/polkadot-sdk/pull/2657#discussion_r1443324573))
      from `pallet_balances`, and its `Holds` are now bounded to
      `RuntimeHoldReason::VARIANT_COUNT`. Therefore, there is no need to let
      the runtime specify `MaxHolds`.
      
      
      ## For reviewers
      
      Relevant changes can be found here:
      - `substrate/frame/support/procedural/src/lib.rs` 
      -  `substrate/frame/support/procedural/src/pallet/parse/composite.rs`
      -  `substrate/frame/support/procedural/src/pallet/expand/composite.rs`
      -
      `substrate/frame/support/procedural/src/construct_runtime/expand/composite_helper.rs`
      -
      `substrate/frame/support/procedural/src/construct_runtime/expand/hold_reason.rs`
      -
      `substrate/frame/support/procedural/src/construct_runtime/expand/freeze_reason.rs`
      - `substrate/frame/support/src/traits/misc.rs`
      
      And the rest of the files is just about removed `MaxHolds` from
      `pallet_balances`
      
      ## Next steps
      
      Do the same for `MaxFreezes`
      https://github.com/paritytech/polkadot-sdk/issues/2997
      
      .
      
      ---------
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: default avatarDónal Murray <[email protected]>
      Co-authored-by: default avatargupnik <[email protected]>
      bb8ddc46
  7. Jan 30, 2024
  8. Nov 30, 2023
  9. Oct 30, 2023
  10. Oct 24, 2023
  11. Oct 16, 2023
  12. Oct 13, 2023
  13. Oct 01, 2023
  14. Sep 06, 2023
  15. Aug 25, 2023
    • gupnik's avatar
      Adds ability to provide defaults for types provided by `construct_runtime` (#14682) · 83ae0180
      gupnik authored
      
      
      * Adds ability to use defaults for verbatim types
      
      * Adds RuntimeOrigin and PalletInfo in DefaultConfig
      
      * Adds RuntimeEvent in DefaultConfig
      
      * Adds RuntimeEvent in DefaultConfig
      
      * Minor fix
      
      * Minor fix
      
      * Everything in frame_system can now have a default
      
      * Adds docs
      
      * Adds UI Test for no_bounds
      
      * Updates docs
      
      * Adds UI tests for verbatim
      
      * Minor update
      
      * Minor updates
      
      * Minor updates
      
      * Addresses review comments
      
      * Fixes test
      
      * Update frame/support/procedural/src/derive_impl.rs
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * Minor fix
      
      * Minor
      
      * Fixes build
      
      * Uses runtime_type
      
      * Fixes comment
      
      * Fixes comment
      
      * Fixes test
      
      * Uses no_aggregated_types as an option in derive_impl
      
      * Uses specific imports
      
      * Fmt
      
      * Updates doc
      
      * Update frame/support/procedural/src/derive_impl.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Update frame/support/procedural/src/derive_impl.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Addresses review comment
      
      * Addresses review comment
      
      * fmt
      
      * Renames test files
      
      * Adds docs using docify
      
      * Fixes test
      
      * Fixes UI tests
      
      ---------
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      83ae0180
  16. Aug 14, 2023
  17. Jul 13, 2023
    • gupnik's avatar
      Moves `Block` to `frame_system` instead of `construct_runtime` and removes... · 5e7b27e9
      gupnik authored
      
      Moves `Block` to `frame_system` instead of `construct_runtime` and removes `Header` and `BlockNumber` (#14437)
      
      * Initial setup
      
      * Adds node block
      
      * Uses UncheckedExtrinsic and removes Where section
      
      * Updates frame_system to use Block
      
      * Adds deprecation warning
      
      * Fixes pallet-timestamp
      
      * Removes Header and BlockNumber
      
      * Addresses review comments
      
      * Addresses review comments
      
      * Adds comment about compiler bug
      
      * Removes where clause
      
      * Refactors code
      
      * Fixes errors in cargo check
      
      * Fixes errors in cargo check
      
      * Fixes warnings in cargo check
      
      * Formatting
      
      * Fixes construct_runtime tests
      
      * Uses import instead of full path for BlockNumber
      
      * Uses import instead of full path for Header
      
      * Formatting
      
      * Fixes construct_runtime tests
      
      * Fixes imports in benchmarks
      
      * Formatting
      
      * Fixes construct_runtime tests
      
      * Formatting
      
      * Minor updates
      
      * Fixes construct_runtime ui tests
      
      * Fixes construct_runtime ui tests with 1.70
      
      * Fixes docs
      
      * Fixes docs
      
      * Adds u128 mock block type
      
      * Fixes split example
      
      * fixes for cumulus
      
      * ".git/.scripts/commands/fmt/fmt.sh"
      
      * Updates new tests
      
      * Fixes fully-qualified path in few places
      
      * Formatting
      
      * Update frame/examples/default-config/src/lib.rs
      
      Co-authored-by: default avatarJuan <[email protected]>
      
      * Update frame/support/procedural/src/construct_runtime/mod.rs
      
      Co-authored-by: default avatarJuan <[email protected]>
      
      * ".git/.scripts/commands/fmt/fmt.sh"
      
      * Addresses some review comments
      
      * Fixes build
      
      * ".git/.scripts/commands/fmt/fmt.sh"
      
      * Update frame/democracy/src/lib.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/democracy/src/lib.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/support/procedural/src/construct_runtime/mod.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/support/procedural/src/construct_runtime/mod.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Addresses review comments
      
      * Updates trait bounds
      
      * Minor fix
      
      * ".git/.scripts/commands/fmt/fmt.sh"
      
      * Removes unnecessary bound
      
      * ".git/.scripts/commands/fmt/fmt.sh"
      
      * Updates test
      
      * Fixes build
      
      * Adds a bound for header
      
      * ".git/.scripts/commands/fmt/fmt.sh"
      
      * Removes where block
      
      * Minor fix
      
      * Minor fix
      
      * Fixes tests
      
      * ".git/.scripts/commands/update-ui/update-ui.sh" 1.70
      
      * Updates test
      
      * Update primitives/runtime/src/traits.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Update primitives/runtime/src/traits.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Updates doc
      
      * Updates doc
      
      ---------
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarJuan <[email protected]>
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      5e7b27e9
  18. Jul 12, 2023
    • Michal Kucharczyk's avatar
      `GenesisBuild<T,I>` deprecated. `BuildGenesisConfig` added. (#14306) · 87d41d0a
      Michal Kucharczyk authored
      
      
      * frame::support: GenesisConfig types for Runtime enabled
      
      * frame::support: macro generating GenesisBuild::build for RuntimeGenesisConfig
      
      * frame: ambiguity BuildStorage vs GenesisBuild fixed
      
      * fix
      
      * RuntimeGenesisBuild added
      
      * Revert "frame: ambiguity BuildStorage vs GenesisBuild fixed"
      
      This reverts commit 950f3d019d0e21c55a739c44cc19cdabd3ff0293.
      
      * Revert "fix"
      
      This reverts commit a2f76dd24e9a16cf9230d45825ed28787211118b.
      
      * Revert "RuntimeGenesisBuild added"
      
      This reverts commit 3c131b618138ced29c01ab8d15d8c6410c9e128b.
      
      * Revert "Revert "frame: ambiguity BuildStorage vs GenesisBuild fixed""
      
      This reverts commit 2b1ecd467231eddec69f8d328039ba48a380da3d.
      
      * Revert "Revert "fix""
      
      This reverts commit fd7fa629adf579d83e30e6ae9fd162637fc45e30.
      
      * Code review suggestions
      
      * frame: BuildGenesisConfig added, BuildGenesis deprecated
      
      * frame: some pallets updated with BuildGenesisConfig
      
      * constuct_runtime: support for BuildGenesisConfig
      
      * frame::support: genesis_build macro supports BuildGenesisConfig
      
      * frame: BuildGenesisConfig added, BuildGenesis deprecated
      
      * Cargo.lock update
      
      * test-runtime: fixes
      
      * Revert "fix"
      
      This reverts commit a2f76dd24e9a16cf9230d45825ed28787211118b.
      
      * Revert "frame: ambiguity BuildStorage vs GenesisBuild fixed"
      
      This reverts commit 950f3d019d0e21c55a739c44cc19cdabd3ff0293.
      
      * self review
      
      * doc fixed
      
      * ui tests fixed
      
      * fmt
      
      * tests fixed
      
      * genesis_build macrto fixed for non-generic GenesisConfig
      
      * BuildGenesisConfig constraints added
      
      * warning fixed
      
      * some duplication removed
      
      * fmt
      
      * fix
      
      * doc tests fix
      
      * doc fix
      
      * cleanup: remove BuildModuleGenesisStorage
      
      * self review comments
      
      * fix
      
      * Update frame/treasury/src/tests.rs
      
      Co-authored-by: default avatarSebastian Kunert <[email protected]>
      
      * Update frame/support/src/traits/hooks.rs
      
      Co-authored-by: default avatarSebastian Kunert <[email protected]>
      
      * doc fix: GenesisBuild exposed
      
      * ".git/.scripts/commands/fmt/fmt.sh"
      
      * frame: more serde(skip) + cleanup
      
      * Update frame/support/src/traits/hooks.rs
      
      Co-authored-by: default avatarDavide Galassi <[email protected]>
      
      * frame: phantom fields moved to the end of structs
      
      * chain-spec: Default::default cleanup
      
      * test-runtime: phantom at the end
      
      * merge master fixes
      
      * fix
      
      * fix
      
      * fix
      
      * fix
      
      * fix (facepalm)
      
      * Update frame/support/procedural/src/pallet/expand/genesis_build.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * fmt
      
      * fix
      
      * fix
      
      ---------
      
      Co-authored-by: parity-processbot <>
      Co-authored-by: default avatarSebastian Kunert <[email protected]>
      Co-authored-by: default avatarDavide Galassi <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      87d41d0a
    • PG Herveou's avatar
      quick updates (#14557) · 49150ee5
      PG Herveou authored
      49150ee5
  19. Jun 14, 2023
  20. May 24, 2023
    • Bastian Köcher's avatar
      HoldReason: Improve usage (#13869) · 05da6d8e
      Bastian Köcher authored
      
      
      * HoldReason: Improve usage
      
      `HoldReason` was switched recently to use the `composite_enum` attribute that will merge the enums
      from all pallets in the runtime to `RuntimeHoldReason`. `pallet-nis` was still requiring that the
      variant was passed as constant to call `hold`. The proper implementation is to use the `HoldReason`
      from inside the pallet directly when calling `hold`. This is done by adding a `RuntimeHoldReason` as
      type to the `Config` trait and requiring that `Currency` is using the same reason. Besides that the
      pr changes the name `HoldIdentifier` in `pallet_balances::Config` to `RuntimeHoldReason`.
      
      * Update frame/nis/src/lib.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Review comment
      
      * Fixes
      
      ---------
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      05da6d8e
  21. May 20, 2023
    • Michal Kucharczyk's avatar
      frame: Enable GenesisConfig in no_std (#14108) · 613420a0
      Michal Kucharczyk authored
      * frame: Default for GenesisConfig in no_std
      
      `Default` for `GenesisConfig` will be required for no_std in no native
      runtime world. It must be possible to instantiate default GenesisConfig
      for pallets and runtime.
      
      * ".git/.scripts/commands/fmt/fmt.sh"
      
      * hash69 in no_std reverted
      
      * derive(DefaultNoBound) for GenesisConfig used when possible
      
      * treasury: derive(Default)
      
      * Cargo.lock update
      
      * genesis_config: compiler error improved
      
      When std feature is not enabled for pallet, the GenesisConfig will be
      defined, but serde::{Serialize,Deserialize} traits will not be
      implemented.
      
      The compiler error indicates the reason of latter errors.
      
      This is temporary and serde traits will be enabled with together with
      `serde` support in frame.
      
      ---------
      
      Co-authored-by: command-bot <>
      613420a0
  22. Apr 27, 2023
  23. Apr 26, 2023
    • Gavin Wood's avatar
      Various minor fixes (#13945) · 781ea7cb
      Gavin Wood authored
      
      
      * Fix: Incorrect implementation of can_reserve check
      
      * Fix: Incorrect migration of consumer counting for existing accounts with frozen amounts
      
      * Fix: Inconsistent implementation between assets can_deposit and new_account
      
      * Fixes
      
      * Fixes
      
      * Another fix
      
      * Update tests.rs
      
      * Update fungible_tests.rs
      
      * Use `can_accrue_consumers` in the body of `can_inc_consumer`
      
      ---------
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: parity-processbot <>
      781ea7cb
  24. Apr 21, 2023
  25. Apr 17, 2023
  26. Apr 11, 2023
  27. Apr 01, 2023
  28. Mar 24, 2023
  29. Mar 18, 2023
    • Gavin Wood's avatar
      Deprecate `Currency`; introduce holds and freezing into `fungible` traits (#12951) · 5d81f23f
      Gavin Wood authored
      
      
      * First reworking of fungibles API
      
      * New API and docs
      
      * More fungible::* API improvements
      
      * New ref-counting logic for old API
      
      * Missing files
      
      * Fixes
      
      * Use the new transfer logic
      
      * Use fungibles for the dispatchables
      
      * Use shelve/restore names
      
      * Locking works with total balance.
      
      * repotting and removal
      
      * Separate Holds from Reserves
      
      * Introduce freezes
      
      * Missing files
      
      * Tests for freezing
      
      * Fix hold+freeze combo
      
      * More tests
      
      * Fee-free dispatchable for upgrading accounts
      
      * Benchmarks and a few fixes
      
      * Another test
      
      * Docs and refactor to avoid blanket impls
      
      * Repot
      
      * Fit out ItemOf fully
      
      * Add events to Balanced traits
      
      * Introduced events into Hold traits
      
      * Fix Assets pallet tests
      
      * Assets benchmarks pass
      
      * Missing files and fixes
      
      * Fixes
      
      * Fixes
      
      * Benchmarks fixes
      
      * Fix balance benchmarks
      
      * Formatting
      
      * Expose fungible sub modules
      
      * Move NIS to fungible API
      
      * Fix broken impl and add test
      
      * Fix tests
      
      * API for `transfer_and_hold`
      
      * Use composite APIs
      
      * Formatting
      
      * Upgraded event
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Repot tests and some fixed
      
      * Fix some bits
      
      * Fix dust tests
      
      * Rename `set_balance`
      
      - `Balances::set_balance` becomes `Balances::force_set_balance`
      - `Unbalanced::set_balance` becomes `Unbalances::write_balance`
      
      * becomes
      
      * Move dust handling to fungibles API
      
      * Formatting
      
      * Fixes and more refactoring
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Use reducible_balance for better correctness on fees
      
      * Reducing hold to zero should remove entry.
      
      * Add test
      
      * Docs
      
      * Update frame/support/src/traits/tokens/fungibles/hold.rs
      
      Co-authored-by: default avatarMuharem Ismailov <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungibles/regular.rs
      
      Co-authored-by: default avatarMuharem Ismailov <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungible/hold.rs
      
      Co-authored-by: default avatarMuharem Ismailov <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungible/regular.rs
      
      Co-authored-by: default avatarMuharem Ismailov <[email protected]>
      
      * Docs
      
      * Docs
      
      * Docs
      
      * Fix NIS benchmarks
      
      * Doc comment
      
      * Remove post_mutation
      
      * Fix some tests
      
      * Fix some grumbles
      
      * Enumify bool args to fungible(s) functions
      
      * Fix up assets and balances
      
      * Formatting
      
      * Fix contracts
      
      * Fix tests & benchmarks build
      
      * Typify minted boolean arg
      
      * Typify on_hold boolean arg; renames
      
      * Fix numerous tests
      
      * Fix dependency issue
      
      * Privatize dangerous API mutate_account
      
      * Fix contracts (@alext - please check this commit)
      
      * Remove println
      
      * Fix tests for contracts
      
      * Fix broken rename
      
      * Fix broken rename
      
      * Fix broken rename
      
      * Docs
      
      * Update frame/support/src/traits/tokens/fungible/hold.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * remove from_ref_time
      
      * Update frame/executive/src/lib.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/executive/src/lib.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Reenable test
      
      * Update frame/support/src/traits/tokens/fungibles/hold.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungible/hold.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungible/hold.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungible/hold.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/support/src/traits/tokens/currency.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/lottery/src/tests.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungible/mod.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungible/regular.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungibles/freeze.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungible/regular.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungibles/hold.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungibles/hold.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungibles/hold.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Rename UnwantedRemoval to UnwantedAccountRemoval
      
      * Docs
      
      * Formatting
      
      * Update frame/balances/src/lib.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update primitives/runtime/src/lib.rs
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * handle_raw_dust oes nothing
      
      * Formatting
      
      * Fixes
      
      * Grumble
      
      * Fixes
      
      * Add test
      
      * Add test
      
      * Tests for reducible_balance
      
      * Fixes
      
      * Fix Salary
      
      * Fixes
      
      * Disable broken test
      
      * Disable nicely
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Rename some events
      
      * Fix nomination pools breakage
      
      * Add compatibility stub for transfer tx
      
      * Reinstate a safely compatible version of Balances set_balance
      
      * Fixes
      
      * Grumble
      
      * Update frame/nis/src/lib.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_balances
      
      * disable flakey tests
      
      * Update frame/balances/src/lib.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Grumbles
      
      * Grumble
      
      ---------
      
      Co-authored-by: default avatarMuharem Ismailov <[email protected]>
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      Co-authored-by: default avatarKian Paimani <[email protected]>
      Co-authored-by: command-bot <>
      5d81f23f
  30. Mar 13, 2023
    • Vivek Pandya's avatar
      Remove use of trait Store from all pallets and deprecate it. (#13535) · 2009821c
      Vivek Pandya authored
      * Remove use of trait Store from staking pallet
      
      * Remove use of trait Store from bounties pallet
      
      * Remove use of trait Store from collective pallet
      
      * Remove use of trait Store from babe pallet
      
      * Remove use of trait Store from assets pallet
      
      * Remove use of trait Store from grandpa pallet
      
      * Remove use of trait Store from balances pallet
      
      * Remove use of trait Store from authorship pallet
      
      * Remove use of trait Store from authority-discovery pallet
      
      * Remove use of trait Store from atomic-swap pallet
      
      * Remove use of trait Store from sudo pallet
      
      * Remove use of trait Store from scheduler pallet
      
      * Remove use of trait Store from scored-pool pallet
      
      * Remove use of trait Store from society pallet
      
      * Remove use of trait Store from lottery pallet
      
      * Remove use of trait Store from executive pallet
      
      * Remove use of trait Store from democracy pallet
      
      * Remove use of trait Store from elections-phragmen pallet
      
      * Remove use of trait Store from indices pallet
      
      * Remove use of trait Store from identity pallet
      
      * Remove use of trait Store from multisig pallet
      
      * Remove use of trait Store from merkle-mountain-range pallet
      
      * Remove use of trait Store from im-online pallet
      
      * Remove use of trait Store from membership pallet
      
      * Remove use of trait Store from nicks pallet
      
      * Remove use of trait Store from session pallet
      
      * Remove use of trait Store from transaction-payment pallet
      
      * Remove use of trait Store from utility pallet
      
      * Remove use of trait Store from child-bounties pallet
      
      * Remove use of trait Store from nis pallet
      
      * Remove use of trait Store from nfts pallet
      
      * Remove use of trait Store from conviction-voting pallet
      
      * Remove use of trait Store from treasury pallet
      
      * Remove use of trait Store from vesting pallet
      
      * Remove use of trait Store from preimage pallet
      
      * Remove use of trait Store from uniques pallet
      
      * Remove use of trait Store from ranked-collective pallet
      
      * Remove use of trait Store from beefy-mmr pallet
      
      * Remove use of trait Store from referenda pallet
      
      * Remove use of trait Store from whitelist pallet
      
      * Remove use of trait Store from alliance pallet
      
      * Remove use of trait Store from nomination-pools pallet
      
      * Remove use of trait Store from state-trie-migration pallet
      
      * Remove use of trait Store from message-queue pallet
      
      * Remove use of trait Store from root-offences pallet
      
      * Remove use of trait Store from root-testing pallet
      
      * Remove use of trait Store from timestamps pallet
      
      * Remove use of trait Store from system pallet
      
      * Remove use of trait Store from offences pallet
      
      * Remove use of trait Store from recovery pallet
      
      * Remove use of trait Store from node-authorization pallet
      
      * Remove use of trait Store from proxy pallet
      
      * Remove use of trait Store from benchmarking pallet
      
      * Remove use of trait Store from bags-list pallet
      
      * Add deprecated warning in store_trait
      
      * Change warning message
      
      * Run cargo fmt
      
      * Fix warning and update tests
      
      * Remove unnecessary allow deprecated
      
      * Remove use of trait Store
      
      * Fix mismatch in expected output
      
      * Minor update to warning message for deprecation of generate_store with Store trait attribute
      
      * Fixes as per review comments
      
      * Fixes as per review suggestions
      
      * Remove use of Store trait from core-fellowship pallet
      
      * Fix type in store_trait.rs
      
      * Fixes as pre review comment
      2009821c
  31. Feb 21, 2023
    • Vivek Pandya's avatar
      Remove years from copyright notes. (#13415) · bc53b9a0
      Vivek Pandya authored
      * Change copyright year to 2023 from 2022
      
      * Fix incorrect update of copyright year
      
      * Remove years from copy right header
      
      * Fix remaining files
      
      * Fix typo in a header and remove update-copyright.sh
      bc53b9a0
  32. Feb 14, 2023
  33. Jan 10, 2023
  34. Dec 12, 2022
  35. Dec 09, 2022
  36. Dec 08, 2022
    • Anthony Alaribe's avatar
      Move LockableCurrency trait to fungibles::Lockable and deprecate LockableCurrency (#12798) · 9a014d1e
      Anthony Alaribe authored
      
      
      * WIP move LockableCurrency to fungibles
      
      * rename Lockable and LockIdentifier to funginbles::*
      
      * fix imports further
      
      * change Lockable from fungible to fungibles
      
      * reintroduce LockableCurrency but marked as deprecated
      
      * fix imports
      
      * fix imports
      
      * cargo fmt
      
      * add allow deprecated warnings
      
      * remove unused benchmark import
      
      * fix some of the docs
      
      * fix failing doctest check
      
      * reexport LockIdentifier and LockableCurrency from support/traits
      
      * reexport LockIdentifier and LockableCurrency from support/traits
      
      * allow using deprecated re-export
      
      * replace LockableCurrency and LockIdentifier with a module alias
      
      * Update frame/support/src/traits/tokens/fungibles/lockable.rs
      
      * Update frame/staking/src/pallet/mod.rs
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * Update frame/support/src/traits.rs
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * REVERT removing fungibles::Lockable import
      
      Co-authored-by: parity-processbot <>
      Co-authored-by: default avatarSquirrel <[email protected]>
      9a014d1e
  37. Dec 05, 2022
    • Bastian Köcher's avatar
      pallet-balances: Fix inactive funds migration (#12840) · 4be3ddaa
      Bastian Köcher authored
      * pallet-balances: Fix inactive funds migration
      
      Fixes the inactive funds migration. It was missing to set the `storage_version` attribute for the
      `Pallet` struct. Besides that it also removes the old `StorageVersion` representation and adds support
      for instances of pallet-balances.
      
      * Fix test
      4be3ddaa
  38. Dec 03, 2022