fix: Complete snowbridge pezpallet rebrand and critical bug fixes

- snowbridge-pezpallet-* → pezsnowbridge-pezpallet-* (201 refs)
- pallet/ directories → pezpallet/ (4 locations)
- Fixed pezpallet.rs self-include recursion bug
- Fixed sc-chain-spec hardcoded crate name in derive macro
- Reverted .pezpallet_by_name() to .pallet_by_name() (subxt API)
- Added BizinikiwiConfig type alias for zombienet tests
- Deleted obsolete session state files

Verified: pezsnowbridge-pezpallet-*, pezpallet-staking,
pezpallet-staking-async, pezframe-benchmarking-cli all pass cargo check
This commit is contained in:
2025-12-16 09:57:23 +03:00
parent eea003e14d
commit 3139ffa25e
3022 changed files with 42157 additions and 23579 deletions
@@ -28,14 +28,14 @@ use pezsp_metadata_ir::{
use pezsp_runtime::BuildStorage;
use pezsp_runtime::{generic, traits::BlakeTwo256};
pub use self::pezframe_system::{pezpallet_prelude::*, Config, Pallet};
pub use self::pezframe_system::{pezpallet_prelude::*, Config, Pezpallet};
mod inject_runtime_type;
mod runtime;
mod tasks;
#[import_section(tasks::tasks_example)]
#[pallet]
#[pezpallet]
pub mod pezframe_system {
#[allow(unused)]
use super::{pezframe_system, pezframe_system::pezpallet_prelude::*};
@@ -62,29 +62,29 @@ pub mod pezframe_system {
}
}
#[pallet::pallet]
pub struct Pallet<T>(_);
#[pezpallet::pezpallet]
pub struct Pezpallet<T>(_);
#[pallet::config(with_default, pezframe_system_config)]
#[pallet::disable_pezframe_system_supertrait_check]
#[pezpallet::config(with_default, pezframe_system_config)]
#[pezpallet::disable_pezframe_system_supertrait_check]
pub trait Config: 'static {
#[pallet::no_default]
#[pezpallet::no_default]
type Block: Parameter + pezsp_runtime::traits::Block;
type AccountId;
#[pallet::no_default_bounds]
#[pezpallet::no_default_bounds]
type BaseCallFilter: crate::traits::Contains<Self::RuntimeCall>;
#[pallet::no_default_bounds]
#[pezpallet::no_default_bounds]
type RuntimeOrigin;
#[pallet::no_default_bounds]
#[pezpallet::no_default_bounds]
type RuntimeCall;
#[pallet::no_default_bounds]
#[pezpallet::no_default_bounds]
type RuntimeTask: crate::traits::tasks::Task;
#[pallet::no_default_bounds]
#[pezpallet::no_default_bounds]
type PalletInfo: crate::traits::PalletInfo;
type DbWeight: Get<crate::weights::RuntimeDbWeight>;
}
#[pallet::error]
#[pezpallet::error]
pub enum Error<T> {
/// Required by construct_runtime
CallFiltered,
@@ -96,13 +96,13 @@ pub mod pezframe_system {
FailedTask,
}
#[pallet::origin]
#[pezpallet::origin]
pub type Origin<T> = RawOrigin<<T as Config>::AccountId>;
#[pallet::call]
impl<T: Config> Pallet<T> {
#[pallet::call_index(0)]
#[pallet::weight(task.weight())]
#[pezpallet::call]
impl<T: Config> Pezpallet<T> {
#[pezpallet::call_index(0)]
#[pezpallet::weight(task.weight())]
pub fn do_task(_origin: OriginFor<T>, task: T::RuntimeTask) -> DispatchResultWithPostInfo {
if !task.is_valid() {
return Err(Error::<T>::InvalidTask.into());
@@ -116,25 +116,25 @@ pub mod pezframe_system {
}
}
#[pallet::storage]
#[pezpallet::storage]
pub type Data<T> = StorageMap<_, Twox64Concat, u32, u64, ValueQuery>;
#[pallet::storage]
#[pezpallet::storage]
pub type OptionLinkedMap<T> = StorageMap<_, Blake2_128Concat, u32, u32, OptionQuery>;
#[pallet::storage]
#[pezpallet::storage]
pub type GenericData<T: Config> =
StorageMap<_, Identity, BlockNumberFor<T>, BlockNumberFor<T>, ValueQuery>;
#[pallet::storage]
#[pezpallet::storage]
pub type GenericData2<T: Config> =
StorageMap<_, Blake2_128Concat, BlockNumberFor<T>, BlockNumberFor<T>, OptionQuery>;
#[pallet::storage]
#[pezpallet::storage]
pub type DataDM<T> =
StorageDoubleMap<_, Twox64Concat, u32, Blake2_128Concat, u32, u64, ValueQuery>;
#[pallet::storage]
#[pezpallet::storage]
pub type GenericDataDM<T: Config> = StorageDoubleMap<
_,
Blake2_128Concat,
@@ -145,7 +145,7 @@ pub mod pezframe_system {
ValueQuery,
>;
#[pallet::storage]
#[pezpallet::storage]
pub type GenericData2DM<T: Config> = StorageDoubleMap<
_,
Blake2_128Concat,
@@ -156,8 +156,8 @@ pub mod pezframe_system {
OptionQuery,
>;
#[pallet::storage]
#[pallet::unbounded]
#[pezpallet::storage]
#[pezpallet::unbounded]
pub type AppendableDM<T: Config> = StorageDoubleMap<
_,
Blake2_128Concat,
@@ -168,7 +168,7 @@ pub mod pezframe_system {
ValueQuery,
>;
#[pallet::genesis_config]
#[pezpallet::genesis_config]
pub struct GenesisConfig<T: Config> {
pub data: Vec<(u32, u64)>,
pub test_config: Vec<(u32, u32, u64)>,
@@ -186,7 +186,7 @@ pub mod pezframe_system {
}
}
#[pallet::genesis_build]
#[pezpallet::genesis_build]
impl<T: Config> BuildGenesisConfig for GenesisConfig<T> {
fn build(&self) {
for (k, v) in &self.data {
@@ -199,11 +199,11 @@ pub mod pezframe_system {
}
/// Some running total.
#[pallet::storage]
#[pezpallet::storage]
pub type Total<T: Config> = StorageValue<_, (u32, u32), ValueQuery>;
/// Numbers to be added into the total.
#[pallet::storage]
#[pezpallet::storage]
pub type Numbers<T: Config> = StorageMap<_, Twox64Concat, u32, u32, OptionQuery>;
pub mod pezpallet_prelude {
@@ -701,7 +701,7 @@ fn expected_metadata() -> PalletStorageMetadataIR {
#[test]
fn store_metadata() {
let metadata = Pallet::<Runtime>::storage_metadata();
let metadata = Pezpallet::<Runtime>::storage_metadata();
pretty_assertions::assert_eq!(expected_metadata(), metadata);
}