From 053a8abf17026a6bf52e42bfab505f149e9f36f0 Mon Sep 17 00:00:00 2001 From: Dhiraj Sah Date: Wed, 4 Feb 2026 18:00:28 +0530 Subject: [PATCH 01/17] use upstream pay module --- system-parachains/asset-hubs/asset-hub-kusama/src/treasury.rs | 4 ++-- .../asset-hubs/asset-hub-polkadot/src/treasury.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/treasury.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/treasury.rs index 17d94c69e7..8eb3caa9fd 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/treasury.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/treasury.rs @@ -38,7 +38,7 @@ parameter_types! { pub TreasuryAccount: AccountId = Treasury::account_id(); } -pub type TreasuryPaymaster = system_parachains_common::pay::LocalPay< +pub type TreasuryPaymaster = parachains_common::pay::LocalPay< NativeAndAssets, TreasuryAccount, xcm_config::LocationToAccountId, @@ -113,7 +113,7 @@ impl pallet_treasury::Config for Runtime { type BalanceConverter = AssetRateWithNative; type PayoutPeriod = PayoutSpendPeriod; #[cfg(feature = "runtime-benchmarks")] - type BenchmarkHelper = system_parachains_common::pay::benchmarks::LocalPayArguments< + type BenchmarkHelper = parachains_common::pay::benchmarks::LocalPayArguments< xcm_config::TrustBackedAssetsPalletIndex, >; type BlockNumberProvider = RelaychainDataProvider; diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/treasury.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/treasury.rs index f8813592db..83327af25d 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/treasury.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/treasury.rs @@ -28,7 +28,7 @@ parameter_types! { pub TreasuryAccount: AccountId = Treasury::account_id(); } -pub type TreasuryPaymaster = system_parachains_common::pay::LocalPay< +pub type TreasuryPaymaster = parachains_common::pay::LocalPay< NativeAndAssets, TreasuryAccount, xcm_config::LocationToAccountId, @@ -53,7 +53,7 @@ impl pallet_treasury::Config for Runtime { type BalanceConverter = AssetRateWithNative; type PayoutPeriod = PayoutSpendPeriod; #[cfg(feature = "runtime-benchmarks")] - type BenchmarkHelper = system_parachains_common::pay::benchmarks::LocalPayArguments< + type BenchmarkHelper = parachains_common::pay::benchmarks::LocalPayArguments< xcm_config::TrustBackedAssetsPalletIndex, >; type BlockNumberProvider = RelaychainDataProvider; From 830b2e331709615932c9aab0410c48389d1b763d Mon Sep 17 00:00:00 2001 From: Dhiraj Sah Date: Wed, 4 Feb 2026 19:30:40 +0530 Subject: [PATCH 02/17] fix: remove local pay moduel deps --- system-parachains/common/Cargo.toml | 23 ----------------------- system-parachains/common/src/lib.rs | 1 - 2 files changed, 24 deletions(-) diff --git a/system-parachains/common/Cargo.toml b/system-parachains/common/Cargo.toml index 0856d81617..e0eb361def 100644 --- a/system-parachains/common/Cargo.toml +++ b/system-parachains/common/Cargo.toml @@ -15,19 +15,12 @@ scale-info = { features = ["derive"], workspace = true } sp-runtime = { workspace = true } sp-state-machine = { workspace = true } sp-api = { workspace = true } -sp-core = { workspace = true } frame-support = { workspace = true } cumulus-pallet-parachain-system = { workspace = true } cumulus-primitives-core = { workspace = true } polkadot-primitives = { workspace = true } -parachains-common = { workspace = true } -polkadot-runtime-common = { workspace = true } -xcm = { workspace = true } -xcm-executor = { workspace = true } -pallet-treasury = { workspace = true, optional = true } - [features] default = ["std"] std = [ @@ -36,38 +29,22 @@ std = [ "cumulus-primitives-core/std", "frame-support/std", "log/std", - "pallet-treasury/std", - "parachains-common/std", "polkadot-primitives/std", - "polkadot-runtime-common/std", - "scale-info/std", "sp-api/std", - "sp-core/std", "sp-runtime/std", "sp-state-machine/std", - "xcm-executor/std", - "xcm/std", ] runtime-benchmarks = [ "cumulus-pallet-parachain-system/runtime-benchmarks", "cumulus-primitives-core/runtime-benchmarks", "frame-support/runtime-benchmarks", - "pallet-treasury", - "pallet-treasury/runtime-benchmarks", - "parachains-common/runtime-benchmarks", "polkadot-primitives/runtime-benchmarks", - "polkadot-runtime-common/runtime-benchmarks", "sp-runtime/runtime-benchmarks", - "xcm-executor/runtime-benchmarks", - "xcm/runtime-benchmarks", ] try-runtime = [ "cumulus-pallet-parachain-system/try-runtime", "frame-support/try-runtime", - "pallet-treasury/try-runtime", - "parachains-common/try-runtime", - "polkadot-runtime-common/try-runtime", "sp-runtime/try-runtime", ] diff --git a/system-parachains/common/src/lib.rs b/system-parachains/common/src/lib.rs index 0e9ba72580..4ba771b718 100644 --- a/system-parachains/common/src/lib.rs +++ b/system-parachains/common/src/lib.rs @@ -17,7 +17,6 @@ //! Shared types between system-parachains runtimes. #![cfg_attr(not(feature = "std"), no_std)] -pub mod pay; pub mod randomness; /// Extra runtime APIs. From 7e7a72cb09514e2f27f1934b907179b243ffc3ce Mon Sep 17 00:00:00 2001 From: Dhiraj Sah Date: Wed, 4 Feb 2026 19:31:05 +0530 Subject: [PATCH 03/17] fix : remove local pay module implementation --- system-parachains/common/src/pay.rs | 150 ---------------------------- 1 file changed, 150 deletions(-) delete mode 100644 system-parachains/common/src/pay.rs diff --git a/system-parachains/common/src/pay.rs b/system-parachains/common/src/pay.rs deleted file mode 100644 index 4fe6cdc832..0000000000 --- a/system-parachains/common/src/pay.rs +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Cumulus. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//! Local implementation of the pay module with V3 to V5 conversion support. -//! This is a temporary fix until the changes are merged into polkadot-sdk. - -// TODO (issue #1027): remove this module and import it from polkadot-sdk instead - -use frame_support::traits::{ - fungibles, - tokens::{PaymentStatus, Preservation}, -}; -use parachains_common::pay::VersionedLocatableAccount; -use polkadot_runtime_common::impls::VersionedLocatableAsset; -use sp_runtime::{traits::TypedGet, DispatchError}; -use xcm::latest::prelude::*; -use xcm_executor::traits::ConvertLocation; - -/// Pay on the local chain with `fungibles` implementation if the beneficiary and the asset are both -/// local. -pub struct LocalPay(core::marker::PhantomData<(F, A, C)>); -impl frame_support::traits::tokens::Pay for LocalPay -where - A: TypedGet, - F: fungibles::Mutate + fungibles::Create, - C: ConvertLocation, - A::Type: Eq + Clone, -{ - type Balance = F::Balance; - type Beneficiary = VersionedLocatableAccount; - type AssetKind = VersionedLocatableAsset; - type Id = QueryId; - type Error = DispatchError; - fn pay( - who: &Self::Beneficiary, - asset: Self::AssetKind, - amount: Self::Balance, - ) -> Result { - let who = Self::match_location(who).map_err(|_| DispatchError::Unavailable)?; - let asset = Self::match_asset(&asset).map_err(|_| DispatchError::Unavailable)?; - >::transfer( - asset, - &A::get(), - &who, - amount, - Preservation::Expendable, - )?; - // We use `QueryId::MAX` as a constant identifier for these payments since they are always - // processed immediately and successfully on the local chain. The `QueryId` type is used to - // maintain compatibility with XCM payment implementations. - Ok(Self::Id::MAX) // Should return a unique identifier for the payment. - } - fn check_payment(_: Self::Id) -> PaymentStatus { - PaymentStatus::Success - } - #[cfg(feature = "runtime-benchmarks")] - fn ensure_successful(_: &Self::Beneficiary, asset: Self::AssetKind, amount: Self::Balance) { - let asset = Self::match_asset(&asset).expect("invalid asset"); - >::create(asset.clone(), A::get(), true, amount).unwrap(); - >::mint_into(asset, &A::get(), amount).unwrap(); - } - #[cfg(feature = "runtime-benchmarks")] - fn ensure_concluded(_: Self::Id) {} -} - -impl LocalPay -where - A: TypedGet, - F: fungibles::Mutate + fungibles::Create, - C: ConvertLocation, - A::Type: Eq + Clone, -{ - fn match_location(who: &VersionedLocatableAccount) -> Result { - // only applicable for the local accounts - let account_id = match who { - VersionedLocatableAccount::V4 { location, account_id } if location.is_here() => - &account_id.clone().try_into().map_err(|_| ())?, - VersionedLocatableAccount::V5 { location, account_id } if location.is_here() => - account_id, - _ => return Err(()), - }; - C::convert_location(account_id).ok_or(()) - } - fn match_asset(asset: &VersionedLocatableAsset) -> Result { - match asset { - VersionedLocatableAsset::V3 { location, asset_id } if location.is_here() => { - // Convert V3 asset_id to V5 Location (must go through V4) - let v4_asset_id: xcm::v4::AssetId = (*asset_id).try_into().map_err(|_| ())?; - let v5_asset_id: xcm::v5::AssetId = v4_asset_id.try_into().map_err(|_| ())?; - Ok(v5_asset_id.0) - }, - VersionedLocatableAsset::V4 { location, asset_id } if location.is_here() => - asset_id.clone().try_into().map(|a: xcm::v5::AssetId| a.0).map_err(|_| ()), - VersionedLocatableAsset::V5 { location, asset_id } if location.is_here() => - Ok(asset_id.clone().0), - _ => Err(()), - } - } -} - -#[cfg(feature = "runtime-benchmarks")] -pub mod benchmarks { - use super::*; - use core::marker::PhantomData; - use frame_support::traits::Get; - use pallet_treasury::ArgumentsFactory as TreasuryArgumentsFactory; - use sp_core::ConstU8; - - /// Provides factory methods for the `AssetKind` and the `Beneficiary` that are applicable for - /// the payout made by [`LocalPay`]. - /// - /// ### Parameters: - /// - `PalletId`: The ID of the assets registry pallet. - /// - `AssetId`: The ID of the asset that will be created for the benchmark within `PalletId`. - pub struct LocalPayArguments>(PhantomData); - impl> - TreasuryArgumentsFactory - for LocalPayArguments - { - fn create_asset_kind(seed: u32) -> VersionedLocatableAsset { - VersionedLocatableAsset::V5 { - location: Location::new(0, []), - asset_id: Location::new( - 0, - [PalletInstance(PalletId::get()), GeneralIndex(seed.into())], - ) - .into(), - } - } - fn create_beneficiary(seed: [u8; 32]) -> VersionedLocatableAccount { - VersionedLocatableAccount::V5 { - location: Location::new(0, []), - account_id: Location::new(0, [AccountId32 { network: None, id: seed }]), - } - } - } -} From 36a3f4b7cddda81ad62acdaa9f7e3aaa66bb252b Mon Sep 17 00:00:00 2001 From: Dhiraj Sah Date: Wed, 4 Feb 2026 23:55:50 +0530 Subject: [PATCH 04/17] feat: multi-asset-bounties added to KAH --- .../asset-hubs/asset-hub-kusama/Cargo.toml | 4 ++ .../asset-hubs/asset-hub-kusama/src/lib.rs | 4 ++ .../asset-hub-kusama/src/treasury.rs | 64 ++++++++++++++++++- .../asset-hub-kusama/src/weights/mod.rs | 1 + .../weights/pallet_multi_asset_bounties.rs | 3 + 5 files changed, 74 insertions(+), 2 deletions(-) create mode 100644 system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_multi_asset_bounties.rs diff --git a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml index 68752dfebf..e06a5fd20e 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml @@ -56,6 +56,7 @@ pallet-indices = { workspace = true } pallet-message-queue = { workspace = true } pallet-migrations = { workspace = true } pallet-multisig = { workspace = true } +pallet-multi-asset-bounties = { workspace = true } pallet-nomination-pools = { workspace = true } pallet-nft-fractionalization = { workspace = true } pallet-nfts = { workspace = true } @@ -199,6 +200,7 @@ runtime-benchmarks = [ "pallet-message-queue/runtime-benchmarks", "pallet-migrations/runtime-benchmarks", "pallet-multisig/runtime-benchmarks", + "pallet-multi-asset-bounties/runtime-benchmarks", "pallet-nft-fractionalization/runtime-benchmarks", "pallet-nfts/runtime-benchmarks", "pallet-nomination-pools-benchmarking/runtime-benchmarks", @@ -278,6 +280,7 @@ try-runtime = [ "pallet-message-queue/try-runtime", "pallet-migrations/try-runtime", "pallet-multisig/try-runtime", + "pallet-multi-asset-bounties/try-runtime", "pallet-nft-fractionalization/try-runtime", "pallet-nfts/try-runtime", "pallet-nomination-pools/try-runtime", @@ -366,6 +369,7 @@ std = [ "pallet-message-queue/std", "pallet-migrations/std", "pallet-multisig/std", + "pallet-multi-asset-bounties/std", "pallet-nft-fractionalization/std", "pallet-nfts-runtime-api/std", "pallet-nfts/std", diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index f618a823e7..612777086f 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -654,6 +654,7 @@ impl InstanceFilter for ProxyType { RuntimeCall::Treasury(..) | RuntimeCall::Bounties(..) | RuntimeCall::ChildBounties(..) | + RuntimeCall::MultiAssetBounties(..) | RuntimeCall::ConvictionVoting(..) | RuntimeCall::Referenda(..) | // Not on AH RuntimeCall::FellowshipCollective(..) | @@ -690,6 +691,7 @@ impl InstanceFilter for ProxyType { RuntimeCall::Bounties(..) | RuntimeCall::Utility(..) | RuntimeCall::ChildBounties(..) | + RuntimeCall::MultiAssetBounties(..) | // OpenGov calls RuntimeCall::ConvictionVoting(..) | RuntimeCall::Referenda(..) | @@ -1693,6 +1695,7 @@ construct_runtime!( Bounties: pallet_bounties = 95, ChildBounties: pallet_child_bounties = 96, AssetRate: pallet_asset_rate = 97, + MultiAssetBounties: pallet_multi_asset_bounties = 98, // Asset Hub Migration in the 250s AhOps: pallet_ah_ops = 254, @@ -1902,6 +1905,7 @@ mod benches { [pallet_whitelist, Whitelist] [pallet_bounties, Bounties] [pallet_child_bounties, ChildBounties] + [pallet_multi_asset_bounties, MultiAssetBounties] [pallet_asset_rate, AssetRate] [pallet_ah_migrator, AhMigrator] [pallet_indices, Indices] diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/treasury.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/treasury.rs index 8eb3caa9fd..254435d090 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/treasury.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/treasury.rs @@ -20,9 +20,11 @@ use super::*; use crate::governance::{Treasurer, TreasurySpender}; use frame_support::traits::{ - tokens::UnityOrOuterConversion, Currency, FromContains, Get, OnUnbalanced, + fungible::HoldConsideration, + tokens::{UnityOrOuterConversion, ConversionFromAssetBalance, ConversionToAssetBalance}, + Currency, FromContains, Get, OnUnbalanced, }; -use parachains_common::pay::VersionedLocatableAccount; +use parachains_common::pay::{AccountIdToLocalLocation, LocalPay, VersionedLocatableAccount}; use polkadot_runtime_common::impls::{ContainsParts, VersionedLocatableAsset}; use scale_info::TypeInfo; use sp_runtime::traits::IdentityLookup; @@ -162,6 +164,64 @@ impl pallet_child_bounties::Config for Runtime { type WeightInfo = weights::pallet_child_bounties::WeightInfo; } +parameter_types! { + pub const MultiAssetBountyValueMinimum: Balance = 200 * CENTS; + pub const MultiAssetChildBountyValueMinimum: Balance = MultiAssetBountyValueMinimum::get() / 10; + pub const MultiAssetMaxActiveChildBountyCount: u32 = 100; + pub const MultiAssetCuratorHoldReason: RuntimeHoldReason = + RuntimeHoldReason::MultiAssetBounties(pallet_multi_asset_bounties::HoldReason::CuratorDeposit); + pub const MultiAssetCuratorDepositFromValueMultiplier: Permill = Permill::from_percent(50); + pub const MultiAssetCuratorDepositMin: Balance = 10 * CENTS; + pub const MultiAssetCuratorDepositMax: Balance = 500 * CENTS; +} + +impl pallet_multi_asset_bounties::Config for Runtime { + type Balance = Balance; + type RejectOrigin = EitherOfDiverse, Treasurer>; + type SpendOrigin = TreasurySpender; + type AssetKind = VersionedLocatableAsset; + type Beneficiary = VersionedLocatableAccount; + type BeneficiaryLookup = IdentityLookup; + type BountyValueMinimum = MultiAssetBountyValueMinimum; + type ChildBountyValueMinimum = MultiAssetChildBountyValueMinimum; + type MaxActiveChildBountyCount = MultiAssetMaxActiveChildBountyCount; + type WeightInfo = weights::pallet_multi_asset_bounties::WeightInfo; // todo @dhiraj + type FundingSource = pallet_multi_asset_bounties::PalletIdAsFundingSource< + TreasuryPalletId, + Runtime, + AccountIdToLocalLocation, + >; + type BountySource = pallet_multi_asset_bounties::BountySourceFromPalletId< + TreasuryPalletId, + Runtime, + AccountIdToLocalLocation, + >; + type ChildBountySource = pallet_multi_asset_bounties::ChildBountySourceFromPalletId< + TreasuryPalletId, + Runtime, + AccountIdToLocalLocation, + >; + type Paymaster = LocalPay; + type BalanceConverter = AssetRateWithNative; + type Preimages = Preimage; + type Consideration = HoldConsideration< + AccountId, + Balances, + MultiAssetCuratorHoldReason, + pallet_multi_asset_bounties::CuratorDepositAmount< + MultiAssetCuratorDepositFromValueMultiplier, + MultiAssetCuratorDepositMin, + MultiAssetCuratorDepositMax, + Balance, + >, + Balance, + >; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = system_parachains_common::pay::benchmarks::LocalPayWithSourceArguments< + xcm_config::TrustBackedAssetsPalletIndex, + >; +} + /// The [frame_support::traits::tokens::ConversionFromAssetBalance] implementation provided by the /// `AssetRate` pallet instance. /// diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/mod.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/mod.rs index a082cf3bc8..5353ee45a5 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/mod.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/mod.rs @@ -30,6 +30,7 @@ pub mod pallet_assets_pool; pub mod pallet_balances; pub mod pallet_bounties; pub mod pallet_child_bounties; +pub mod pallet_multi_asset_bounties; pub mod pallet_collator_selection; pub mod pallet_conviction_voting; pub mod pallet_message_queue; diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_multi_asset_bounties.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_multi_asset_bounties.rs new file mode 100644 index 0000000000..b28b04f643 --- /dev/null +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_multi_asset_bounties.rs @@ -0,0 +1,3 @@ + + + From f763d3d8a3731783d94aff94cbc4712f76813b83 Mon Sep 17 00:00:00 2001 From: Dhiraj Sah Date: Thu, 5 Feb 2026 00:01:00 +0530 Subject: [PATCH 05/17] dep: add create multi asset bounties --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index 611e8432d2..2549e663e3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -143,6 +143,7 @@ pallet-insecure-randomness-collective-flip = { version = "33.0.0", default-featu pallet-membership = { version = "45.0.0", default-features = false } pallet-message-queue = { version = "48.0.0", default-features = false } pallet-mmr = { version = "45.0.0", default-features = false } +pallet-multi-asset-bounties = { version = "0.2.1", default-features = false } pallet-multisig = { version = "45.0.0", default-features = false } pallet-nft-fractionalization = { version = "29.0.0", default-features = false } pallet-nfts = { version = "39.0.0", default-features = false } From 16a09eba603e32b793ee6a4cd8d37cf31fa1847f Mon Sep 17 00:00:00 2001 From: Dhiraj Sah Date: Fri, 6 Feb 2026 18:28:35 +0530 Subject: [PATCH 06/17] fix: clippy --- .../asset-hub-kusama/src/treasury.rs | 6 +++--- .../asset-hub-kusama/src/weights/mod.rs | 2 +- .../src/weights/pallet_multi_asset_bounties.rs | 18 ++++++++++++++++++ 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/treasury.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/treasury.rs index 254435d090..9db02f36e5 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/treasury.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/treasury.rs @@ -21,7 +21,7 @@ use super::*; use crate::governance::{Treasurer, TreasurySpender}; use frame_support::traits::{ fungible::HoldConsideration, - tokens::{UnityOrOuterConversion, ConversionFromAssetBalance, ConversionToAssetBalance}, + tokens::{ConversionFromAssetBalance, ConversionToAssetBalance, UnityOrOuterConversion}, Currency, FromContains, Get, OnUnbalanced, }; use parachains_common::pay::{AccountIdToLocalLocation, LocalPay, VersionedLocatableAccount}; @@ -216,8 +216,8 @@ impl pallet_multi_asset_bounties::Config for Runtime { >, Balance, >; - #[cfg(feature = "runtime-benchmarks")] - type BenchmarkHelper = system_parachains_common::pay::benchmarks::LocalPayWithSourceArguments< + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = parachains_common::pay::benchmarks::LocalPayWithSourceArguments< xcm_config::TrustBackedAssetsPalletIndex, >; } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/mod.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/mod.rs index 5353ee45a5..805b96dc62 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/mod.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/mod.rs @@ -30,11 +30,11 @@ pub mod pallet_assets_pool; pub mod pallet_balances; pub mod pallet_bounties; pub mod pallet_child_bounties; -pub mod pallet_multi_asset_bounties; pub mod pallet_collator_selection; pub mod pallet_conviction_voting; pub mod pallet_message_queue; pub mod pallet_migrations; +pub mod pallet_multi_asset_bounties; pub mod pallet_multisig; pub mod pallet_nft_fractionalization; pub mod pallet_nfts; diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_multi_asset_bounties.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_multi_asset_bounties.rs index b28b04f643..025f925c2e 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_multi_asset_bounties.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_multi_asset_bounties.rs @@ -1,3 +1,21 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//! Weights for `pallet_multi_asset_bounties` +//! +//! Using default substrate weights until benchmarks are generated. +pub use pallet_multi_asset_bounties::weights::SubstrateWeight as WeightInfo; From 2dc68086a0ad6dad56afa8f47a8a007f3dd1ebb6 Mon Sep 17 00:00:00 2001 From: Dhiraj Sah Date: Fri, 6 Feb 2026 19:16:42 +0530 Subject: [PATCH 07/17] fix: fmt and clippy --- system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml | 2 +- .../asset-hub-kusama/src/ah_migration/call_filter.rs | 2 ++ .../asset-hubs/asset-hub-kusama/src/treasury.rs | 5 ++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml index e06a5fd20e..15d6b2b20c 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml @@ -56,7 +56,7 @@ pallet-indices = { workspace = true } pallet-message-queue = { workspace = true } pallet-migrations = { workspace = true } pallet-multisig = { workspace = true } -pallet-multi-asset-bounties = { workspace = true } +pallet-multi-asset-bounties = { workspace = true } pallet-nomination-pools = { workspace = true } pallet-nft-fractionalization = { workspace = true } pallet-nfts = { workspace = true } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/ah_migration/call_filter.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/ah_migration/call_filter.rs index 35ba2fab5b..ee7049f28e 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/ah_migration/call_filter.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/ah_migration/call_filter.rs @@ -97,6 +97,7 @@ pub fn call_allowed_status( Bounties(..) => OFF, ChildBounties(..) => OFF, Claims(..) => OFF, + MultiAssetBounties(..) => OFF, CollatorSelection(..) => ON, // Why? ConvictionVoting(..) => OFF, CumulusXcm(..) => OFF, /* Empty call enum, see https://github.com/paritytech/polkadot-sdk/issues/8222 */ @@ -172,6 +173,7 @@ pub fn call_allowed_before_migration( // Governance disabled before migration starts. Bounties(..) => OFF, ChildBounties(..) => OFF, + MultiAssetBounties(..) => OFF, ConvictionVoting(..) => OFF, Referenda(..) => OFF, Treasury(..) => OFF, diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/treasury.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/treasury.rs index 9db02f36e5..6f5d5188fd 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/treasury.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/treasury.rs @@ -20,9 +20,8 @@ use super::*; use crate::governance::{Treasurer, TreasurySpender}; use frame_support::traits::{ - fungible::HoldConsideration, - tokens::{ConversionFromAssetBalance, ConversionToAssetBalance, UnityOrOuterConversion}, - Currency, FromContains, Get, OnUnbalanced, + fungible::HoldConsideration, tokens::UnityOrOuterConversion, Currency, FromContains, Get, + OnUnbalanced, }; use parachains_common::pay::{AccountIdToLocalLocation, LocalPay, VersionedLocatableAccount}; use polkadot_runtime_common::impls::{ContainsParts, VersionedLocatableAsset}; From 36c8c919ac0b9f90615815f125aee349d9eb13a9 Mon Sep 17 00:00:00 2001 From: Dhiraj Sah Date: Fri, 6 Feb 2026 19:25:50 +0530 Subject: [PATCH 08/17] bump spec version of KAH --- system-parachains/asset-hubs/asset-hub-kusama/src/treasury.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/treasury.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/treasury.rs index 6f5d5188fd..6515f0234b 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/treasury.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/treasury.rs @@ -184,7 +184,7 @@ impl pallet_multi_asset_bounties::Config for Runtime { type BountyValueMinimum = MultiAssetBountyValueMinimum; type ChildBountyValueMinimum = MultiAssetChildBountyValueMinimum; type MaxActiveChildBountyCount = MultiAssetMaxActiveChildBountyCount; - type WeightInfo = weights::pallet_multi_asset_bounties::WeightInfo; // todo @dhiraj + type WeightInfo = weights::pallet_multi_asset_bounties::WeightInfo; type FundingSource = pallet_multi_asset_bounties::PalletIdAsFundingSource< TreasuryPalletId, Runtime, From 8966f2ca4ebc4895fb181a6ff5d6d35fe7a7b2ab Mon Sep 17 00:00:00 2001 From: Dhiraj Sah Date: Fri, 6 Feb 2026 20:41:14 +0530 Subject: [PATCH 09/17] fix: add cargo.lock --- Cargo.lock | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5889379526..911eb5f018 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1110,6 +1110,7 @@ dependencies = [ "pallet-indices", "pallet-message-queue", "pallet-migrations", + "pallet-multi-asset-bounties", "pallet-multisig", "pallet-nft-fractionalization", "pallet-nfts", @@ -17920,18 +17921,12 @@ dependencies = [ "cumulus-primitives-core", "frame-support", "log", - "pallet-treasury", - "parachains-common", "parity-scale-codec", "polkadot-primitives", - "polkadot-runtime-common", "scale-info", "sp-api 40.0.0", - "sp-core 39.0.0", "sp-runtime 45.0.0", "sp-state-machine 0.49.0", - "staging-xcm", - "staging-xcm-executor", ] [[package]] From 12b77cefcb41fa9d1637dc1664a09d0ed89b32f3 Mon Sep 17 00:00:00 2001 From: Dhiraj Sah Date: Fri, 6 Feb 2026 20:57:08 +0530 Subject: [PATCH 10/17] fix: taplo and zepter --- .../asset-hubs/asset-hub-kusama/Cargo.toml | 12 ++++++++---- system-parachains/common/Cargo.toml | 1 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml index 15d6b2b20c..a26f1237b1 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml @@ -199,8 +199,8 @@ runtime-benchmarks = [ "pallet-indices/runtime-benchmarks", "pallet-message-queue/runtime-benchmarks", "pallet-migrations/runtime-benchmarks", - "pallet-multisig/runtime-benchmarks", "pallet-multi-asset-bounties/runtime-benchmarks", + "pallet-multisig/runtime-benchmarks", "pallet-nft-fractionalization/runtime-benchmarks", "pallet-nfts/runtime-benchmarks", "pallet-nomination-pools-benchmarking/runtime-benchmarks", @@ -279,8 +279,8 @@ try-runtime = [ "pallet-indices/try-runtime", "pallet-message-queue/try-runtime", "pallet-migrations/try-runtime", - "pallet-multisig/try-runtime", "pallet-multi-asset-bounties/try-runtime", + "pallet-multisig/try-runtime", "pallet-nft-fractionalization/try-runtime", "pallet-nfts/try-runtime", "pallet-nomination-pools/try-runtime", @@ -368,8 +368,8 @@ std = [ "pallet-indices/std", "pallet-message-queue/std", "pallet-migrations/std", - "pallet-multisig/std", "pallet-multi-asset-bounties/std", + "pallet-multisig/std", "pallet-nft-fractionalization/std", "pallet-nfts-runtime-api/std", "pallet-nfts/std", @@ -445,4 +445,8 @@ metadata-hash = ["substrate-wasm-builder?/metadata-hash"] # A feature that should be enabled when the runtime should be built for on-chain # deployment. This will disable stuff that shouldn't be part of the on-chain wasm # to make it smaller, like logging for example. -on-chain-release-build = ["kusama-ahm", "metadata-hash", "sp-api/disable-logging"] +on-chain-release-build = [ + "kusama-ahm", + "metadata-hash", + "sp-api/disable-logging", +] diff --git a/system-parachains/common/Cargo.toml b/system-parachains/common/Cargo.toml index e0eb361def..e8dc63c7a7 100644 --- a/system-parachains/common/Cargo.toml +++ b/system-parachains/common/Cargo.toml @@ -30,6 +30,7 @@ std = [ "frame-support/std", "log/std", "polkadot-primitives/std", + "scale-info/std", "sp-api/std", "sp-runtime/std", "sp-state-machine/std", From e98be386908172679ed17d3af8667b4f77587c14 Mon Sep 17 00:00:00 2001 From: Dhiraj Sah Date: Mon, 9 Feb 2026 21:04:29 +0530 Subject: [PATCH 11/17] feat: add multi asset bounties pallet to assset hub polkadot --- Cargo.lock | 1 + .../asset-hubs/asset-hub-polkadot/Cargo.toml | 4 ++ .../src/ah_migration/call_filter.rs | 2 + .../asset-hubs/asset-hub-polkadot/src/lib.rs | 2 + .../asset-hub-polkadot/src/treasury.rs | 66 ++++++++++++++++++- .../asset-hub-polkadot/src/weights/mod.rs | 1 + .../weights/pallet_multi_asset_bounties.rs | 21 ++++++ 7 files changed, 94 insertions(+), 3 deletions(-) create mode 100644 system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_multi_asset_bounties.rs diff --git a/Cargo.lock b/Cargo.lock index 911eb5f018..8fe45ba974 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1297,6 +1297,7 @@ dependencies = [ "pallet-election-provider-multi-block", "pallet-indices", "pallet-message-queue", + "pallet-multi-asset-bounties", "pallet-multisig", "pallet-nfts", "pallet-nfts-runtime-api", diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml index 4ff3d7355f..e75ff88241 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml @@ -56,6 +56,7 @@ pallet-conviction-voting = { workspace = true } pallet-indices = { workspace = true } pallet-message-queue = { workspace = true } pallet-multisig = { workspace = true } +pallet-multi-asset-bounties = { workspace = true } pallet-nfts = { workspace = true } pallet-nfts-runtime-api = { workspace = true } pallet-parameters = { workspace = true } @@ -204,6 +205,7 @@ runtime-benchmarks = [ "pallet-election-provider-multi-block/runtime-benchmarks", "pallet-indices/runtime-benchmarks", "pallet-message-queue/runtime-benchmarks", + "pallet-multi-asset-bounties/runtime-benchmarks", "pallet-multisig/runtime-benchmarks", "pallet-nfts/runtime-benchmarks", "pallet-nomination-pools-benchmarking/runtime-benchmarks", @@ -282,6 +284,7 @@ try-runtime = [ "pallet-election-provider-multi-block/try-runtime", "pallet-indices/try-runtime", "pallet-message-queue/try-runtime", + "pallet-multi-asset-bounties/try-runtime", "pallet-multisig/try-runtime", "pallet-nfts/try-runtime", "pallet-nomination-pools/try-runtime", @@ -371,6 +374,7 @@ std = [ "pallet-election-provider-multi-block/std", "pallet-indices/std", "pallet-message-queue/std", + "pallet-multi-asset-bounties/std", "pallet-multisig/std", "pallet-nfts-runtime-api/std", "pallet-nfts/std", diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/ah_migration/call_filter.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/ah_migration/call_filter.rs index 68bc41a520..41f3774875 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/ah_migration/call_filter.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/ah_migration/call_filter.rs @@ -96,6 +96,7 @@ pub fn call_allowed_status( Balances(..) => ON, // no reason to disable it, just convenience Bounties(..) => OFF, ChildBounties(..) => OFF, + MultiAssetBounties(..) => OFF, Claims(..) => OFF, CollatorSelection(..) => ON, // Why? ConvictionVoting(..) => OFF, @@ -171,6 +172,7 @@ pub fn call_allowed_before_migration( // Governance disabled before migration starts. Bounties(..) => OFF, ChildBounties(..) => OFF, + MultiAssetBounties(..) => OFF, ConvictionVoting(..) => OFF, Referenda(..) => OFF, Treasury(..) => OFF, diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index 8b2cf0d780..435c61ca1d 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -1549,6 +1549,7 @@ construct_runtime!( Bounties: pallet_bounties = 65, ChildBounties: pallet_child_bounties = 66, AssetRate: pallet_asset_rate = 67, + MultiAssetBounties: pallet_multi_asset_bounties = 68, // State trie migration pallet, only temporary. StateTrieMigration: pallet_state_trie_migration = 70, @@ -1769,6 +1770,7 @@ mod benches { [pallet_bounties, Bounties] [pallet_child_bounties, ChildBounties] [pallet_asset_rate, AssetRate] + [pallet_multi_asset_bounties, MultiAssetBounties] [pallet_ah_migrator, AhMigrator] [pallet_indices, Indices] [polkadot_runtime_common::claims, Claims] diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/treasury.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/treasury.rs index 83327af25d..82e65d3284 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/treasury.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/treasury.rs @@ -13,9 +13,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::*; -use frame_support::traits::{tokens::UnityOrOuterConversion, FromContains}; -use parachains_common::pay::VersionedLocatableAccount; +use crate::{governance::Treasurer, *}; +use frame_support::traits::{ + fungible::HoldConsideration, tokens::UnityOrOuterConversion, FromContains, +}; +use parachains_common::pay::{AccountIdToLocalLocation, LocalPay, VersionedLocatableAccount}; use polkadot_runtime_common::impls::{ContainsParts, VersionedLocatableAsset}; parameter_types! { @@ -102,6 +104,64 @@ impl pallet_child_bounties::Config for Runtime { type WeightInfo = weights::pallet_child_bounties::WeightInfo; } +parameter_types! { + pub const MultiAssetBountyValueMinimum: Balance = 10 * DOLLARS; + pub const MultiAssetChildBountyValueMinimum: Balance = MultiAssetBountyValueMinimum::get() / 10; + pub const MultiAssetMaxActiveChildBountyCount: u32 = 100; + pub const MultiAssetCuratorHoldReason: RuntimeHoldReason = + RuntimeHoldReason::MultiAssetBounties(pallet_multi_asset_bounties::HoldReason::CuratorDeposit); + pub const MultiAssetCuratorDepositFromValueMultiplier: Permill = Permill::from_percent(50); + pub const MultiAssetCuratorDepositMin: Balance = 10 * DOLLARS; + pub const MultiAssetCuratorDepositMax: Balance = 200 * DOLLARS; +} + +impl pallet_multi_asset_bounties::Config for Runtime { + type Balance = Balance; + type RejectOrigin = EitherOfDiverse, Treasurer>; + type SpendOrigin = TreasurySpender; + type AssetKind = VersionedLocatableAsset; + type Beneficiary = VersionedLocatableAccount; + type BeneficiaryLookup = IdentityLookup; + type BountyValueMinimum = MultiAssetBountyValueMinimum; + type ChildBountyValueMinimum = MultiAssetChildBountyValueMinimum; + type MaxActiveChildBountyCount = MultiAssetMaxActiveChildBountyCount; + type WeightInfo = weights::pallet_multi_asset_bounties::WeightInfo; + type FundingSource = pallet_multi_asset_bounties::PalletIdAsFundingSource< + TreasuryPalletId, + Runtime, + AccountIdToLocalLocation, + >; + type BountySource = pallet_multi_asset_bounties::BountySourceFromPalletId< + TreasuryPalletId, + Runtime, + AccountIdToLocalLocation, + >; + type ChildBountySource = pallet_multi_asset_bounties::ChildBountySourceFromPalletId< + TreasuryPalletId, + Runtime, + AccountIdToLocalLocation, + >; + type Paymaster = LocalPay; + type BalanceConverter = AssetRateWithNative; + type Preimages = Preimage; + type Consideration = HoldConsideration< + AccountId, + Balances, + MultiAssetCuratorHoldReason, + pallet_multi_asset_bounties::CuratorDepositAmount< + MultiAssetCuratorDepositFromValueMultiplier, + MultiAssetCuratorDepositMin, + MultiAssetCuratorDepositMax, + Balance, + >, + Balance, + >; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = parachains_common::pay::benchmarks::LocalPayWithSourceArguments< + xcm_config::TrustBackedAssetsPalletIndex, + >; +} + /// The [frame_support::traits::tokens::ConversionFromAssetBalance] implementation provided by the /// `AssetRate` pallet instance. /// diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/mod.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/mod.rs index bdf9d9969c..2b53982594 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/mod.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/mod.rs @@ -42,6 +42,7 @@ pub mod pallet_election_provider_multi_block_unsigned; pub mod pallet_election_provider_multi_block_verifier; pub mod pallet_indices; pub mod pallet_message_queue; +pub mod pallet_multi_asset_bounties; pub mod pallet_multisig; pub mod pallet_nfts; pub mod pallet_parameters; diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_multi_asset_bounties.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_multi_asset_bounties.rs new file mode 100644 index 0000000000..025f925c2e --- /dev/null +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_multi_asset_bounties.rs @@ -0,0 +1,21 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Weights for `pallet_multi_asset_bounties` +//! +//! Using default substrate weights until benchmarks are generated. + +pub use pallet_multi_asset_bounties::weights::SubstrateWeight as WeightInfo; From 26ba82420a2009795ef9bcf79532952e78fc07c8 Mon Sep 17 00:00:00 2001 From: Dhiraj Sah Date: Wed, 11 Feb 2026 18:54:14 +0530 Subject: [PATCH 12/17] fix: reused existing constants from bounties pallet --- .../asset-hub-kusama/src/treasury.rs | 18 ++++++------------ .../asset-hub-polkadot/src/treasury.rs | 18 ++++++------------ 2 files changed, 12 insertions(+), 24 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/treasury.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/treasury.rs index 6515f0234b..096ded3fec 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/treasury.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/treasury.rs @@ -164,14 +164,8 @@ impl pallet_child_bounties::Config for Runtime { } parameter_types! { - pub const MultiAssetBountyValueMinimum: Balance = 200 * CENTS; - pub const MultiAssetChildBountyValueMinimum: Balance = MultiAssetBountyValueMinimum::get() / 10; - pub const MultiAssetMaxActiveChildBountyCount: u32 = 100; pub const MultiAssetCuratorHoldReason: RuntimeHoldReason = RuntimeHoldReason::MultiAssetBounties(pallet_multi_asset_bounties::HoldReason::CuratorDeposit); - pub const MultiAssetCuratorDepositFromValueMultiplier: Permill = Permill::from_percent(50); - pub const MultiAssetCuratorDepositMin: Balance = 10 * CENTS; - pub const MultiAssetCuratorDepositMax: Balance = 500 * CENTS; } impl pallet_multi_asset_bounties::Config for Runtime { @@ -181,9 +175,9 @@ impl pallet_multi_asset_bounties::Config for Runtime { type AssetKind = VersionedLocatableAsset; type Beneficiary = VersionedLocatableAccount; type BeneficiaryLookup = IdentityLookup; - type BountyValueMinimum = MultiAssetBountyValueMinimum; - type ChildBountyValueMinimum = MultiAssetChildBountyValueMinimum; - type MaxActiveChildBountyCount = MultiAssetMaxActiveChildBountyCount; + type BountyValueMinimum = BountyValueMinimum; + type ChildBountyValueMinimum = ChildBountyValueMinimum; + type MaxActiveChildBountyCount = MaxActiveChildBountyCount; type WeightInfo = weights::pallet_multi_asset_bounties::WeightInfo; type FundingSource = pallet_multi_asset_bounties::PalletIdAsFundingSource< TreasuryPalletId, @@ -208,9 +202,9 @@ impl pallet_multi_asset_bounties::Config for Runtime { Balances, MultiAssetCuratorHoldReason, pallet_multi_asset_bounties::CuratorDepositAmount< - MultiAssetCuratorDepositFromValueMultiplier, - MultiAssetCuratorDepositMin, - MultiAssetCuratorDepositMax, + CuratorDepositMultiplier, + CuratorDepositMin, + CuratorDepositMax, Balance, >, Balance, diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/treasury.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/treasury.rs index 82e65d3284..f18a92e452 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/treasury.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/treasury.rs @@ -105,14 +105,8 @@ impl pallet_child_bounties::Config for Runtime { } parameter_types! { - pub const MultiAssetBountyValueMinimum: Balance = 10 * DOLLARS; - pub const MultiAssetChildBountyValueMinimum: Balance = MultiAssetBountyValueMinimum::get() / 10; - pub const MultiAssetMaxActiveChildBountyCount: u32 = 100; pub const MultiAssetCuratorHoldReason: RuntimeHoldReason = RuntimeHoldReason::MultiAssetBounties(pallet_multi_asset_bounties::HoldReason::CuratorDeposit); - pub const MultiAssetCuratorDepositFromValueMultiplier: Permill = Permill::from_percent(50); - pub const MultiAssetCuratorDepositMin: Balance = 10 * DOLLARS; - pub const MultiAssetCuratorDepositMax: Balance = 200 * DOLLARS; } impl pallet_multi_asset_bounties::Config for Runtime { @@ -122,9 +116,9 @@ impl pallet_multi_asset_bounties::Config for Runtime { type AssetKind = VersionedLocatableAsset; type Beneficiary = VersionedLocatableAccount; type BeneficiaryLookup = IdentityLookup; - type BountyValueMinimum = MultiAssetBountyValueMinimum; - type ChildBountyValueMinimum = MultiAssetChildBountyValueMinimum; - type MaxActiveChildBountyCount = MultiAssetMaxActiveChildBountyCount; + type BountyValueMinimum = BountyValueMinimum; + type ChildBountyValueMinimum = ChildBountyValueMinimum; + type MaxActiveChildBountyCount = MaxActiveChildBountyCount; type WeightInfo = weights::pallet_multi_asset_bounties::WeightInfo; type FundingSource = pallet_multi_asset_bounties::PalletIdAsFundingSource< TreasuryPalletId, @@ -149,9 +143,9 @@ impl pallet_multi_asset_bounties::Config for Runtime { Balances, MultiAssetCuratorHoldReason, pallet_multi_asset_bounties::CuratorDepositAmount< - MultiAssetCuratorDepositFromValueMultiplier, - MultiAssetCuratorDepositMin, - MultiAssetCuratorDepositMax, + CuratorDepositMultiplier, + CuratorDepositMin, + CuratorDepositMax, Balance, >, Balance, From 651124a7ef1269d016b647e9c1aaa66cd5740de0 Mon Sep 17 00:00:00 2001 From: Dhiraj Sah Date: Wed, 11 Feb 2026 23:42:48 +0530 Subject: [PATCH 13/17] fix: use local bounty account derivation with prefix mbt and mcb --- Cargo.lock | 1 + .../asset-hubs/asset-hub-kusama/Cargo.toml | 2 +- .../asset-hub-kusama/src/treasury.rs | 22 ++--- .../asset-hubs/asset-hub-polkadot/Cargo.toml | 2 +- .../asset-hub-polkadot/src/treasury.rs | 22 ++--- system-parachains/common/Cargo.toml | 3 + system-parachains/common/src/lib.rs | 3 + .../common/src/multi_asset_bounty_sources.rs | 90 +++++++++++++++++++ 8 files changed, 123 insertions(+), 22 deletions(-) create mode 100644 system-parachains/common/src/multi_asset_bounty_sources.rs diff --git a/Cargo.lock b/Cargo.lock index 8fe45ba974..03f1f65699 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17922,6 +17922,7 @@ dependencies = [ "cumulus-primitives-core", "frame-support", "log", + "pallet-multi-asset-bounties", "parity-scale-codec", "polkadot-primitives", "scale-info", diff --git a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml index a26f1237b1..376137f781 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml @@ -26,7 +26,7 @@ bp-bridge-hub-kusama = { workspace = true } bp-bridge-hub-polkadot = { workspace = true } kusama-runtime-constants = { workspace = true } system-parachains-constants = { workspace = true } -system-parachains-common = { workspace = true } +system-parachains-common = { workspace = true, features = ["multi-asset-bounties"] } pallet-remote-proxy = { workspace = true } # Substrate diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/treasury.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/treasury.rs index 096ded3fec..fdcefb7e7f 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/treasury.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/treasury.rs @@ -184,16 +184,18 @@ impl pallet_multi_asset_bounties::Config for Runtime { Runtime, AccountIdToLocalLocation, >; - type BountySource = pallet_multi_asset_bounties::BountySourceFromPalletId< - TreasuryPalletId, - Runtime, - AccountIdToLocalLocation, - >; - type ChildBountySource = pallet_multi_asset_bounties::ChildBountySourceFromPalletId< - TreasuryPalletId, - Runtime, - AccountIdToLocalLocation, - >; + type BountySource = + system_parachains_common::multi_asset_bounty_sources::MultiAssetBountySourceFromPalletId< + TreasuryPalletId, + Runtime, + AccountIdToLocalLocation, + >; + type ChildBountySource = + system_parachains_common::multi_asset_bounty_sources::MultiAssetChildBountySourceFromPalletId< + TreasuryPalletId, + Runtime, + AccountIdToLocalLocation, + >; type Paymaster = LocalPay; type BalanceConverter = AssetRateWithNative; type Preimages = Preimage; diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml index e75ff88241..0684767f3a 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml @@ -27,7 +27,7 @@ collectives-polkadot-runtime-constants = { workspace = true } kusama-runtime-constants = { workspace = true } polkadot-runtime-constants = { workspace = true } system-parachains-constants = { workspace = true } -system-parachains-common = { workspace = true } +system-parachains-common = { workspace = true, features = ["multi-asset-bounties"] } # Substrate frame-benchmarking = { optional = true, workspace = true } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/treasury.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/treasury.rs index f18a92e452..cb3068cc13 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/treasury.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/treasury.rs @@ -125,16 +125,18 @@ impl pallet_multi_asset_bounties::Config for Runtime { Runtime, AccountIdToLocalLocation, >; - type BountySource = pallet_multi_asset_bounties::BountySourceFromPalletId< - TreasuryPalletId, - Runtime, - AccountIdToLocalLocation, - >; - type ChildBountySource = pallet_multi_asset_bounties::ChildBountySourceFromPalletId< - TreasuryPalletId, - Runtime, - AccountIdToLocalLocation, - >; + type BountySource = + system_parachains_common::multi_asset_bounty_sources::MultiAssetBountySourceFromPalletId< + TreasuryPalletId, + Runtime, + AccountIdToLocalLocation, + >; + type ChildBountySource = + system_parachains_common::multi_asset_bounty_sources::MultiAssetChildBountySourceFromPalletId< + TreasuryPalletId, + Runtime, + AccountIdToLocalLocation, + >; type Paymaster = LocalPay; type BalanceConverter = AssetRateWithNative; type Preimages = Preimage; diff --git a/system-parachains/common/Cargo.toml b/system-parachains/common/Cargo.toml index e8dc63c7a7..db5abd14a6 100644 --- a/system-parachains/common/Cargo.toml +++ b/system-parachains/common/Cargo.toml @@ -20,15 +20,18 @@ frame-support = { workspace = true } cumulus-pallet-parachain-system = { workspace = true } cumulus-primitives-core = { workspace = true } polkadot-primitives = { workspace = true } +pallet-multi-asset-bounties = { workspace = true, optional = true } [features] default = ["std"] +multi-asset-bounties = ["pallet-multi-asset-bounties"] std = [ "codec/std", "cumulus-pallet-parachain-system/std", "cumulus-primitives-core/std", "frame-support/std", "log/std", + "pallet-multi-asset-bounties?/std", "polkadot-primitives/std", "scale-info/std", "sp-api/std", diff --git a/system-parachains/common/src/lib.rs b/system-parachains/common/src/lib.rs index 4ba771b718..c35bbc066c 100644 --- a/system-parachains/common/src/lib.rs +++ b/system-parachains/common/src/lib.rs @@ -19,6 +19,9 @@ pub mod randomness; +#[cfg(feature = "multi-asset-bounties")] +pub mod multi_asset_bounty_sources; + /// Extra runtime APIs. pub mod apis { /// Information about the current issuance rate of the system. diff --git a/system-parachains/common/src/multi_asset_bounty_sources.rs b/system-parachains/common/src/multi_asset_bounty_sources.rs new file mode 100644 index 0000000000..5e2529b1c0 --- /dev/null +++ b/system-parachains/common/src/multi_asset_bounty_sources.rs @@ -0,0 +1,90 @@ +// Copyright (C) Polkadot Fellows. +// This file is part of Polkadot. + +// Polkadot 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. + +// Polkadot 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 Polkadot. If not, see . + +//! Multi-asset bounty and child-bounty source types that derive account IDs using distinct +//! sub-account prefixes (`"mbt"` and `"mcb"`) so they do not collide with the legacy +//! single-asset bounties pallet (which uses `"bt"` and `"cb"`). + +use frame_support::{traits::Get, PalletId}; +use pallet_multi_asset_bounties::BountyIndex; +use sp_runtime::traits::{AccountIdConversion, Convert, TryConvert}; + +// TODO (issue #1071) @dhirajs0: remove this module and use the try_convert methods from +// multi-asset-bounties pallet directly in config. + +/// Derives a **multi-asset** bounty account ID from the `PalletId` and the `BountyIndex`, +/// then converts it into the corresponding bounty `Beneficiary`. +/// +/// Uses the prefix `"mbt"` (multi-asset bounty) so account IDs do not collide with the +/// legacy bounties pallet, which uses `"bt"`. +/// +/// # Type Parameters +/// - `Id`: The pallet ID getter +/// - `T`: The pallet configuration +/// - `C`: Converter from `T::AccountId` to `T::Beneficiary`. Use `Identity` when types are the +/// same. +/// - `I`: Instance parameter (default: `()`) +pub struct MultiAssetBountySourceFromPalletId( + core::marker::PhantomData<(Id, T, C, I)>, +); + +impl TryConvert<(BountyIndex, T::AssetKind), T::Beneficiary> + for MultiAssetBountySourceFromPalletId +where + Id: Get, + T: pallet_multi_asset_bounties::Config, + C: Convert, +{ + fn try_convert( + (parent_bounty_id, _asset_kind): (BountyIndex, T::AssetKind), + ) -> Result { + let account: T::AccountId = + Id::get().into_sub_account_truncating(("mbt", parent_bounty_id)); + Ok(C::convert(account)) + } +} + +/// Derives a **multi-asset** child-bounty account ID from the `PalletId`, the parent index, +/// and the child index, then converts it into the child-bounty `Beneficiary`. +/// +/// Uses the prefix `"mcb"` (multi-asset child bounty) so account IDs do not collide with the +/// legacy child-bounties pallet, which uses `"cb"`. +/// +/// # Type Parameters +/// - `Id`: The pallet ID getter +/// - `T`: The pallet configuration +/// - `C`: Converter from `T::AccountId` to `T::Beneficiary`. Use `Identity` when types are the +/// same. +/// - `I`: Instance parameter (default: `()`) +pub struct MultiAssetChildBountySourceFromPalletId( + core::marker::PhantomData<(Id, T, C, I)>, +); + +impl TryConvert<(BountyIndex, BountyIndex, T::AssetKind), T::Beneficiary> + for MultiAssetChildBountySourceFromPalletId +where + Id: Get, + T: pallet_multi_asset_bounties::Config, + C: Convert, +{ + fn try_convert( + (parent_bounty_id, child_bounty_id, _asset_kind): (BountyIndex, BountyIndex, T::AssetKind), + ) -> Result { + let account: T::AccountId = + Id::get().into_sub_account_truncating(("mcb", parent_bounty_id, child_bounty_id)); + Ok(C::convert(account)) + } +} From 99553929f46afe40ee1fe5ff6f3d1f6464787f77 Mon Sep 17 00:00:00 2001 From: Dhiraj Sah Date: Thu, 12 Feb 2026 00:11:26 +0530 Subject: [PATCH 14/17] fix: zepter --- system-parachains/common/Cargo.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/system-parachains/common/Cargo.toml b/system-parachains/common/Cargo.toml index db5abd14a6..f31e901a35 100644 --- a/system-parachains/common/Cargo.toml +++ b/system-parachains/common/Cargo.toml @@ -43,6 +43,7 @@ runtime-benchmarks = [ "cumulus-pallet-parachain-system/runtime-benchmarks", "cumulus-primitives-core/runtime-benchmarks", "frame-support/runtime-benchmarks", + "pallet-multi-asset-bounties?/runtime-benchmarks", "polkadot-primitives/runtime-benchmarks", "sp-runtime/runtime-benchmarks", ] @@ -50,5 +51,6 @@ runtime-benchmarks = [ try-runtime = [ "cumulus-pallet-parachain-system/try-runtime", "frame-support/try-runtime", + "pallet-multi-asset-bounties?/try-runtime", "sp-runtime/try-runtime", ] From 414965a3dc98ede1a04c5e6d24cc09333e6ece4a Mon Sep 17 00:00:00 2001 From: Dhiraj Sah Date: Sat, 21 Feb 2026 02:19:23 +0530 Subject: [PATCH 15/17] docs: update CHANGELOG for multi-asset bounties and local pay removal --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea6c41d424..c42b85e63c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,9 +9,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Added - Add `pallet-assets` on Polkadot People to support HOLLAR (and more assets in the future) ([polkadot-fellows/runtimes/pull/962](https://github.com/polkadot-fellows/runtimes/pull/962)) +- Add `pallet_multi_asset_bounties` pallet to Asset Hub Kusama and Asset Hub Polkadot for multi-asset bounty support ([#1070](https://github.com/polkadot-fellows/runtimes/pull/1070)) ### Changed +- Remove local pay module in favor of upstream implementation ([#1070](https://github.com/polkadot-fellows/runtimes/pull/1070)) - Update Kusama submission deposit to 3.333KSM as per [ref 588](https://kusama.subsquare.io/referenda/558) - Re-add StakingOperator proxy type and allow Staking proxy to add/remove a StakingOperator [#1033](https://github.com/polkadot-fellows/runtimes/pull/1033) - Fix check-migration(asset-hub-polkadot) CI job [#1057](https://github.com/polkadot-fellows/runtimes/pull/1057) From 59d2ba569d1cdde28d43af1c31a04a6149b9b303 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 21 Feb 2026 13:12:30 +0000 Subject: [PATCH 16/17] Update from ggwpez running command 'bench --runtime asset-hub-kusama --pallet pallet_multi_asset_bounties' --- .../weights/pallet_multi_asset_bounties.rs | 352 +++++++++++++++++- 1 file changed, 349 insertions(+), 3 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_multi_asset_bounties.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_multi_asset_bounties.rs index 025f925c2e..702a7cb6cc 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_multi_asset_bounties.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_multi_asset_bounties.rs @@ -14,8 +14,354 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! Weights for `pallet_multi_asset_bounties` +//! Autogenerated weights for `pallet_multi_asset_bounties` //! -//! Using default substrate weights until benchmarks are generated. +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 +//! DATE: 2026-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `bm1-3`, CPU: `Intel(R) Xeon(R) E-2388G CPU @ 3.20GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 -pub use pallet_multi_asset_bounties::weights::SubstrateWeight as WeightInfo; +// Executed Command: +// frame-omni-bencher +// v1 +// benchmark +// pallet +// --extrinsic=* +// --runtime=target/production/wbuild/asset-hub-kusama-runtime/asset_hub_kusama_runtime.wasm +// --pallet=pallet_multi_asset_bounties +// --header=/opt/actions-runner/_work/runtimes/runtimes/.github/scripts/cmd/file_header.txt +// --output=./system-parachains/asset-hubs/asset-hub-kusama/src/weights +// --wasm-execution=compiled +// --steps=50 +// --repeat=20 +// --heap-pages=4096 + +#![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_multi_asset_bounties`. +pub struct WeightInfo(PhantomData); +impl pallet_multi_asset_bounties::WeightInfo for WeightInfo { + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `AssetRate::ConversionRateToNative` (r:1 w:0) + /// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(1238), added: 3713, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::BountyCount` (r:1 w:1) + /// Proof: `MultiAssetBounties::BountyCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::Bounties` (r:0 w:1) + /// Proof: `MultiAssetBounties::Bounties` (`max_values`: None, `max_size`: Some(2513), added: 4988, mode: `MaxEncodedLen`) + fn fund_bounty() -> Weight { + // Proof Size summary in bytes: + // Measured: `2359` + // Estimated: `6208` + // Minimum execution time: 81_569_000 picoseconds. + Weight::from_parts(83_164_000, 0) + .saturating_add(Weight::from_parts(0, 6208)) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(8)) + } + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::Bounties` (r:1 w:0) + /// Proof: `MultiAssetBounties::Bounties` (`max_values`: None, `max_size`: Some(2513), added: 4988, mode: `MaxEncodedLen`) + /// Storage: `AssetRate::ConversionRateToNative` (r:1 w:0) + /// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(1238), added: 3713, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::ChildBountiesPerParent` (r:1 w:1) + /// Proof: `MultiAssetBounties::ChildBountiesPerParent` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::ChildBountiesValuePerParent` (r:1 w:1) + /// Proof: `MultiAssetBounties::ChildBountiesValuePerParent` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::TotalChildBountiesPerParent` (r:1 w:1) + /// Proof: `MultiAssetBounties::TotalChildBountiesPerParent` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::ChildBounties` (r:0 w:1) + /// Proof: `MultiAssetBounties::ChildBounties` (`max_values`: None, `max_size`: Some(1323), added: 3798, mode: `MaxEncodedLen`) + fn fund_child_bounty() -> Weight { + // Proof Size summary in bytes: + // Measured: `1469` + // Estimated: `6208` + // Minimum execution time: 88_553_000 picoseconds. + Weight::from_parts(89_951_000, 0) + .saturating_add(Weight::from_parts(0, 6208)) + .saturating_add(T::DbWeight::get().reads(11)) + .saturating_add(T::DbWeight::get().writes(9)) + } + /// Storage: `MultiAssetBounties::Bounties` (r:1 w:1) + /// Proof: `MultiAssetBounties::Bounties` (`max_values`: None, `max_size`: Some(2513), added: 4988, mode: `MaxEncodedLen`) + /// Storage: `AssetRate::ConversionRateToNative` (r:1 w:0) + /// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(1238), added: 3713, mode: `MaxEncodedLen`) + fn propose_curator_parent_bounty() -> Weight { + // Proof Size summary in bytes: + // Measured: `307` + // Estimated: `5978` + // Minimum execution time: 25_283_000 picoseconds. + Weight::from_parts(25_614_000, 0) + .saturating_add(Weight::from_parts(0, 5978)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `MultiAssetBounties::Bounties` (r:1 w:0) + /// Proof: `MultiAssetBounties::Bounties` (`max_values`: None, `max_size`: Some(2513), added: 4988, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::ChildBounties` (r:1 w:1) + /// Proof: `MultiAssetBounties::ChildBounties` (`max_values`: None, `max_size`: Some(1323), added: 3798, mode: `MaxEncodedLen`) + fn propose_curator_child_bounty() -> Weight { + // Proof Size summary in bytes: + // Measured: `468` + // Estimated: `5978` + // Minimum execution time: 24_034_000 picoseconds. + Weight::from_parts(24_766_000, 0) + .saturating_add(Weight::from_parts(0, 5978)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `MultiAssetBounties::Bounties` (r:1 w:0) + /// Proof: `MultiAssetBounties::Bounties` (`max_values`: None, `max_size`: Some(2513), added: 4988, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::ChildBounties` (r:1 w:1) + /// Proof: `MultiAssetBounties::ChildBounties` (`max_values`: None, `max_size`: Some(1323), added: 3798, mode: `MaxEncodedLen`) + /// Storage: `AssetRate::ConversionRateToNative` (r:1 w:0) + /// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(1238), added: 3713, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(283), added: 2758, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::CuratorDeposit` (r:0 w:1) + /// Proof: `MultiAssetBounties::CuratorDeposit` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + fn accept_curator() -> Weight { + // Proof Size summary in bytes: + // Measured: `3341` + // Estimated: `5978` + // Minimum execution time: 76_683_000 picoseconds. + Weight::from_parts(77_894_000, 0) + .saturating_add(Weight::from_parts(0, 5978)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `MultiAssetBounties::Bounties` (r:1 w:0) + /// Proof: `MultiAssetBounties::Bounties` (`max_values`: None, `max_size`: Some(2513), added: 4988, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::ChildBounties` (r:1 w:1) + /// Proof: `MultiAssetBounties::ChildBounties` (`max_values`: None, `max_size`: Some(1323), added: 3798, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::CuratorDeposit` (r:1 w:1) + /// Proof: `MultiAssetBounties::CuratorDeposit` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(283), added: 2758, mode: `MaxEncodedLen`) + fn unassign_curator() -> Weight { + // Proof Size summary in bytes: + // Measured: `3365` + // Estimated: `5978` + // Minimum execution time: 59_654_000 picoseconds. + Weight::from_parts(61_392_000, 0) + .saturating_add(Weight::from_parts(0, 5978)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `MultiAssetBounties::Bounties` (r:1 w:0) + /// Proof: `MultiAssetBounties::Bounties` (`max_values`: None, `max_size`: Some(2513), added: 4988, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::ChildBounties` (r:1 w:1) + /// Proof: `MultiAssetBounties::ChildBounties` (`max_values`: None, `max_size`: Some(1323), added: 3798, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn award_bounty() -> Weight { + // Proof Size summary in bytes: + // Measured: `2854` + // Estimated: `6208` + // Minimum execution time: 79_695_000 picoseconds. + Weight::from_parts(81_369_000, 0) + .saturating_add(Weight::from_parts(0, 6208)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: `MultiAssetBounties::Bounties` (r:1 w:1) + /// Proof: `MultiAssetBounties::Bounties` (`max_values`: None, `max_size`: Some(2513), added: 4988, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::ChildBountiesPerParent` (r:1 w:0) + /// Proof: `MultiAssetBounties::ChildBountiesPerParent` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn close_parent_bounty() -> Weight { + // Proof Size summary in bytes: + // Measured: `2465` + // Estimated: `6208` + // Minimum execution time: 73_503_000 picoseconds. + Weight::from_parts(74_619_000, 0) + .saturating_add(Weight::from_parts(0, 6208)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: `MultiAssetBounties::Bounties` (r:1 w:0) + /// Proof: `MultiAssetBounties::Bounties` (`max_values`: None, `max_size`: Some(2513), added: 4988, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::ChildBounties` (r:1 w:1) + /// Proof: `MultiAssetBounties::ChildBounties` (`max_values`: None, `max_size`: Some(1323), added: 3798, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn close_child_bounty() -> Weight { + // Proof Size summary in bytes: + // Measured: `1702` + // Estimated: `6208` + // Minimum execution time: 70_807_000 picoseconds. + Weight::from_parts(72_093_000, 0) + .saturating_add(Weight::from_parts(0, 6208)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: `MultiAssetBounties::Bounties` (r:1 w:0) + /// Proof: `MultiAssetBounties::Bounties` (`max_values`: None, `max_size`: Some(2513), added: 4988, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::ChildBounties` (r:1 w:1) + /// Proof: `MultiAssetBounties::ChildBounties` (`max_values`: None, `max_size`: Some(1323), added: 3798, mode: `MaxEncodedLen`) + fn check_status_funding() -> Weight { + // Proof Size summary in bytes: + // Measured: `510` + // Estimated: `5978` + // Minimum execution time: 24_269_000 picoseconds. + Weight::from_parts(24_994_000, 0) + .saturating_add(Weight::from_parts(0, 5978)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `MultiAssetBounties::Bounties` (r:1 w:0) + /// Proof: `MultiAssetBounties::Bounties` (`max_values`: None, `max_size`: Some(2513), added: 4988, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::ChildBounties` (r:1 w:1) + /// Proof: `MultiAssetBounties::ChildBounties` (`max_values`: None, `max_size`: Some(1323), added: 3798, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::CuratorDeposit` (r:1 w:1) + /// Proof: `MultiAssetBounties::CuratorDeposit` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(283), added: 2758, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::ChildBountiesValuePerParent` (r:1 w:1) + /// Proof: `MultiAssetBounties::ChildBountiesValuePerParent` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::ChildBountiesPerParent` (r:1 w:1) + /// Proof: `MultiAssetBounties::ChildBountiesPerParent` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + fn check_status_refund() -> Weight { + // Proof Size summary in bytes: + // Measured: `3499` + // Estimated: `5978` + // Minimum execution time: 81_121_000 picoseconds. + Weight::from_parts(82_501_000, 0) + .saturating_add(Weight::from_parts(0, 5978)) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(7)) + } + /// Storage: `MultiAssetBounties::Bounties` (r:1 w:0) + /// Proof: `MultiAssetBounties::Bounties` (`max_values`: None, `max_size`: Some(2513), added: 4988, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::ChildBounties` (r:1 w:1) + /// Proof: `MultiAssetBounties::ChildBounties` (`max_values`: None, `max_size`: Some(1323), added: 3798, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::CuratorDeposit` (r:1 w:1) + /// Proof: `MultiAssetBounties::CuratorDeposit` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(283), added: 2758, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::ChildBountiesPerParent` (r:1 w:1) + /// Proof: `MultiAssetBounties::ChildBountiesPerParent` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + fn check_status_payout() -> Weight { + // Proof Size summary in bytes: + // Measured: `3522` + // Estimated: `5978` + // Minimum execution time: 78_941_000 picoseconds. + Weight::from_parts(80_032_000, 0) + .saturating_add(Weight::from_parts(0, 5978)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: `MultiAssetBounties::Bounties` (r:1 w:0) + /// Proof: `MultiAssetBounties::Bounties` (`max_values`: None, `max_size`: Some(2513), added: 4988, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::ChildBounties` (r:1 w:1) + /// Proof: `MultiAssetBounties::ChildBounties` (`max_values`: None, `max_size`: Some(1323), added: 3798, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn retry_payment_funding() -> Weight { + // Proof Size summary in bytes: + // Measured: `2105` + // Estimated: `6208` + // Minimum execution time: 69_819_000 picoseconds. + Weight::from_parts(71_204_000, 0) + .saturating_add(Weight::from_parts(0, 6208)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: `MultiAssetBounties::Bounties` (r:1 w:0) + /// Proof: `MultiAssetBounties::Bounties` (`max_values`: None, `max_size`: Some(2513), added: 4988, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::ChildBounties` (r:1 w:1) + /// Proof: `MultiAssetBounties::ChildBounties` (`max_values`: None, `max_size`: Some(1323), added: 3798, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn retry_payment_refund() -> Weight { + // Proof Size summary in bytes: + // Measured: `1704` + // Estimated: `6208` + // Minimum execution time: 69_697_000 picoseconds. + Weight::from_parts(71_447_000, 0) + .saturating_add(Weight::from_parts(0, 6208)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: `MultiAssetBounties::Bounties` (r:1 w:0) + /// Proof: `MultiAssetBounties::Bounties` (`max_values`: None, `max_size`: Some(2513), added: 4988, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::ChildBounties` (r:1 w:1) + /// Proof: `MultiAssetBounties::ChildBounties` (`max_values`: None, `max_size`: Some(1323), added: 3798, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn retry_payment_payout() -> Weight { + // Proof Size summary in bytes: + // Measured: `2894` + // Estimated: `6208` + // Minimum execution time: 77_802_000 picoseconds. + Weight::from_parts(79_803_000, 0) + .saturating_add(Weight::from_parts(0, 6208)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(6)) + } +} From 0ed0e670616c9efc91532254feffab8f505957ca Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 21 Feb 2026 13:25:12 +0000 Subject: [PATCH 17/17] Update from ggwpez running command 'bench --runtime asset-hub-polkadot --pallet pallet_multi_asset_bounties' --- .../weights/pallet_multi_asset_bounties.rs | 352 +++++++++++++++++- 1 file changed, 349 insertions(+), 3 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_multi_asset_bounties.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_multi_asset_bounties.rs index 025f925c2e..9fe6ed365a 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_multi_asset_bounties.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_multi_asset_bounties.rs @@ -14,8 +14,354 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! Weights for `pallet_multi_asset_bounties` +//! Autogenerated weights for `pallet_multi_asset_bounties` //! -//! Using default substrate weights until benchmarks are generated. +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 53.0.0 +//! DATE: 2026-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `df580984f9e7`, CPU: `QEMU Virtual CPU version 2.5+` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 -pub use pallet_multi_asset_bounties::weights::SubstrateWeight as WeightInfo; +// Executed Command: +// frame-omni-bencher +// v1 +// benchmark +// pallet +// --extrinsic=* +// --runtime=target/production/wbuild/asset-hub-polkadot-runtime/asset_hub_polkadot_runtime.wasm +// --pallet=pallet_multi_asset_bounties +// --header=/_work/ibp-ch/runtimes/runtimes/.github/scripts/cmd/file_header.txt +// --output=./system-parachains/asset-hubs/asset-hub-polkadot/src/weights +// --wasm-execution=compiled +// --steps=50 +// --repeat=20 +// --heap-pages=4096 + +#![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_multi_asset_bounties`. +pub struct WeightInfo(PhantomData); +impl pallet_multi_asset_bounties::WeightInfo for WeightInfo { + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `AssetRate::ConversionRateToNative` (r:1 w:0) + /// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(1238), added: 3713, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::BountyCount` (r:1 w:1) + /// Proof: `MultiAssetBounties::BountyCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::Bounties` (r:0 w:1) + /// Proof: `MultiAssetBounties::Bounties` (`max_values`: None, `max_size`: Some(2513), added: 4988, mode: `MaxEncodedLen`) + fn fund_bounty() -> Weight { + // Proof Size summary in bytes: + // Measured: `2541` + // Estimated: `6208` + // Minimum execution time: 97_570_000 picoseconds. + Weight::from_parts(100_450_000, 0) + .saturating_add(Weight::from_parts(0, 6208)) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(8)) + } + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::Bounties` (r:1 w:0) + /// Proof: `MultiAssetBounties::Bounties` (`max_values`: None, `max_size`: Some(2513), added: 4988, mode: `MaxEncodedLen`) + /// Storage: `AssetRate::ConversionRateToNative` (r:1 w:0) + /// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(1238), added: 3713, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::ChildBountiesPerParent` (r:1 w:1) + /// Proof: `MultiAssetBounties::ChildBountiesPerParent` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::ChildBountiesValuePerParent` (r:1 w:1) + /// Proof: `MultiAssetBounties::ChildBountiesValuePerParent` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::TotalChildBountiesPerParent` (r:1 w:1) + /// Proof: `MultiAssetBounties::TotalChildBountiesPerParent` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::ChildBounties` (r:0 w:1) + /// Proof: `MultiAssetBounties::ChildBounties` (`max_values`: None, `max_size`: Some(1323), added: 3798, mode: `MaxEncodedLen`) + fn fund_child_bounty() -> Weight { + // Proof Size summary in bytes: + // Measured: `1568` + // Estimated: `6208` + // Minimum execution time: 106_929_000 picoseconds. + Weight::from_parts(108_949_000, 0) + .saturating_add(Weight::from_parts(0, 6208)) + .saturating_add(T::DbWeight::get().reads(11)) + .saturating_add(T::DbWeight::get().writes(9)) + } + /// Storage: `MultiAssetBounties::Bounties` (r:1 w:1) + /// Proof: `MultiAssetBounties::Bounties` (`max_values`: None, `max_size`: Some(2513), added: 4988, mode: `MaxEncodedLen`) + /// Storage: `AssetRate::ConversionRateToNative` (r:1 w:0) + /// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(1238), added: 3713, mode: `MaxEncodedLen`) + fn propose_curator_parent_bounty() -> Weight { + // Proof Size summary in bytes: + // Measured: `307` + // Estimated: `5978` + // Minimum execution time: 27_140_000 picoseconds. + Weight::from_parts(28_280_000, 0) + .saturating_add(Weight::from_parts(0, 5978)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `MultiAssetBounties::Bounties` (r:1 w:0) + /// Proof: `MultiAssetBounties::Bounties` (`max_values`: None, `max_size`: Some(2513), added: 4988, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::ChildBounties` (r:1 w:1) + /// Proof: `MultiAssetBounties::ChildBounties` (`max_values`: None, `max_size`: Some(1323), added: 3798, mode: `MaxEncodedLen`) + fn propose_curator_child_bounty() -> Weight { + // Proof Size summary in bytes: + // Measured: `468` + // Estimated: `5978` + // Minimum execution time: 27_131_000 picoseconds. + Weight::from_parts(28_109_000, 0) + .saturating_add(Weight::from_parts(0, 5978)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `MultiAssetBounties::Bounties` (r:1 w:0) + /// Proof: `MultiAssetBounties::Bounties` (`max_values`: None, `max_size`: Some(2513), added: 4988, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::ChildBounties` (r:1 w:1) + /// Proof: `MultiAssetBounties::ChildBounties` (`max_values`: None, `max_size`: Some(1323), added: 3798, mode: `MaxEncodedLen`) + /// Storage: `AssetRate::ConversionRateToNative` (r:1 w:0) + /// Proof: `AssetRate::ConversionRateToNative` (`max_values`: None, `max_size`: Some(1238), added: 3713, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(265), added: 2740, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::CuratorDeposit` (r:0 w:1) + /// Proof: `MultiAssetBounties::CuratorDeposit` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + fn accept_curator() -> Weight { + // Proof Size summary in bytes: + // Measured: `3473` + // Estimated: `5978` + // Minimum execution time: 95_098_000 picoseconds. + Weight::from_parts(96_369_000, 0) + .saturating_add(Weight::from_parts(0, 5978)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `MultiAssetBounties::Bounties` (r:1 w:0) + /// Proof: `MultiAssetBounties::Bounties` (`max_values`: None, `max_size`: Some(2513), added: 4988, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::ChildBounties` (r:1 w:1) + /// Proof: `MultiAssetBounties::ChildBounties` (`max_values`: None, `max_size`: Some(1323), added: 3798, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::CuratorDeposit` (r:1 w:1) + /// Proof: `MultiAssetBounties::CuratorDeposit` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(265), added: 2740, mode: `MaxEncodedLen`) + fn unassign_curator() -> Weight { + // Proof Size summary in bytes: + // Measured: `3497` + // Estimated: `5978` + // Minimum execution time: 72_769_000 picoseconds. + Weight::from_parts(76_090_000, 0) + .saturating_add(Weight::from_parts(0, 5978)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `MultiAssetBounties::Bounties` (r:1 w:0) + /// Proof: `MultiAssetBounties::Bounties` (`max_values`: None, `max_size`: Some(2513), added: 4988, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::ChildBounties` (r:1 w:1) + /// Proof: `MultiAssetBounties::ChildBounties` (`max_values`: None, `max_size`: Some(1323), added: 3798, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn award_bounty() -> Weight { + // Proof Size summary in bytes: + // Measured: `2903` + // Estimated: `6208` + // Minimum execution time: 96_230_000 picoseconds. + Weight::from_parts(97_620_000, 0) + .saturating_add(Weight::from_parts(0, 6208)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: `MultiAssetBounties::Bounties` (r:1 w:1) + /// Proof: `MultiAssetBounties::Bounties` (`max_values`: None, `max_size`: Some(2513), added: 4988, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::ChildBountiesPerParent` (r:1 w:0) + /// Proof: `MultiAssetBounties::ChildBountiesPerParent` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn close_parent_bounty() -> Weight { + // Proof Size summary in bytes: + // Measured: `2602` + // Estimated: `6208` + // Minimum execution time: 89_599_000 picoseconds. + Weight::from_parts(97_529_000, 0) + .saturating_add(Weight::from_parts(0, 6208)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: `MultiAssetBounties::Bounties` (r:1 w:0) + /// Proof: `MultiAssetBounties::Bounties` (`max_values`: None, `max_size`: Some(2513), added: 4988, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::ChildBounties` (r:1 w:1) + /// Proof: `MultiAssetBounties::ChildBounties` (`max_values`: None, `max_size`: Some(1323), added: 3798, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn close_child_bounty() -> Weight { + // Proof Size summary in bytes: + // Measured: `1801` + // Estimated: `6208` + // Minimum execution time: 87_189_000 picoseconds. + Weight::from_parts(89_649_000, 0) + .saturating_add(Weight::from_parts(0, 6208)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: `MultiAssetBounties::Bounties` (r:1 w:0) + /// Proof: `MultiAssetBounties::Bounties` (`max_values`: None, `max_size`: Some(2513), added: 4988, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::ChildBounties` (r:1 w:1) + /// Proof: `MultiAssetBounties::ChildBounties` (`max_values`: None, `max_size`: Some(1323), added: 3798, mode: `MaxEncodedLen`) + fn check_status_funding() -> Weight { + // Proof Size summary in bytes: + // Measured: `510` + // Estimated: `5978` + // Minimum execution time: 27_750_000 picoseconds. + Weight::from_parts(28_949_000, 0) + .saturating_add(Weight::from_parts(0, 5978)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `MultiAssetBounties::Bounties` (r:1 w:0) + /// Proof: `MultiAssetBounties::Bounties` (`max_values`: None, `max_size`: Some(2513), added: 4988, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::ChildBounties` (r:1 w:1) + /// Proof: `MultiAssetBounties::ChildBounties` (`max_values`: None, `max_size`: Some(1323), added: 3798, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::CuratorDeposit` (r:1 w:1) + /// Proof: `MultiAssetBounties::CuratorDeposit` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(265), added: 2740, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::ChildBountiesValuePerParent` (r:1 w:1) + /// Proof: `MultiAssetBounties::ChildBountiesValuePerParent` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::ChildBountiesPerParent` (r:1 w:1) + /// Proof: `MultiAssetBounties::ChildBountiesPerParent` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + fn check_status_refund() -> Weight { + // Proof Size summary in bytes: + // Measured: `3631` + // Estimated: `5978` + // Minimum execution time: 98_080_000 picoseconds. + Weight::from_parts(100_650_000, 0) + .saturating_add(Weight::from_parts(0, 5978)) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(7)) + } + /// Storage: `MultiAssetBounties::Bounties` (r:1 w:0) + /// Proof: `MultiAssetBounties::Bounties` (`max_values`: None, `max_size`: Some(2513), added: 4988, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::ChildBounties` (r:1 w:1) + /// Proof: `MultiAssetBounties::ChildBounties` (`max_values`: None, `max_size`: Some(1323), added: 3798, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::CuratorDeposit` (r:1 w:1) + /// Proof: `MultiAssetBounties::CuratorDeposit` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(265), added: 2740, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::ChildBountiesPerParent` (r:1 w:1) + /// Proof: `MultiAssetBounties::ChildBountiesPerParent` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`) + fn check_status_payout() -> Weight { + // Proof Size summary in bytes: + // Measured: `3654` + // Estimated: `5978` + // Minimum execution time: 95_468_000 picoseconds. + Weight::from_parts(98_090_000, 0) + .saturating_add(Weight::from_parts(0, 5978)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: `MultiAssetBounties::Bounties` (r:1 w:0) + /// Proof: `MultiAssetBounties::Bounties` (`max_values`: None, `max_size`: Some(2513), added: 4988, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::ChildBounties` (r:1 w:1) + /// Proof: `MultiAssetBounties::ChildBounties` (`max_values`: None, `max_size`: Some(1323), added: 3798, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn retry_payment_funding() -> Weight { + // Proof Size summary in bytes: + // Measured: `2143` + // Estimated: `6208` + // Minimum execution time: 85_141_000 picoseconds. + Weight::from_parts(88_729_000, 0) + .saturating_add(Weight::from_parts(0, 6208)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: `MultiAssetBounties::Bounties` (r:1 w:0) + /// Proof: `MultiAssetBounties::Bounties` (`max_values`: None, `max_size`: Some(2513), added: 4988, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::ChildBounties` (r:1 w:1) + /// Proof: `MultiAssetBounties::ChildBounties` (`max_values`: None, `max_size`: Some(1323), added: 3798, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn retry_payment_refund() -> Weight { + // Proof Size summary in bytes: + // Measured: `1803` + // Estimated: `6208` + // Minimum execution time: 84_570_000 picoseconds. + Weight::from_parts(85_859_000, 0) + .saturating_add(Weight::from_parts(0, 6208)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(5)) + } + /// Storage: `MultiAssetBounties::Bounties` (r:1 w:0) + /// Proof: `MultiAssetBounties::Bounties` (`max_values`: None, `max_size`: Some(2513), added: 4988, mode: `MaxEncodedLen`) + /// Storage: `MultiAssetBounties::ChildBounties` (r:1 w:1) + /// Proof: `MultiAssetBounties::ChildBounties` (`max_values`: None, `max_size`: Some(1323), added: 3798, mode: `MaxEncodedLen`) + /// Storage: `Assets::Asset` (r:1 w:1) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) + /// Storage: `Assets::Account` (r:2 w:2) + /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn retry_payment_payout() -> Weight { + // Proof Size summary in bytes: + // Measured: `2943` + // Estimated: `6208` + // Minimum execution time: 93_880_000 picoseconds. + Weight::from_parts(96_569_000, 0) + .saturating_add(Weight::from_parts(0, 6208)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(6)) + } +}