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:
@@ -289,7 +289,7 @@ parameter_types! {
|
||||
pub type AssetsForceOrigin = EnsureRoot<AccountId>;
|
||||
|
||||
// Called "Trust Backed" assets because these are generally registered by some account, and users of
|
||||
// the asset assume it has some claimed backing. The pallet is called `Assets` in
|
||||
// the asset assume it has some claimed backing. The pezpallet is called `Assets` in
|
||||
// `construct_runtime` to avoid breaking changes on storage reads.
|
||||
pub type TrustBackedAssetsInstance = pezpallet_assets::Instance1;
|
||||
type TrustBackedAssetsCall = pezpallet_assets::Call<Runtime, TrustBackedAssetsInstance>;
|
||||
@@ -318,7 +318,7 @@ impl pezpallet_assets::Config<TrustBackedAssetsInstance> for Runtime {
|
||||
type BenchmarkHelper = ();
|
||||
}
|
||||
|
||||
// Allow Freezes for the `Assets` pallet
|
||||
// Allow Freezes for the `Assets` pezpallet
|
||||
pub type AssetsFreezerInstance = pezpallet_assets_freezer::Instance1;
|
||||
impl pezpallet_assets_freezer::Config<AssetsFreezerInstance> for Runtime {
|
||||
type RuntimeFreezeReason = RuntimeFreezeReason;
|
||||
@@ -362,7 +362,7 @@ impl pezpallet_assets::Config<PoolAssetsInstance> for Runtime {
|
||||
type BenchmarkHelper = ();
|
||||
}
|
||||
|
||||
// Allow Freezes for the `PoolAssets` pallet
|
||||
// Allow Freezes for the `PoolAssets` pezpallet
|
||||
pub type PoolAssetsFreezerInstance = pezpallet_assets_freezer::Instance3;
|
||||
impl pezpallet_assets_freezer::Config<PoolAssetsFreezerInstance> for Runtime {
|
||||
type RuntimeFreezeReason = RuntimeFreezeReason;
|
||||
@@ -475,7 +475,7 @@ impl pezpallet_asset_conversion::Config for Runtime {
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
type BenchmarkHelper = assets_common::benchmarks::AssetPairFactory<
|
||||
ZagrosLocation,
|
||||
teyrchain_info::Pallet<Runtime>,
|
||||
teyrchain_info::Pezpallet<Runtime>,
|
||||
xcm_config::TrustBackedAssetsPalletIndex,
|
||||
xcm::v5::Location,
|
||||
>;
|
||||
@@ -543,7 +543,7 @@ impl pezpallet_asset_rewards::Config for Runtime {
|
||||
ConstantStoragePrice<StakePoolCreationDeposit, Balance>,
|
||||
>;
|
||||
type WeightInfo = weights::pezpallet_asset_rewards::WeightInfo<Runtime>;
|
||||
type BlockNumberProvider = pezframe_system::Pallet<Runtime>;
|
||||
type BlockNumberProvider = pezframe_system::Pezpallet<Runtime>;
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
type BenchmarkHelper = PalletAssetRewardsBenchmarkHelper;
|
||||
}
|
||||
@@ -583,7 +583,7 @@ impl pezpallet_assets::Config<ForeignAssetsInstance> for Runtime {
|
||||
type Currency = Balances;
|
||||
type CreateOrigin = ForeignCreators<
|
||||
(
|
||||
FromSiblingTeyrchain<teyrchain_info::Pallet<Runtime>, xcm::v5::Location>,
|
||||
FromSiblingTeyrchain<teyrchain_info::Pezpallet<Runtime>, xcm::v5::Location>,
|
||||
FromNetwork<xcm_config::UniversalLocation, EthereumNetwork, xcm::v5::Location>,
|
||||
xcm_config::bridging::to_pezkuwichain::PezkuwichainAssetFromAssetHubPezkuwichain,
|
||||
),
|
||||
@@ -608,7 +608,7 @@ impl pezpallet_assets::Config<ForeignAssetsInstance> for Runtime {
|
||||
type BenchmarkHelper = assets_common::benchmarks::LocationAssetsBenchmarkHelper;
|
||||
}
|
||||
|
||||
// Allow Freezes for the `ForeignAssets` pallet
|
||||
// Allow Freezes for the `ForeignAssets` pezpallet
|
||||
pub type ForeignAssetsFreezerInstance = pezpallet_assets_freezer::Instance2;
|
||||
impl pezpallet_assets_freezer::Config<ForeignAssetsFreezerInstance> for Runtime {
|
||||
type RuntimeFreezeReason = RuntimeFreezeReason;
|
||||
@@ -894,7 +894,7 @@ impl pezcumulus_pezpallet_teyrchain_system::Config for Runtime {
|
||||
type WeightInfo = weights::pezcumulus_pezpallet_teyrchain_system::WeightInfo<Runtime>;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type OnSystemEvent = ();
|
||||
type SelfParaId = teyrchain_info::Pallet<Runtime>;
|
||||
type SelfParaId = teyrchain_info::Pezpallet<Runtime>;
|
||||
type DmpQueue = pezframe_support::traits::EnqueueWithOrigin<MessageQueue, RelayOrigin>;
|
||||
type ReservedDmpWeight = ReservedDmpWeight;
|
||||
type OutboundXcmpMessageSource = XcmpQueue;
|
||||
@@ -932,7 +932,7 @@ impl pezpallet_message_queue::Config for Runtime {
|
||||
RuntimeCall,
|
||||
>;
|
||||
type Size = u32;
|
||||
// The XCMP queue pallet is only ever able to handle the `Sibling(ParaId)` origin:
|
||||
// The XCMP queue pezpallet is only ever able to handle the `Sibling(ParaId)` origin:
|
||||
type QueueChangeHandler = NarrowOriginToSibling<XcmpQueue>;
|
||||
type QueuePausedQuery = NarrowOriginToSibling<XcmpQueue>;
|
||||
type HeapSize = pezsp_core::ConstU32<{ 103 * 1024 }>;
|
||||
@@ -1275,7 +1275,7 @@ impl pezpallet_preimage::Config for Runtime {
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
/// Deposit for an index in the indices pallet.
|
||||
/// Deposit for an index in the indices pezpallet.
|
||||
///
|
||||
/// 32 bytes for the account ID and 16 for the deposit. We cannot use `max_encoded_len` since it
|
||||
/// is not const.
|
||||
@@ -1340,7 +1340,7 @@ construct_runtime!(
|
||||
ToPezkuwichainXcmRouter: pezpallet_xcm_bridge_hub_router::<Instance1> = 34,
|
||||
MessageQueue: pezpallet_message_queue = 35,
|
||||
// Snowbridge
|
||||
SnowbridgeSystemFrontend: snowbridge_pezpallet_system_frontend = 36,
|
||||
SnowbridgeSystemFrontend: pezsnowbridge_pezpallet_system_frontend = 36,
|
||||
|
||||
// Handy utilities.
|
||||
Utility: pezpallet_utility = 40,
|
||||
@@ -1389,7 +1389,7 @@ construct_runtime!(
|
||||
Treasury: pezpallet_treasury = 94,
|
||||
AssetRate: pezpallet_asset_rate = 95,
|
||||
|
||||
// TODO: the pallet instance should be removed once all pools have migrated
|
||||
// TODO: the pezpallet instance should be removed once all pools have migrated
|
||||
// to the new account IDs.
|
||||
AssetConversionMigration: pezpallet_asset_conversion_ops = 200,
|
||||
|
||||
@@ -1515,7 +1515,7 @@ impl pezframe_support::traits::OnRuntimeUpgrade for DeleteUndecodableStorage {
|
||||
|
||||
// Destroy undecodable NFT item 1
|
||||
writes.saturating_inc();
|
||||
match pezpallet_nfts::Pallet::<Runtime, ()>::do_burn(3, 1, |_| Ok(())) {
|
||||
match pezpallet_nfts::Pezpallet::<Runtime, ()>::do_burn(3, 1, |_| Ok(())) {
|
||||
Ok(_) => {
|
||||
tracing::info!(target: "bridges::on_runtime_upgrade", "Destroyed undecodable NFT item 1");
|
||||
},
|
||||
@@ -1527,7 +1527,7 @@ impl pezframe_support::traits::OnRuntimeUpgrade for DeleteUndecodableStorage {
|
||||
|
||||
// Destroy undecodable NFT item 2
|
||||
writes.saturating_inc();
|
||||
match pezpallet_nfts::Pallet::<Runtime, ()>::do_burn(3, 2, |_| Ok(())) {
|
||||
match pezpallet_nfts::Pezpallet::<Runtime, ()>::do_burn(3, 2, |_| Ok(())) {
|
||||
Ok(_) => {
|
||||
tracing::info!(target: "bridges::on_runtime_upgrade", "Destroyed undecodable NFT item 2");
|
||||
},
|
||||
@@ -1539,7 +1539,7 @@ impl pezframe_support::traits::OnRuntimeUpgrade for DeleteUndecodableStorage {
|
||||
|
||||
// Finally, we can destroy the collection
|
||||
writes.saturating_inc();
|
||||
match pezpallet_nfts::Pallet::<Runtime, ()>::do_destroy_collection(
|
||||
match pezpallet_nfts::Pezpallet::<Runtime, ()>::do_destroy_collection(
|
||||
3,
|
||||
DestroyWitness { attributes: 0, item_metadatas: 1, item_configs: 0 },
|
||||
None,
|
||||
@@ -1612,7 +1612,7 @@ impl
|
||||
fn create_asset_id_parameter(
|
||||
seed: u32,
|
||||
) -> (pezcumulus_primitives_core::Location, pezcumulus_primitives_core::Location) {
|
||||
// Use a different teyrchain foreign assets pallet so that the asset is indeed foreign.
|
||||
// Use a different teyrchain foreign assets pezpallet so that the asset is indeed foreign.
|
||||
let asset_id = pezcumulus_primitives_core::Location::new(
|
||||
1,
|
||||
[
|
||||
@@ -1715,7 +1715,7 @@ mod benches {
|
||||
[pezpallet_xcm_benchmarks::fungible, XcmBalances]
|
||||
[pezpallet_xcm_benchmarks::generic, XcmGeneric]
|
||||
[pezcumulus_pezpallet_weight_reclaim, WeightReclaim]
|
||||
[snowbridge_pezpallet_system_frontend, SnowbridgeSystemFrontend]
|
||||
[pezsnowbridge_pezpallet_system_frontend, SnowbridgeSystemFrontend]
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2166,25 +2166,25 @@ pezpallet_revive::impl_runtime_apis_plus_revive_traits!(
|
||||
) {
|
||||
use pezframe_benchmarking::BenchmarkList;
|
||||
use pezframe_support::traits::StorageInfoTrait;
|
||||
use pezframe_system_benchmarking::Pallet as SystemBench;
|
||||
use pezframe_system_benchmarking::extensions::Pallet as SystemExtensionsBench;
|
||||
use pezcumulus_pezpallet_session_benchmarking::Pallet as SessionBench;
|
||||
use pezpallet_xcm::benchmarking::Pallet as PalletXcmExtrinsicsBenchmark;
|
||||
use pezpallet_xcm_bridge_hub_router::benchmarking::Pallet as XcmBridgeHubRouterBench;
|
||||
use pezframe_system_benchmarking::Pezpallet as SystemBench;
|
||||
use pezframe_system_benchmarking::extensions::Pezpallet as SystemExtensionsBench;
|
||||
use pezcumulus_pezpallet_session_benchmarking::Pezpallet as SessionBench;
|
||||
use pezpallet_xcm::benchmarking::Pezpallet as PalletXcmExtrinsicsBenchmark;
|
||||
use pezpallet_xcm_bridge_hub_router::benchmarking::Pezpallet as XcmBridgeHubRouterBench;
|
||||
|
||||
// This is defined once again in dispatch_benchmark, because list_benchmarks!
|
||||
// and add_benchmarks! are macros exported by define_benchmarks! macros and those types
|
||||
// are referenced in that call.
|
||||
type XcmBalances = pezpallet_xcm_benchmarks::fungible::Pallet::<Runtime>;
|
||||
type XcmGeneric = pezpallet_xcm_benchmarks::generic::Pallet::<Runtime>;
|
||||
type XcmBalances = pezpallet_xcm_benchmarks::fungible::Pezpallet::<Runtime>;
|
||||
type XcmGeneric = pezpallet_xcm_benchmarks::generic::Pezpallet::<Runtime>;
|
||||
|
||||
// Benchmark files generated for `Assets/ForeignAssets` instances are by default
|
||||
// `pezpallet_assets_assets.rs / pezpallet_assets_foreign_assets`, which is not really nice,
|
||||
// so with this redefinition we can change names to nicer:
|
||||
// `pezpallet_assets_local.rs / pezpallet_assets_foreign.rs`.
|
||||
type Local = pezpallet_assets::Pallet::<Runtime, TrustBackedAssetsInstance>;
|
||||
type Foreign = pezpallet_assets::Pallet::<Runtime, ForeignAssetsInstance>;
|
||||
type Pool = pezpallet_assets::Pallet::<Runtime, PoolAssetsInstance>;
|
||||
type Local = pezpallet_assets::Pezpallet::<Runtime, TrustBackedAssetsInstance>;
|
||||
type Foreign = pezpallet_assets::Pezpallet::<Runtime, ForeignAssetsInstance>;
|
||||
type Pool = pezpallet_assets::Pezpallet::<Runtime, PoolAssetsInstance>;
|
||||
|
||||
type ToPezkuwichain = XcmBridgeHubRouterBench<Runtime, ToPezkuwichainXcmRouterInstance>;
|
||||
|
||||
@@ -2202,8 +2202,8 @@ pezpallet_revive::impl_runtime_apis_plus_revive_traits!(
|
||||
use pezframe_benchmarking::{BenchmarkBatch, BenchmarkError};
|
||||
use pezframe_support::assert_ok;
|
||||
use pezsp_storage::TrackedStorageKey;
|
||||
use pezframe_system_benchmarking::Pallet as SystemBench;
|
||||
use pezframe_system_benchmarking::extensions::Pallet as SystemExtensionsBench;
|
||||
use pezframe_system_benchmarking::Pezpallet as SystemBench;
|
||||
use pezframe_system_benchmarking::extensions::Pezpallet as SystemExtensionsBench;
|
||||
impl pezframe_system_benchmarking::Config for Runtime {
|
||||
fn setup_set_code_requirements(code: &alloc::vec::Vec<u8>) -> Result<(), BenchmarkError> {
|
||||
TeyrchainSystem::initialize_for_set_code_benchmark(code.len() as u32);
|
||||
@@ -2215,7 +2215,7 @@ pezpallet_revive::impl_runtime_apis_plus_revive_traits!(
|
||||
}
|
||||
}
|
||||
|
||||
use pezcumulus_pezpallet_session_benchmarking::Pallet as SessionBench;
|
||||
use pezcumulus_pezpallet_session_benchmarking::Pezpallet as SessionBench;
|
||||
use xcm_config::{MaxAssetsIntoHolding, ZagrosLocation};
|
||||
|
||||
impl pezcumulus_pezpallet_session_benchmarking::Config for Runtime {}
|
||||
@@ -2229,7 +2229,7 @@ pezpallet_revive::impl_runtime_apis_plus_revive_traits!(
|
||||
pub RandomParaId: ParaId = ParaId::new(43211234);
|
||||
}
|
||||
|
||||
use pezpallet_xcm::benchmarking::Pallet as PalletXcmExtrinsicsBenchmark;
|
||||
use pezpallet_xcm::benchmarking::Pezpallet as PalletXcmExtrinsicsBenchmark;
|
||||
impl pezpallet_xcm::benchmarking::Config for Runtime {
|
||||
type DeliveryHelper = (
|
||||
pezkuwi_runtime_common::xcm_sender::ToTeyrchainDeliveryHelper<
|
||||
@@ -2364,7 +2364,7 @@ pezpallet_revive::impl_runtime_apis_plus_revive_traits!(
|
||||
}
|
||||
|
||||
use pezpallet_xcm_bridge_hub_router::benchmarking::{
|
||||
Pallet as XcmBridgeHubRouterBench,
|
||||
Pezpallet as XcmBridgeHubRouterBench,
|
||||
Config as XcmBridgeHubRouterConfig,
|
||||
};
|
||||
|
||||
@@ -2610,12 +2610,12 @@ pezpallet_revive::impl_runtime_apis_plus_revive_traits!(
|
||||
}
|
||||
}
|
||||
|
||||
type XcmBalances = pezpallet_xcm_benchmarks::fungible::Pallet::<Runtime>;
|
||||
type XcmGeneric = pezpallet_xcm_benchmarks::generic::Pallet::<Runtime>;
|
||||
type XcmBalances = pezpallet_xcm_benchmarks::fungible::Pezpallet::<Runtime>;
|
||||
type XcmGeneric = pezpallet_xcm_benchmarks::generic::Pezpallet::<Runtime>;
|
||||
|
||||
type Local = pezpallet_assets::Pallet::<Runtime, TrustBackedAssetsInstance>;
|
||||
type Foreign = pezpallet_assets::Pallet::<Runtime, ForeignAssetsInstance>;
|
||||
type Pool = pezpallet_assets::Pallet::<Runtime, PoolAssetsInstance>;
|
||||
type Local = pezpallet_assets::Pezpallet::<Runtime, TrustBackedAssetsInstance>;
|
||||
type Foreign = pezpallet_assets::Pezpallet::<Runtime, ForeignAssetsInstance>;
|
||||
type Pool = pezpallet_assets::Pezpallet::<Runtime, PoolAssetsInstance>;
|
||||
|
||||
type ToPezkuwichain = XcmBridgeHubRouterBench<Runtime, ToPezkuwichainXcmRouterInstance>;
|
||||
|
||||
@@ -2663,7 +2663,7 @@ impl pezpallet_state_trie_migration::Config for Runtime {
|
||||
type RuntimeHoldReason = RuntimeHoldReason;
|
||||
type SignedDepositPerItem = MigrationSignedDepositPerItem;
|
||||
type SignedDepositBase = MigrationSignedDepositBase;
|
||||
// An origin that can control the whole pallet: should be Root, or a part of your council.
|
||||
// An origin that can control the whole pezpallet: should be Root, or a part of your council.
|
||||
type ControlOrigin = pezframe_system::EnsureSignedBy<RootMigController, AccountId>;
|
||||
// specific account for the migration, can trigger the signed migrations.
|
||||
type SignedFilter = pezframe_system::EnsureSignedBy<MigController, AccountId>;
|
||||
|
||||
Reference in New Issue
Block a user