1. Apr 19, 2024
  2. Apr 18, 2024
  3. Apr 17, 2024
    • Muharem Ismailov's avatar
      Asset Conversion: Pool Touch Call (#3251) · 305d311d
      Muharem Ismailov authored
      Introduce `touch` call designed to address operational prerequisites
      before providing liquidity to a pool.
      
      This function ensures that essential requirements, such as the presence
      of the pool's accounts, are fulfilled. It is particularly beneficial in
      scenarios where a pool creator removes the pool's accounts without
      providing liquidity.
      
      ---------
      
      Co-authored-by: command-bot <>
      305d311d
    • PG Herveou's avatar
      Contracts: Refactor test builder (#4158) · aa78fe21
      PG Herveou authored
      - Moved `substrate/frame/contracts/src/tests/builder.rs` into a pub
      test_utils module, so we can use that in the
      `pallet-contracts-mock-network` tests
      - Refactor xcm tests to use XCM builders, and simplify the use case for
      xcm-send
      aa78fe21
    • Oliver Tale-Yazdi's avatar
      Fix nostd build of several crates (#4060) · 7a2c9d4a
      Oliver Tale-Yazdi authored
      Preparation for https://github.com/paritytech/polkadot-sdk/pull/3935
      
      Changes:
      - Add some `default-features = false` for the case that a crate and that
      dependency both support nostd builds.
      - Shuffle files around of some benchmarking-only crates. These
      conditionally disabled the `cfg_attr` for nostd and pulled in libstd.
      Example [here](https://github.com/ggwpez/zepter/pull/95
      
      ). The actual
      logic is moved into a `inner.rs` to preserve nostd capability of the
      crate in case the benchmarking feature is disabled.
      - Add some `use sp_std::vec` where needed.
      - Remove some `optional = true` in cases where it was not optional.
      - Removed one superfluous `cfg_attr(not(feature = "std"), no_std..`.
      
      All in all this should be logical no-op.
      
      ---------
      
      Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
      7a2c9d4a
    • Alexandru Vasile's avatar
      chainHead: Report unique hashes for pruned blocks (#3667) · bfbf7f5d
      Alexandru Vasile authored
      This PR ensures that the reported pruned blocks are unique.
      
      While at it, ensure that the best block event is properly generated when
      the last best block is a fork that will be pruned in the future.
      
      To achieve this, the chainHead keeps a LRU set of reported pruned blocks
      to ensure the following are not reported twice:
      
      ```bash
      	 finalized -> block 1 -> block 2 -> block 3
      	
      	                      -> block 2 -> block 4 -> block 5
      	
      	           -> block 1 -> block 2_f -> block 6 -> block 7 -> block 8
      ```
      
      When block 7 is finalized the branch [block 2; block 3] is reported as
      pruned.
      When block 8 is finalized the branch [block 2; block 4; block 5] should
      be reported as pruned, however block 2 was already reported as pruned at
      the previous step.
      
      This is a side-effect of the pruned blocks being reported at level N -
      1. For example, if all pruned forks would be reported with the first
      encounter (when block 6 is finalized we know that block 3 and block 5
      are stale), we would not need the LRU cache.
      
      cc @paritytech/subxt-team  
      
      Closes https://github.com/paritytech/polkadot-sdk/issues/3658
      
      
      
      ---------
      
      Signed-off-by: default avatarAlexandru Vasile <[email protected]>
      Co-authored-by: default avatarSebastian Kunert <[email protected]>
      bfbf7f5d
    • thiolliere's avatar
      Improve doc for pallet macro and config macro (#4146) · ca7c01c8
      thiolliere authored
      Improve doc:
      
      * the pallet macro is actually referring to 2 places, for the module and
      for the struct placeholder but doesn't really clarify it (I should have
      named the latter just `pallet_struct` or something but it is a bit late)
      
      * The doc of `with_default` is a bit confusing too IMO.
      
      CC @Kianenigma
      
      
      
      ---------
      
      Co-authored-by: default avatarLiam Aharon <[email protected]>
      ca7c01c8
    • Muharem Ismailov's avatar
      Asset Conversion: Pool Account ID derivation with additional Pallet ID seed (#3250) · 4e10d3b0
      Muharem Ismailov authored
      Introduce `PalletId` as an additional seed parameter for pool's account
      id derivation.
      
      The PR also introduces the `pallet_asset_conversion_ops` pallet with a
      call to migrate a given pool to thew new account. Additionally
      `fungibles::lifetime::ResetTeam` and `fungible::lifetime::Refund`
      traits, to facilitate the migration of pools.
      
      ---------
      
      Co-authored-by: command-bot <>
      4e10d3b0