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:
@@ -2,7 +2,7 @@
|
||||
// SPDX-FileCopyrightText: 2023 Snowfork <hello@snowfork.com>
|
||||
//! XCM Execution weights for invoking the backend implementation
|
||||
|
||||
use frame_support::weights::{constants::RocksDbWeight, Weight};
|
||||
use pezframe_support::weights::{constants::RocksDbWeight, Weight};
|
||||
|
||||
/// XCM Execution weights for invoking the backend implementation
|
||||
pub trait BackendWeightInfo {
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-FileCopyrightText: 2023 Snowfork <hello@snowfork.com>
|
||||
//! Benchmarking setup for pallet-template
|
||||
//! Benchmarking setup for pezpallet-template
|
||||
use super::*;
|
||||
#[allow(unused)]
|
||||
use crate::Pallet as SnowbridgeControlFrontend;
|
||||
use frame_benchmarking::v2::*;
|
||||
use frame_system::RawOrigin;
|
||||
use pezframe_benchmarking::v2::*;
|
||||
use pezframe_system::RawOrigin;
|
||||
use xcm::prelude::{Location, *};
|
||||
use xcm_executor::traits::ConvertLocation;
|
||||
|
||||
#[benchmarks(where <T as frame_system::Config>::AccountId: Into<Location>)]
|
||||
#[benchmarks(where <T as pezframe_system::Config>::AccountId: Into<Location>)]
|
||||
mod benchmarks {
|
||||
use super::*;
|
||||
#[benchmark]
|
||||
|
||||
@@ -24,14 +24,14 @@ pub use weights::*;
|
||||
pub mod backend_weights;
|
||||
pub use backend_weights::*;
|
||||
|
||||
use frame_support::{pallet_prelude::*, traits::EnsureOriginWithArg};
|
||||
use frame_system::pallet_prelude::*;
|
||||
use pallet_asset_conversion::Swap;
|
||||
use pezframe_support::{pezpallet_prelude::*, traits::EnsureOriginWithArg};
|
||||
use pezframe_system::pezpallet_prelude::*;
|
||||
use pezpallet_asset_conversion::Swap;
|
||||
use snowbridge_core::{
|
||||
burn_for_teleport, operating_mode::ExportPausedQuery, reward::MessageId, AssetMetadata,
|
||||
BasicOperatingMode as OperatingMode,
|
||||
};
|
||||
use sp_std::prelude::*;
|
||||
use pezsp_std::prelude::*;
|
||||
use xcm::{
|
||||
latest::{validate_send, XcmHash},
|
||||
prelude::*,
|
||||
@@ -39,24 +39,24 @@ use xcm::{
|
||||
use xcm_executor::traits::{FeeManager, FeeReason, TransactAsset};
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
use frame_support::traits::OriginTrait;
|
||||
use pezframe_support::traits::OriginTrait;
|
||||
|
||||
pub use pallet::*;
|
||||
pub type AccountIdOf<T> = <T as frame_system::Config>::AccountId;
|
||||
pub type AccountIdOf<T> = <T as pezframe_system::Config>::AccountId;
|
||||
|
||||
pub const LOG_TARGET: &str = "snowbridge-system-frontend";
|
||||
|
||||
/// Call indices within BridgeHub runtime for dispatchables within `snowbridge-pallet-system-v2`
|
||||
/// Call indices within BridgeHub runtime for dispatchables within `snowbridge-pezpallet-system-v2`
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
#[derive(Encode, Decode, Debug, PartialEq, Clone, TypeInfo)]
|
||||
pub enum BridgeHubRuntime<T: frame_system::Config> {
|
||||
pub enum BridgeHubRuntime<T: pezframe_system::Config> {
|
||||
#[codec(index = 90)]
|
||||
EthereumSystem(EthereumSystemCall<T>),
|
||||
}
|
||||
|
||||
/// Call indices for dispatchables within `snowbridge-pallet-system-v2`
|
||||
/// Call indices for dispatchables within `snowbridge-pezpallet-system-v2`
|
||||
#[derive(Encode, Decode, Debug, PartialEq, Clone, TypeInfo)]
|
||||
pub enum EthereumSystemCall<T: frame_system::Config> {
|
||||
pub enum EthereumSystemCall<T: pezframe_system::Config> {
|
||||
#[codec(index = 2)]
|
||||
RegisterToken {
|
||||
sender: Box<VersionedLocation>,
|
||||
@@ -78,7 +78,7 @@ where
|
||||
fn setup_pools(caller: AccountId, asset: Location);
|
||||
}
|
||||
|
||||
#[frame_support::pallet]
|
||||
#[pezframe_support::pallet]
|
||||
pub mod pallet {
|
||||
use super::*;
|
||||
use xcm_executor::traits::ConvertLocation;
|
||||
@@ -86,9 +86,9 @@ pub mod pallet {
|
||||
pub struct Pallet<T>(_);
|
||||
|
||||
#[pallet::config]
|
||||
pub trait Config: frame_system::Config {
|
||||
pub trait Config: pezframe_system::Config {
|
||||
#[allow(deprecated)]
|
||||
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
|
||||
type RuntimeEvent: From<Event<Self>> + IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
|
||||
|
||||
/// Origin check for XCM locations that can register token
|
||||
type RegisterTokenOrigin: EnsureOriginWithArg<
|
||||
@@ -196,7 +196,7 @@ pub mod pallet {
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T>
|
||||
where
|
||||
<T as frame_system::Config>::AccountId: Into<Location>,
|
||||
<T as pezframe_system::Config>::AccountId: Into<Location>,
|
||||
{
|
||||
/// Set the operating mode for exporting messages to Ethereum.
|
||||
#[pallet::call_index(0)]
|
||||
@@ -261,7 +261,7 @@ pub mod pallet {
|
||||
)]
|
||||
pub fn add_tip(origin: OriginFor<T>, message_id: MessageId, asset: Asset) -> DispatchResult
|
||||
where
|
||||
<T as frame_system::Config>::AccountId: Into<Location>,
|
||||
<T as pezframe_system::Config>::AccountId: Into<Location>,
|
||||
{
|
||||
let who = ensure_signed(origin)?;
|
||||
|
||||
|
||||
@@ -3,36 +3,36 @@
|
||||
use crate as snowbridge_system_frontend;
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
use crate::BenchmarkHelper;
|
||||
use frame_support::{
|
||||
use pezframe_support::{
|
||||
derive_impl, parameter_types,
|
||||
traits::{AsEnsureOriginWithArg, Everything},
|
||||
};
|
||||
use snowbridge_core::ParaId;
|
||||
use snowbridge_test_utils::mock_swap_executor::SwapExecutor;
|
||||
pub use snowbridge_test_utils::{mock_origin::pallet_xcm_origin, mock_xcm::*};
|
||||
use sp_core::H256;
|
||||
use sp_runtime::{
|
||||
pub use snowbridge_test_utils::{mock_origin::pezpallet_xcm_origin, mock_xcm::*};
|
||||
use pezsp_core::H256;
|
||||
use pezsp_runtime::{
|
||||
traits::{AccountIdConversion, BlakeTwo256, IdentityLookup},
|
||||
AccountId32, BuildStorage,
|
||||
};
|
||||
use xcm::prelude::*;
|
||||
|
||||
type Block = frame_system::mocking::MockBlock<Test>;
|
||||
type Block = pezframe_system::mocking::MockBlock<Test>;
|
||||
pub type AccountId = AccountId32;
|
||||
|
||||
// Configure a mock runtime to test the pallet.
|
||||
frame_support::construct_runtime!(
|
||||
pezframe_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system,
|
||||
XcmOrigin: pallet_xcm_origin::{Pallet, Origin},
|
||||
System: pezframe_system,
|
||||
XcmOrigin: pezpallet_xcm_origin::{Pallet, Origin},
|
||||
EthereumSystemFrontend: snowbridge_system_frontend,
|
||||
}
|
||||
);
|
||||
|
||||
#[derive_impl(frame_system::config_preludes::TestDefaultConfig)]
|
||||
impl frame_system::Config for Test {
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
#[derive_impl(pezframe_system::config_preludes::TestDefaultConfig)]
|
||||
impl pezframe_system::Config for Test {
|
||||
type BaseCallFilter = pezframe_support::traits::Everything;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type RuntimeTask = RuntimeTask;
|
||||
@@ -42,19 +42,19 @@ impl frame_system::Config for Test {
|
||||
type Lookup = IdentityLookup<Self::AccountId>;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type PalletInfo = PalletInfo;
|
||||
type AccountData = pallet_balances::AccountData<u128>;
|
||||
type AccountData = pezpallet_balances::AccountData<u128>;
|
||||
type Nonce = u64;
|
||||
type Block = Block;
|
||||
}
|
||||
|
||||
impl pallet_xcm_origin::Config for Test {
|
||||
impl pezpallet_xcm_origin::Config for Test {
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
}
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
impl BenchmarkHelper<RuntimeOrigin, AccountId> for () {
|
||||
fn make_xcm_origin(location: Location) -> RuntimeOrigin {
|
||||
RuntimeOrigin::from(pallet_xcm_origin::Origin(location))
|
||||
RuntimeOrigin::from(pezpallet_xcm_origin::Origin(location))
|
||||
}
|
||||
|
||||
fn initialize_storage(_: Location, _: Location) {}
|
||||
@@ -90,7 +90,7 @@ impl xcm_executor::traits::ConvertLocation<AccountId> for AccountIdConverter {
|
||||
|
||||
impl crate::Config for Test {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type RegisterTokenOrigin = AsEnsureOriginWithArg<pallet_xcm_origin::EnsureXcm<Everything>>;
|
||||
type RegisterTokenOrigin = AsEnsureOriginWithArg<pezpallet_xcm_origin::EnsureXcm<Everything>>;
|
||||
type XcmSender = MockXcmSender;
|
||||
type AssetTransactor = SuccessfulTransactor;
|
||||
type EthereumLocation = Ether;
|
||||
@@ -107,9 +107,9 @@ impl crate::Config for Test {
|
||||
}
|
||||
|
||||
// Build genesis storage according to the mock runtime.
|
||||
pub fn new_test_ext() -> sp_io::TestExternalities {
|
||||
let storage = frame_system::GenesisConfig::<Test>::default().build_storage().unwrap();
|
||||
let mut ext: sp_io::TestExternalities = storage.into();
|
||||
pub fn new_test_ext() -> pezsp_io::TestExternalities {
|
||||
let storage = pezframe_system::GenesisConfig::<Test>::default().build_storage().unwrap();
|
||||
let mut ext: pezsp_io::TestExternalities = storage.into();
|
||||
ext.execute_with(|| {
|
||||
System::set_block_number(1);
|
||||
});
|
||||
@@ -117,5 +117,5 @@ pub fn new_test_ext() -> sp_io::TestExternalities {
|
||||
}
|
||||
|
||||
pub fn make_xcm_origin(location: Location) -> RuntimeOrigin {
|
||||
pallet_xcm_origin::Origin(location).into()
|
||||
pezpallet_xcm_origin::Origin(location).into()
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-FileCopyrightText: 2023 Snowfork <hello@snowfork.com>
|
||||
use crate::{mock::*, DispatchError::Other, Error};
|
||||
use frame_support::{assert_err, assert_noop, assert_ok};
|
||||
use frame_system::RawOrigin;
|
||||
use pezframe_support::{assert_err, assert_noop, assert_ok};
|
||||
use pezframe_system::RawOrigin;
|
||||
use snowbridge_core::{reward::MessageId, AssetMetadata, BasicOperatingMode};
|
||||
use snowbridge_test_utils::mock_swap_executor::TRIGGER_SWAP_ERROR_AMOUNT;
|
||||
use sp_keyring::sr25519::Keyring;
|
||||
use pezsp_keyring::sr25519::Keyring;
|
||||
use xcm::{
|
||||
latest::{Assets, Error as XcmError, Location},
|
||||
opaque::latest::{Asset, AssetId, AssetInstance, Fungibility},
|
||||
@@ -244,7 +244,7 @@ fn add_tip_origin_not_signed_fails() {
|
||||
let asset = Asset::from((ether_location, tip_amount));
|
||||
assert_noop!(
|
||||
EthereumSystemFrontend::add_tip(RuntimeOrigin::root(), message_id, asset),
|
||||
sp_runtime::DispatchError::BadOrigin
|
||||
pezsp_runtime::DispatchError::BadOrigin
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
//! Autogenerated weights for `snowbridge_system`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-10-09, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `crake.local`, CPU: `<UNKNOWN>`
|
||||
@@ -27,7 +27,7 @@
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
|
||||
use pezframe_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions needed for `snowbridge_system`.
|
||||
|
||||
Reference in New Issue
Block a user