chore: regenerate umbrella crate, fix feature propagation

This commit is contained in:
2025-12-16 11:28:32 +03:00
parent dd6d48f528
commit 620b0e3aa0
1358 changed files with 9464 additions and 7656 deletions
@@ -15,13 +15,13 @@
//! Managed Collective Content Pezpallet
//!
//! The pezpallet provides the functionality to store different types of content. This would typically
//! be used by an on-chain collective, such as the Pezkuwi Alliance or Ambassador Program.
//! The pezpallet provides the functionality to store different types of content. This would
//! typically be used by an on-chain collective, such as the Pezkuwi Alliance or Ambassador Program.
//!
//! The pezpallet stores content as an [OpaqueCid], which should correspond to some off-chain hosting
//! service, such as IPFS, and contain any type of data. Each type of content has its own origin
//! from which it can be managed. The origins are configurable in the runtime. Storing content does
//! not require a deposit, as it is expected to be managed by a trusted collective.
//! The pezpallet stores content as an [OpaqueCid], which should correspond to some off-chain
//! hosting service, such as IPFS, and contain any type of data. Each type of content has its own
//! origin from which it can be managed. The origins are configurable in the runtime. Storing
//! content does not require a deposit, as it is expected to be managed by a trusted collective.
//!
//! Content types:
//!
@@ -124,7 +124,8 @@ pub mod pezpallet {
#[pezpallet::config]
pub trait Config: pezframe_system::Config {
type RuntimeEvent: From<Event<Self>> + IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
type RuntimeEvent: From<Event<Self>>
+ IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
type Currency: ReservableCurrency<Self::AccountId>;
/// Origin that can revoke citizenship (governance/root)
@@ -1,7 +1,7 @@
use codec::{Decode, Encode, MaxEncodedLen};
use pezframe_support::pezpallet_prelude::{BoundedVec, Get, RuntimeDebug};
use scale_info::TypeInfo;
use pezsp_core::H256;
use scale_info::TypeInfo;
/// Citizenship status levels
/// PRIVACY: No personal data stored on-chain, only status and hash
@@ -114,7 +114,8 @@ pub mod pezpallet {
#[pezpallet::config]
pub trait Config: pezframe_system::Config {
type RuntimeEvent: From<Event<Self>> + IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
type RuntimeEvent: From<Event<Self>>
+ IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
type AdminOrigin: EnsureOrigin<Self::RuntimeOrigin, Success = Self::AccountId>;
type WeightInfo: WeightInfo;
@@ -140,8 +140,8 @@ impl pezpallet_collective::Config<Instance1> for Test {
pub fn new_test_ext() -> pezsp_io::TestExternalities {
let t = pezframe_system::GenesisConfig::<Test>::default().build_storage().unwrap();
// `pezpallet-collective`'in genesis'ini de kurmamıza gerek kalmadı çünkü artık testimiz ona bağlı
// değil.
// `pezpallet-collective`'in genesis'ini de kurmamıza gerek kalmadı çünkü artık testimiz ona
// bağlı değil.
let mut ext = pezsp_io::TestExternalities::new(t);
ext.execute_with(|| System::set_block_number(1));
ext
@@ -115,8 +115,8 @@ use pezframe_support::{
};
use pezframe_system::pezpallet_prelude::BlockNumberFor;
use pezpallet_trust::TrustScoreProvider;
use scale_info::TypeInfo;
use pezsp_runtime::traits::{AccountIdConversion, Member, Saturating, Zero};
use scale_info::TypeInfo;
#[pezframe_support::pezpallet]
pub mod pezpallet {
@@ -2,7 +2,8 @@
//! # PEZ Treasury Pezpallet
//!
//! A pezpallet for managing the PEZ token distribution and treasury with automated halving mechanics.
//! A pezpallet for managing the PEZ token distribution and treasury with automated halving
//! mechanics.
//!
//! ## Overview
//!
@@ -92,8 +93,8 @@ use pezframe_support::{
PalletId,
};
use pezframe_system::pezpallet_prelude::BlockNumberFor;
use scale_info::TypeInfo;
use pezsp_runtime::traits::{AccountIdConversion, Saturating, Zero};
use scale_info::TypeInfo;
#[pezframe_support::pezpallet]
pub mod pezpallet {
@@ -91,7 +91,9 @@ pub mod v1 {
}
#[cfg(feature = "try-runtime")]
fn post_upgrade(state: pezsp_std::vec::Vec<u8>) -> Result<(), pezsp_runtime::TryRuntimeError> {
fn post_upgrade(
state: pezsp_std::vec::Vec<u8>,
) -> Result<(), pezsp_runtime::TryRuntimeError> {
use codec::Decode;
let (
@@ -199,7 +201,9 @@ pub mod v2 {
}
#[cfg(feature = "try-runtime")]
fn post_upgrade(_state: pezsp_std::vec::Vec<u8>) -> Result<(), pezsp_runtime::TryRuntimeError> {
fn post_upgrade(
_state: pezsp_std::vec::Vec<u8>,
) -> Result<(), pezsp_runtime::TryRuntimeError> {
log::info!("✅ Post-upgrade check passed for pezpallet-pez-treasury v2");
Ok(())
}
@@ -97,8 +97,9 @@ impl pezpallet_assets::Config for Test {
type AssetId = u32;
type AssetIdParameter = u32;
type Currency = Balances;
type CreateOrigin =
pezframe_support::traits::AsEnsureOriginWithArg<pezframe_system::EnsureSigned<Self::AccountId>>;
type CreateOrigin = pezframe_support::traits::AsEnsureOriginWithArg<
pezframe_system::EnsureSigned<Self::AccountId>,
>;
type ForceOrigin = pezframe_system::EnsureRoot<Self::AccountId>;
type AssetDeposit = AssetDeposit;
type AssetAccountDeposit = ConstU128<0>;
@@ -49,7 +49,8 @@ pub mod pezpallet {
pub trait Config: pezframe_system::Config {
/// The overarching event type.
#[allow(deprecated)]
type RuntimeEvent: From<Event<Self>> + IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
type RuntimeEvent: From<Event<Self>>
+ IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
type RuntimeOrigin: From<<Self as SystemConfig>::RuntimeOrigin>
+ Into<Result<CumulusOrigin, <Self as Config>::RuntimeOrigin>>;
@@ -2,7 +2,8 @@
//! # Referral Pezpallet
//!
//! A pezpallet for managing user referrals and tracking network growth through invitation mechanics.
//! A pezpallet for managing user referrals and tracking network growth through invitation
//! mechanics.
//!
//! ## Overview
//!
@@ -120,7 +121,8 @@ pub mod pezpallet {
#[pezpallet::config]
pub trait Config: pezframe_system::Config + pezpallet_identity_kyc::Config + TypeInfo {
type RuntimeEvent: From<Event<Self>> + IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
type RuntimeEvent: From<Event<Self>>
+ IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
type WeightInfo: weights::WeightInfo;
/// Default referrer account - used when no referrer is specified
@@ -149,7 +149,8 @@ pub mod pezpallet {
// Ensuring BlockNumber is convertible from u32.
BlockNumberFor<Self>: From<u32>,
{
type RuntimeEvent: From<Event<Self>> + IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
type RuntimeEvent: From<Event<Self>>
+ IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
/// Balance type to be used for staking.
/// Adding all required mathematical and comparison properties.
type Balance: Member
@@ -247,7 +247,8 @@ impl ExtBuilder {
}
pub fn build(self) -> pezsp_io::TestExternalities {
let mut storage = pezframe_system::GenesisConfig::<Test>::default().build_storage().unwrap();
let mut storage =
pezframe_system::GenesisConfig::<Test>::default().build_storage().unwrap();
let mut balances: Vec<(AccountId, Balance)> = vec![
(1, 1_000_000 * UNITS),
@@ -287,8 +288,8 @@ impl ExtBuilder {
})
.collect(),
force_era: pezpallet_staking::Forcing::ForceNew, // Yeni era başlatmaya zorla
min_nominator_bond: MinNominatorBond::get(), // Tanımlanan minimum değerleri kullan
min_validator_bond: MinValidatorBond::get(), // Tanımlanan minimum değerleri kullan
min_nominator_bond: MinNominatorBond::get(), // Tanımlanan minimum değerleri kullan
min_validator_bond: MinValidatorBond::get(), // Tanımlanan minimum değerleri kullan
..Default::default()
}
.assimilate_storage(&mut storage)
@@ -105,9 +105,9 @@ pub use pezpallet::*;
use alloc::{format, vec::Vec};
use pezframe_support::pezpallet_prelude::{MaybeSerializeDeserialize, Parameter, RuntimeDebug};
use pezsp_runtime::DispatchError;
use scale_info::TypeInfo;
use serde::{Deserialize, Serialize};
use pezsp_runtime::DispatchError;
#[cfg(feature = "runtime-benchmarks")]
mod benchmarking;
@@ -133,9 +133,12 @@ pub mod pezpallet {
#[pezpallet::config]
pub trait Config:
pezframe_system::Config + pezpallet_nfts::Config<ItemId = u32> + pezpallet_identity_kyc::Config
pezframe_system::Config
+ pezpallet_nfts::Config<ItemId = u32>
+ pezpallet_identity_kyc::Config
{
type RuntimeEvent: From<Event<Self>> + IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
type RuntimeEvent: From<Event<Self>>
+ IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
type AdminOrigin: EnsureOrigin<Self::RuntimeOrigin>;
type WeightInfo: weights::WeightInfo;
@@ -53,7 +53,10 @@ pub mod v1 {
weight
} else {
log::info!("👌 pezpallet-tiki migration not needed, current version is {:?}", current);
log::info!(
"👌 pezpallet-tiki migration not needed, current version is {:?}",
current
);
T::DbWeight::get().reads(1)
}
}
@@ -80,7 +83,9 @@ pub mod v1 {
}
#[cfg(feature = "try-runtime")]
fn post_upgrade(state: pezsp_std::vec::Vec<u8>) -> Result<(), pezsp_runtime::TryRuntimeError> {
fn post_upgrade(
state: pezsp_std::vec::Vec<u8>,
) -> Result<(), pezsp_runtime::TryRuntimeError> {
use codec::Decode;
let (pre_citizen_count, pre_user_tikis_count, pre_tiki_holder_count): (u32, u32, u32) =
@@ -27,8 +27,12 @@ mod benchmarks {
T::Currency::make_free_balance_be(&pezpallet_account, funding);
// Create asset
let _ =
T::Assets::create(T::WrapperAssetId::get(), pezpallet_account.clone(), true, 1u32.into());
let _ = T::Assets::create(
T::WrapperAssetId::get(),
pezpallet_account.clone(),
true,
1u32.into(),
);
#[extrinsic_call]
_(RawOrigin::Signed(caller.clone()), amount);
@@ -51,8 +55,12 @@ mod benchmarks {
T::Currency::make_free_balance_be(&pezpallet_account, funding);
// Create asset
let _ =
T::Assets::create(T::WrapperAssetId::get(), pezpallet_account.clone(), true, 1u32.into());
let _ = T::Assets::create(
T::WrapperAssetId::get(),
pezpallet_account.clone(),
true,
1u32.into(),
);
// Wrap first
let _ = Pezpallet::<T>::wrap(RawOrigin::Signed(caller.clone()).into(), amount);
@@ -153,7 +153,8 @@ pub mod pezpallet {
#[pezpallet::config]
pub trait Config: pezframe_system::Config + pezpallet_identity_kyc::Config {
type RuntimeEvent: From<Event<Self>> + IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
type RuntimeEvent: From<Event<Self>>
+ IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
type WeightInfo: WeightInfo;
type Score: Member
@@ -121,8 +121,13 @@ mod benchmarks {
let election = ActiveElections::<T>::get(0).unwrap();
pezframe_system::Pezpallet::<T>::set_block_number(election.voting_start);
Pezpallet::<T>::cast_vote(RawOrigin::Signed(voter.clone()).into(), 0, vec![candidate], None)
.unwrap();
Pezpallet::<T>::cast_vote(
RawOrigin::Signed(voter.clone()).into(),
0,
vec![candidate],
None,
)
.unwrap();
// 2. Advance to election end time
pezframe_system::Pezpallet::<T>::set_block_number(election.end_block + 1u32.into());
@@ -224,7 +224,8 @@ pub mod pezpallet {
+ pezpallet_identity_kyc::Config
+ core::fmt::Debug
{
type RuntimeEvent: From<Event<Self>> + IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
type RuntimeEvent: From<Event<Self>>
+ IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
type WeightInfo: crate::WeightInfo;
type Randomness: Randomness<Self::Hash, BlockNumberFor<Self>>;
type RuntimeCall: Parameter
@@ -127,7 +127,9 @@ pub mod v1 {
}
#[cfg(feature = "try-runtime")]
fn post_upgrade(state: pezsp_std::vec::Vec<u8>) -> Result<(), pezsp_runtime::TryRuntimeError> {
fn post_upgrade(
state: pezsp_std::vec::Vec<u8>,
) -> Result<(), pezsp_runtime::TryRuntimeError> {
use codec::Decode;
let (
@@ -339,7 +341,9 @@ pub mod v2 {
}
#[cfg(feature = "try-runtime")]
fn post_upgrade(_state: pezsp_std::vec::Vec<u8>) -> Result<(), pezsp_runtime::TryRuntimeError> {
fn post_upgrade(
_state: pezsp_std::vec::Vec<u8>,
) -> Result<(), pezsp_runtime::TryRuntimeError> {
log::info!("✅ Post-upgrade check passed for pezpallet-welati v2");
Ok(())
}
@@ -2,9 +2,9 @@ use codec::{Decode, Encode, MaxEncodedLen};
use pezframe_support::pezpallet_prelude::*;
use pezframe_system::{pezpallet_prelude::BlockNumberFor, Config as SystemConfig};
use pezpallet_tiki::Tiki;
use scale_info::TypeInfo;
use pezsp_runtime::RuntimeDebug;
use pezsp_std::prelude::*;
use scale_info::TypeInfo;
#[derive(RuntimeDebug, Eq, PartialEq)]
pub enum ElectionOutcome<AccountId> {