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:
@@ -20,7 +20,7 @@
|
||||
use crate::{
|
||||
migration::{IsFinished, MigrationStep},
|
||||
weights::WeightInfo,
|
||||
CodeHash, Config, Determinism, Pallet, Weight, LOG_TARGET,
|
||||
CodeHash, Config, Determinism, Pezpallet, Weight, LOG_TARGET,
|
||||
};
|
||||
use alloc::vec::Vec;
|
||||
use codec::{Decode, Encode};
|
||||
@@ -46,7 +46,7 @@ mod v8 {
|
||||
|
||||
#[storage_alias]
|
||||
pub type CodeStorage<T: Config> =
|
||||
StorageMap<Pallet<T>, Identity, CodeHash<T>, PrefabWasmModule>;
|
||||
StorageMap<Pezpallet<T>, Identity, CodeHash<T>, PrefabWasmModule>;
|
||||
}
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
@@ -75,7 +75,7 @@ struct PrefabWasmModule {
|
||||
}
|
||||
|
||||
#[storage_alias]
|
||||
type CodeStorage<T: Config> = StorageMap<Pallet<T>, Identity, CodeHash<T>, PrefabWasmModule>;
|
||||
type CodeStorage<T: Config> = StorageMap<Pezpallet<T>, Identity, CodeHash<T>, PrefabWasmModule>;
|
||||
|
||||
#[derive(Encode, Decode, MaxEncodedLen, DefaultNoBound)]
|
||||
pub struct Migration<T: Config> {
|
||||
|
||||
@@ -22,7 +22,7 @@ use crate::{
|
||||
exec::AccountIdOf,
|
||||
migration::{IsFinished, MigrationStep},
|
||||
weights::WeightInfo,
|
||||
CodeHash, Config, Pallet, TrieId, Weight, LOG_TARGET,
|
||||
CodeHash, Config, Pezpallet, TrieId, Weight, LOG_TARGET,
|
||||
};
|
||||
use codec::{Decode, Encode};
|
||||
use core::{
|
||||
@@ -74,7 +74,7 @@ mod v9 {
|
||||
|
||||
#[storage_alias]
|
||||
pub type ContractInfoOf<T: Config, OldCurrency> = StorageMap<
|
||||
Pallet<T>,
|
||||
Pezpallet<T>,
|
||||
Twox64Concat,
|
||||
<T as pezframe_system::Config>::AccountId,
|
||||
ContractInfo<T, OldCurrency>,
|
||||
@@ -136,7 +136,7 @@ pub struct Migration<T: Config, OldCurrency = ()> {
|
||||
|
||||
#[storage_alias]
|
||||
type ContractInfoOf<T: Config, OldCurrency> = StorageMap<
|
||||
Pallet<T>,
|
||||
Pezpallet<T>,
|
||||
Twox64Concat,
|
||||
<T as pezframe_system::Config>::AccountId,
|
||||
ContractInfo<T, OldCurrency>,
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
use crate::{
|
||||
migration::{IsFinished, MigrationStep},
|
||||
weights::WeightInfo,
|
||||
Config, Pallet, TrieId, Weight, LOG_TARGET,
|
||||
Config, Pezpallet, TrieId, Weight, LOG_TARGET,
|
||||
};
|
||||
use alloc::vec::Vec;
|
||||
use codec::{Decode, Encode};
|
||||
@@ -39,7 +39,7 @@ mod v10 {
|
||||
}
|
||||
|
||||
#[storage_alias]
|
||||
pub type DeletionQueue<T: Config> = StorageValue<Pallet<T>, Vec<DeletedContract>>;
|
||||
pub type DeletionQueue<T: Config> = StorageValue<Pezpallet<T>, Vec<DeletedContract>>;
|
||||
}
|
||||
|
||||
#[derive(Encode, Decode, TypeInfo, MaxEncodedLen, DefaultNoBound, Clone)]
|
||||
@@ -60,10 +60,10 @@ pub fn fill_old_queue<T: Config>(len: usize) {
|
||||
}
|
||||
|
||||
#[storage_alias]
|
||||
type DeletionQueue<T: Config> = StorageMap<Pallet<T>, Twox64Concat, u32, TrieId>;
|
||||
type DeletionQueue<T: Config> = StorageMap<Pezpallet<T>, Twox64Concat, u32, TrieId>;
|
||||
|
||||
#[storage_alias]
|
||||
type DeletionQueueCounter<T: Config> = StorageValue<Pallet<T>, DeletionQueueManager<T>, ValueQuery>;
|
||||
type DeletionQueueCounter<T: Config> = StorageValue<Pezpallet<T>, DeletionQueueManager<T>, ValueQuery>;
|
||||
|
||||
#[derive(Encode, Decode, MaxEncodedLen, DefaultNoBound)]
|
||||
pub struct Migration<T: Config> {
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
use crate::{
|
||||
migration::{IsFinished, MigrationStep},
|
||||
weights::WeightInfo,
|
||||
AccountIdOf, BalanceOf, CodeHash, Config, Determinism, Pallet, Weight, LOG_TARGET,
|
||||
AccountIdOf, BalanceOf, CodeHash, Config, Determinism, Pezpallet, Weight, LOG_TARGET,
|
||||
};
|
||||
use alloc::vec::Vec;
|
||||
use codec::{Decode, Encode};
|
||||
@@ -72,11 +72,11 @@ mod v11 {
|
||||
|
||||
#[storage_alias]
|
||||
pub type OwnerInfoOf<T: Config, OldCurrency> =
|
||||
StorageMap<Pallet<T>, Identity, CodeHash<T>, OwnerInfo<T, OldCurrency>>;
|
||||
StorageMap<Pezpallet<T>, Identity, CodeHash<T>, OwnerInfo<T, OldCurrency>>;
|
||||
|
||||
#[storage_alias]
|
||||
pub type CodeStorage<T: Config> =
|
||||
StorageMap<Pallet<T>, Identity, CodeHash<T>, PrefabWasmModule>;
|
||||
StorageMap<Pezpallet<T>, Identity, CodeHash<T>, PrefabWasmModule>;
|
||||
}
|
||||
|
||||
#[derive(Encode, Decode, scale_info::TypeInfo, MaxEncodedLen)]
|
||||
@@ -97,10 +97,10 @@ where
|
||||
|
||||
#[storage_alias]
|
||||
pub type CodeInfoOf<T: Config, OldCurrency> =
|
||||
StorageMap<Pallet<T>, Identity, CodeHash<T>, CodeInfo<T, OldCurrency>>;
|
||||
StorageMap<Pezpallet<T>, Identity, CodeHash<T>, CodeInfo<T, OldCurrency>>;
|
||||
|
||||
#[storage_alias]
|
||||
pub type PristineCode<T: Config> = StorageMap<Pallet<T>, Identity, CodeHash<T>, Vec<u8>>;
|
||||
pub type PristineCode<T: Config> = StorageMap<Pezpallet<T>, Identity, CodeHash<T>, Vec<u8>>;
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
pub fn store_old_dummy_code<T: Config, OldCurrency>(len: usize, account: T::AccountId)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
use crate::{
|
||||
migration::{IsFinished, MigrationStep},
|
||||
weights::WeightInfo,
|
||||
AccountIdOf, BalanceOf, CodeHash, Config, Pallet, TrieId, Weight, LOG_TARGET,
|
||||
AccountIdOf, BalanceOf, CodeHash, Config, Pezpallet, TrieId, Weight, LOG_TARGET,
|
||||
};
|
||||
use codec::{Decode, Encode};
|
||||
use pezframe_support::{pezpallet_prelude::*, storage_alias, weights::WeightMeter, DefaultNoBound};
|
||||
@@ -45,7 +45,7 @@ mod v12 {
|
||||
|
||||
#[storage_alias]
|
||||
pub type ContractInfoOf<T: Config> = StorageMap<
|
||||
Pallet<T>,
|
||||
Pezpallet<T>,
|
||||
Twox64Concat,
|
||||
<T as pezframe_system::Config>::AccountId,
|
||||
ContractInfo<T>,
|
||||
@@ -73,7 +73,7 @@ pub fn store_old_contract_info<T: Config>(account: T::AccountId, info: crate::Co
|
||||
|
||||
#[storage_alias]
|
||||
pub type ContractInfoOf<T: Config> =
|
||||
StorageMap<Pallet<T>, Twox64Concat, <T as pezframe_system::Config>::AccountId, ContractInfo<T>>;
|
||||
StorageMap<Pezpallet<T>, Twox64Concat, <T as pezframe_system::Config>::AccountId, ContractInfo<T>>;
|
||||
|
||||
#[derive(Encode, Decode, CloneNoBound, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)]
|
||||
#[scale_info(skip_type_params(T))]
|
||||
|
||||
@@ -24,7 +24,7 @@ use crate::{
|
||||
exec::AccountIdOf,
|
||||
migration::{IsFinished, MigrationStep},
|
||||
weights::WeightInfo,
|
||||
BalanceOf, CodeHash, Config, Determinism, HoldReason, Pallet, Weight, LOG_TARGET,
|
||||
BalanceOf, CodeHash, Config, Determinism, HoldReason, Pezpallet, Weight, LOG_TARGET,
|
||||
};
|
||||
#[cfg(feature = "try-runtime")]
|
||||
use alloc::collections::btree_map::BTreeMap;
|
||||
@@ -71,7 +71,7 @@ mod v13 {
|
||||
|
||||
#[storage_alias]
|
||||
pub type CodeInfoOf<T: Config, OldCurrency> =
|
||||
StorageMap<Pallet<T>, Identity, CodeHash<T>, CodeInfo<T, OldCurrency>>;
|
||||
StorageMap<Pezpallet<T>, Identity, CodeHash<T>, CodeInfo<T, OldCurrency>>;
|
||||
}
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
use crate::{
|
||||
migration::{IsFinished, MigrationStep},
|
||||
weights::WeightInfo,
|
||||
AccountIdOf, BalanceOf, CodeHash, Config, HoldReason, Pallet, TrieId, Weight, LOG_TARGET,
|
||||
AccountIdOf, BalanceOf, CodeHash, Config, HoldReason, Pezpallet, TrieId, Weight, LOG_TARGET,
|
||||
};
|
||||
#[cfg(feature = "try-runtime")]
|
||||
use alloc::vec::Vec;
|
||||
@@ -41,7 +41,7 @@ use pezframe_support::{
|
||||
weights::WeightMeter,
|
||||
BoundedBTreeMap, DefaultNoBound,
|
||||
};
|
||||
use pezframe_system::Pallet as System;
|
||||
use pezframe_system::Pezpallet as System;
|
||||
use pezsp_core::hexdisplay::HexDisplay;
|
||||
#[cfg(feature = "try-runtime")]
|
||||
use pezsp_runtime::TryRuntimeError;
|
||||
@@ -69,7 +69,7 @@ mod v14 {
|
||||
|
||||
#[storage_alias]
|
||||
pub type ContractInfoOf<T: Config> = StorageMap<
|
||||
Pallet<T>,
|
||||
Pezpallet<T>,
|
||||
Twox64Concat,
|
||||
<T as pezframe_system::Config>::AccountId,
|
||||
ContractInfo<T>,
|
||||
@@ -112,7 +112,7 @@ struct ContractInfo<T: Config> {
|
||||
|
||||
#[storage_alias]
|
||||
type ContractInfoOf<T: Config> =
|
||||
StorageMap<Pallet<T>, Twox64Concat, <T as pezframe_system::Config>::AccountId, ContractInfo<T>>;
|
||||
StorageMap<Pezpallet<T>, Twox64Concat, <T as pezframe_system::Config>::AccountId, ContractInfo<T>>;
|
||||
|
||||
#[derive(Encode, Decode, MaxEncodedLen, DefaultNoBound)]
|
||||
pub struct Migration<T: Config> {
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
use crate::{
|
||||
migration::{IsFinished, MigrationStep},
|
||||
weights::WeightInfo,
|
||||
BalanceOf, CodeHash, Config, Pallet, TrieId, Weight, WeightMeter, LOG_TARGET,
|
||||
BalanceOf, CodeHash, Config, Pezpallet, TrieId, Weight, WeightMeter, LOG_TARGET,
|
||||
};
|
||||
use codec::{Decode, Encode};
|
||||
use pezframe_support::{pezpallet_prelude::*, storage_alias, DefaultNoBound};
|
||||
@@ -32,7 +32,7 @@ pub fn store_old_contract_info<T: Config>(
|
||||
account: T::AccountId,
|
||||
info: &crate::ContractInfo<T>,
|
||||
) -> BalanceOf<T> {
|
||||
let storage_base_deposit = Pallet::<T>::min_balance() + 1u32.into();
|
||||
let storage_base_deposit = Pezpallet::<T>::min_balance() + 1u32.into();
|
||||
ContractInfoOf::<T>::insert(
|
||||
account,
|
||||
ContractInfo {
|
||||
@@ -52,7 +52,7 @@ pub fn store_old_contract_info<T: Config>(
|
||||
|
||||
#[storage_alias]
|
||||
pub type ContractInfoOf<T: Config> =
|
||||
StorageMap<Pallet<T>, Twox64Concat, <T as pezframe_system::Config>::AccountId, ContractInfo<T>>;
|
||||
StorageMap<Pezpallet<T>, Twox64Concat, <T as pezframe_system::Config>::AccountId, ContractInfo<T>>;
|
||||
|
||||
#[derive(Encode, Decode, CloneNoBound, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)]
|
||||
#[scale_info(skip_type_params(T))]
|
||||
@@ -89,7 +89,7 @@ impl<T: Config> MigrationStep for Migration<T> {
|
||||
if let Some(key) = iter.next() {
|
||||
log::debug!(target: LOG_TARGET, "Migrating contract {:?}", key);
|
||||
ContractInfoOf::<T>::mutate(key.clone(), |info| {
|
||||
let ed = Pallet::<T>::min_balance();
|
||||
let ed = Pezpallet::<T>::min_balance();
|
||||
let mut updated_info = info.take().expect("Item exists; qed");
|
||||
updated_info.storage_base_deposit.saturating_reduce(ed);
|
||||
*info = Some(updated_info);
|
||||
|
||||
Reference in New Issue
Block a user