mirror of
https://github.com/pezkuwichain/pezkuwi-runtime-templates.git
synced 2026-06-13 05:51:05 +00:00
Complete terminology rebrand to Pezkuwi ecosystem
Applied global changes: Polkadot->Pezkuwi, Parachain->TeyrChain, pallet->pezpallet, frame->pezframe. Updated authors in Cargo.toml to include Kurdistan Tech Institute and pezkuwichain team. Used Cargo aliases to maintain SDK compatibility while using rebranded names in source code.
This commit is contained in:
@@ -3,7 +3,7 @@ mod constant_tests {
|
||||
|
||||
#[test]
|
||||
fn test_constants() {
|
||||
assert_eq!(MICROCENTS, 1_000_000);
|
||||
assert_eq!(MICTYRENTS, 1_000_000);
|
||||
|
||||
assert_eq!(MILLICENTS, 1_000_000_000);
|
||||
|
||||
@@ -28,7 +28,7 @@ mod runtime_tests {
|
||||
constants::{currency::*, *},
|
||||
BlockNumber, Runtime,
|
||||
};
|
||||
use frame_support::{pallet_prelude::Weight, traits::TypedGet, PalletId};
|
||||
use pezframe_support::{pezpallet_prelude::Weight, traits::TypedGet, PezpalletId};
|
||||
use sp_runtime::{Cow, Perbill};
|
||||
use sp_version::RuntimeVersion;
|
||||
use xcm::latest::prelude::BodyId;
|
||||
@@ -39,8 +39,8 @@ mod runtime_tests {
|
||||
assert_eq!(
|
||||
VERSION,
|
||||
RuntimeVersion {
|
||||
spec_name: Cow::Borrowed("template-parachain"),
|
||||
impl_name: Cow::Borrowed("template-parachain"),
|
||||
spec_name: Cow::Borrowed("template-teyrchain"),
|
||||
impl_name: Cow::Borrowed("template-teyrchain"),
|
||||
authoring_version: 1,
|
||||
spec_version: 1,
|
||||
impl_version: 0,
|
||||
@@ -61,12 +61,12 @@ mod runtime_tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn frame_system_constants() {
|
||||
fn pezframe_system_constants() {
|
||||
#[cfg(not(feature = "async-backing"))]
|
||||
assert_eq!(
|
||||
MAXIMUM_BLOCK_WEIGHT,
|
||||
Weight::from_parts(
|
||||
frame_support::weights::constants::WEIGHT_REF_TIME_PER_SECOND.saturating_div(2),
|
||||
pezframe_support::weights::constants::WEIGHT_REF_TIME_PER_SECOND.saturating_div(2),
|
||||
cumulus_primitives_core::relay_chain::MAX_POV_SIZE as u64
|
||||
)
|
||||
);
|
||||
@@ -75,7 +75,7 @@ mod runtime_tests {
|
||||
assert_eq!(
|
||||
MAXIMUM_BLOCK_WEIGHT,
|
||||
Weight::from_parts(
|
||||
frame_support::weights::constants::WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2),
|
||||
pezframe_support::weights::constants::WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2),
|
||||
cumulus_primitives_core::relay_chain::MAX_POV_SIZE as u64
|
||||
)
|
||||
);
|
||||
@@ -88,7 +88,7 @@ mod runtime_tests {
|
||||
#[cfg(feature = "async-backing")]
|
||||
assert_eq!(UNINCLUDED_SEGMENT_CAPACITY, 3);
|
||||
|
||||
assert_eq!(BLOCK_PROCESSING_VELOCITY, 1);
|
||||
assert_eq!(BLOCK_PTYRESSING_VELOCITY, 1);
|
||||
|
||||
assert_eq!(RELAY_CHAIN_SLOT_DURATION_MILLIS, 6000);
|
||||
|
||||
@@ -107,105 +107,105 @@ mod runtime_tests {
|
||||
|
||||
assert_eq!(MAX_BLOCK_LENGTH, 5 * 1024 * 1024);
|
||||
|
||||
assert_eq!(<Runtime as frame_system::Config>::SS58Prefix::get(), 42);
|
||||
assert_eq!(<Runtime as pezframe_system::Config>::SS58Prefix::get(), 42);
|
||||
|
||||
assert_eq!(<Runtime as frame_system::Config>::MaxConsumers::get(), 16);
|
||||
assert_eq!(<Runtime as pezframe_system::Config>::MaxConsumers::get(), 16);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn proxy_constants() {
|
||||
assert_eq!(<Runtime as pallet_proxy::Config>::MaxProxies::get(), 32);
|
||||
assert_eq!(<Runtime as pezpallet_proxy::Config>::MaxProxies::get(), 32);
|
||||
|
||||
assert_eq!(<Runtime as pallet_proxy::Config>::MaxPending::get(), 32);
|
||||
assert_eq!(<Runtime as pezpallet_proxy::Config>::MaxPending::get(), 32);
|
||||
|
||||
assert_eq!(<Runtime as pallet_proxy::Config>::ProxyDepositBase::get(), deposit(1, 40));
|
||||
assert_eq!(<Runtime as pezpallet_proxy::Config>::ProxyDepositBase::get(), deposit(1, 40));
|
||||
|
||||
assert_eq!(
|
||||
<Runtime as pallet_proxy::Config>::AnnouncementDepositBase::get(),
|
||||
<Runtime as pezpallet_proxy::Config>::AnnouncementDepositBase::get(),
|
||||
deposit(1, 48)
|
||||
);
|
||||
|
||||
assert_eq!(<Runtime as pallet_proxy::Config>::ProxyDepositFactor::get(), deposit(0, 33));
|
||||
assert_eq!(<Runtime as pezpallet_proxy::Config>::ProxyDepositFactor::get(), deposit(0, 33));
|
||||
|
||||
assert_eq!(
|
||||
<Runtime as pallet_proxy::Config>::AnnouncementDepositFactor::get(),
|
||||
<Runtime as pezpallet_proxy::Config>::AnnouncementDepositFactor::get(),
|
||||
deposit(0, 66)
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn balances_constants() {
|
||||
assert_eq!(<Runtime as pallet_balances::Config>::MaxFreezes::get(), 0);
|
||||
assert_eq!(<Runtime as pezpallet_balances::Config>::MaxFreezes::get(), 0);
|
||||
|
||||
assert_eq!(<Runtime as pallet_balances::Config>::MaxLocks::get(), 50);
|
||||
assert_eq!(<Runtime as pezpallet_balances::Config>::MaxLocks::get(), 50);
|
||||
|
||||
assert_eq!(<Runtime as pallet_balances::Config>::MaxReserves::get(), 50);
|
||||
assert_eq!(<Runtime as pezpallet_balances::Config>::MaxReserves::get(), 50);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn assets_constants() {
|
||||
assert_eq!(<Runtime as pallet_assets::Config>::AssetDeposit::get(), 10 * CENTS);
|
||||
assert_eq!(<Runtime as pezpallet_assets::Config>::AssetDeposit::get(), 10 * CENTS);
|
||||
|
||||
assert_eq!(<Runtime as pallet_assets::Config>::AssetAccountDeposit::get(), deposit(1, 16));
|
||||
assert_eq!(<Runtime as pezpallet_assets::Config>::AssetAccountDeposit::get(), deposit(1, 16));
|
||||
|
||||
assert_eq!(<Runtime as pallet_assets::Config>::ApprovalDeposit::get(), MILLICENTS);
|
||||
assert_eq!(<Runtime as pezpallet_assets::Config>::ApprovalDeposit::get(), MILLICENTS);
|
||||
|
||||
assert_eq!(<Runtime as pallet_assets::Config>::StringLimit::get(), 50);
|
||||
assert_eq!(<Runtime as pezpallet_assets::Config>::StringLimit::get(), 50);
|
||||
|
||||
assert_eq!(<Runtime as pallet_assets::Config>::MetadataDepositBase::get(), deposit(1, 68));
|
||||
assert_eq!(<Runtime as pezpallet_assets::Config>::MetadataDepositBase::get(), deposit(1, 68));
|
||||
|
||||
assert_eq!(
|
||||
<Runtime as pallet_assets::Config>::MetadataDepositPerByte::get(),
|
||||
<Runtime as pezpallet_assets::Config>::MetadataDepositPerByte::get(),
|
||||
deposit(0, 1)
|
||||
);
|
||||
|
||||
assert_eq!(<Runtime as pallet_assets::Config>::RemoveItemsLimit::get(), 1000);
|
||||
assert_eq!(<Runtime as pezpallet_assets::Config>::RemoveItemsLimit::get(), 1000);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn transaction_payment_constants() {
|
||||
assert_eq!(configs::TransactionByteFee::get(), 10 * MICROCENTS);
|
||||
assert_eq!(configs::TransactionByteFee::get(), 10 * MICTYRENTS);
|
||||
|
||||
assert_eq!(
|
||||
<Runtime as pallet_transaction_payment::Config>::OperationalFeeMultiplier::get(),
|
||||
<Runtime as pezpallet_transaction_payment::Config>::OperationalFeeMultiplier::get(),
|
||||
5
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn cumulus_pallet_parachain_system_constants() {
|
||||
fn cumulus_pezpallet_teyrchain_system_constants() {
|
||||
assert_eq!(
|
||||
<Runtime as cumulus_pallet_parachain_system::Config>::ReservedXcmpWeight::get(),
|
||||
<Runtime as cumulus_pezpallet_teyrchain_system::Config>::ReservedXcmpWeight::get(),
|
||||
MAXIMUM_BLOCK_WEIGHT.saturating_div(4)
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
<Runtime as cumulus_pallet_parachain_system::Config>::ReservedDmpWeight::get(),
|
||||
<Runtime as cumulus_pezpallet_teyrchain_system::Config>::ReservedDmpWeight::get(),
|
||||
MAXIMUM_BLOCK_WEIGHT.saturating_div(4)
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn message_queue_constants() {
|
||||
assert_eq!(<Runtime as pallet_message_queue::Config>::HeapSize::get(), 64 * 1024);
|
||||
assert_eq!(<Runtime as pallet_message_queue::Config>::MaxStale::get(), 8);
|
||||
assert_eq!(<Runtime as pezpallet_message_queue::Config>::HeapSize::get(), 64 * 1024);
|
||||
assert_eq!(<Runtime as pezpallet_message_queue::Config>::MaxStale::get(), 8);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn cumulus_pallet_xcmp_queue_constants() {
|
||||
fn cumulus_pezpallet_xcmp_queue_constants() {
|
||||
assert_eq!(
|
||||
<Runtime as cumulus_pallet_xcmp_queue::Config>::MaxInboundSuspended::get(),
|
||||
<Runtime as cumulus_pezpallet_xcmp_queue::Config>::MaxInboundSuspended::get(),
|
||||
1000
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn multisig_constants() {
|
||||
assert_eq!(<Runtime as pallet_multisig::Config>::DepositBase::get(), deposit(1, 88));
|
||||
assert_eq!(<Runtime as pezpallet_multisig::Config>::DepositBase::get(), deposit(1, 88));
|
||||
|
||||
assert_eq!(<Runtime as pallet_multisig::Config>::DepositFactor::get(), deposit(0, 32));
|
||||
assert_eq!(<Runtime as pezpallet_multisig::Config>::DepositFactor::get(), deposit(0, 32));
|
||||
|
||||
assert_eq!(<Runtime as pallet_multisig::Config>::MaxSignatories::get(), 100);
|
||||
assert_eq!(<Runtime as pezpallet_multisig::Config>::MaxSignatories::get(), 100);
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -221,40 +221,40 @@ mod runtime_tests {
|
||||
#[cfg(not(feature = "tanssi"))]
|
||||
fn aura_constants() {
|
||||
#[cfg(not(feature = "async-backing"))]
|
||||
assert!(!<Runtime as pallet_aura::Config>::AllowMultipleBlocksPerSlot::get());
|
||||
assert!(!<Runtime as pezpallet_aura::Config>::AllowMultipleBlocksPerSlot::get());
|
||||
#[cfg(feature = "async-backing")]
|
||||
assert!(<Runtime as pallet_aura::Config>::AllowMultipleBlocksPerSlot::get());
|
||||
assert!(<Runtime as pezpallet_aura::Config>::AllowMultipleBlocksPerSlot::get());
|
||||
|
||||
assert_eq!(<Runtime as pallet_aura::Config>::MaxAuthorities::get(), 100_000);
|
||||
assert_eq!(<Runtime as pezpallet_aura::Config>::MaxAuthorities::get(), 100_000);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(not(feature = "tanssi"))]
|
||||
fn collator_selection_constants() {
|
||||
let pallet_id_to_string = |id: PalletId| -> String {
|
||||
let pezpallet_id_to_string = |id: PezpalletId| -> String {
|
||||
core::str::from_utf8(&id.0).unwrap_or_default().to_string()
|
||||
};
|
||||
|
||||
assert_eq!(
|
||||
pallet_id_to_string(<Runtime as pallet_collator_selection::Config>::PotId::get()),
|
||||
pallet_id_to_string(PalletId(*b"PotStake"))
|
||||
pezpallet_id_to_string(<Runtime as pezpallet_collator_selection::Config>::PotId::get()),
|
||||
pezpallet_id_to_string(PezpalletId(*b"PotStake"))
|
||||
);
|
||||
|
||||
assert_eq!(configs::SessionLength::get(), 6 * HOURS);
|
||||
|
||||
assert_eq!(configs::StakingAdminBodyId::get(), BodyId::Defense);
|
||||
|
||||
assert_eq!(<Runtime as pallet_collator_selection::Config>::MaxCandidates::get(), 100);
|
||||
assert_eq!(<Runtime as pezpallet_collator_selection::Config>::MaxCandidates::get(), 100);
|
||||
|
||||
assert_eq!(<Runtime as pallet_collator_selection::Config>::MaxInvulnerables::get(), 20);
|
||||
assert_eq!(<Runtime as pezpallet_collator_selection::Config>::MaxInvulnerables::get(), 20);
|
||||
|
||||
assert_eq!(<Runtime as pallet_collator_selection::Config>::MinEligibleCollators::get(), 4);
|
||||
assert_eq!(<Runtime as pezpallet_collator_selection::Config>::MinEligibleCollators::get(), 4);
|
||||
}
|
||||
}
|
||||
|
||||
mod xcm_tests {
|
||||
use evm_runtime_template::{configs, Runtime};
|
||||
use frame_support::weights::Weight;
|
||||
use pezframe_support::weights::Weight;
|
||||
|
||||
#[test]
|
||||
fn xcm_executor_constants() {
|
||||
@@ -264,9 +264,9 @@ mod xcm_tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pallet_xcm_constants() {
|
||||
assert_eq!(<Runtime as pallet_xcm::Config>::MaxLockers::get(), 8);
|
||||
assert_eq!(<Runtime as pallet_xcm::Config>::MaxRemoteLockConsumers::get(), 0);
|
||||
assert_eq!(<Runtime as pallet_xcm::Config>::VERSION_DISCOVERY_QUEUE_SIZE, 100);
|
||||
fn pezpallet_xcm_constants() {
|
||||
assert_eq!(<Runtime as pezpallet_xcm::Config>::MaxLockers::get(), 8);
|
||||
assert_eq!(<Runtime as pezpallet_xcm::Config>::MaxRemoteLockConsumers::get(), 0);
|
||||
assert_eq!(<Runtime as pezpallet_xcm::Config>::VERSION_DISCOVERY_QUEUE_SIZE, 100);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user