-
Notifications
You must be signed in to change notification settings - Fork 767
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Asset Conversion: Pool Account ID derivation with additional Pallet I…
…D seed (#3250) 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 <>
- Loading branch information
Showing
31 changed files
with
1,647 additions
and
39 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
...us/parachains/runtimes/assets/asset-hub-rococo/src/weights/pallet_asset_conversion_ops.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
// Copyright (C) Parity Technologies (UK) Ltd. | ||
// This file is part of Cumulus. | ||
|
||
// Cumulus is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
|
||
// Cumulus is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
|
||
// You should have received a copy of the GNU General Public License | ||
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
//! Autogenerated weights for `pallet_asset_conversion_ops` | ||
//! | ||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 | ||
//! DATE: 2024-02-15, STEPS: `10`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` | ||
//! WORST CASE MAP SIZE: `1000000` | ||
//! HOSTNAME: `cob`, CPU: `<UNKNOWN>` | ||
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-rococo-dev")`, DB CACHE: 1024 | ||
// Executed Command: | ||
// ./target/debug/polkadot-parachain | ||
// benchmark | ||
// pallet | ||
// --chain=asset-hub-rococo-dev | ||
// --steps=10 | ||
// --repeat=2 | ||
// --pallet=pallet-asset-conversion-ops | ||
// --extrinsic=* | ||
// --wasm-execution=compiled | ||
// --heap-pages=4096 | ||
// --output=./cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/ | ||
|
||
#![cfg_attr(rustfmt, rustfmt_skip)] | ||
#![allow(unused_parens)] | ||
#![allow(unused_imports)] | ||
#![allow(missing_docs)] | ||
|
||
use frame_support::{traits::Get, weights::Weight}; | ||
use core::marker::PhantomData; | ||
|
||
/// Weight functions for `pallet_asset_conversion_ops`. | ||
pub struct WeightInfo<T>(PhantomData<T>); | ||
impl<T: frame_system::Config> pallet_asset_conversion_ops::WeightInfo for WeightInfo<T> { | ||
/// Storage: `AssetConversion::Pools` (r:1 w:0) | ||
/// Proof: `AssetConversion::Pools` (`max_values`: None, `max_size`: Some(1224), added: 3699, mode: `MaxEncodedLen`) | ||
/// Storage: `System::Account` (r:2 w:2) | ||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) | ||
/// Storage: `ForeignAssets::Account` (r:2 w:2) | ||
/// Proof: `ForeignAssets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`) | ||
/// Storage: `PoolAssets::Account` (r:2 w:2) | ||
/// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) | ||
/// Storage: `PoolAssets::Asset` (r:1 w:1) | ||
/// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) | ||
/// Storage: `ForeignAssets::Asset` (r:1 w:1) | ||
/// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`) | ||
fn migrate_to_new_account() -> Weight { | ||
// Proof Size summary in bytes: | ||
// Measured: `1105` | ||
// Estimated: `7404` | ||
// Minimum execution time: 2_323_000_000 picoseconds. | ||
Weight::from_parts(2_404_000_000, 0) | ||
.saturating_add(Weight::from_parts(0, 7404)) | ||
.saturating_add(T::DbWeight::get().reads(9)) | ||
.saturating_add(T::DbWeight::get().writes(8)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.