feat: Rebrand Polkadot/Substrate references to PezkuwiChain

This commit systematically rebrands various references from Parity Technologies'
Polkadot/Substrate ecosystem to PezkuwiChain within the kurdistan-sdk.

Key changes include:
- Updated external repository URLs (zombienet-sdk, parity-db, parity-scale-codec, wasm-instrument) to point to pezkuwichain forks.
- Modified internal documentation and code comments to reflect PezkuwiChain naming and structure.
- Replaced direct references to  with  or specific paths within the  for XCM, Pezkuwi, and other modules.
- Cleaned up deprecated  issue and PR references in various  and  files, particularly in  and  modules.
- Adjusted image and logo URLs in documentation to point to PezkuwiChain assets.
- Removed or rephrased comments related to external Polkadot/Substrate PRs and issues.

This is a significant step towards fully customizing the SDK for the PezkuwiChain ecosystem.
This commit is contained in:
2025-12-14 00:04:10 +03:00
parent 286de54384
commit 1c0e57d984
9084 changed files with 997839 additions and 997557 deletions
@@ -0,0 +1,391 @@
// This file is part of Bizinikiwi.
// Copyright (C) Parity Technologies (UK) Ltd.
// 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.
//! Bounties pallet benchmarking.
use super::*;
use alloc::{vec, vec::Vec};
use pezframe_benchmarking::v2::*;
use pezframe_system::{pezpallet_prelude::BlockNumberFor as SystemBlockNumberFor, RawOrigin};
use pezsp_runtime::traits::{BlockNumberProvider, Bounded};
use crate::Pallet as Bounties;
use pezpallet_treasury::Pallet as Treasury;
const SEED: u32 = 0;
fn set_block_number<T: Config<I>, I: 'static>(n: BlockNumberFor<T, I>) {
<T as pezpallet_treasury::Config<I>>::BlockNumberProvider::set_block_number(n);
}
fn minimum_balance<T: Config<I>, I: 'static>() -> BalanceOf<T, I> {
let minimum_balance = T::Currency::minimum_balance();
if minimum_balance.is_zero() {
1u32.into()
} else {
minimum_balance
}
}
// Create bounties that are approved for use in `on_initialize`.
fn create_approved_bounties<T: Config<I>, I: 'static>(n: u32) -> Result<(), BenchmarkError> {
for i in 0..n {
let (caller, _curator, _fee, value, reason) =
setup_bounty::<T, I>(i, T::MaximumReasonLength::get());
Bounties::<T, I>::propose_bounty(RawOrigin::Signed(caller).into(), value, reason)?;
let bounty_id = BountyCount::<T, I>::get() - 1;
let approve_origin =
T::SpendOrigin::try_successful_origin().map_err(|_| BenchmarkError::Weightless)?;
Bounties::<T, I>::approve_bounty(approve_origin, bounty_id)?;
}
ensure!(BountyApprovals::<T, I>::get().len() == n as usize, "Not all bounty approved");
Ok(())
}
// Create the pre-requisite information needed to create a treasury `propose_bounty`.
fn setup_bounty<T: Config<I>, I: 'static>(
u: u32,
d: u32,
) -> (T::AccountId, T::AccountId, BalanceOf<T, I>, BalanceOf<T, I>, Vec<u8>) {
let caller = account("caller", u, SEED);
let value: BalanceOf<T, I> = T::BountyValueMinimum::get().saturating_mul(100u32.into());
let fee = value / 2u32.into();
let deposit = T::BountyDepositBase::get() +
T::DataDepositPerByte::get() * T::MaximumReasonLength::get().into();
let _ = T::Currency::make_free_balance_be(&caller, deposit + minimum_balance::<T, I>());
let curator = account("curator", u, SEED);
let _ =
T::Currency::make_free_balance_be(&curator, fee / 2u32.into() + minimum_balance::<T, I>());
let reason = vec![0; d as usize];
(caller, curator, fee, value, reason)
}
fn create_bounty<T: Config<I>, I: 'static>(
) -> Result<(AccountIdLookupOf<T>, BountyIndex), BenchmarkError> {
let (caller, curator, fee, value, reason) =
setup_bounty::<T, I>(0, T::MaximumReasonLength::get());
let curator_lookup = T::Lookup::unlookup(curator.clone());
Bounties::<T, I>::propose_bounty(RawOrigin::Signed(caller).into(), value, reason)?;
let bounty_id = BountyCount::<T, I>::get() - 1;
let approve_origin =
T::SpendOrigin::try_successful_origin().map_err(|_| BenchmarkError::Weightless)?;
Bounties::<T, I>::approve_bounty(approve_origin.clone(), bounty_id)?;
set_block_number::<T, I>(T::SpendPeriod::get());
Treasury::<T, I>::on_initialize(pezframe_system::Pallet::<T>::block_number());
Bounties::<T, I>::propose_curator(approve_origin, bounty_id, curator_lookup.clone(), fee)?;
Bounties::<T, I>::accept_curator(RawOrigin::Signed(curator).into(), bounty_id)?;
Ok((curator_lookup, bounty_id))
}
fn setup_pot_account<T: Config<I>, I: 'static>() {
let pot_account = Bounties::<T, I>::account_id();
let value = minimum_balance::<T, I>().saturating_mul(1_000_000_000u32.into());
let _ = T::Currency::make_free_balance_be(&pot_account, value);
}
fn assert_last_event<T: Config<I>, I: 'static>(generic_event: <T as Config<I>>::RuntimeEvent) {
pezframe_system::Pallet::<T>::assert_last_event(generic_event.into());
}
#[instance_benchmarks]
mod benchmarks {
use super::*;
#[benchmark]
fn propose_bounty(d: Linear<0, { T::MaximumReasonLength::get() }>) {
let (caller, _, _, value, description) = setup_bounty::<T, I>(0, d);
#[extrinsic_call]
_(RawOrigin::Signed(caller), value, description);
}
#[benchmark]
fn approve_bounty() -> Result<(), BenchmarkError> {
let (caller, _, _, value, reason) = setup_bounty::<T, I>(0, T::MaximumReasonLength::get());
Bounties::<T, I>::propose_bounty(RawOrigin::Signed(caller).into(), value, reason)?;
let bounty_id = BountyCount::<T, I>::get() - 1;
let approve_origin =
T::SpendOrigin::try_successful_origin().map_err(|_| BenchmarkError::Weightless)?;
#[extrinsic_call]
_(approve_origin as T::RuntimeOrigin, bounty_id);
Ok(())
}
#[benchmark]
fn propose_curator() -> Result<(), BenchmarkError> {
setup_pot_account::<T, I>();
let (caller, curator, fee, value, reason) =
setup_bounty::<T, I>(0, T::MaximumReasonLength::get());
let curator_lookup = T::Lookup::unlookup(curator);
Bounties::<T, I>::propose_bounty(RawOrigin::Signed(caller).into(), value, reason)?;
let bounty_id = BountyCount::<T, I>::get() - 1;
let approve_origin =
T::SpendOrigin::try_successful_origin().map_err(|_| BenchmarkError::Weightless)?;
Bounties::<T, I>::approve_bounty(approve_origin.clone(), bounty_id)?;
set_block_number::<T, I>(T::SpendPeriod::get());
Treasury::<T, I>::on_initialize(pezframe_system::Pallet::<T>::block_number());
#[extrinsic_call]
_(approve_origin as T::RuntimeOrigin, bounty_id, curator_lookup, fee);
Ok(())
}
#[benchmark]
fn approve_bounty_with_curator() -> Result<(), BenchmarkError> {
setup_pot_account::<T, I>();
let (caller, curator, fee, value, reason) =
setup_bounty::<T, I>(0, T::MaximumReasonLength::get());
let curator_lookup = T::Lookup::unlookup(curator.clone());
Bounties::<T, I>::propose_bounty(RawOrigin::Signed(caller).into(), value, reason)?;
let bounty_id = BountyCount::<T, I>::get() - 1;
let approve_origin =
T::SpendOrigin::try_successful_origin().map_err(|_| BenchmarkError::Weightless)?;
Treasury::<T, I>::on_initialize(SystemBlockNumberFor::<T>::zero());
#[extrinsic_call]
_(approve_origin as T::RuntimeOrigin, bounty_id, curator_lookup, fee);
assert_last_event::<T, I>(Event::CuratorProposed { bounty_id, curator }.into());
Ok(())
}
// Worst case when curator is inactive and any sender unassigns the curator,
// or if `BountyUpdatePeriod` is large enough and `RejectOrigin` executes the call.
#[benchmark]
fn unassign_curator() -> Result<(), BenchmarkError> {
setup_pot_account::<T, I>();
let (curator_lookup, _) = create_bounty::<T, I>()?;
Treasury::<T, I>::on_initialize(pezframe_system::Pallet::<T>::block_number());
let bounty_id = BountyCount::<T, I>::get() - 1;
let bounty_update_period = T::BountyUpdatePeriod::get();
let inactivity_timeout = T::SpendPeriod::get().saturating_add(bounty_update_period);
set_block_number::<T, I>(inactivity_timeout.saturating_add(2u32.into()));
// If `BountyUpdatePeriod` overflows the inactivity timeout the benchmark still executes the
// slash
let origin = if Pallet::<T, I>::treasury_block_number() <= inactivity_timeout {
let curator = T::Lookup::lookup(curator_lookup).map_err(<&str>::from)?;
T::RejectOrigin::try_successful_origin()
.unwrap_or_else(|_| RawOrigin::Signed(curator).into())
} else {
let caller = whitelisted_caller();
RawOrigin::Signed(caller).into()
};
#[extrinsic_call]
_(origin as T::RuntimeOrigin, bounty_id);
Ok(())
}
#[benchmark]
fn accept_curator() -> Result<(), BenchmarkError> {
setup_pot_account::<T, I>();
let (caller, curator, fee, value, reason) =
setup_bounty::<T, I>(0, T::MaximumReasonLength::get());
let curator_lookup = T::Lookup::unlookup(curator.clone());
Bounties::<T, I>::propose_bounty(RawOrigin::Signed(caller).into(), value, reason)?;
let bounty_id = BountyCount::<T, I>::get() - 1;
let approve_origin =
T::SpendOrigin::try_successful_origin().map_err(|_| BenchmarkError::Weightless)?;
Bounties::<T, I>::approve_bounty(approve_origin.clone(), bounty_id)?;
set_block_number::<T, I>(T::SpendPeriod::get());
Treasury::<T, I>::on_initialize(pezframe_system::Pallet::<T>::block_number());
Bounties::<T, I>::propose_curator(approve_origin, bounty_id, curator_lookup, fee)?;
#[extrinsic_call]
_(RawOrigin::Signed(curator), bounty_id);
Ok(())
}
#[benchmark]
fn award_bounty() -> Result<(), BenchmarkError> {
setup_pot_account::<T, I>();
let (curator_lookup, _) = create_bounty::<T, I>()?;
Treasury::<T, I>::on_initialize(pezframe_system::Pallet::<T>::block_number());
let bounty_id = BountyCount::<T, I>::get() - 1;
let curator = T::Lookup::lookup(curator_lookup).map_err(<&str>::from)?;
let beneficiary = T::Lookup::unlookup(account("beneficiary", 0, SEED));
#[extrinsic_call]
_(RawOrigin::Signed(curator), bounty_id, beneficiary);
Ok(())
}
#[benchmark]
fn claim_bounty() -> Result<(), BenchmarkError> {
setup_pot_account::<T, I>();
let (curator_lookup, _) = create_bounty::<T, I>()?;
Treasury::<T, I>::on_initialize(pezframe_system::Pallet::<T>::block_number());
let bounty_id = BountyCount::<T, I>::get() - 1;
let curator = T::Lookup::lookup(curator_lookup).map_err(<&str>::from)?;
let beneficiary_account: T::AccountId = account("beneficiary", 0, SEED);
let beneficiary = T::Lookup::unlookup(beneficiary_account.clone());
Bounties::<T, I>::award_bounty(
RawOrigin::Signed(curator.clone()).into(),
bounty_id,
beneficiary,
)?;
set_block_number::<T, I>(
T::SpendPeriod::get() + T::BountyDepositPayoutDelay::get() + 1u32.into(),
);
assert!(
T::Currency::free_balance(&beneficiary_account).is_zero(),
"Beneficiary already has balance"
);
#[extrinsic_call]
_(RawOrigin::Signed(curator), bounty_id);
assert!(
!T::Currency::free_balance(&beneficiary_account).is_zero(),
"Beneficiary didn't get paid"
);
Ok(())
}
#[benchmark]
fn close_bounty_proposed() -> Result<(), BenchmarkError> {
setup_pot_account::<T, I>();
let (caller, _, _, value, reason) = setup_bounty::<T, I>(0, 0);
Bounties::<T, I>::propose_bounty(RawOrigin::Signed(caller).into(), value, reason)?;
let bounty_id = BountyCount::<T, I>::get() - 1;
let approve_origin =
T::RejectOrigin::try_successful_origin().map_err(|_| BenchmarkError::Weightless)?;
#[extrinsic_call]
close_bounty(approve_origin, bounty_id);
Ok(())
}
#[benchmark]
fn close_bounty_active() -> Result<(), BenchmarkError> {
setup_pot_account::<T, I>();
let (_, _) = create_bounty::<T, I>()?;
Treasury::<T, I>::on_initialize(pezframe_system::Pallet::<T>::block_number());
let bounty_id = BountyCount::<T, I>::get() - 1;
let approve_origin =
T::RejectOrigin::try_successful_origin().map_err(|_| BenchmarkError::Weightless)?;
#[extrinsic_call]
close_bounty(approve_origin as T::RuntimeOrigin, bounty_id);
assert_last_event::<T, I>(Event::BountyCanceled { index: bounty_id }.into());
Ok(())
}
#[benchmark]
fn extend_bounty_expiry() -> Result<(), BenchmarkError> {
setup_pot_account::<T, I>();
let (curator_lookup, _) = create_bounty::<T, I>()?;
Treasury::<T, I>::on_initialize(pezframe_system::Pallet::<T>::block_number());
let bounty_id = BountyCount::<T, I>::get() - 1;
let curator = T::Lookup::lookup(curator_lookup).map_err(<&str>::from)?;
#[extrinsic_call]
_(RawOrigin::Signed(curator), bounty_id, Vec::new());
assert_last_event::<T, I>(Event::BountyExtended { index: bounty_id }.into());
Ok(())
}
#[benchmark]
fn spend_funds(b: Linear<0, 100>) -> Result<(), BenchmarkError> {
setup_pot_account::<T, I>();
create_approved_bounties::<T, I>(b)?;
let mut budget_remaining = BalanceOf::<T, I>::max_value();
let mut imbalance = PositiveImbalanceOf::<T, I>::zero();
let mut total_weight = Weight::zero();
let mut missed_any = false;
#[block]
{
<Bounties<T, I> as pezpallet_treasury::SpendFunds<T, I>>::spend_funds(
&mut budget_remaining,
&mut imbalance,
&mut total_weight,
&mut missed_any,
);
}
assert!(!missed_any, "Missed some");
if b > 0 {
assert!(budget_remaining < BalanceOf::<T, I>::max_value(), "Budget not used");
assert_last_event::<T, I>(Event::BountyBecameActive { index: b - 1 }.into());
} else {
assert!(budget_remaining == BalanceOf::<T, I>::max_value(), "Budget used");
}
Ok(())
}
#[benchmark]
fn poke_deposit() -> Result<(), BenchmarkError> {
// Create a bounty
let (caller, _, _, value, reason) = setup_bounty::<T, I>(0, 5); // 5 bytes description
Bounties::<T, I>::propose_bounty(RawOrigin::Signed(caller.clone()).into(), value, reason)?;
let bounty_id = BountyCount::<T, I>::get() - 1;
let old_deposit = T::Currency::reserved_balance(&caller);
// Modify the description to be maximum length
let max_description: Vec<u8> = vec![0; T::MaximumReasonLength::get() as usize];
let bounded_description: BoundedVec<u8, T::MaximumReasonLength> =
max_description.try_into().unwrap();
BountyDescriptions::<T, I>::insert(bounty_id, &bounded_description);
// Ensure caller has enough balance for new deposit
let new_deposit = Bounties::<T, I>::calculate_bounty_deposit(&bounded_description);
let required_balance = new_deposit.saturating_add(minimum_balance::<T, I>());
T::Currency::make_free_balance_be(&caller, required_balance);
#[extrinsic_call]
_(RawOrigin::Signed(caller.clone()), bounty_id);
let bounty = crate::Bounties::<T, I>::get(bounty_id).unwrap();
assert_eq!(bounty.bond, new_deposit);
assert_eq!(T::Currency::reserved_balance(&caller), new_deposit);
assert_last_event::<T, I>(
Event::DepositPoked { bounty_id, proposer: caller, old_deposit, new_deposit }.into(),
);
Ok(())
}
impl_benchmark_test_suite!(
Bounties,
crate::tests::ExtBuilder::default().build(),
crate::tests::Test
);
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,19 @@
// This file is part of Bizinikiwi.
// Copyright (C) Parity Technologies (UK) Ltd.
// 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.
/// Version 4.
pub mod v4;
@@ -0,0 +1,230 @@
// This file is part of Bizinikiwi.
// Copyright (C) Parity Technologies (UK) Ltd.
// 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.
use core::str;
use pezframe_support::{
storage::{generator::StorageValue, StoragePrefixedMap},
traits::{
Get, GetStorageVersion, PalletInfoAccess, StorageVersion,
STORAGE_VERSION_STORAGE_KEY_POSTFIX,
},
weights::Weight,
};
use pezsp_core::hexdisplay::HexDisplay;
use pezsp_io::{hashing::twox_128, storage};
use crate as pezpallet_bounties;
/// Migrate the storage of the bounties pallet to a new prefix, leaving all other storage untouched
///
/// This new prefix must be the same as the one set in construct_runtime. For safety, use
/// `PalletInfo` to get it, as:
/// `<Runtime as pezframe_system::Config>::PalletInfo::name::<BountiesPallet>`.
///
/// The migration will look into the storage version in order not to trigger a migration on an up
/// to date storage. Thus the on chain storage version must be less than 4 in order to trigger the
/// migration.
pub fn migrate<
T: pezpallet_bounties::Config,
P: GetStorageVersion + PalletInfoAccess,
N: AsRef<str>,
>(
old_pallet_name: N,
new_pallet_name: N,
) -> Weight {
let old_pallet_name = old_pallet_name.as_ref();
let new_pallet_name = new_pallet_name.as_ref();
if new_pallet_name == old_pallet_name {
log::info!(
target: "runtime::bounties",
"New pallet name is equal to the old prefix. No migration needs to be done.",
);
return Weight::zero();
}
let on_chain_storage_version = <P as GetStorageVersion>::on_chain_storage_version();
log::info!(
target: "runtime::bounties",
"Running migration to v4 for bounties with storage version {:?}",
on_chain_storage_version,
);
if on_chain_storage_version < 4 {
let storage_prefix = pezpallet_bounties::BountyCount::<T>::storage_prefix();
pezframe_support::storage::migration::move_storage_from_pallet(
storage_prefix,
old_pallet_name.as_bytes(),
new_pallet_name.as_bytes(),
);
log_migration("migration", storage_prefix, old_pallet_name, new_pallet_name);
let storage_prefix = pezpallet_bounties::Bounties::<T>::storage_prefix();
pezframe_support::storage::migration::move_storage_from_pallet(
storage_prefix,
old_pallet_name.as_bytes(),
new_pallet_name.as_bytes(),
);
log_migration("migration", storage_prefix, old_pallet_name, new_pallet_name);
let storage_prefix = pezpallet_bounties::BountyDescriptions::<T>::storage_prefix();
pezframe_support::storage::migration::move_storage_from_pallet(
storage_prefix,
old_pallet_name.as_bytes(),
new_pallet_name.as_bytes(),
);
log_migration("migration", storage_prefix, old_pallet_name, new_pallet_name);
let storage_prefix = pezpallet_bounties::BountyApprovals::<T>::storage_prefix();
pezframe_support::storage::migration::move_storage_from_pallet(
storage_prefix,
old_pallet_name.as_bytes(),
new_pallet_name.as_bytes(),
);
log_migration("migration", storage_prefix, old_pallet_name, new_pallet_name);
StorageVersion::new(4).put::<P>();
<T as pezframe_system::Config>::BlockWeights::get().max_block
} else {
log::warn!(
target: "runtime::bounties",
"Attempted to apply migration to v4 but failed because storage version is {:?}",
on_chain_storage_version,
);
Weight::zero()
}
}
/// Some checks prior to migration. This can be linked to
/// `pezframe_support::traits::OnRuntimeUpgrade::pre_upgrade` for further testing.
///
/// Panics if anything goes wrong.
pub fn pre_migration<T: pezpallet_bounties::Config, P: GetStorageVersion + 'static, N: AsRef<str>>(
old_pallet_name: N,
new_pallet_name: N,
) {
let old_pallet_name = old_pallet_name.as_ref();
let new_pallet_name = new_pallet_name.as_ref();
let storage_prefix_bounties_count = pezpallet_bounties::BountyCount::<T>::storage_prefix();
let storage_prefix_bounties = pezpallet_bounties::Bounties::<T>::storage_prefix();
let storage_prefix_bounties_description =
pezpallet_bounties::BountyDescriptions::<T>::storage_prefix();
let storage_prefix_bounties_approvals = pezpallet_bounties::BountyApprovals::<T>::storage_prefix();
log_migration("pre-migration", storage_prefix_bounties_count, old_pallet_name, new_pallet_name);
log_migration("pre-migration", storage_prefix_bounties, old_pallet_name, new_pallet_name);
log_migration(
"pre-migration",
storage_prefix_bounties_description,
old_pallet_name,
new_pallet_name,
);
log_migration(
"pre-migration",
storage_prefix_bounties_approvals,
old_pallet_name,
new_pallet_name,
);
let new_pallet_prefix = twox_128(new_pallet_name.as_bytes());
let storage_version_key =
[&new_pallet_prefix, &twox_128(STORAGE_VERSION_STORAGE_KEY_POSTFIX)[..]].concat();
// ensure nothing is stored in the new prefix.
assert!(
storage::next_key(&new_pallet_prefix).map_or(
// either nothing is there
true,
// or we ensure that the next key has no common prefix with twox_128(new),
// or is the pallet version that is already stored using the pallet name
|next_key| {
storage::next_key(&next_key).map_or(true, |next_key| {
!next_key.starts_with(&new_pallet_prefix) || next_key == storage_version_key
})
},
),
"unexpected next_key({}) = {:?}",
new_pallet_name,
HexDisplay::from(&pezsp_io::storage::next_key(&new_pallet_prefix).unwrap()),
);
assert!(<P as GetStorageVersion>::on_chain_storage_version() < 4);
}
/// Some checks for after migration. This can be linked to
/// `pezframe_support::traits::OnRuntimeUpgrade::post_upgrade` for further testing.
///
/// Panics if anything goes wrong.
pub fn post_migration<T: pezpallet_bounties::Config, P: GetStorageVersion, N: AsRef<str>>(
old_pallet_name: N,
new_pallet_name: N,
) {
let old_pallet_name = old_pallet_name.as_ref();
let new_pallet_name = new_pallet_name.as_ref();
let storage_prefix_bounties_count = pezpallet_bounties::BountyCount::<T>::storage_prefix();
let storage_prefix_bounties = pezpallet_bounties::Bounties::<T>::storage_prefix();
let storage_prefix_bounties_description =
pezpallet_bounties::BountyDescriptions::<T>::storage_prefix();
let storage_prefix_bounties_approvals = pezpallet_bounties::BountyApprovals::<T>::storage_prefix();
log_migration(
"post-migration",
storage_prefix_bounties_count,
old_pallet_name,
new_pallet_name,
);
log_migration("post-migration", storage_prefix_bounties, old_pallet_name, new_pallet_name);
log_migration(
"post-migration",
storage_prefix_bounties_description,
old_pallet_name,
new_pallet_name,
);
log_migration(
"post-migration",
storage_prefix_bounties_approvals,
old_pallet_name,
new_pallet_name,
);
let old_pallet_prefix = twox_128(old_pallet_name.as_bytes());
let old_bounties_count_key =
[&old_pallet_prefix, &twox_128(storage_prefix_bounties_count)[..]].concat();
let old_bounties_key = [&old_pallet_prefix, &twox_128(storage_prefix_bounties)[..]].concat();
let old_bounties_description_key =
[&old_pallet_prefix, &twox_128(storage_prefix_bounties_description)[..]].concat();
let old_bounties_approvals_key =
[&old_pallet_prefix, &twox_128(storage_prefix_bounties_approvals)[..]].concat();
assert!(storage::next_key(&old_bounties_count_key)
.map_or(true, |next_key| !next_key.starts_with(&old_bounties_count_key)));
assert!(storage::next_key(&old_bounties_key)
.map_or(true, |next_key| !next_key.starts_with(&old_bounties_key)));
assert!(storage::next_key(&old_bounties_description_key)
.map_or(true, |next_key| !next_key.starts_with(&old_bounties_description_key)));
assert!(storage::next_key(&old_bounties_approvals_key)
.map_or(true, |next_key| !next_key.starts_with(&old_bounties_approvals_key)));
assert_eq!(<P as GetStorageVersion>::on_chain_storage_version(), 4);
}
fn log_migration(stage: &str, storage_prefix: &[u8], old_pallet_name: &str, new_pallet_name: &str) {
log::info!(
target: "runtime::bounties",
"{} prefix of storage '{}': '{}' ==> '{}'",
stage,
str::from_utf8(storage_prefix).unwrap_or("<Invalid UTF8>"),
old_pallet_name,
new_pallet_name,
);
}
File diff suppressed because it is too large Load Diff
+496
View File
@@ -0,0 +1,496 @@
// This file is part of Bizinikiwi.
// Copyright (C) Parity Technologies (UK) Ltd.
// 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.
// This file is part of Bizinikiwi.
// Copyright (C) Parity Technologies (UK) Ltd.
// 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.
//! Autogenerated weights for `pezpallet_bounties`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-07-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ce7865b6eb9f`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024`
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/kitchensink-runtime/kitchensink_runtime.wasm
// --pallet=pezpallet_bounties
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/bizinikiwi/HEADER-APACHE2
// --output=/__w/pezkuwi-sdk/pezkuwi-sdk/bizinikiwi/pezframe/bounties/src/weights.rs
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --template=bizinikiwi/.maintain/frame-weight-template.hbs
// --no-storage-info
// --no-min-squares
// --no-median-slopes
// --exclude-pallets=pezpallet_xcm,pezpallet_xcm_benchmarks::fungible,pezpallet_xcm_benchmarks::generic,pezpallet_nomination_pools,pezpallet_remark,pezpallet_transaction_storage
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
#![allow(dead_code)]
use pezframe_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use core::marker::PhantomData;
/// Weight functions needed for `pezpallet_bounties`.
pub trait WeightInfo {
fn propose_bounty(d: u32, ) -> Weight;
fn approve_bounty() -> Weight;
fn propose_curator() -> Weight;
fn approve_bounty_with_curator() -> Weight;
fn unassign_curator() -> Weight;
fn accept_curator() -> Weight;
fn award_bounty() -> Weight;
fn claim_bounty() -> Weight;
fn close_bounty_proposed() -> Weight;
fn close_bounty_active() -> Weight;
fn extend_bounty_expiry() -> Weight;
fn spend_funds(b: u32, ) -> Weight;
fn poke_deposit() -> Weight;
}
/// Weights for `pezpallet_bounties` using the Bizinikiwi node and recommended hardware.
pub struct BizinikiwiWeight<T>(PhantomData<T>);
impl<T: pezframe_system::Config> WeightInfo for BizinikiwiWeight<T> {
/// Storage: `Bounties::BountyCount` (r:1 w:1)
/// Proof: `Bounties::BountyCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `Bounties::BountyDescriptions` (r:0 w:1)
/// Proof: `Bounties::BountyDescriptions` (`max_values`: None, `max_size`: Some(314), added: 2789, mode: `MaxEncodedLen`)
/// Storage: `Bounties::Bounties` (r:0 w:1)
/// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
/// The range of component `d` is `[0, 300]`.
fn propose_bounty(d: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `342`
// Estimated: `3593`
// Minimum execution time: 25_999_000 picoseconds.
Weight::from_parts(27_437_542, 3593)
// Standard Error: 204
.saturating_add(Weight::from_parts(775, 0).saturating_mul(d.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
/// Storage: `Bounties::Bounties` (r:1 w:1)
/// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
/// Storage: `Bounties::BountyApprovals` (r:1 w:1)
/// Proof: `Bounties::BountyApprovals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`)
fn approve_bounty() -> Weight {
// Proof Size summary in bytes:
// Measured: `434`
// Estimated: `3642`
// Minimum execution time: 14_047_000 picoseconds.
Weight::from_parts(14_589_000, 3642)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Bounties::Bounties` (r:1 w:1)
/// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
fn propose_curator() -> Weight {
// Proof Size summary in bytes:
// Measured: `454`
// Estimated: `3642`
// Minimum execution time: 15_603_000 picoseconds.
Weight::from_parts(16_186_000, 3642)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Bounties::Bounties` (r:1 w:1)
/// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
/// Storage: `Bounties::BountyApprovals` (r:1 w:1)
/// Proof: `Bounties::BountyApprovals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`)
fn approve_bounty_with_curator() -> Weight {
// Proof Size summary in bytes:
// Measured: `434`
// Estimated: `3642`
// Minimum execution time: 18_853_000 picoseconds.
Weight::from_parts(19_458_000, 3642)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Bounties::Bounties` (r:1 w:1)
/// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn unassign_curator() -> Weight {
// Proof Size summary in bytes:
// Measured: `630`
// Estimated: `3642`
// Minimum execution time: 41_310_000 picoseconds.
Weight::from_parts(42_322_000, 3642)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Bounties::Bounties` (r:1 w:1)
/// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn accept_curator() -> Weight {
// Proof Size summary in bytes:
// Measured: `626`
// Estimated: `3642`
// Minimum execution time: 32_010_000 picoseconds.
Weight::from_parts(32_692_000, 3642)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Bounties::Bounties` (r:1 w:1)
/// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
/// Storage: `ChildBounties::ParentChildBounties` (r:1 w:0)
/// Proof: `ChildBounties::ParentChildBounties` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`)
fn award_bounty() -> Weight {
// Proof Size summary in bytes:
// Measured: `638`
// Estimated: `3642`
// Minimum execution time: 20_416_000 picoseconds.
Weight::from_parts(21_226_000, 3642)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Bounties::Bounties` (r:1 w:1)
/// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:3 w:3)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `ChildBounties::ChildrenCuratorFees` (r:1 w:1)
/// Proof: `ChildBounties::ChildrenCuratorFees` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
/// Storage: `Bounties::BountyDescriptions` (r:0 w:1)
/// Proof: `Bounties::BountyDescriptions` (`max_values`: None, `max_size`: Some(314), added: 2789, mode: `MaxEncodedLen`)
/// Storage: `ChildBounties::ParentTotalChildBounties` (r:0 w:1)
/// Proof: `ChildBounties::ParentTotalChildBounties` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`)
/// Storage: `ChildBounties::ParentChildBounties` (r:0 w:1)
/// Proof: `ChildBounties::ParentChildBounties` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`)
fn claim_bounty() -> Weight {
// Proof Size summary in bytes:
// Measured: `1036`
// Estimated: `8799`
// Minimum execution time: 113_090_000 picoseconds.
Weight::from_parts(114_971_000, 8799)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(8_u64))
}
/// Storage: `Bounties::Bounties` (r:1 w:1)
/// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
/// Storage: `ChildBounties::ParentChildBounties` (r:1 w:0)
/// Proof: `ChildBounties::ParentChildBounties` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `Bounties::BountyDescriptions` (r:0 w:1)
/// Proof: `Bounties::BountyDescriptions` (`max_values`: None, `max_size`: Some(314), added: 2789, mode: `MaxEncodedLen`)
fn close_bounty_proposed() -> Weight {
// Proof Size summary in bytes:
// Measured: `682`
// Estimated: `3642`
// Minimum execution time: 44_374_000 picoseconds.
Weight::from_parts(46_520_000, 3642)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
/// Storage: `Bounties::Bounties` (r:1 w:1)
/// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
/// Storage: `ChildBounties::ParentChildBounties` (r:1 w:1)
/// Proof: `ChildBounties::ParentChildBounties` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `Bounties::BountyDescriptions` (r:0 w:1)
/// Proof: `Bounties::BountyDescriptions` (`max_values`: None, `max_size`: Some(314), added: 2789, mode: `MaxEncodedLen`)
/// Storage: `ChildBounties::ParentTotalChildBounties` (r:0 w:1)
/// Proof: `ChildBounties::ParentTotalChildBounties` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`)
fn close_bounty_active() -> Weight {
// Proof Size summary in bytes:
// Measured: `952`
// Estimated: `6196`
// Minimum execution time: 79_903_000 picoseconds.
Weight::from_parts(83_063_000, 6196)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(6_u64))
}
/// Storage: `Bounties::Bounties` (r:1 w:1)
/// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
fn extend_bounty_expiry() -> Weight {
// Proof Size summary in bytes:
// Measured: `490`
// Estimated: `3642`
// Minimum execution time: 16_302_000 picoseconds.
Weight::from_parts(16_897_000, 3642)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Bounties::BountyApprovals` (r:1 w:1)
/// Proof: `Bounties::BountyApprovals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`)
/// Storage: `Bounties::Bounties` (r:100 w:100)
/// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:200 w:200)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `b` is `[0, 100]`.
fn spend_funds(b: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `71 + b * (298 ±0)`
// Estimated: `1887 + b * (5206 ±0)`
// Minimum execution time: 3_377_000 picoseconds.
Weight::from_parts(3_447_000, 1887)
// Standard Error: 10_301
.saturating_add(Weight::from_parts(34_772_229, 0).saturating_mul(b.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(b.into())))
.saturating_add(T::DbWeight::get().writes(1_u64))
.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(b.into())))
.saturating_add(Weight::from_parts(0, 5206).saturating_mul(b.into()))
}
/// Storage: `Bounties::Bounties` (r:1 w:1)
/// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
/// Storage: `Bounties::BountyDescriptions` (r:1 w:0)
/// Proof: `Bounties::BountyDescriptions` (`max_values`: None, `max_size`: Some(314), added: 2789, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn poke_deposit() -> Weight {
// Proof Size summary in bytes:
// Measured: `839`
// Estimated: `3779`
// Minimum execution time: 32_100_000 picoseconds.
Weight::from_parts(33_660_000, 3779)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
}
// For backwards compatibility and tests.
impl WeightInfo for () {
/// Storage: `Bounties::BountyCount` (r:1 w:1)
/// Proof: `Bounties::BountyCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `Bounties::BountyDescriptions` (r:0 w:1)
/// Proof: `Bounties::BountyDescriptions` (`max_values`: None, `max_size`: Some(314), added: 2789, mode: `MaxEncodedLen`)
/// Storage: `Bounties::Bounties` (r:0 w:1)
/// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
/// The range of component `d` is `[0, 300]`.
fn propose_bounty(d: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `342`
// Estimated: `3593`
// Minimum execution time: 25_999_000 picoseconds.
Weight::from_parts(27_437_542, 3593)
// Standard Error: 204
.saturating_add(Weight::from_parts(775, 0).saturating_mul(d.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(4_u64))
}
/// Storage: `Bounties::Bounties` (r:1 w:1)
/// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
/// Storage: `Bounties::BountyApprovals` (r:1 w:1)
/// Proof: `Bounties::BountyApprovals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`)
fn approve_bounty() -> Weight {
// Proof Size summary in bytes:
// Measured: `434`
// Estimated: `3642`
// Minimum execution time: 14_047_000 picoseconds.
Weight::from_parts(14_589_000, 3642)
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
/// Storage: `Bounties::Bounties` (r:1 w:1)
/// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
fn propose_curator() -> Weight {
// Proof Size summary in bytes:
// Measured: `454`
// Estimated: `3642`
// Minimum execution time: 15_603_000 picoseconds.
Weight::from_parts(16_186_000, 3642)
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
/// Storage: `Bounties::Bounties` (r:1 w:1)
/// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
/// Storage: `Bounties::BountyApprovals` (r:1 w:1)
/// Proof: `Bounties::BountyApprovals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`)
fn approve_bounty_with_curator() -> Weight {
// Proof Size summary in bytes:
// Measured: `434`
// Estimated: `3642`
// Minimum execution time: 18_853_000 picoseconds.
Weight::from_parts(19_458_000, 3642)
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
/// Storage: `Bounties::Bounties` (r:1 w:1)
/// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn unassign_curator() -> Weight {
// Proof Size summary in bytes:
// Measured: `630`
// Estimated: `3642`
// Minimum execution time: 41_310_000 picoseconds.
Weight::from_parts(42_322_000, 3642)
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
/// Storage: `Bounties::Bounties` (r:1 w:1)
/// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn accept_curator() -> Weight {
// Proof Size summary in bytes:
// Measured: `626`
// Estimated: `3642`
// Minimum execution time: 32_010_000 picoseconds.
Weight::from_parts(32_692_000, 3642)
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
/// Storage: `Bounties::Bounties` (r:1 w:1)
/// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
/// Storage: `ChildBounties::ParentChildBounties` (r:1 w:0)
/// Proof: `ChildBounties::ParentChildBounties` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`)
fn award_bounty() -> Weight {
// Proof Size summary in bytes:
// Measured: `638`
// Estimated: `3642`
// Minimum execution time: 20_416_000 picoseconds.
Weight::from_parts(21_226_000, 3642)
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
/// Storage: `Bounties::Bounties` (r:1 w:1)
/// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:3 w:3)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `ChildBounties::ChildrenCuratorFees` (r:1 w:1)
/// Proof: `ChildBounties::ChildrenCuratorFees` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
/// Storage: `Bounties::BountyDescriptions` (r:0 w:1)
/// Proof: `Bounties::BountyDescriptions` (`max_values`: None, `max_size`: Some(314), added: 2789, mode: `MaxEncodedLen`)
/// Storage: `ChildBounties::ParentTotalChildBounties` (r:0 w:1)
/// Proof: `ChildBounties::ParentTotalChildBounties` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`)
/// Storage: `ChildBounties::ParentChildBounties` (r:0 w:1)
/// Proof: `ChildBounties::ParentChildBounties` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`)
fn claim_bounty() -> Weight {
// Proof Size summary in bytes:
// Measured: `1036`
// Estimated: `8799`
// Minimum execution time: 113_090_000 picoseconds.
Weight::from_parts(114_971_000, 8799)
.saturating_add(RocksDbWeight::get().reads(5_u64))
.saturating_add(RocksDbWeight::get().writes(8_u64))
}
/// Storage: `Bounties::Bounties` (r:1 w:1)
/// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
/// Storage: `ChildBounties::ParentChildBounties` (r:1 w:0)
/// Proof: `ChildBounties::ParentChildBounties` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `Bounties::BountyDescriptions` (r:0 w:1)
/// Proof: `Bounties::BountyDescriptions` (`max_values`: None, `max_size`: Some(314), added: 2789, mode: `MaxEncodedLen`)
fn close_bounty_proposed() -> Weight {
// Proof Size summary in bytes:
// Measured: `682`
// Estimated: `3642`
// Minimum execution time: 44_374_000 picoseconds.
Weight::from_parts(46_520_000, 3642)
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
}
/// Storage: `Bounties::Bounties` (r:1 w:1)
/// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
/// Storage: `ChildBounties::ParentChildBounties` (r:1 w:1)
/// Proof: `ChildBounties::ParentChildBounties` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `Bounties::BountyDescriptions` (r:0 w:1)
/// Proof: `Bounties::BountyDescriptions` (`max_values`: None, `max_size`: Some(314), added: 2789, mode: `MaxEncodedLen`)
/// Storage: `ChildBounties::ParentTotalChildBounties` (r:0 w:1)
/// Proof: `ChildBounties::ParentTotalChildBounties` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`)
fn close_bounty_active() -> Weight {
// Proof Size summary in bytes:
// Measured: `952`
// Estimated: `6196`
// Minimum execution time: 79_903_000 picoseconds.
Weight::from_parts(83_063_000, 6196)
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().writes(6_u64))
}
/// Storage: `Bounties::Bounties` (r:1 w:1)
/// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
fn extend_bounty_expiry() -> Weight {
// Proof Size summary in bytes:
// Measured: `490`
// Estimated: `3642`
// Minimum execution time: 16_302_000 picoseconds.
Weight::from_parts(16_897_000, 3642)
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
/// Storage: `Bounties::BountyApprovals` (r:1 w:1)
/// Proof: `Bounties::BountyApprovals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`)
/// Storage: `Bounties::Bounties` (r:100 w:100)
/// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:200 w:200)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `b` is `[0, 100]`.
fn spend_funds(b: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `71 + b * (298 ±0)`
// Estimated: `1887 + b * (5206 ±0)`
// Minimum execution time: 3_377_000 picoseconds.
Weight::from_parts(3_447_000, 1887)
// Standard Error: 10_301
.saturating_add(Weight::from_parts(34_772_229, 0).saturating_mul(b.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().reads((3_u64).saturating_mul(b.into())))
.saturating_add(RocksDbWeight::get().writes(1_u64))
.saturating_add(RocksDbWeight::get().writes((3_u64).saturating_mul(b.into())))
.saturating_add(Weight::from_parts(0, 5206).saturating_mul(b.into()))
}
/// Storage: `Bounties::Bounties` (r:1 w:1)
/// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
/// Storage: `Bounties::BountyDescriptions` (r:1 w:0)
/// Proof: `Bounties::BountyDescriptions` (`max_values`: None, `max_size`: Some(314), added: 2789, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn poke_deposit() -> Weight {
// Proof Size summary in bytes:
// Measured: `839`
// Estimated: `3779`
// Minimum execution time: 32_100_000 picoseconds.
Weight::from_parts(33_660_000, 3779)
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
}