Update documentation and templates for Pezkuwi branding

This commit is contained in:
2026-01-17 23:19:40 +03:00
parent d839cbd92b
commit 9bd688a742
172 changed files with 12903 additions and 6604 deletions
+66 -66
View File
@@ -19,8 +19,8 @@ scale-info = { workspace = true, features = [ "derive" ] }
serde_json = { workspace = true, default-features = false, features = [ "alloc" ] }
smallvec = { workspace = true }
openzeppelin-pezpallet-abstractions = { workspace = true }
openzeppelin-pezpallet-abstractions-proc = { workspace = true }
openzeppelin-pallet-abstractions = { workspace = true }
openzeppelin-pallet-abstractions-proc = { workspace = true }
# Bizinikiwi
pezframe-benchmarking = { workspace = true, optional = true }
@@ -49,22 +49,22 @@ pezpallet-transaction-payment-rpc-runtime-api = { workspace = true }
pezpallet-treasury = { workspace = true }
pezpallet-utility = { workspace = true }
pezpallet-whitelist = { workspace = true }
sp-api = { workspace = true }
sp-arithmetic = { workspace = true }
sp-block-builder = { workspace = true }
sp-consensus-aura = { workspace = true }
sp-core = { workspace = true }
sp-genesis-builder = { workspace = true }
sp-inherents = { workspace = true }
sp-keyring = { workspace = true }
sp-offchain = { workspace = true }
sp-runtime = { workspace = true }
sp-session = { workspace = true }
sp-std = { workspace = true }
sp-transaction-pool = { workspace = true }
sp-version = { workspace = true }
pezsp-api = { workspace = true }
pezsp-arithmetic = { workspace = true }
pezsp-block-builder = { workspace = true }
pezsp-consensus-aura = { workspace = true }
pezsp-core = { workspace = true }
pezsp-genesis-builder = { workspace = true }
pezsp-inherents = { workspace = true }
pezsp-keyring = { workspace = true }
pezsp-offchain = { workspace = true }
pezsp-runtime = { workspace = true }
pezsp-session = { workspace = true }
pezsp-std = { workspace = true }
pezsp-transaction-pool = { workspace = true }
pezsp-version = { workspace = true }
cumulus-pezpallet-aura-ext = { workspace = true }
pezcumulus-pezpallet-aura-ext = { workspace = true }
pezpallet-aura = { workspace = true }
pezpallet-authorship = { workspace = true }
pezpallet-collator-selection = { workspace = true }
@@ -78,17 +78,17 @@ staging-xcm = { workspace = true }
staging-xcm-builder = { workspace = true }
staging-xcm-executor = { workspace = true }
# Cumulus
# Pezpezcumulus
assets-common = { workspace = true }
cumulus-pezpallet-teyrchain-system = { workspace = true }
cumulus-pezpallet-session-benchmarking = { workspace = true }
cumulus-pezpallet-weight-reclaim = { workspace = true }
cumulus-pezpallet-xcm = { workspace = true }
cumulus-pezpallet-xcmp-queue = { workspace = true }
cumulus-primitives-aura = { workspace = true }
cumulus-primitives-core = { workspace = true }
cumulus-primitives-timestamp = { workspace = true }
cumulus-primitives-utility = { workspace = true }
pezcumulus-pezpallet-teyrchain-system = { workspace = true }
pezcumulus-pezpallet-session-benchmarking = { workspace = true }
pezcumulus-pezpallet-weight-reclaim = { workspace = true }
pezcumulus-pezpallet-xcm = { workspace = true }
pezcumulus-pezpallet-xcmp-queue = { workspace = true }
pezcumulus-primitives-aura = { workspace = true }
pezcumulus-primitives-core = { workspace = true }
pezcumulus-primitives-timestamp = { workspace = true }
pezcumulus-primitives-utility = { workspace = true }
teyrchain-info = { workspace = true }
teyrchains-common = { workspace = true }
@@ -112,8 +112,8 @@ pezpallet-cc-authorities-noting = { workspace = true }
[dev-dependencies]
pezkuwi-runtime-teyrchains = { workspace = true }
sp-io = { workspace = true }
sp-tracing = { workspace = true }
pezsp-io = { workspace = true }
pezsp-tracing = { workspace = true }
xcm-pez-simulator = { workspace = true }
[build-dependencies]
@@ -122,16 +122,16 @@ bizinikiwi-wasm-builder = { workspace = true }
[features]
std = [
"assets-common/std",
"cumulus-pezpallet-aura-ext/std",
"cumulus-pezpallet-teyrchain-system/std",
"cumulus-pezpallet-session-benchmarking/std",
"cumulus-pezpallet-weight-reclaim/std",
"cumulus-pezpallet-xcm/std",
"cumulus-pezpallet-xcmp-queue/std",
"cumulus-primitives-aura/std",
"cumulus-primitives-core/std",
"cumulus-primitives-timestamp/std",
"cumulus-primitives-utility/std",
"pezcumulus-pezpallet-aura-ext/std",
"pezcumulus-pezpallet-teyrchain-system/std",
"pezcumulus-pezpallet-session-benchmarking/std",
"pezcumulus-pezpallet-weight-reclaim/std",
"pezcumulus-pezpallet-xcm/std",
"pezcumulus-pezpallet-xcmp-queue/std",
"pezcumulus-primitives-aura/std",
"pezcumulus-primitives-core/std",
"pezcumulus-primitives-timestamp/std",
"pezcumulus-primitives-utility/std",
"dp-consensus/std",
"pezframe-benchmarking?/std",
"pezframe-executive/std",
@@ -143,7 +143,7 @@ std = [
"pezframe-try-runtime?/std",
"log/std",
"nimbus-primitives/std",
"openzeppelin-pezpallet-abstractions/std",
"openzeppelin-pallet-abstractions/std",
"orml-oracle-runtime-api/std",
"orml-oracle/std",
"orml-xtokens/std",
@@ -182,20 +182,20 @@ std = [
"pezkuwi-runtime-common/std",
"scale-info/std",
"serde_json/std",
"sp-api/std",
"sp-arithmetic/std",
"sp-block-builder/std",
"sp-consensus-aura/std",
"sp-core/std",
"sp-genesis-builder/std",
"sp-inherents/std",
"sp-keyring/std",
"sp-offchain/std",
"sp-runtime/std",
"sp-session/std",
"sp-std/std",
"sp-transaction-pool/std",
"sp-version/std",
"pezsp-api/std",
"pezsp-arithmetic/std",
"pezsp-block-builder/std",
"pezsp-consensus-aura/std",
"pezsp-core/std",
"pezsp-genesis-builder/std",
"pezsp-inherents/std",
"pezsp-keyring/std",
"pezsp-offchain/std",
"pezsp-runtime/std",
"pezsp-session/std",
"pezsp-std/std",
"pezsp-transaction-pool/std",
"pezsp-version/std",
"staging-xcm-builder/std",
"staging-xcm-executor/std",
"xcm-primitives/std",
@@ -204,10 +204,10 @@ std = [
runtime-benchmarks = [
"assets-common/runtime-benchmarks",
"cumulus-pezpallet-teyrchain-system/runtime-benchmarks",
"cumulus-pezpallet-session-benchmarking/runtime-benchmarks",
"cumulus-pezpallet-xcmp-queue/runtime-benchmarks",
"cumulus-primitives-utility/runtime-benchmarks",
"pezcumulus-pezpallet-teyrchain-system/runtime-benchmarks",
"pezcumulus-pezpallet-session-benchmarking/runtime-benchmarks",
"pezcumulus-pezpallet-xcmp-queue/runtime-benchmarks",
"pezcumulus-primitives-utility/runtime-benchmarks",
"dp-consensus/runtime-benchmarks",
"pezframe-benchmarking/runtime-benchmarks",
"pezframe-support/runtime-benchmarks",
@@ -241,16 +241,16 @@ runtime-benchmarks = [
"teyrchains-common/runtime-benchmarks",
"pezkuwi-teyrchain-primitives/runtime-benchmarks",
"pezkuwi-runtime-common/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"pezsp-runtime/runtime-benchmarks",
"staging-xcm-builder/runtime-benchmarks",
"staging-xcm-executor/runtime-benchmarks",
]
try-runtime = [
"cumulus-pezpallet-aura-ext/try-runtime",
"cumulus-pezpallet-teyrchain-system/try-runtime",
"cumulus-pezpallet-xcm/try-runtime",
"cumulus-pezpallet-xcmp-queue/try-runtime",
"pezcumulus-pezpallet-aura-ext/try-runtime",
"pezcumulus-pezpallet-teyrchain-system/try-runtime",
"pezcumulus-pezpallet-xcm/try-runtime",
"pezcumulus-pezpallet-xcmp-queue/try-runtime",
"pezframe-executive/try-runtime",
"pezframe-support/try-runtime",
"pezframe-system/try-runtime",
@@ -285,15 +285,15 @@ try-runtime = [
"pezpallet-xcm/try-runtime",
"teyrchain-info/try-runtime",
"pezkuwi-runtime-common/try-runtime",
"sp-runtime/try-runtime",
"pezsp-runtime/try-runtime",
]
# A feature that should be enabled when the runtime should be built for on-chain
# deployment. This will disable stuff that shouldn't be part of the on-chain wasm
# to make it smaller, like logging for example.
on-chain-release-build = [ "sp-api/disable-logging" ]
on-chain-release-build = [ "pezsp-api/disable-logging" ]
async-backing = [ "openzeppelin-pezpallet-abstractions-proc/async-backing" ]
async-backing = [ "openzeppelin-pallet-abstractions-proc/async-backing" ]
default = [ "std" ]
+7 -7
View File
@@ -17,7 +17,7 @@ use crate::{
};
#[cfg(feature = "runtime-benchmarks")]
type ExistentialDeposit = sp_core::ConstU128<EXISTENTIAL_DEPOSIT>;
type ExistentialDeposit = pezsp_core::ConstU128<EXISTENTIAL_DEPOSIT>;
#[cfg(not(feature = "tanssi"))]
#[openzeppelin_runtime_apis]
@@ -46,7 +46,7 @@ mod apis {
mod system {
type Executive = Executive;
type System = System;
type TeyrChainSystem = TeyrChainSystem;
type ParachainSystem = TeyrChainSystem;
type RuntimeVersion = VERSION;
type AccountId = AccountId;
type Nonce = Nonce;
@@ -55,13 +55,13 @@ mod apis {
}
mod benchmarks {
type AllPezpalletsWithSystem = AllPezpalletsWithSystem;
type AllPalletsWithSystem = AllPezpalletsWithSystem;
type Assets = Assets;
type AssetManager = AssetManager;
type AssetType = AssetType;
type RuntimeOrigin = RuntimeOrigin;
type RelayLocation = RelayLocation;
type TeyrChainSystem = TeyrChainSystem;
type ParachainSystem = TeyrChainSystem;
type System = System;
type ExistentialDeposit = ExistentialDeposit;
type AssetId = AssetId;
@@ -96,7 +96,7 @@ mod apis {
mod system {
type Executive = Executive;
type System = System;
type TeyrChainSystem = TeyrChainSystem;
type ParachainSystem = TeyrChainSystem;
type RuntimeVersion = VERSION;
type AccountId = AccountId;
type Nonce = Nonce;
@@ -105,13 +105,13 @@ mod apis {
}
mod benchmarks {
type AllPezpalletsWithSystem = AllPezpalletsWithSystem;
type AllPalletsWithSystem = AllPezpalletsWithSystem;
type Assets = Assets;
type AssetManager = AssetManager;
type AssetType = AssetType;
type RuntimeOrigin = RuntimeOrigin;
type RelayLocation = RelayLocation;
type TeyrChainSystem = TeyrChainSystem;
type ParachainSystem = TeyrChainSystem;
type System = System;
type ExistentialDeposit = ExistentialDeposit;
type AssetId = AssetId;
+4 -4
View File
@@ -7,8 +7,8 @@ pezframe_benchmarking::define_benchmarks!(
[pezpallet_message_queue, MessageQueue]
[pezpallet_sudo, Sudo]
[pezpallet_collator_selection, CollatorSelection]
[cumulus_pezpallet_xcmp_queue, XcmpQueue]
[cumulus_pezpallet_teyrchain_system, TeyrChainSystem]
[pezcumulus_pezpallet_xcmp_queue, XcmpQueue]
[pezcumulus_pezpallet_teyrchain_system, TeyrChainSystem]
[pezpallet_proxy, Proxy]
[pezpallet_utility, Utility]
[pezpallet_multisig, Multisig]
@@ -24,12 +24,12 @@ pezframe_benchmarking::define_benchmarks!(
[pezpallet_xcm_weight_trader, XcmWeightTrader]
);
use cumulus_primitives_core::{ChannelStatus, GetChannelInfo};
use pezcumulus_primitives_core::{ChannelStatus, GetChannelInfo};
use pezframe_support::traits::{
tokens::{Pay, PaymentStatus},
Get,
};
use sp_std::marker::PhantomData;
use pezsp_std::marker::PhantomData;
use crate::TeyrChainSystem;
@@ -1,9 +1,9 @@
use pezframe_support::{dispatch::GetDispatchInfo, weights::Weight};
use parity_scale_codec::{Decode, DecodeWithMemTracking, Encode};
use scale_info::TypeInfo;
use sp_core::H256;
use sp_runtime::traits::Hash as THash;
use sp_std::{
use pezsp_core::H256;
use pezsp_runtime::traits::Hash as THash;
use pezsp_std::{
convert::{From, Into},
prelude::*,
};
@@ -73,7 +73,7 @@ impl From<AssetType> for AssetId {
match asset {
AssetType::Xcm(id) => {
let mut result: [u8; 4] = [0u8; 4];
let hash: H256 = id.using_encoded(<Runtime as pezframe_system::Config>::Hashing::hash);
let hash: H256 = id.using_encoded(<Runtime as frame_system::Config>::Hashing::hash);
result.copy_from_slice(&hash.as_fixed_bytes()[0..4]);
u32::from_le_bytes(result)
}
@@ -155,7 +155,7 @@ impl pezpallet_asset_manager::AssetRegistrar<Runtime> for AssetRegistrar {
Assets::force_create(
RuntimeOrigin::root(),
asset.into(),
sp_runtime::MultiAddress::Id(AssetManager::account_id()),
pezsp_runtime::MultiAddress::Id(AssetManager::account_id()),
is_sufficient,
min_balance,
)?;
@@ -194,7 +194,7 @@ impl pezpallet_asset_manager::AssetRegistrar<Runtime> for AssetRegistrar {
mod tests {
mod asset_registrar {
use pezpallet_asset_manager::AssetRegistrar;
use sp_io::TestExternalities;
use pezsp_io::TestExternalities;
use crate::{
configs::{AssetRegistrar as Registrar, AssetRegistrarMetadata},
@@ -217,7 +217,7 @@ mod tests {
let _ = Assets::force_create(
RuntimeOrigin::root(),
asset_id.into(),
sp_runtime::MultiAddress::Id(AssetManager::account_id()),
pezsp_runtime::MultiAddress::Id(AssetManager::account_id()),
true,
1,
);
@@ -247,7 +247,7 @@ mod tests {
}
mod account_asset_id_conversion {
use sp_runtime::AccountId32;
use pezsp_runtime::AccountId32;
use crate::{
configs::{
@@ -2,17 +2,18 @@
pub use pezpallet_custom_origins::*;
#[pezframe_support::pezpallet]
use pezsp_std::marker::PhantomData;
#[pezframe_support::pallet]
pub mod pezpallet_custom_origins {
use pezframe_support::pezpallet_prelude::*;
use pezframe_support::pallet_prelude::*;
use crate::configs::governance::{Balance, CENTS, GRAND};
#[pezpallet::config]
pub trait Config: pezframe_system::Config {}
#[pallet::config]
pub trait Config: frame_system::Config {}
#[pezpallet::pezpallet]
pub struct Pezpallet<T>(_);
#[pallet::pezpallet]
pub struct Pezpallet<T>(PhantomData<T>);
#[derive(
PartialEq,
@@ -25,7 +26,7 @@ pub mod pezpallet_custom_origins {
TypeInfo,
RuntimeDebug,
)]
#[pezpallet::origin]
#[pallet::origin]
pub enum Origin {
/// Origin for spending (any amount of) funds.
Treasurer,
@@ -3,13 +3,13 @@
use alloc::borrow::Cow;
use pezpallet_referenda::Track;
use sp_runtime::str_array as s;
use pezsp_runtime::str_array as s;
use super::*;
use crate::constants::MINUTES;
const fn percent(x: i32) -> sp_arithmetic::FixedI64 {
sp_arithmetic::FixedI64::from_rational(x as u128, 100)
const fn percent(x: i32) -> pezsp_arithmetic::FixedI64 {
pezsp_arithmetic::FixedI64::from_rational(x as u128, 100)
}
use pezpallet_referenda::Curve;
const APP_ROOT: Curve = Curve::make_reciprocal(4, 28, percent(80), percent(50), percent(100));
@@ -42,7 +42,7 @@ const SUP_WHITELISTED_CALLER: Curve =
pub struct TracksInfo;
impl pezpallet_referenda::TracksInfo<Balance, BlockNumber> for TracksInfo {
type Id = u16;
type RuntimeOrigin = <RuntimeOrigin as pezframe_support::traits::OriginTrait>::PalletsOrigin;
type RuntimeOrigin = <RuntimeOrigin as pezframe_support::traits::OriginTrait>::PezpalletsOrigin;
fn tracks() -> impl Iterator<Item = Cow<'static, Track<Self::Id, Balance, BlockNumber>>> {
static DATA: [Track<u16, Balance, BlockNumber>; 10] = [
@@ -346,7 +346,7 @@ mod tests {
<crate::configs::governance::tracks::TracksInfo as pezpallet_referenda::TracksInfo<
Balance,
BlockNumber,
>>::track_for(&OriginCaller::CumulusXcm(cumulus_pezpallet_xcm::Origin::Relay))
>>::track_for(&OriginCaller::PezcumulusXcm(pezcumulus_pezpallet_xcm::Origin::Relay))
.expect_err("incorrect config");
}
}
+8 -8
View File
@@ -6,12 +6,12 @@ pub mod xcm_config;
use asset_config::*;
#[cfg(feature = "tanssi")]
use cumulus_pezpallet_teyrchain_system::ExpectParentIncluded;
use pezcumulus_pezpallet_teyrchain_system::ExpectParentIncluded;
#[cfg(feature = "async-backing")]
use cumulus_pezpallet_teyrchain_system::RelayNumberMonotonicallyIncreases;
use pezcumulus_pezpallet_teyrchain_system::RelayNumberMonotonicallyIncreases;
#[cfg(not(feature = "async-backing"))]
use cumulus_pezpallet_teyrchain_system::RelayNumberStrictlyIncreases;
use cumulus_primitives_core::{AggregateMessageOrigin, ParaId};
use pezcumulus_pezpallet_teyrchain_system::RelayNumberStrictlyIncreases;
use pezcumulus_primitives_core::{AggregateMessageOrigin, ParaId};
#[cfg(not(feature = "tanssi"))]
use pezframe_support::PalletId;
use pezframe_support::{
@@ -44,8 +44,8 @@ use openzeppelin_pezpallet_abstractions::{impl_openzeppelin_tanssi, TanssiConfig
use teyrchains_common::message_queue::{NarrowOriginToSibling, ParaIdToSibling};
use pezkuwi_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate};
#[cfg(not(feature = "tanssi"))]
use sp_consensus_aura::sr25519::AuthorityId as AuraId;
use sp_runtime::{
use pezsp_consensus_aura::sr25519::AuthorityId as AuraId;
use pezsp_runtime::{
traits::{AccountIdLookup, BlakeTwo256, IdentityLookup},
Perbill,
};
@@ -126,7 +126,7 @@ impl GovernanceConfig for OpenZeppelinRuntime {
type ReferendaSubmitOrigin = EnsureSigned<AccountId>;
type ReferendaUndecidingTimeout = ConstU32<{ 14 * DAYS }>;
type TreasuryInteriorLocation = TreasuryInteriorLocation;
type TreasuryPezpalletId = TreasuryPezpalletId;
type TreasuryPalletId = TreasuryPezpalletId;
type TreasuryPayoutSpendPeriod = ConstU32<{ 30 * DAYS }>;
type TreasuryRejectOrigin = EitherOfDiverse<EnsureRoot<AccountId>, Treasurer>;
type TreasurySpendOrigin = TreasurySpender;
@@ -153,7 +153,7 @@ impl XcmConfig for OpenZeppelinRuntime {
type MessageQueueHeapSize = ConstU32<{ 64 * 1024 }>;
type MessageQueueMaxStale = ConstU32<8>;
type MessageQueueServiceWeight = MessageQueueServiceWeight;
type TeyrChainMinFee = TeyrChainMinFee;
type TeyrchainMinFee = TeyrChainMinFee;
type PauseSupportedAssetOrigin = EnsureRoot<AccountId>;
type RelayLocation = RelayLocation;
type RemoveSupportedAssetOrigin = EnsureRoot<AccountId>;
@@ -14,7 +14,7 @@ impl SystemWeight for OpenZeppelinRuntime {
type Balances = weights::pezpallet_balances::WeightInfo<Runtime>;
type DbWeight = RocksDbWeight;
type Multisig = weights::pezpallet_multisig::WeightInfo<Runtime>;
type TeyrChainSystem = weights::cumulus_pezpallet_teyrchain_system::WeightInfo<Runtime>;
type ParachainSystem = weights::pezcumulus_pezpallet_teyrchain_system::WeightInfo<Runtime>;
type Preimage = weights::pezpallet_preimage::WeightInfo<Runtime>;
type Proxy = weights::pezpallet_proxy::WeightInfo<Runtime>;
type Scheduler = weights::pezpallet_scheduler::WeightInfo<Runtime>;
@@ -53,7 +53,7 @@ impl XcmWeight for OpenZeppelinRuntime {
type Xcm = weights::pezpallet_xcm::WeightInfo<Runtime>;
type XcmTransactor = weights::pezpallet_xcm_transactor::WeightInfo<Runtime>;
type XcmWeightTrader = weights::pezpallet_xcm_weight_trader::WeightInfo<Runtime>;
type XcmpQueue = weights::cumulus_pezpallet_xcmp_queue::WeightInfo<Runtime>;
type XcmpQueue = weights::pezcumulus_pezpallet_xcmp_queue::WeightInfo<Runtime>;
}
#[cfg(feature = "tanssi")]
@@ -11,8 +11,8 @@ use pezpallet_xcm::XcmPassthrough;
use parity_scale_codec::{Decode, DecodeWithMemTracking, Encode};
use pezkuwi_teyrchain_primitives::primitives::{self, Sibling};
use scale_info::TypeInfo;
use sp_runtime::{traits::Convert, Vec};
use xcm::latest::{prelude::*, Junction::PalletInstance};
use pezsp_runtime::{traits::Convert, Vec};
use xcm::latest::{prelude::*, Junction::PezpalletInstance};
use xcm_builder::{
AccountId32Aliases, Case, FixedWeightBounds, FungibleAdapter, FungiblesAdapter,
IsChildSystemTeyrChain, IsConcrete, NoChecking, ParentIsPreset, RelayChainAsNative,
@@ -31,7 +31,7 @@ use crate::{
parameter_types! {
pub PlaceholderAccount: AccountId = PezkuwiXcm::check_account();
pub const RelayNetwork: Option<NetworkId> = None;
pub RelayChainOrigin: RuntimeOrigin = cumulus_pezpallet_xcm::Origin::Relay.into();
pub RelayChainOrigin: RuntimeOrigin = pezcumulus_pezpallet_xcm::Origin::Relay.into();
pub AssetsPezpalletLocation: Location =
PezpalletInstance(<Assets as PezpalletInfoAccess>::index() as u8).into();
pub UniversalLocation: InteriorLocation = TeyrChain(TeyrChainInfo::teyrchain_id().into()).into();
@@ -114,7 +114,7 @@ pub type XcmOriginToTransactDispatchOrigin = (
RelayChainAsNative<RelayChainOrigin, RuntimeOrigin>,
// Native converter for sibling TeyrChains; will convert to a `SiblingPara` origin when
// recognized.
SiblingTeyrChainAsNative<cumulus_pezpallet_xcm::Origin, RuntimeOrigin>,
SiblingTeyrChainAsNative<pezcumulus_pezpallet_xcm::Origin, RuntimeOrigin>,
// Native signed account converter; this just converts an `AccountId32` origin into a normal
// `RuntimeOrigin::Signed` origin of the same 32-byte value.
SignedAccountId32AsNative<RelayNetwork, RuntimeOrigin>,
@@ -176,7 +176,7 @@ pub type LocalOriginToLocation = SignedToAccountId32<RuntimeOrigin, AccountId, R
/// the right message queues.
pub type XcmRouter = WithUniqueTopic<(
// Two routers - use UMP to communicate with the relay chain:
cumulus_primitives_utility::ParentAsUmp<TeyrChainSystem, (), ()>,
pezcumulus_primitives_utility::ParentAsUmp<TeyrChainSystem, (), ()>,
// ..and XCMP to communicate with the sibling chains.
XcmpQueue,
)>;
@@ -234,11 +234,11 @@ parameter_types! {
}
// How to convert from CurrencyId to Location
pub struct CurrencyIdToLocation<AssetXConverter>(sp_std::marker::PhantomData<AssetXConverter>);
impl<AssetXConverter> sp_runtime::traits::Convert<CurrencyId, Option<Location>>
pub struct CurrencyIdToLocation<AssetXConverter>(pezsp_std::marker::PhantomData<AssetXConverter>);
impl<AssetXConverter> pezsp_runtime::traits::Convert<CurrencyId, Option<Location>>
for CurrencyIdToLocation<AssetXConverter>
where
AssetXConverter: sp_runtime::traits::MaybeEquivalence<Location, AssetId>,
AssetXConverter: pezsp_runtime::traits::MaybeEquivalence<Location, AssetId>,
{
fn convert(currency: CurrencyId) -> Option<Location> {
match currency {
@@ -411,8 +411,8 @@ impl TryFrom<u8> for Transactors {
impl UtilityEncodeCall for Transactors {
fn encode_call(self, call: UtilityAvailableCalls) -> Vec<u8> {
match self {
Transactors::Relay => pezpallet_xcm_transactor::Pallet::<Runtime>::encode_call(
pezpallet_xcm_transactor::Pallet(sp_std::marker::PhantomData::<Runtime>),
Transactors::Relay => pezpallet_xcm_transactor::Pezpallet::<Runtime>::encode_call(
pezpallet_xcm_transactor::Pezpallet(pezsp_std::marker::PhantomData::<Runtime>),
call,
),
}
@@ -433,7 +433,7 @@ parameter_types! {
#[cfg(feature = "runtime-benchmarks")]
mod testing {
use sp_runtime::traits::MaybeEquivalence;
use pezsp_runtime::traits::MaybeEquivalence;
use xcm_builder::WithLatestLocationConverter;
use xcm_executor::traits::ConvertLocation;
@@ -469,7 +469,7 @@ mod testing {
#[cfg(test)]
mod tests {
mod location_conversion {
use sp_runtime::traits::Convert;
use pezsp_runtime::traits::Convert;
use xcm::latest::{Junction::AccountId32, Location};
use crate::configs::{AccountIdToLocation, CurrencyId, CurrencyIdToLocation, SelfReserve};
@@ -526,9 +526,9 @@ mod tests {
}
mod asset_fee_filter {
use cumulus_primitives_core::Junctions::{X1, X4};
use pezcumulus_primitives_core::Junctions::{X1, X4};
use pezframe_support::traits::Contains;
use sp_std::sync::Arc;
use pezsp_std::sync::Arc;
use xcm::{latest::Location, prelude::*};
use crate::configs::{AssetFeesFilter, PezkuwiXcmLocation};
@@ -557,7 +557,7 @@ mod tests {
1,
X4(Arc::new([
Junction::TeyrChain(1000),
Junction::PalletInstance(5),
Junction::PezpalletInstance(5),
Junction::GeneralIndex(42),
Junction::AccountId32 { network: None, id: [1u8; 32] },
])),
@@ -590,7 +590,7 @@ mod tests {
#[test]
fn test_transactors_encode_call() {
sp_io::TestExternalities::default().execute_with(|| {
pezsp_io::TestExternalities::default().execute_with(|| {
let transactor = Transactors::Relay;
let call = UtilityAvailableCalls::AsDerivative(1u16, Vec::<u8>::new());
+4 -4
View File
@@ -1,8 +1,8 @@
extern crate alloc;
use pezframe_support::weights::{constants::WEIGHT_REF_TIME_PER_SECOND, Weight};
use sp_runtime::Perbill;
use sp_version::RuntimeVersion;
use pezsp_runtime::Perbill;
use pezsp_version::RuntimeVersion;
use crate::{apis, types::BlockNumber};
@@ -26,7 +26,7 @@ pub const P_FACTOR: u128 = 10;
pub const Q_FACTOR: u128 = 100;
pub const POLY_DEGREE: u8 = 1;
#[sp_version::runtime_version]
#[pezsp_version::runtime_version]
pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: alloc::borrow::Cow::Borrowed("template-teyrchain"),
impl_name: alloc::borrow::Cow::Borrowed("template-teyrchain"),
@@ -72,7 +72,7 @@ pub const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts(
WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2),
#[cfg(not(feature = "async-backing"))]
WEIGHT_REF_TIME_PER_SECOND.saturating_div(2),
cumulus_primitives_core::relay_chain::MAX_POV_SIZE as u64,
pezcumulus_primitives_core::relay_chain::MAX_POV_SIZE as u64,
);
/// Maximum number of blocks simultaneously accepted by the Runtime, not yet
@@ -1,11 +1,11 @@
use alloc::{vec, vec::Vec};
use cumulus_primitives_core::ParaId;
use pezcumulus_primitives_core::ParaId;
use pezframe_support::build_struct_json_patch;
use teyrchains_common::AuraId;
use serde_json::Value;
use sp_genesis_builder::PresetId;
use sp_keyring::Sr25519Keyring;
use pezsp_genesis_builder::PresetId;
use pezsp_keyring::Sr25519Keyring;
use crate::{
constants::currency::EXISTENTIAL_DEPOSIT, AccountId, BalancesConfig, CollatorSelectionConfig,
@@ -91,8 +91,8 @@ fn development_config_genesis() -> Value {
/// Provides the JSON representation of predefined genesis config for given `id`.
pub fn get_preset(id: &PresetId) -> Option<vec::Vec<u8>> {
let patch = match id.as_ref() {
sp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET => local_testnet_genesis(),
sp_genesis_builder::DEV_RUNTIME_PRESET => development_config_genesis(),
pezsp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET => local_testnet_genesis(),
pezsp_genesis_builder::DEV_RUNTIME_PRESET => development_config_genesis(),
_ => return None,
};
Some(
@@ -105,8 +105,8 @@ pub fn get_preset(id: &PresetId) -> Option<vec::Vec<u8>> {
/// List of supported presets.
pub fn preset_names() -> Vec<PresetId> {
vec![
PresetId::from(sp_genesis_builder::DEV_RUNTIME_PRESET),
PresetId::from(sp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET),
PresetId::from(pezsp_genesis_builder::DEV_RUNTIME_PRESET),
PresetId::from(pezsp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET),
]
}
@@ -203,14 +203,14 @@ mod tests {
fn get_preset_roundtrips_known_ids() {
// LOCAL_TESTNET
let p =
super::get_preset(&PresetId::from(sp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET))
super::get_preset(&PresetId::from(pezsp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET))
.expect("local preset should exist");
let from_api = parse_bytes(p);
let from_fn = super::local_testnet_genesis();
assert_eq!(from_api, from_fn, "local_testnet preset must match function output");
// DEV
let p = super::get_preset(&PresetId::from(sp_genesis_builder::DEV_RUNTIME_PRESET))
let p = super::get_preset(&PresetId::from(pezsp_genesis_builder::DEV_RUNTIME_PRESET))
.expect("dev preset should exist");
let from_api = parse_bytes(p);
let from_fn = super::development_config_genesis();
@@ -221,11 +221,11 @@ mod tests {
fn preset_names_lists_supported() {
let names = super::preset_names();
assert!(
names.contains(&PresetId::from(sp_genesis_builder::DEV_RUNTIME_PRESET)),
names.contains(&PresetId::from(pezsp_genesis_builder::DEV_RUNTIME_PRESET)),
"DEV preset should be listed"
);
assert!(
names.contains(&PresetId::from(sp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET)),
names.contains(&PresetId::from(pezsp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET)),
"LOCAL_TESTNET preset should be listed"
);
}
+11 -8
View File
@@ -1,3 +1,6 @@
pub use pezframe_system as frame_system;
pub use pezframe_support as frame_support;
pub use pezcumulus_pezpallet_teyrchain_system as cumulus_pallet_parachain_system;
#![cfg_attr(not(feature = "std"), no_std)]
#![recursion_limit = "256"]
@@ -19,14 +22,14 @@ use pezframe_support::weights::{
};
pub use genesis_config_presets::TEYRCHAIN_ID;
use smallvec::smallvec;
pub use sp_consensus_aura::sr25519::AuthorityId as AuraId;
use sp_runtime::impl_opaque_keys;
pub use pezsp_consensus_aura::sr25519::AuthorityId as AuraId;
use pezsp_runtime::impl_opaque_keys;
#[cfg(any(feature = "std", test))]
pub use sp_runtime::BuildStorage;
pub use sp_runtime::{MultiAddress, Perbill, Permill};
use sp_std::prelude::*;
pub use pezsp_runtime::BuildStorage;
pub use pezsp_runtime::{MultiAddress, Perbill, Permill};
use pezsp_std::prelude::*;
#[cfg(feature = "std")]
use sp_version::NativeVersion;
use pezsp_version::NativeVersion;
use crate::{
configs::pezpallet_custom_origins,
@@ -79,8 +82,8 @@ impl WeightToFeePolynomial for WeightToFee {
/// continue syncing the network through upgrades to even the core data
/// structures.
pub mod opaque {
pub use sp_runtime::OpaqueExtrinsic as UncheckedExtrinsic;
use sp_runtime::{
pub use pezsp_runtime::OpaqueExtrinsic as UncheckedExtrinsic;
use pezsp_runtime::{
generic,
traits::{BlakeTwo256, Hash as HashT},
};
+9 -9
View File
@@ -10,15 +10,15 @@ use pezkuwi_runtime_common::impls::{
LocatableAssetConverter, VersionedLocatableAsset, VersionedLocationConverter,
};
use scale_info::TypeInfo;
use sp_core::ConstU32;
use sp_runtime::{
use pezsp_core::ConstU32;
use pezsp_runtime::{
generic,
traits::{BlakeTwo256, IdentifyAccount, Verify},
MultiAddress, MultiSignature, Perbill, RuntimeDebug,
};
use sp_version::RuntimeVersion;
use pezsp_version::RuntimeVersion;
use xcm::{
latest::{InteriorLocation, Junction::PalletInstance},
latest::{InteriorLocation, Junction::PezpalletInstance},
VersionedLocation,
};
use xcm_builder::PayOverXcm;
@@ -58,7 +58,7 @@ pub type AssetId = u32;
pub type Nonce = u32;
/// A hash of some data used by the chain.
pub type Hash = sp_core::H256;
pub type Hash = pezsp_core::H256;
/// An index to a block.
pub type BlockNumber = u32;
@@ -73,7 +73,7 @@ pub type Header = generic::Header<BlockNumber, BlakeTwo256>;
pub type Block = generic::Block<Header, UncheckedExtrinsic>;
/// The TransactionExtension to the basic transaction logic.
pub type TxExtension = cumulus_pezpallet_weight_reclaim::StorageWeightReclaim<
pub type TxExtension = pezcumulus_pezpallet_weight_reclaim::StorageWeightReclaim<
Runtime,
(
pezframe_system::CheckNonZeroSender<Runtime>,
@@ -111,7 +111,7 @@ pub type PriceForSiblingTeyrChainDelivery = pezkuwi_runtime_common::xcm_sender::
/// Configures the number of blocks that can be created without submission of validity proof to the relay chain
#[cfg(not(feature = "tanssi"))]
pub type ConsensusHook = cumulus_pezpallet_aura_ext::FixedVelocityConsensusHook<
pub type ConsensusHook = pezcumulus_pezpallet_aura_ext::FixedVelocityConsensusHook<
Runtime,
RELAY_CHAIN_SLOT_DURATION_MILLIS,
BLOCK_PTYRESSING_VELOCITY,
@@ -205,7 +205,7 @@ parameter_types! {
mod test {
mod filter {
use pezframe_support::traits::InstanceFilter;
use sp_core::H256;
use pezsp_core::H256;
use crate::{types::ProxyType, AssetManager, RuntimeCall};
@@ -241,7 +241,7 @@ mod test {
);
assert!(!proxy_type.filter(&invalid_call));
let valid_call = RuntimeCall::Proxy(pezpallet_proxy::Call::reject_announcement {
delegate: sp_runtime::MultiAddress::Id(AssetManager::account_id()),
delegate: pezsp_runtime::MultiAddress::Id(AssetManager::account_id()),
call_hash: H256::zero(),
});
assert!(proxy_type.filter(&valid_call));
+2 -2
View File
@@ -18,8 +18,8 @@
//! Expose the auto generated weight files.
pub mod block_weights;
pub mod cumulus_pezpallet_teyrchain_system;
pub mod cumulus_pezpallet_xcmp_queue;
pub mod pezcumulus_pezpallet_teyrchain_system;
pub mod pezcumulus_pezpallet_xcmp_queue;
pub mod extrinsic_weights;
pub mod pezpallet_asset_manager;
pub mod pezpallet_assets;
@@ -1,5 +1,5 @@
//! Autogenerated weights for `cumulus_pezpallet_teyrchain_system`
//! Autogenerated weights for `pezcumulus_pezpallet_teyrchain_system`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-11-03, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
@@ -16,10 +16,10 @@
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=benchmarking/results/results-cumulus_pezpallet_teyrchain_system.json
// --pezpallet=cumulus_pezpallet_teyrchain_system
// --json-file=benchmarking/results/results-pezcumulus_pezpallet_teyrchain_system.json
// --pezpallet=pezcumulus_pezpallet_teyrchain_system
// --chain=dev
// --output=benchmarking/new-benchmarks/cumulus_pezpallet_teyrchain_system.rs
// --output=benchmarking/new-benchmarks/pezcumulus_pezpallet_teyrchain_system.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -29,9 +29,9 @@
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `cumulus_pezpallet_teyrchain_system`.
/// Weight functions for `pezcumulus_pezpallet_teyrchain_system`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> cumulus_pezpallet_teyrchain_system::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pezcumulus_pezpallet_teyrchain_system::WeightInfo for WeightInfo<T> {
/// Storage: `TeyrChainSystem::LastDmqMqcHead` (r:1 w:1)
/// Proof: `TeyrChainSystem::LastDmqMqcHead` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
@@ -1,5 +1,5 @@
//! Autogenerated weights for `cumulus_pezpallet_xcmp_queue`
//! Autogenerated weights for `pezcumulus_pezpallet_xcmp_queue`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
//! DATE: 2024-11-03, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
@@ -16,10 +16,10 @@
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=benchmarking/results/results-cumulus_pezpallet_xcmp_queue.json
// --pezpallet=cumulus_pezpallet_xcmp_queue
// --json-file=benchmarking/results/results-pezcumulus_pezpallet_xcmp_queue.json
// --pezpallet=pezcumulus_pezpallet_xcmp_queue
// --chain=dev
// --output=benchmarking/new-benchmarks/cumulus_pezpallet_xcmp_queue.rs
// --output=benchmarking/new-benchmarks/pezcumulus_pezpallet_xcmp_queue.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -29,9 +29,9 @@
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `cumulus_pezpallet_xcmp_queue`.
/// Weight functions for `pezcumulus_pezpallet_xcmp_queue`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> cumulus_pezpallet_xcmp_queue::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pezcumulus_pezpallet_xcmp_queue::WeightInfo for WeightInfo<T> {
/// Storage: `XcmpQueue::QueueConfig` (r:1 w:1)
/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
fn set_config_with_u32() -> Weight {
@@ -31,7 +31,7 @@ use core::marker::PhantomData;
/// Weight functions for `pezpallet_asset_manager`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_asset_manager::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pezpallet_asset_manager::WeightInfo for WeightInfo<T> {
/// Storage: `AssetManager::AssetIdType` (r:1 w:1)
/// Proof: `AssetManager::AssetIdType` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Assets::Asset` (r:1 w:1)
@@ -31,7 +31,7 @@ use core::marker::PhantomData;
/// Weight functions for `pezpallet_assets`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_assets::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pezpallet_assets::WeightInfo for WeightInfo<T> {
/// Storage: `Assets::Asset` (r:1 w:1)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
/// Storage: `Assets::NextAssetId` (r:1 w:0)
@@ -31,7 +31,7 @@ use core::marker::PhantomData;
/// Weight functions for `pezpallet_balances`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_balances::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pezpallet_balances::WeightInfo for WeightInfo<T> {
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn transfer_allow_death() -> Weight {
@@ -31,7 +31,7 @@ use pezframe_support::{traits::Get, weights::Weight};
/// Weight functions for `pezpallet_collator_selection`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_collator_selection::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pezpallet_collator_selection::WeightInfo for WeightInfo<T> {
/// Storage: `Session::NextKeys` (r:20 w:0)
/// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `CollatorSelection::Invulnerables` (r:0 w:1)
@@ -31,7 +31,7 @@ use core::marker::PhantomData;
/// Weight functions for `pezpallet_conviction_voting`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_conviction_voting::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pezpallet_conviction_voting::WeightInfo for WeightInfo<T> {
/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(936), added: 3411, mode: `MaxEncodedLen`)
/// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
@@ -31,7 +31,7 @@ use core::marker::PhantomData;
/// Weight functions for `pezpallet_message_queue`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_message_queue::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pezpallet_message_queue::WeightInfo for WeightInfo<T> {
/// Storage: `MessageQueue::ServiceHead` (r:1 w:0)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::BookStateFor` (r:2 w:2)
@@ -31,7 +31,7 @@ use core::marker::PhantomData;
/// Weight functions for `pezpallet_multisig`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_multisig::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pezpallet_multisig::WeightInfo for WeightInfo<T> {
/// The range of component `z` is `[0, 10000]`.
fn as_multi_threshold_1(z: u32, ) -> Weight {
// Proof Size summary in bytes:
@@ -31,7 +31,7 @@ use core::marker::PhantomData;
/// Weight functions for `pezpallet_preimage`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_preimage::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pezpallet_preimage::WeightInfo for WeightInfo<T> {
/// Storage: `Preimage::StatusFor` (r:1 w:0)
/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
@@ -31,7 +31,7 @@ use core::marker::PhantomData;
/// Weight functions for `pezpallet_proxy`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_proxy::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pezpallet_proxy::WeightInfo for WeightInfo<T> {
/// Storage: `Proxy::Proxies` (r:1 w:0)
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
/// The range of component `p` is `[1, 31]`.
@@ -31,7 +31,7 @@ use core::marker::PhantomData;
/// Weight functions for `pezpallet_referenda`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_referenda::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pezpallet_referenda::WeightInfo for WeightInfo<T> {
/// Storage: `Referenda::ReferendumCount` (r:1 w:1)
/// Proof: `Referenda::ReferendumCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Scheduler::Agenda` (r:1 w:1)
@@ -31,7 +31,7 @@ use core::marker::PhantomData;
/// Weight functions for `pezpallet_scheduler`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_scheduler::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pezpallet_scheduler::WeightInfo for WeightInfo<T> {
/// Storage: `Scheduler::IncompleteSince` (r:1 w:1)
/// Proof: `Scheduler::IncompleteSince` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn service_agendas_base() -> Weight {
@@ -31,7 +31,7 @@ use pezframe_support::{traits::Get, weights::Weight};
/// Weight functions for `pezpallet_session`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_session::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pezpallet_session::WeightInfo for WeightInfo<T> {
/// Storage: `Session::NextKeys` (r:1 w:1)
/// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Session::KeyOwner` (r:1 w:1)
@@ -31,7 +31,7 @@ use core::marker::PhantomData;
/// Weight functions for `pezpallet_sudo`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_sudo::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pezpallet_sudo::WeightInfo for WeightInfo<T> {
/// Storage: `Sudo::Key` (r:1 w:1)
/// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
fn set_key() -> Weight {
@@ -31,7 +31,7 @@ use core::marker::PhantomData;
/// Weight functions for `pezpallet_timestamp`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_timestamp::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pezpallet_timestamp::WeightInfo for WeightInfo<T> {
/// Storage: `Timestamp::Now` (r:1 w:1)
/// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Aura::CurrentSlot` (r:1 w:0)
@@ -31,7 +31,7 @@ use core::marker::PhantomData;
/// Weight functions for `pezpallet_transaction_payment`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_transaction_payment::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pezpallet_transaction_payment::WeightInfo for WeightInfo<T> {
fn charge_transaction_payment() -> Weight {
// Proof Size summary in bytes:
// Measured: `94`
@@ -31,7 +31,7 @@ use core::marker::PhantomData;
/// Weight functions for `pezpallet_treasury`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_treasury::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pezpallet_treasury::WeightInfo for WeightInfo<T> {
/// Storage: `Treasury::ProposalCount` (r:1 w:1)
/// Proof: `Treasury::ProposalCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `Treasury::Approvals` (r:1 w:1)
@@ -31,7 +31,7 @@ use core::marker::PhantomData;
/// Weight functions for `pezpallet_utility`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_utility::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pezpallet_utility::WeightInfo for WeightInfo<T> {
/// The range of component `c` is `[0, 1000]`.
fn batch(c: u32, ) -> Weight {
// Proof Size summary in bytes:
@@ -31,7 +31,7 @@ use core::marker::PhantomData;
/// Weight functions for `pezpallet_whitelist`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_whitelist::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pezpallet_whitelist::WeightInfo for WeightInfo<T> {
/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
/// Storage: `Preimage::StatusFor` (r:1 w:0)
@@ -31,7 +31,7 @@ use core::marker::PhantomData;
/// Weight functions for `pezpallet_xcm`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_xcm::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pezpallet_xcm::WeightInfo for WeightInfo<T> {
/// Storage: `PezkuwiXcm::AuthorizedAliases` (r:1 w:1)
/// Proof: `PezkuwiXcm::AuthorizedAliases` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn add_authorized_alias() -> Weight {
@@ -31,7 +31,7 @@ use core::marker::PhantomData;
/// Weight functions for `pezpallet_xcm_transactor`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_xcm_transactor::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pezpallet_xcm_transactor::WeightInfo for WeightInfo<T> {
/// Storage: `XcmTransactor::IndexToAccount` (r:1 w:1)
/// Proof: `XcmTransactor::IndexToAccount` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn register() -> Weight {
@@ -31,7 +31,7 @@ use core::marker::PhantomData;
/// Weight functions for `pezpallet_xcm_weight_trader`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_xcm_weight_trader::WeightInfo for WeightInfo<T> {
impl<T: frame_system::Config> pezpallet_xcm_weight_trader::WeightInfo for WeightInfo<T> {
/// Storage: `XcmWeightTrader::SupportedAssets` (r:1 w:1)
/// Proof: `XcmWeightTrader::SupportedAssets` (`max_values`: None, `max_size`: Some(635), added: 3110, mode: `MaxEncodedLen`)
fn add_asset() -> Weight {
+1 -1
View File
@@ -3,7 +3,7 @@ use pezframe_support::weights::Weight;
use generic_runtime_template::{BuildStorage, Runtime, System};
pub fn run_with_system_weight<F: FnMut()>(w: Weight, mut assertions: F) {
let mut t: sp_io::TestExternalities =
let mut t: pezsp_io::TestExternalities =
pezframe_system::GenesisConfig::<Runtime>::default().build_storage().unwrap().into();
t.execute_with(|| {
System::set_block_consumed_resources(w, 0);
@@ -25,8 +25,8 @@ mod runtime_tests {
constants::{currency::*, *},
BlockNumber, Runtime,
};
use sp_runtime::Perbill;
use sp_version::RuntimeVersion;
use pezsp_runtime::Perbill;
use pezsp_version::RuntimeVersion;
use xcm::latest::prelude::BodyId;
#[test]
@@ -62,7 +62,7 @@ mod runtime_tests {
MAXIMUM_BLOCK_WEIGHT,
Weight::from_parts(
pezframe_support::weights::constants::WEIGHT_REF_TIME_PER_SECOND.saturating_div(2),
cumulus_primitives_core::relay_chain::MAX_POV_SIZE as u64
pezcumulus_primitives_core::relay_chain::MAX_POV_SIZE as u64
)
);
@@ -71,7 +71,7 @@ mod runtime_tests {
MAXIMUM_BLOCK_WEIGHT,
Weight::from_parts(
pezframe_support::weights::constants::WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2),
cumulus_primitives_core::relay_chain::MAX_POV_SIZE as u64
pezcumulus_primitives_core::relay_chain::MAX_POV_SIZE as u64
)
);
@@ -102,9 +102,9 @@ mod runtime_tests {
assert_eq!(MAX_BLOCK_LENGTH, 5 * 1024 * 1024);
assert_eq!(<Runtime as pezframe_system::Config>::SS58Prefix::get(), 42);
assert_eq!(<Runtime as frame_system::Config>::SS58Prefix::get(), 42);
assert_eq!(<Runtime as pezframe_system::Config>::MaxConsumers::get(), 16);
assert_eq!(<Runtime as frame_system::Config>::MaxConsumers::get(), 16);
}
#[test]
@@ -168,14 +168,14 @@ mod runtime_tests {
}
#[test]
fn cumulus_pezpallet_teyrchain_system_constants() {
fn pezcumulus_pezpallet_teyrchain_system_constants() {
assert_eq!(
<Runtime as cumulus_pezpallet_teyrchain_system::Config>::ReservedXcmpWeight::get(),
<Runtime as pezcumulus_pezpallet_teyrchain_system::Config>::ReservedXcmpWeight::get(),
MAXIMUM_BLOCK_WEIGHT.saturating_div(4)
);
assert_eq!(
<Runtime as cumulus_pezpallet_teyrchain_system::Config>::ReservedDmpWeight::get(),
<Runtime as pezcumulus_pezpallet_teyrchain_system::Config>::ReservedDmpWeight::get(),
MAXIMUM_BLOCK_WEIGHT.saturating_div(4)
);
}
@@ -187,9 +187,9 @@ mod runtime_tests {
}
#[test]
fn cumulus_pezpallet_xcmp_queue_constants() {
fn pezcumulus_pezpallet_xcmp_queue_constants() {
assert_eq!(
<Runtime as cumulus_pezpallet_xcmp_queue::Config>::MaxInboundSuspended::get(),
<Runtime as pezcumulus_pezpallet_xcmp_queue::Config>::MaxInboundSuspended::get(),
1000
);
}
+2 -2
View File
@@ -1,11 +1,11 @@
// Integration transaction weight-fee tests
mod common;
use common::*;
use pezframe_support::pezpallet_prelude::*;
use pezframe_support::pallet_prelude::*;
use generic_runtime_template::{Runtime, RuntimeBlockWeights};
use pezpallet_transaction_payment::Multiplier;
use pezkuwi_runtime_common::MinimumMultiplier;
use sp_runtime::{traits::Convert, Perquintill};
use pezsp_runtime::{traits::Convert, Perquintill};
fn min_multiplier() -> Multiplier {
MinimumMultiplier::get()
+4 -4
View File
@@ -1,14 +1,14 @@
// Storage indices integration checks
use pezframe_support::traits::PalletInfo;
use pezframe_support::traits::PezpalletInfo;
#[cfg(not(feature = "tanssi"))]
use generic_runtime_template::{Aura, AuraExt, Authorship, CollatorSelection, Session};
use generic_runtime_template::{
Balances, CumulusXcm, MessageQueue, Multisig, TeyrChainInfo, TeyrChainSystem, PezkuwiXcm,
Balances, PezcumulusXcm, MessageQueue, Multisig, TeyrChainInfo, TeyrChainSystem, PezkuwiXcm,
Proxy, Runtime, Sudo, System, Timestamp, TransactionPayment, XcmpQueue,
};
fn assert_pezpallet_prefix<P: 'static>(name: &str) {
assert_eq!(<Runtime as pezframe_system::Config>::PalletInfo::name::<P>(), Some(name));
assert_eq!(<Runtime as frame_system::Config>::PezpalletInfo::name::<P>(), Some(name));
}
#[test]
@@ -24,7 +24,7 @@ fn verify_pezpallet_prefixes() {
assert_pezpallet_prefix::<Multisig>("Multisig");
assert_pezpallet_prefix::<XcmpQueue>("XcmpQueue");
assert_pezpallet_prefix::<PezkuwiXcm>("PezkuwiXcm");
assert_pezpallet_prefix::<CumulusXcm>("CumulusXcm");
assert_pezpallet_prefix::<PezcumulusXcm>("PezcumulusXcm");
assert_pezpallet_prefix::<MessageQueue>("MessageQueue");
#[cfg(not(feature = "tanssi"))]
+13 -13
View File
@@ -1,13 +1,13 @@
pub mod teyrchain;
pub mod relay_chain;
use sp_runtime::BuildStorage;
use sp_tracing;
use pezsp_runtime::BuildStorage;
use pezsp_tracing;
use xcm::prelude::*;
use xcm_executor::traits::ConvertLocation;
use xcm_simulator::{decl_test_network, decl_test_teyrchain, decl_test_relay_chain, TestExt};
pub const ALICE: sp_runtime::AccountId32 = sp_runtime::AccountId32::new([1u8; 32]);
pub const ALICE: pezsp_runtime::AccountId32 = pezsp_runtime::AccountId32::new([1u8; 32]);
pub const INITIAL_BALANCE: u128 = 1_000_000_000;
decl_test_teyrchain! {
@@ -60,22 +60,22 @@ pub fn child_account_id(para: u32) -> relay_chain::AccountId {
relay_chain::location_converter::LocationConverter::convert_location(&location.into()).unwrap()
}
pub fn child_account_account_id(para: u32, who: sp_runtime::AccountId32) -> relay_chain::AccountId {
pub fn child_account_account_id(para: u32, who: pezsp_runtime::AccountId32) -> relay_chain::AccountId {
let location = (TeyrChain(para), AccountId32 { network: None, id: who.into() });
relay_chain::location_converter::LocationConverter::convert_location(&location.into()).unwrap()
}
pub fn sibling_account_account_id(para: u32, who: sp_runtime::AccountId32) -> teyrchain::AccountId {
pub fn sibling_account_account_id(para: u32, who: pezsp_runtime::AccountId32) -> teyrchain::AccountId {
let location = (Parent, TeyrChain(para), AccountId32 { network: None, id: who.into() });
teyrchain::location_converter::LocationConverter::convert_location(&location.into()).unwrap()
}
pub fn parent_account_account_id(who: sp_runtime::AccountId32) -> teyrchain::AccountId {
pub fn parent_account_account_id(who: pezsp_runtime::AccountId32) -> teyrchain::AccountId {
let location = (Parent, AccountId32 { network: None, id: who.into() });
teyrchain::location_converter::LocationConverter::convert_location(&location.into()).unwrap()
}
pub fn para_ext(para_id: u32) -> sp_io::TestExternalities {
pub fn para_ext(para_id: u32) -> pezsp_io::TestExternalities {
use teyrchain::{MsgQueue, Runtime, System};
let mut t = pezframe_system::GenesisConfig::<Runtime>::default().build_storage().unwrap();
@@ -87,16 +87,16 @@ pub fn para_ext(para_id: u32) -> sp_io::TestExternalities {
.assimilate_storage(&mut t)
.unwrap();
let mut ext = sp_io::TestExternalities::new(t);
let mut ext = pezsp_io::TestExternalities::new(t);
ext.execute_with(|| {
sp_tracing::try_init_simple();
pezsp_tracing::try_init_simple();
System::set_block_number(1);
MsgQueue::set_para_id(para_id.into());
});
ext
}
pub fn relay_ext() -> sp_io::TestExternalities {
pub fn relay_ext() -> pezsp_io::TestExternalities {
use relay_chain::{Runtime, System};
let mut t = pezframe_system::GenesisConfig::<Runtime>::default().build_storage().unwrap();
@@ -112,12 +112,12 @@ pub fn relay_ext() -> sp_io::TestExternalities {
.assimilate_storage(&mut t)
.unwrap();
let mut ext = sp_io::TestExternalities::new(t);
let mut ext = pezsp_io::TestExternalities::new(t);
ext.execute_with(|| {
System::set_block_number(1);
});
ext
}
pub type RelayChainPezpalletXcm = pezpallet_xcm::Pallet<relay_chain::Runtime>;
pub type TeyrChainPezpalletXcm = pezpallet_xcm::Pallet<teyrchain::Runtime>;
pub type RelayChainPezpalletXcm = pezpallet_xcm::Pezpallet<relay_chain::Runtime>;
pub type TeyrChainPezpalletXcm = pezpallet_xcm::Pezpallet<teyrchain::Runtime>;
@@ -12,8 +12,8 @@ use pezkuwi_runtime_teyrchains::{
inclusion::{AggregateMessageOrigin, UmpQueueId},
origin, shared,
};
use sp_core::ConstU32;
use sp_runtime::{traits::IdentityLookup, AccountId32};
use pezsp_core::ConstU32;
use pezsp_runtime::{traits::IdentityLookup, AccountId32};
use xcm::latest::prelude::*;
use xcm_builder::{IsConcrete, SignedToAccountId32};
pub use xcm_config::*;
@@ -27,7 +27,7 @@ parameter_types! {
}
#[derive_impl(pezframe_system::config_preludes::TestDefaultConfig)]
impl pezframe_system::Config for Runtime {
impl frame_system::Config for Runtime {
type AccountData = pezpallet_balances::AccountData<Balance>;
type AccountId = AccountId;
type Block = Block;
@@ -7,8 +7,8 @@ use pezframe_support::{
weights::{constants::WEIGHT_REF_TIME_PER_SECOND, Weight},
};
use pezframe_system::EnsureRoot;
use sp_core::ConstU32;
use sp_runtime::{
use pezsp_core::ConstU32;
use pezsp_runtime::{
traits::{Get, IdentityLookup},
AccountId32,
};
@@ -26,7 +26,7 @@ parameter_types! {
}
#[derive_impl(pezframe_system::config_preludes::TestDefaultConfig)]
impl pezframe_system::Config for Runtime {
impl frame_system::Config for Runtime {
type AccountData = pezpallet_balances::AccountData<Balance>;
type AccountId = AccountId;
type Block = Block;