Merge development: FAZ 1 Complete - Workspace compile fixes & warning cleanup
This commit is contained in:
@@ -18,7 +18,8 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dev-dependencies]
|
||||
codec = { features = ["derive"], workspace = true, default-features = true }
|
||||
frame = { workspace = true, default-features = true }
|
||||
pezframe = { workspace = true, default-features = true }
|
||||
pezframe-system = { workspace = true }
|
||||
log = { workspace = true }
|
||||
pezframe-support = { workspace = true, default-features = true }
|
||||
pezsp-core = { workspace = true, default-features = true }
|
||||
@@ -58,7 +59,7 @@ try-runtime = [
|
||||
"pezpallet-staking-async-rc-client/try-runtime",
|
||||
"pezpallet-staking-async/try-runtime",
|
||||
|
||||
"frame/try-runtime",
|
||||
"pezframe/try-runtime",
|
||||
"pezframe-election-provider-support/try-runtime",
|
||||
"pezframe-support/try-runtime",
|
||||
"pezpallet-authorship/try-runtime",
|
||||
@@ -70,7 +71,7 @@ try-runtime = [
|
||||
"pezpallet-timestamp/try-runtime",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"frame/runtime-benchmarks",
|
||||
"pezframe/runtime-benchmarks",
|
||||
"pezframe-election-provider-support/runtime-benchmarks",
|
||||
"pezframe-support/runtime-benchmarks",
|
||||
"pezpallet-authorship/runtime-benchmarks",
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// limitations under the License.
|
||||
|
||||
use crate::shared;
|
||||
use frame::testing_prelude::*;
|
||||
use pezframe::testing_prelude::*;
|
||||
use pezframe_election_provider_support::{
|
||||
bounds::{ElectionBounds, ElectionBoundsBuilder},
|
||||
SequentialPhragmen,
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// limitations under the License.
|
||||
|
||||
use crate::ah::mock::*;
|
||||
use frame::prelude::Perbill;
|
||||
use pezframe::prelude::Perbill;
|
||||
use pezframe_support::assert_ok;
|
||||
use pezpallet_election_provider_multi_block::{Event as ElectionEvent, Phase};
|
||||
use pezpallet_staking_async::{
|
||||
|
||||
@@ -32,7 +32,7 @@ mod tests {
|
||||
rc::RootOffences,
|
||||
};
|
||||
use ah_client::OperatingMode;
|
||||
use frame::testing_prelude::*;
|
||||
use pezframe::testing_prelude::*;
|
||||
use pezframe_support::traits::Get;
|
||||
use pezpallet_election_provider_multi_block as multi_block;
|
||||
use pezpallet_staking as staking_classic;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
use crate::shared;
|
||||
use ah_client::OperatingMode;
|
||||
use frame::{
|
||||
use pezframe::{
|
||||
deps::pezsp_runtime::testing::UintAuthorityId, testing_prelude::*, traits::fungible::Mutate,
|
||||
};
|
||||
use pezframe_election_provider_support::{
|
||||
@@ -157,7 +157,7 @@ impl BoundToRuntimeAppPublic for OtherSessionHandler {
|
||||
type Public = UintAuthorityId;
|
||||
}
|
||||
|
||||
frame::deps::pezsp_runtime::impl_opaque_keys! {
|
||||
pezframe::deps::pezsp_runtime::impl_opaque_keys! {
|
||||
pub struct SessionKeys {
|
||||
pub other: OtherSessionHandler,
|
||||
}
|
||||
@@ -183,7 +183,7 @@ impl pezpallet_session::Config for Runtime {
|
||||
type DisablingStrategy = pezpallet_session::disabling::UpToLimitDisablingStrategy<1>;
|
||||
|
||||
type Keys = SessionKeys;
|
||||
type SessionHandler = <SessionKeys as frame::traits::OpaqueKeys>::KeyTypeIdProviders;
|
||||
type SessionHandler = <SessionKeys as pezframe::traits::OpaqueKeys>::KeyTypeIdProviders;
|
||||
|
||||
type NextSessionRotation = Self::ShouldEndSession;
|
||||
type ShouldEndSession = pezpallet_session::PeriodicSessions<Period, Offset>;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// limitations under the License.
|
||||
|
||||
use crate::rc::mock::*;
|
||||
use frame::testing_prelude::*;
|
||||
use pezframe::testing_prelude::*;
|
||||
use pezpallet_staking_async_ah_client::{
|
||||
self as ah_client, Mode, OffenceSendQueue, OperatingMode, OutgoingSessionReport, UnexpectedKind,
|
||||
};
|
||||
@@ -1402,7 +1402,7 @@ mod splitting {
|
||||
|
||||
#[cfg(test)]
|
||||
mod key_proofs {
|
||||
use frame::traits::KeyOwnerProofSystem;
|
||||
use pezframe::traits::KeyOwnerProofSystem;
|
||||
use pezframe_support::pezsp_runtime;
|
||||
|
||||
use super::*;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// limitations under the License.
|
||||
|
||||
use crate::*;
|
||||
use frame::testing_prelude::*;
|
||||
use pezframe::testing_prelude::*;
|
||||
use std::cell::UnsafeCell;
|
||||
|
||||
thread_local! {
|
||||
|
||||
@@ -13,7 +13,9 @@ documentation.workspace = true
|
||||
|
||||
[dependencies]
|
||||
codec = { workspace = true }
|
||||
frame = { workspace = true, features = ["runtime"] }
|
||||
pezframe = { workspace = true, features = ["runtime"] }
|
||||
pezframe-system = { workspace = true }
|
||||
pezframe-support = { workspace = true }
|
||||
pezpallet-staking-async-ah-client = { workspace = true }
|
||||
scale-info = { workspace = true }
|
||||
|
||||
@@ -21,11 +23,13 @@ scale-info = { workspace = true }
|
||||
default = ["std"]
|
||||
std = [
|
||||
"codec/std",
|
||||
"frame/std",
|
||||
"pezframe/std",
|
||||
"pezframe-system/std",
|
||||
"pezframe-support/std",
|
||||
"pezpallet-staking-async-ah-client/std",
|
||||
"scale-info/std",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"frame/runtime-benchmarks",
|
||||
"pezframe/runtime-benchmarks",
|
||||
"pezpallet-staking-async-ah-client/runtime-benchmarks",
|
||||
]
|
||||
|
||||
@@ -22,10 +22,10 @@
|
||||
|
||||
pub use pezpallet::*;
|
||||
|
||||
#[frame::pezpallet]
|
||||
#[pezframe::pezpallet]
|
||||
pub mod pezpallet {
|
||||
extern crate alloc;
|
||||
use frame::prelude::*;
|
||||
use pezframe::prelude::*;
|
||||
|
||||
#[pezpallet::storage]
|
||||
#[pezpallet::getter(fn preset)]
|
||||
|
||||
@@ -108,7 +108,7 @@ xcm-runtime-pezapis = { workspace = true }
|
||||
zagros-runtime-constants = { workspace = true }
|
||||
|
||||
# Pezcumulus
|
||||
assets-common = { workspace = true }
|
||||
pez-assets-common = { workspace = true }
|
||||
pezcumulus-pezpallet-aura-ext = { workspace = true }
|
||||
pezcumulus-pezpallet-session-benchmarking = { workspace = true }
|
||||
pezcumulus-pezpallet-teyrchain-system = { workspace = true }
|
||||
@@ -125,10 +125,10 @@ teyrchain-info = { workspace = true }
|
||||
teyrchains-common = { workspace = true }
|
||||
|
||||
# Bridges
|
||||
bp-asset-hub-pezkuwichain = { workspace = true }
|
||||
pezbp-asset-hub-pezkuwichain = { workspace = true }
|
||||
# bp-asset-hub-next-zagros = { workspace = true }
|
||||
bp-bridge-hub-pezkuwichain = { workspace = true }
|
||||
bp-bridge-hub-zagros = { workspace = true }
|
||||
pezbp-bridge-hub-pezkuwichain = { workspace = true }
|
||||
pezbp-bridge-hub-zagros = { workspace = true }
|
||||
pezpallet-xcm-bridge-hub-router = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
@@ -148,11 +148,11 @@ bizinikiwi-wasm-builder = { optional = true, workspace = true, default-features
|
||||
default = ["std"]
|
||||
runtime-benchmarks = [
|
||||
"asset-test-pezutils/runtime-benchmarks",
|
||||
"assets-common/runtime-benchmarks",
|
||||
"pez-assets-common/runtime-benchmarks",
|
||||
"bizinikiwi-wasm-builder?/runtime-benchmarks",
|
||||
"bp-asset-hub-pezkuwichain/runtime-benchmarks",
|
||||
"bp-bridge-hub-pezkuwichain/runtime-benchmarks",
|
||||
"bp-bridge-hub-zagros/runtime-benchmarks",
|
||||
"pezbp-asset-hub-pezkuwichain/runtime-benchmarks",
|
||||
"pezbp-bridge-hub-pezkuwichain/runtime-benchmarks",
|
||||
"pezbp-bridge-hub-zagros/runtime-benchmarks",
|
||||
"pezcumulus-pezpallet-aura-ext/runtime-benchmarks",
|
||||
"pezcumulus-pezpallet-session-benchmarking/runtime-benchmarks",
|
||||
"pezcumulus-pezpallet-teyrchain-system/runtime-benchmarks",
|
||||
@@ -247,7 +247,7 @@ runtime-benchmarks = [
|
||||
]
|
||||
try-runtime = [
|
||||
"asset-test-pezutils/try-runtime",
|
||||
"assets-common/try-runtime",
|
||||
"pez-assets-common/try-runtime",
|
||||
"pezcumulus-pezpallet-aura-ext/try-runtime",
|
||||
"pezcumulus-pezpallet-teyrchain-system/try-runtime",
|
||||
"pezcumulus-pezpallet-weight-reclaim/try-runtime",
|
||||
@@ -304,12 +304,12 @@ try-runtime = [
|
||||
"teyrchains-common/try-runtime",
|
||||
]
|
||||
std = [
|
||||
"assets-common/std",
|
||||
"bp-asset-hub-pezkuwichain/std",
|
||||
"pez-assets-common/std",
|
||||
"pezbp-asset-hub-pezkuwichain/std",
|
||||
# "bp-asset-hub-next-zagros/std",
|
||||
"bizinikiwi-wasm-builder",
|
||||
"bp-bridge-hub-pezkuwichain/std",
|
||||
"bp-bridge-hub-zagros/std",
|
||||
"pezbp-bridge-hub-pezkuwichain/std",
|
||||
"pezbp-bridge-hub-zagros/std",
|
||||
"codec/std",
|
||||
"log/std",
|
||||
"pezcumulus-pezpallet-aura-ext/std",
|
||||
|
||||
@@ -37,7 +37,7 @@ mod staking;
|
||||
extern crate alloc;
|
||||
|
||||
use alloc::{vec, vec::Vec};
|
||||
use assets_common::{
|
||||
use pez_assets_common::{
|
||||
foreign_creators::ForeignCreators,
|
||||
local_and_foreign_assets::{ForeignAssetReserveData, LocalFromLeft, TargetFromLeft},
|
||||
matching::{FromNetwork, FromSiblingTeyrchain},
|
||||
@@ -449,7 +449,7 @@ impl pezpallet_asset_conversion::Config for Runtime {
|
||||
type MintMinLiquidity = ConstU128<100>;
|
||||
type WeightInfo = weights::pezpallet_asset_conversion::WeightInfo<Runtime>;
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
type BenchmarkHelper = assets_common::benchmarks::AssetPairFactory<
|
||||
type BenchmarkHelper = pez_assets_common::benchmarks::AssetPairFactory<
|
||||
ZagrosLocation,
|
||||
teyrchain_info::Pezpallet<Runtime>,
|
||||
xcm_config::TrustBackedAssetsPalletIndex,
|
||||
@@ -582,7 +582,7 @@ impl pezpallet_assets::Config<ForeignAssetsInstance> for Runtime {
|
||||
type AssetAccountDeposit = ForeignAssetsAssetAccountDeposit;
|
||||
type RemoveItemsLimit = pezframe_support::traits::ConstU32<1000>;
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
type BenchmarkHelper = assets_common::benchmarks::LocationAssetsBenchmarkHelper;
|
||||
type BenchmarkHelper = pez_assets_common::benchmarks::LocationAssetsBenchmarkHelper;
|
||||
}
|
||||
|
||||
// Allow Freezes for the `ForeignAssets` pezpallet
|
||||
@@ -1577,7 +1577,7 @@ impl_runtime_apis! {
|
||||
let mut acceptable_assets = vec![AssetId(native_token.clone())];
|
||||
// We also accept all assets in a pool with the native token.
|
||||
acceptable_assets.extend(
|
||||
assets_common::PoolAdapter::<Runtime>::get_assets_in_pool_with(native_token)
|
||||
pez_assets_common::PoolAdapter::<Runtime>::get_assets_in_pool_with(native_token)
|
||||
.map_err(|()| XcmPaymentApiError::VersionedConversionFailed)?
|
||||
);
|
||||
PezkuwiXcm::query_acceptable_payment_assets(xcm_version, acceptable_assets)
|
||||
@@ -1594,7 +1594,7 @@ impl_runtime_apis! {
|
||||
},
|
||||
Ok(asset_id) => {
|
||||
// Try to get current price of `asset_id` in `native_asset`.
|
||||
if let Ok(Some(swapped_in_native)) = assets_common::PoolAdapter::<Runtime>::quote_price_tokens_for_exact_tokens(
|
||||
if let Ok(Some(swapped_in_native)) = pez_assets_common::PoolAdapter::<Runtime>::quote_price_tokens_for_exact_tokens(
|
||||
asset_id.0.clone(),
|
||||
native_asset,
|
||||
fee_in_native,
|
||||
@@ -1668,13 +1668,13 @@ impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl assets_common::runtime_api::FungiblesApi<
|
||||
impl pez_assets_common::runtime_api::FungiblesApi<
|
||||
Block,
|
||||
AccountId,
|
||||
> for Runtime
|
||||
{
|
||||
fn query_account_balances(account: AccountId) -> Result<xcm::VersionedAssets, assets_common::runtime_api::FungiblesAccessError> {
|
||||
use assets_common::fungible_conversion::{convert, convert_balance};
|
||||
fn query_account_balances(account: AccountId) -> Result<xcm::VersionedAssets, pez_assets_common::runtime_api::FungiblesAccessError> {
|
||||
use pez_assets_common::fungible_conversion::{convert, convert_balance};
|
||||
Ok([
|
||||
// collect pezpallet_balance
|
||||
{
|
||||
|
||||
@@ -22,7 +22,7 @@ use super::{
|
||||
StakingAdmin, TeyrchainInfo, TeyrchainSystem, ToPezkuwichainXcmRouter, TransactionByteFee,
|
||||
Treasurer, TrustBackedAssetsInstance, Uniques, WeightToFee, XcmpQueue,
|
||||
};
|
||||
use assets_common::{
|
||||
use pez_assets_common::{
|
||||
matching::{FromSiblingTeyrchain, IsForeignConcreteAsset, ParentLocation},
|
||||
TrustBackedAssetsAsLocation,
|
||||
};
|
||||
@@ -123,7 +123,7 @@ pub type FungibleTransactor = FungibleAdapter<
|
||||
|
||||
/// `AssetId`/`Balance` converter for `TrustBackedAssets`.
|
||||
pub type TrustBackedAssetsConvertedConcreteId =
|
||||
assets_common::TrustBackedAssetsConvertedConcreteId<TrustBackedAssetsPalletLocation, Balance>;
|
||||
pez_assets_common::TrustBackedAssetsConvertedConcreteId<TrustBackedAssetsPalletLocation, Balance>;
|
||||
|
||||
/// Means for transacting assets besides the native currency on this chain.
|
||||
pub type FungiblesTransactor = FungiblesAdapter<
|
||||
@@ -144,7 +144,7 @@ pub type FungiblesTransactor = FungiblesAdapter<
|
||||
|
||||
/// Matcher for converting `ClassId`/`InstanceId` into a uniques asset.
|
||||
pub type UniquesConvertedConcreteId =
|
||||
assets_common::UniquesConvertedConcreteId<UniquesPalletLocation>;
|
||||
pez_assets_common::UniquesConvertedConcreteId<UniquesPalletLocation>;
|
||||
|
||||
/// Means for transacting unique assets.
|
||||
pub type UniquesTransactor = NonFungiblesAdapter<
|
||||
@@ -163,7 +163,7 @@ pub type UniquesTransactor = NonFungiblesAdapter<
|
||||
>;
|
||||
|
||||
/// `AssetId`/`Balance` converter for `ForeignAssets`.
|
||||
pub type ForeignAssetsConvertedConcreteId = assets_common::ForeignAssetsConvertedConcreteId<
|
||||
pub type ForeignAssetsConvertedConcreteId = pez_assets_common::ForeignAssetsConvertedConcreteId<
|
||||
(
|
||||
// Ignore `TrustBackedAssets` explicitly
|
||||
StartsWith<TrustBackedAssetsPalletLocation>,
|
||||
@@ -196,7 +196,7 @@ pub type ForeignFungiblesTransactor = FungiblesAdapter<
|
||||
|
||||
/// `AssetId`/`Balance` converter for `PoolAssets`.
|
||||
pub type PoolAssetsConvertedConcreteId =
|
||||
assets_common::PoolAssetsConvertedConcreteId<PoolAssetsPalletLocation, Balance>;
|
||||
pez_assets_common::PoolAssetsConvertedConcreteId<PoolAssetsPalletLocation, Balance>;
|
||||
|
||||
/// Means for transacting asset conversion pool assets on this chain.
|
||||
pub type PoolFungiblesTransactor = FungiblesAdapter<
|
||||
@@ -618,7 +618,7 @@ impl pezcumulus_pezpallet_xcm::Config for Runtime {
|
||||
pub mod bridging {
|
||||
use super::*;
|
||||
use alloc::collections::btree_set::BTreeSet;
|
||||
use assets_common::matching;
|
||||
use pez_assets_common::matching;
|
||||
|
||||
parameter_types! {
|
||||
/// Base price of every byte of the Zagros -> Pezkuwichain message. Can be adjusted via
|
||||
@@ -633,14 +633,14 @@ pub mod bridging {
|
||||
///
|
||||
/// 3) the approximate cost of Zagros -> Pezkuwichain message confirmation transaction on Zagros Bridge Hub.
|
||||
pub storage XcmBridgeHubRouterBaseFee: Balance =
|
||||
bp_bridge_hub_zagros::BridgeHubZagrosBaseXcmFeeInWnds::get()
|
||||
.saturating_add(bp_bridge_hub_pezkuwichain::BridgeHubPezkuwichainBaseDeliveryFeeInRocs::get())
|
||||
.saturating_add(bp_bridge_hub_zagros::BridgeHubZagrosBaseConfirmationFeeInWnds::get());
|
||||
pezbp_bridge_hub_zagros::BridgeHubZagrosBaseXcmFeeInWnds::get()
|
||||
.saturating_add(pezbp_bridge_hub_pezkuwichain::BridgeHubPezkuwichainBaseDeliveryFeeInRocs::get())
|
||||
.saturating_add(pezbp_bridge_hub_zagros::BridgeHubZagrosBaseConfirmationFeeInWnds::get());
|
||||
/// Price of every byte of the Zagros -> Pezkuwichain message. Can be adjusted via
|
||||
/// governance `set_storage` call.
|
||||
pub storage XcmBridgeHubRouterByteFee: Balance = TransactionByteFee::get();
|
||||
|
||||
pub SiblingBridgeHubParaId: u32 = bp_bridge_hub_zagros::BRIDGE_HUB_ZAGROS_TEYRCHAIN_ID;
|
||||
pub SiblingBridgeHubParaId: u32 = pezbp_bridge_hub_zagros::BRIDGE_HUB_ZAGROS_TEYRCHAIN_ID;
|
||||
pub SiblingBridgeHub: Location = Location::new(1, [Teyrchain(SiblingBridgeHubParaId::get())]);
|
||||
/// Router expects payment with this `AssetId`.
|
||||
/// (`AssetId` has to be aligned with `BridgeTable`)
|
||||
@@ -662,7 +662,7 @@ pub mod bridging {
|
||||
1,
|
||||
[
|
||||
Teyrchain(SiblingBridgeHubParaId::get()),
|
||||
PalletInstance(bp_bridge_hub_zagros::WITH_BRIDGE_ZAGROS_TO_PEZKUWICHAIN_MESSAGES_PALLET_INDEX)
|
||||
PalletInstance(pezbp_bridge_hub_zagros::WITH_BRIDGE_ZAGROS_TO_PEZKUWICHAIN_MESSAGES_PALLET_INDEX)
|
||||
]
|
||||
);
|
||||
|
||||
@@ -671,7 +671,7 @@ pub mod bridging {
|
||||
pub RocLocation: Location = Location::new(2, [GlobalConsensus(PezkuwichainNetwork::get())]);
|
||||
pub AssetHubPezkuwichain: Location = Location::new(2, [
|
||||
GlobalConsensus(PezkuwichainNetwork::get()),
|
||||
Teyrchain(bp_asset_hub_pezkuwichain::ASSET_HUB_PEZKUWICHAIN_TEYRCHAIN_ID)
|
||||
Teyrchain(pezbp_asset_hub_pezkuwichain::ASSET_HUB_PEZKUWICHAIN_TEYRCHAIN_ID)
|
||||
]);
|
||||
|
||||
/// Set up exporters configuration.
|
||||
@@ -715,7 +715,7 @@ pub mod bridging {
|
||||
|
||||
pub mod to_ethereum {
|
||||
use super::*;
|
||||
use assets_common::matching::FromNetwork;
|
||||
use pez_assets_common::matching::FromNetwork;
|
||||
use pezsp_std::collections::btree_set::BTreeSet;
|
||||
use testnet_teyrchains_constants::zagros::snowbridge::{
|
||||
EthereumNetwork, INBOUND_QUEUE_PALLET_INDEX_V1,
|
||||
|
||||
Reference in New Issue
Block a user