FAZ 1 Complete: Workspace compile fixes, warning cleanup, version bumps
- Fixed is_using_frame_crate() macro to check for pezframe/pezkuwi_sdk - Removed disable_pezframe_system_supertrait_check temporary bypasses - Feature-gated storage-benchmark and teyrchain-benchmarks code - Fixed dead_code warnings with underscore prefix (_Header) - Removed unused imports and shadowing use statements - Version bumps: procedural-tools 10.0.1, benchmarking-cli 32.0.1, docs 0.0.2, minimal-runtime 0.0.1, yet-another-teyrchain 0.6.1, umbrella 0.1.2 - Updated MAINNET_ROADMAP.md with FAZ 1 completion status
This commit is contained in:
@@ -104,7 +104,7 @@ xcm-executor = { workspace = true }
|
||||
xcm-runtime-pezapis = { 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 }
|
||||
@@ -120,10 +120,10 @@ teyrchain-info = { workspace = true }
|
||||
teyrchains-common = { workspace = true }
|
||||
|
||||
# Bridges
|
||||
bp-asset-hub-pezkuwichain = { workspace = true }
|
||||
bp-asset-hub-zagros = { workspace = true }
|
||||
bp-bridge-hub-pezkuwichain = { workspace = true }
|
||||
bp-bridge-hub-zagros = { workspace = true }
|
||||
pezbp-asset-hub-pezkuwichain = { workspace = true }
|
||||
pezbp-asset-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]
|
||||
@@ -138,12 +138,12 @@ default = ["std"]
|
||||
fast-runtime = []
|
||||
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-asset-hub-zagros/runtime-benchmarks",
|
||||
"bp-bridge-hub-pezkuwichain/runtime-benchmarks",
|
||||
"bp-bridge-hub-zagros/runtime-benchmarks",
|
||||
"pezbp-asset-hub-pezkuwichain/runtime-benchmarks",
|
||||
"pezbp-asset-hub-zagros/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",
|
||||
@@ -230,7 +230,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",
|
||||
@@ -284,12 +284,12 @@ try-runtime = [
|
||||
"teyrchains-common/try-runtime",
|
||||
]
|
||||
std = [
|
||||
"assets-common/std",
|
||||
"pez-assets-common/std",
|
||||
"bizinikiwi-wasm-builder",
|
||||
"bp-asset-hub-pezkuwichain/std",
|
||||
"bp-asset-hub-zagros/std",
|
||||
"bp-bridge-hub-pezkuwichain/std",
|
||||
"bp-bridge-hub-zagros/std",
|
||||
"pezbp-asset-hub-pezkuwichain/std",
|
||||
"pezbp-asset-hub-zagros/std",
|
||||
"pezbp-bridge-hub-pezkuwichain/std",
|
||||
"pezbp-bridge-hub-zagros/std",
|
||||
"codec/std",
|
||||
"log/std",
|
||||
"pezcumulus-pezpallet-aura-ext/std",
|
||||
|
||||
+10
-10
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "bp-asset-hub-pezkuwichain"
|
||||
name = "pezbp-asset-hub-pezkuwichain"
|
||||
description = "Primitives of AssetHubPezkuwichain teyrchain runtime."
|
||||
version = "0.4.0"
|
||||
authors.workspace = true
|
||||
@@ -25,9 +25,9 @@ pezsp-api = { workspace = true }
|
||||
pezsp-core = { workspace = true }
|
||||
|
||||
# Bridge Dependencies
|
||||
bp-bridge-hub-pezcumulus = { workspace = true }
|
||||
bp-messages = { workspace = true }
|
||||
bp-xcm-bridge-hub-router = { workspace = true }
|
||||
pezbp-bridge-hub-pezcumulus = { workspace = true }
|
||||
pezbp-messages = { workspace = true }
|
||||
pezbp-xcm-bridge-hub-router = { workspace = true }
|
||||
pezbp-runtime = { workspace = true }
|
||||
testnet-teyrchains-constants = { features = ["pezkuwichain"], workspace = true }
|
||||
|
||||
@@ -37,9 +37,9 @@ xcm = { workspace = true }
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"bp-bridge-hub-pezcumulus/std",
|
||||
"bp-messages/std",
|
||||
"bp-xcm-bridge-hub-router/std",
|
||||
"pezbp-bridge-hub-pezcumulus/std",
|
||||
"pezbp-messages/std",
|
||||
"pezbp-xcm-bridge-hub-router/std",
|
||||
"codec/std",
|
||||
"pezbp-runtime/std",
|
||||
"pezframe-support/std",
|
||||
@@ -50,9 +50,9 @@ std = [
|
||||
"xcm/std",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"bp-bridge-hub-pezcumulus/runtime-benchmarks",
|
||||
"bp-messages/runtime-benchmarks",
|
||||
"bp-xcm-bridge-hub-router/runtime-benchmarks",
|
||||
"pezbp-bridge-hub-pezcumulus/runtime-benchmarks",
|
||||
"pezbp-messages/runtime-benchmarks",
|
||||
"pezbp-xcm-bridge-hub-router/runtime-benchmarks",
|
||||
"pezbp-runtime/runtime-benchmarks",
|
||||
"pezframe-support/runtime-benchmarks",
|
||||
"pezsp-api/runtime-benchmarks",
|
||||
|
||||
+3
-3
@@ -22,9 +22,9 @@ extern crate alloc;
|
||||
use codec::{Decode, Encode};
|
||||
use scale_info::TypeInfo;
|
||||
|
||||
pub use bp_bridge_hub_pezcumulus::*;
|
||||
use bp_messages::*;
|
||||
pub use bp_xcm_bridge_hub_router::XcmBridgeHubRouterCall;
|
||||
pub use pezbp_bridge_hub_pezcumulus::*;
|
||||
use pezbp_messages::*;
|
||||
pub use pezbp_xcm_bridge_hub_router::XcmBridgeHubRouterCall;
|
||||
use pezbp_runtime::{
|
||||
decl_bridge_finality_runtime_apis, decl_bridge_messages_runtime_apis, Chain, ChainId, Teyrchain,
|
||||
};
|
||||
|
||||
@@ -36,13 +36,13 @@ pub use staking::*;
|
||||
extern crate alloc;
|
||||
|
||||
use alloc::{vec, vec::Vec};
|
||||
use assets_common::{
|
||||
use pez_assets_common::{
|
||||
foreign_creators::ForeignCreators,
|
||||
local_and_foreign_assets::{LocalFromLeft, TargetFromLeft},
|
||||
matching::{FromNetwork, FromSiblingTeyrchain},
|
||||
AssetIdForPoolAssets, AssetIdForPoolAssetsConvert, AssetIdForTrustBackedAssetsConvert,
|
||||
};
|
||||
use bp_asset_hub_pezkuwichain::CreateForeignAssetDeposit;
|
||||
use pezbp_asset_hub_pezkuwichain::CreateForeignAssetDeposit;
|
||||
use pezcumulus_pezpallet_teyrchain_system::{
|
||||
RelayNumberMonotonicallyIncreases, RelaychainDataProvider,
|
||||
};
|
||||
@@ -61,7 +61,7 @@ use testnet_teyrchains_constants::pezkuwichain::snowbridge::EthereumNetwork;
|
||||
use pezsp_version::NativeVersion;
|
||||
use pezsp_version::RuntimeVersion;
|
||||
|
||||
pub use assets_common::local_and_foreign_assets::ForeignAssetReserveData;
|
||||
pub use pez_assets_common::local_and_foreign_assets::ForeignAssetReserveData;
|
||||
use codec::{Decode, DecodeWithMemTracking, Encode, MaxEncodedLen};
|
||||
use pezcumulus_primitives_core::ParaId;
|
||||
use pezframe_support::{
|
||||
@@ -453,7 +453,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<
|
||||
TokenLocation,
|
||||
teyrchain_info::Pezpallet<Runtime>,
|
||||
xcm_config::TrustBackedAssetsPalletIndex,
|
||||
@@ -518,7 +518,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
|
||||
@@ -1771,13 +1771,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
|
||||
{
|
||||
@@ -1818,7 +1818,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)
|
||||
|
||||
@@ -19,7 +19,7 @@ use super::{
|
||||
RuntimeHoldReason, RuntimeOrigin, TeyrchainInfo, TeyrchainSystem, ToZagrosXcmRouter,
|
||||
TransactionByteFee, Uniques, WeightToFee, XcmpQueue,
|
||||
};
|
||||
use assets_common::{
|
||||
use pez_assets_common::{
|
||||
matching::{
|
||||
FromNetwork, IsForeignConcreteAsset, NonTeleportableAssetFromTrustedReserve,
|
||||
ParentLocation, TeleportableAssetWithTrustedReserve,
|
||||
@@ -129,7 +129,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<
|
||||
@@ -150,7 +150,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 = UniqueInstancesAdapter<
|
||||
@@ -161,7 +161,7 @@ pub type UniquesTransactor = UniqueInstancesAdapter<
|
||||
>;
|
||||
|
||||
/// `AssetId`/`Balance` converter for `ForeignAssets`.
|
||||
pub type ForeignAssetsConvertedConcreteId = assets_common::ForeignAssetsConvertedConcreteId<
|
||||
pub type ForeignAssetsConvertedConcreteId = pez_assets_common::ForeignAssetsConvertedConcreteId<
|
||||
(
|
||||
// Ignore `TrustBackedAssets` explicitly
|
||||
StartsWith<TrustBackedAssetsPalletLocation>,
|
||||
@@ -194,7 +194,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<
|
||||
@@ -499,7 +499,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;
|
||||
|
||||
// common/shared parameters
|
||||
parameter_types! {
|
||||
@@ -515,14 +515,14 @@ pub mod bridging {
|
||||
///
|
||||
/// 3) the approximate cost of Pezkuwichain -> Zagros message confirmation transaction on Pezkuwichain Bridge Hub.
|
||||
pub storage XcmBridgeHubRouterBaseFee: Balance =
|
||||
bp_bridge_hub_pezkuwichain::BridgeHubPezkuwichainBaseXcmFeeInRocs::get()
|
||||
.saturating_add(bp_bridge_hub_zagros::BridgeHubZagrosBaseDeliveryFeeInWnds::get())
|
||||
.saturating_add(bp_bridge_hub_pezkuwichain::BridgeHubPezkuwichainBaseConfirmationFeeInRocs::get());
|
||||
pezbp_bridge_hub_pezkuwichain::BridgeHubPezkuwichainBaseXcmFeeInRocs::get()
|
||||
.saturating_add(pezbp_bridge_hub_zagros::BridgeHubZagrosBaseDeliveryFeeInWnds::get())
|
||||
.saturating_add(pezbp_bridge_hub_pezkuwichain::BridgeHubPezkuwichainBaseConfirmationFeeInRocs::get());
|
||||
/// Price of every byte of the Pezkuwichain -> Zagros message. Can be adjusted via
|
||||
/// governance `set_storage` call.
|
||||
pub storage XcmBridgeHubRouterByteFee: Balance = TransactionByteFee::get();
|
||||
|
||||
pub SiblingBridgeHubParaId: u32 = bp_bridge_hub_pezkuwichain::BRIDGE_HUB_PEZKUWICHAIN_TEYRCHAIN_ID;
|
||||
pub SiblingBridgeHubParaId: u32 = pezbp_bridge_hub_pezkuwichain::BRIDGE_HUB_PEZKUWICHAIN_TEYRCHAIN_ID;
|
||||
pub SiblingBridgeHub: Location = Location::new(1, [Teyrchain(SiblingBridgeHubParaId::get())]);
|
||||
/// Router expects payment with this `AssetId`.
|
||||
/// (`AssetId` has to be aligned with `BridgeTable`)
|
||||
@@ -551,7 +551,7 @@ pub mod bridging {
|
||||
1,
|
||||
[
|
||||
Teyrchain(SiblingBridgeHubParaId::get()),
|
||||
PalletInstance(bp_bridge_hub_pezkuwichain::WITH_BRIDGE_PEZKUWICHAIN_TO_ZAGROS_MESSAGES_PALLET_INDEX)
|
||||
PalletInstance(pezbp_bridge_hub_pezkuwichain::WITH_BRIDGE_PEZKUWICHAIN_TO_ZAGROS_MESSAGES_PALLET_INDEX)
|
||||
]
|
||||
);
|
||||
|
||||
@@ -562,7 +562,7 @@ pub mod bridging {
|
||||
pub WndLocation: Location = Location::new(2, [GlobalConsensus(ZagrosNetwork::get())]);
|
||||
pub AssetHubZagros: Location = Location::new(2, [
|
||||
GlobalConsensus(ZagrosNetwork::get()),
|
||||
Teyrchain(bp_asset_hub_zagros::ASSET_HUB_ZAGROS_TEYRCHAIN_ID)
|
||||
Teyrchain(pezbp_asset_hub_zagros::ASSET_HUB_ZAGROS_TEYRCHAIN_ID)
|
||||
]);
|
||||
|
||||
/// Set up exporters configuration.
|
||||
|
||||
@@ -66,7 +66,7 @@ parameter_types! {
|
||||
}
|
||||
|
||||
type AssetIdForTrustBackedAssetsConvert =
|
||||
assets_common::AssetIdForTrustBackedAssetsConvert<TrustBackedAssetsPalletLocation>;
|
||||
pez_assets_common::AssetIdForTrustBackedAssetsConvert<TrustBackedAssetsPalletLocation>;
|
||||
|
||||
type RuntimeHelper = asset_test_pezutils::RuntimeHelper<Runtime, AllPalletsWithoutSystem>;
|
||||
|
||||
@@ -465,7 +465,7 @@ fn test_asset_xcm_trader_not_possible_for_non_sufficient_assets() {
|
||||
|
||||
#[test]
|
||||
fn test_assets_balances_api_works() {
|
||||
use assets_common::runtime_api::runtime_decl_for_fungibles_api::FungiblesApi;
|
||||
use pez_assets_common::runtime_api::runtime_decl_for_fungibles_api::FungiblesApi;
|
||||
|
||||
ExtBuilder::<Runtime>::default()
|
||||
.with_collators(vec![AccountId::from(ALICE)])
|
||||
@@ -553,7 +553,7 @@ fn test_assets_balances_api_works() {
|
||||
|
||||
// check currency
|
||||
assert!(result.inner().iter().any(|asset| asset.eq(
|
||||
&assets_common::fungible_conversion::convert_balance::<TokenLocation, Balance>(
|
||||
&pez_assets_common::fungible_conversion::convert_balance::<TokenLocation, Balance>(
|
||||
some_currency
|
||||
)
|
||||
.unwrap()
|
||||
@@ -812,7 +812,7 @@ mod asset_hub_pezkuwichain_tests {
|
||||
bridging_to_asset_hub_zagros()
|
||||
},
|
||||
(
|
||||
[PalletInstance(bp_bridge_hub_pezkuwichain::WITH_BRIDGE_PEZKUWICHAIN_TO_ZAGROS_MESSAGES_PALLET_INDEX)].into(),
|
||||
[PalletInstance(pezbp_bridge_hub_pezkuwichain::WITH_BRIDGE_PEZKUWICHAIN_TO_ZAGROS_MESSAGES_PALLET_INDEX)].into(),
|
||||
GlobalConsensus(ByGenesis(ZAGROS_GENESIS_HASH)),
|
||||
[Teyrchain(1000)].into()
|
||||
),
|
||||
@@ -892,7 +892,7 @@ mod asset_hub_pezkuwichain_tests {
|
||||
bridging_to_asset_hub_zagros()
|
||||
},
|
||||
(
|
||||
[PalletInstance(bp_bridge_hub_pezkuwichain::WITH_BRIDGE_PEZKUWICHAIN_TO_ZAGROS_MESSAGES_PALLET_INDEX)].into(),
|
||||
[PalletInstance(pezbp_bridge_hub_pezkuwichain::WITH_BRIDGE_PEZKUWICHAIN_TO_ZAGROS_MESSAGES_PALLET_INDEX)].into(),
|
||||
GlobalConsensus(ByGenesis(ZAGROS_GENESIS_HASH)),
|
||||
[Teyrchain(1000)].into()
|
||||
),
|
||||
@@ -932,9 +932,9 @@ mod asset_hub_pezkuwichain_tests {
|
||||
>(
|
||||
collator_session_keys(),
|
||||
bridging_to_asset_hub_zagros,
|
||||
|| bp_asset_hub_pezkuwichain::build_congestion_message(Default::default(), true).into(),
|
||||
|| pezbp_asset_hub_pezkuwichain::build_congestion_message(Default::default(), true).into(),
|
||||
|| {
|
||||
bp_asset_hub_pezkuwichain::build_congestion_message(Default::default(), false)
|
||||
pezbp_asset_hub_pezkuwichain::build_congestion_message(Default::default(), false)
|
||||
.into()
|
||||
},
|
||||
)
|
||||
@@ -942,7 +942,7 @@ mod asset_hub_pezkuwichain_tests {
|
||||
|
||||
#[test]
|
||||
fn test_report_bridge_status_call_compatibility() {
|
||||
// if this test fails, make sure `bp_asset_hub_pezkuwichain` has valid encoding
|
||||
// if this test fails, make sure `pezbp_asset_hub_pezkuwichain` has valid encoding
|
||||
assert_eq!(
|
||||
RuntimeCall::ToZagrosXcmRouter(
|
||||
pezpallet_xcm_bridge_hub_router::Call::report_bridge_status {
|
||||
@@ -951,8 +951,8 @@ mod asset_hub_pezkuwichain_tests {
|
||||
}
|
||||
)
|
||||
.encode(),
|
||||
bp_asset_hub_pezkuwichain::Call::ToZagrosXcmRouter(
|
||||
bp_asset_hub_pezkuwichain::XcmBridgeHubRouterCall::report_bridge_status {
|
||||
pezbp_asset_hub_pezkuwichain::Call::ToZagrosXcmRouter(
|
||||
pezbp_asset_hub_pezkuwichain::XcmBridgeHubRouterCall::report_bridge_status {
|
||||
bridge_id: Default::default(),
|
||||
is_congested: true,
|
||||
}
|
||||
@@ -967,7 +967,7 @@ mod asset_hub_pezkuwichain_tests {
|
||||
let actual = <Runtime as pezpallet_xcm_bridge_hub_router::Config<
|
||||
ToZagrosXcmRouterInstance,
|
||||
>>::WeightInfo::report_bridge_status();
|
||||
let max_weight = bp_asset_hub_pezkuwichain::XcmBridgeHubRouterTransactCallMaxWeight::get();
|
||||
let max_weight = pezbp_asset_hub_pezkuwichain::XcmBridgeHubRouterTransactCallMaxWeight::get();
|
||||
assert!(
|
||||
actual.all_lte(max_weight),
|
||||
"max_weight: {:?} should be adjusted to actual {:?}",
|
||||
|
||||
@@ -114,7 +114,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 }
|
||||
@@ -131,10 +131,10 @@ teyrchain-info = { workspace = true }
|
||||
teyrchains-common = { workspace = true }
|
||||
|
||||
# Bridges
|
||||
bp-asset-hub-pezkuwichain = { workspace = true }
|
||||
bp-asset-hub-zagros = { workspace = true }
|
||||
bp-bridge-hub-pezkuwichain = { workspace = true }
|
||||
bp-bridge-hub-zagros = { workspace = true }
|
||||
pezbp-asset-hub-pezkuwichain = { workspace = true }
|
||||
pezbp-asset-hub-zagros = { workspace = true }
|
||||
pezbp-bridge-hub-pezkuwichain = { workspace = true }
|
||||
pezbp-bridge-hub-zagros = { workspace = true }
|
||||
pezpallet-xcm-bridge-hub-router = { workspace = true }
|
||||
pezsnowbridge-outbound-queue-primitives = { workspace = true }
|
||||
pezsnowbridge-pezpallet-system-frontend = { workspace = true }
|
||||
@@ -154,12 +154,12 @@ 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-asset-hub-zagros/runtime-benchmarks",
|
||||
"bp-bridge-hub-pezkuwichain/runtime-benchmarks",
|
||||
"bp-bridge-hub-zagros/runtime-benchmarks",
|
||||
"pezbp-asset-hub-pezkuwichain/runtime-benchmarks",
|
||||
"pezbp-asset-hub-zagros/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",
|
||||
@@ -260,7 +260,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",
|
||||
@@ -326,12 +326,12 @@ try-runtime = [
|
||||
]
|
||||
std = [
|
||||
"alloy-core/std",
|
||||
"assets-common/std",
|
||||
"pez-assets-common/std",
|
||||
"bizinikiwi-wasm-builder",
|
||||
"bp-asset-hub-pezkuwichain/std",
|
||||
"bp-asset-hub-zagros/std",
|
||||
"bp-bridge-hub-pezkuwichain/std",
|
||||
"bp-bridge-hub-zagros/std",
|
||||
"pezbp-asset-hub-pezkuwichain/std",
|
||||
"pezbp-asset-hub-zagros/std",
|
||||
"pezbp-bridge-hub-pezkuwichain/std",
|
||||
"pezbp-bridge-hub-zagros/std",
|
||||
"codec/std",
|
||||
"log/std",
|
||||
"pezcumulus-pezpallet-aura-ext/std",
|
||||
|
||||
+10
-10
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "bp-asset-hub-zagros"
|
||||
name = "pezbp-asset-hub-zagros"
|
||||
description = "Primitives of AssetHubZagros teyrchain runtime."
|
||||
version = "0.3.0"
|
||||
authors.workspace = true
|
||||
@@ -25,9 +25,9 @@ pezsp-api = { workspace = true }
|
||||
pezsp-core = { workspace = true }
|
||||
|
||||
# Bridge Dependencies
|
||||
bp-bridge-hub-pezcumulus = { workspace = true }
|
||||
bp-messages = { workspace = true }
|
||||
bp-xcm-bridge-hub-router = { workspace = true }
|
||||
pezbp-bridge-hub-pezcumulus = { workspace = true }
|
||||
pezbp-messages = { workspace = true }
|
||||
pezbp-xcm-bridge-hub-router = { workspace = true }
|
||||
pezbp-runtime = { workspace = true }
|
||||
testnet-teyrchains-constants = { features = ["zagros"], workspace = true }
|
||||
|
||||
@@ -37,9 +37,9 @@ xcm = { workspace = true }
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"bp-bridge-hub-pezcumulus/std",
|
||||
"bp-messages/std",
|
||||
"bp-xcm-bridge-hub-router/std",
|
||||
"pezbp-bridge-hub-pezcumulus/std",
|
||||
"pezbp-messages/std",
|
||||
"pezbp-xcm-bridge-hub-router/std",
|
||||
"codec/std",
|
||||
"pezbp-runtime/std",
|
||||
"pezframe-support/std",
|
||||
@@ -50,9 +50,9 @@ std = [
|
||||
"xcm/std",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"bp-bridge-hub-pezcumulus/runtime-benchmarks",
|
||||
"bp-messages/runtime-benchmarks",
|
||||
"bp-xcm-bridge-hub-router/runtime-benchmarks",
|
||||
"pezbp-bridge-hub-pezcumulus/runtime-benchmarks",
|
||||
"pezbp-messages/runtime-benchmarks",
|
||||
"pezbp-xcm-bridge-hub-router/runtime-benchmarks",
|
||||
"pezbp-runtime/runtime-benchmarks",
|
||||
"pezframe-support/runtime-benchmarks",
|
||||
"pezsp-api/runtime-benchmarks",
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
pub use bp_bridge_hub_pezcumulus::*;
|
||||
use bp_messages::*;
|
||||
pub use bp_xcm_bridge_hub_router::XcmBridgeHubRouterCall;
|
||||
pub use pezbp_bridge_hub_pezcumulus::*;
|
||||
use pezbp_messages::*;
|
||||
pub use pezbp_xcm_bridge_hub_router::XcmBridgeHubRouterCall;
|
||||
use codec::{Decode, Encode};
|
||||
use pezbp_runtime::{
|
||||
decl_bridge_finality_runtime_apis, decl_bridge_messages_runtime_apis, Chain, ChainId, Teyrchain,
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ use crate::{
|
||||
},
|
||||
AccountId, AssetConversion, Assets, ForeignAssets, Runtime, RuntimeEvent,
|
||||
};
|
||||
use assets_common::{matching::FromSiblingTeyrchain, AssetIdForTrustBackedAssetsConvert};
|
||||
use pez_assets_common::{matching::FromSiblingTeyrchain, AssetIdForTrustBackedAssetsConvert};
|
||||
use pezframe_support::{parameter_types, traits::EitherOf};
|
||||
use pezframe_system::EnsureRootWithSuccess;
|
||||
use pezsnowbridge_runtime_common::{ForeignAssetOwner, LocalAssetOwner};
|
||||
|
||||
@@ -43,12 +43,12 @@ use governance::{
|
||||
extern crate alloc;
|
||||
|
||||
use alloc::{vec, vec::Vec};
|
||||
pub use assets_common::local_and_foreign_assets::ForeignAssetReserveData;
|
||||
use assets_common::{
|
||||
pub use pez_assets_common::local_and_foreign_assets::ForeignAssetReserveData;
|
||||
use pez_assets_common::{
|
||||
local_and_foreign_assets::{LocalFromLeft, TargetFromLeft},
|
||||
AssetIdForPoolAssets, AssetIdForPoolAssetsConvert, AssetIdForTrustBackedAssetsConvert,
|
||||
};
|
||||
use bp_asset_hub_zagros::CreateForeignAssetDeposit;
|
||||
use pezbp_asset_hub_zagros::CreateForeignAssetDeposit;
|
||||
use codec::{Decode, DecodeWithMemTracking, Encode, MaxEncodedLen};
|
||||
use pezcumulus_pezpallet_teyrchain_system::{
|
||||
RelayNumberMonotonicallyIncreases, RelaychainDataProvider,
|
||||
@@ -110,7 +110,7 @@ use zagros_runtime_constants::time::DAYS as RC_DAYS;
|
||||
#[cfg(any(feature = "std", test))]
|
||||
pub use pezsp_runtime::BuildStorage;
|
||||
|
||||
use assets_common::{
|
||||
use pez_assets_common::{
|
||||
foreign_creators::ForeignCreators,
|
||||
matching::{FromNetwork, FromSiblingTeyrchain},
|
||||
};
|
||||
@@ -477,7 +477,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,
|
||||
@@ -609,7 +609,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
|
||||
@@ -1231,7 +1231,7 @@ parameter_types! {
|
||||
type MultiBlockMigrationsType = pezpallet_migrations::mock_helpers::MockedMigrations;
|
||||
#[cfg(not(feature = "runtime-benchmarks"))]
|
||||
type MultiBlockMigrationsType = (
|
||||
assets_common::migrations::foreign_assets_reserves::ForeignAssetsReservesMigration<
|
||||
pez_assets_common::migrations::foreign_assets_reserves::ForeignAssetsReservesMigration<
|
||||
Runtime,
|
||||
ForeignAssetsInstance,
|
||||
migrations::AssetHubZagrosForeignAssetsReservesProvider,
|
||||
@@ -1954,7 +1954,7 @@ pezpallet_revive::impl_runtime_apis_plus_revive_traits!(
|
||||
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)
|
||||
@@ -2044,13 +2044,13 @@ pezpallet_revive::impl_runtime_apis_plus_revive_traits!(
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
use crate::xcm_config::bridging::to_pezkuwichain::{AssetHubPezkuwichain, PezkuwichainEcosystem};
|
||||
use alloc::{vec, vec::Vec};
|
||||
use assets_common::{
|
||||
use pez_assets_common::{
|
||||
local_and_foreign_assets::ForeignAssetReserveData,
|
||||
migrations::foreign_assets_reserves::ForeignAssetsReservesProvider,
|
||||
};
|
||||
|
||||
@@ -21,7 +21,7 @@ use crate::{
|
||||
Runtime,
|
||||
};
|
||||
use alloc::vec::Vec;
|
||||
use assets_common::IsLocalAccountKey20;
|
||||
use pez_assets_common::IsLocalAccountKey20;
|
||||
use pezframe_support::{traits::Contains, weights::Weight};
|
||||
use pezpallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight;
|
||||
use pezpallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric;
|
||||
|
||||
@@ -21,7 +21,7 @@ use super::{
|
||||
ToPezkuwichainXcmRouter, TransactionByteFee, Treasurer, Uniques, WeightToFee, XcmpQueue,
|
||||
};
|
||||
use alloc::{collections::BTreeSet, vec, vec::Vec};
|
||||
use assets_common::{
|
||||
use pez_assets_common::{
|
||||
matching::{
|
||||
IsForeignConcreteAsset, NonTeleportableAssetFromTrustedReserve, ParentLocation,
|
||||
TeleportableAssetWithTrustedReserve,
|
||||
@@ -124,7 +124,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<
|
||||
@@ -145,7 +145,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 = UniqueInstancesAdapter<
|
||||
@@ -156,7 +156,7 @@ pub type UniquesTransactor = UniqueInstancesAdapter<
|
||||
>;
|
||||
|
||||
/// `AssetId`/`Balance` converter for `ForeignAssets`.
|
||||
pub type ForeignAssetsConvertedConcreteId = assets_common::ForeignAssetsConvertedConcreteId<
|
||||
pub type ForeignAssetsConvertedConcreteId = pez_assets_common::ForeignAssetsConvertedConcreteId<
|
||||
(
|
||||
// Ignore `TrustBackedAssets` explicitly
|
||||
StartsWith<TrustBackedAssetsPalletLocation>,
|
||||
@@ -189,7 +189,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<
|
||||
@@ -216,11 +216,11 @@ parameter_types! {
|
||||
}
|
||||
|
||||
/// Transactor for ERC20 tokens.
|
||||
pub type ERC20Transactor = assets_common::ERC20Transactor<
|
||||
pub type ERC20Transactor = pez_assets_common::ERC20Transactor<
|
||||
// We need this for accessing pezpallet-revive.
|
||||
Runtime,
|
||||
// The matcher for smart contracts.
|
||||
assets_common::ERC20Matcher,
|
||||
pez_assets_common::ERC20Matcher,
|
||||
// How to convert from a location to an account id.
|
||||
LocationToAccountId,
|
||||
// The maximum gas that can be used by a standard ERC20 transfer.
|
||||
@@ -602,7 +602,7 @@ impl pezcumulus_pezpallet_xcm::Config for Runtime {
|
||||
/// All configuration related to bridging
|
||||
pub mod bridging {
|
||||
use super::*;
|
||||
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
|
||||
@@ -617,14 +617,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`)
|
||||
@@ -646,7 +646,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)
|
||||
]
|
||||
);
|
||||
|
||||
@@ -655,7 +655,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.
|
||||
@@ -699,7 +699,7 @@ pub mod bridging {
|
||||
|
||||
pub mod to_ethereum {
|
||||
use super::*;
|
||||
use assets_common::matching::FromNetwork;
|
||||
use pez_assets_common::matching::FromNetwork;
|
||||
use testnet_teyrchains_constants::zagros::snowbridge::{
|
||||
EthereumNetwork, INBOUND_QUEUE_PALLET_INDEX_V1, INBOUND_QUEUE_PALLET_INDEX_V2,
|
||||
};
|
||||
|
||||
@@ -38,7 +38,7 @@ use asset_test_pezutils::{
|
||||
test_cases_over_bridge::TestBridgingConfig, CollatorSessionKey, CollatorSessionKeys,
|
||||
ExtBuilder, GovernanceOrigin, SlotDurations,
|
||||
};
|
||||
use assets_common::local_and_foreign_assets::ForeignAssetReserveData;
|
||||
use pez_assets_common::local_and_foreign_assets::ForeignAssetReserveData;
|
||||
use codec::{Decode, Encode};
|
||||
use hex_literal::hex;
|
||||
use pezframe_support::{
|
||||
@@ -102,7 +102,7 @@ parameter_types! {
|
||||
}
|
||||
|
||||
type AssetIdForTrustBackedAssetsConvert =
|
||||
assets_common::AssetIdForTrustBackedAssetsConvert<TrustBackedAssetsPalletLocation>;
|
||||
pez_assets_common::AssetIdForTrustBackedAssetsConvert<TrustBackedAssetsPalletLocation>;
|
||||
|
||||
type RuntimeHelper = asset_test_pezutils::RuntimeHelper<Runtime, AllPalletsWithoutSystem>;
|
||||
|
||||
@@ -686,7 +686,7 @@ fn test_new_nft_config_works_as_the_old_one() {
|
||||
|
||||
#[test]
|
||||
fn test_assets_balances_api_works() {
|
||||
use assets_common::runtime_api::runtime_decl_for_fungibles_api::FungiblesApi;
|
||||
use pez_assets_common::runtime_api::runtime_decl_for_fungibles_api::FungiblesApi;
|
||||
|
||||
ExtBuilder::<Runtime>::default()
|
||||
.with_tracing()
|
||||
@@ -781,7 +781,7 @@ fn test_assets_balances_api_works() {
|
||||
|
||||
// check currency
|
||||
assert!(result.inner().iter().any(|asset| asset.eq(
|
||||
&assets_common::fungible_conversion::convert_balance::<ZagrosLocation, Balance>(
|
||||
&pez_assets_common::fungible_conversion::convert_balance::<ZagrosLocation, Balance>(
|
||||
some_currency
|
||||
)
|
||||
.unwrap()
|
||||
@@ -1113,7 +1113,7 @@ fn receive_reserve_asset_deposited_roc_from_asset_hub_pezkuwichain_fees_paid_by_
|
||||
bridging_to_asset_hub_pezkuwichain()
|
||||
},
|
||||
(
|
||||
[PalletInstance(bp_bridge_hub_zagros::WITH_BRIDGE_ZAGROS_TO_PEZKUWICHAIN_MESSAGES_PALLET_INDEX)].into(),
|
||||
[PalletInstance(pezbp_bridge_hub_zagros::WITH_BRIDGE_ZAGROS_TO_PEZKUWICHAIN_MESSAGES_PALLET_INDEX)].into(),
|
||||
GlobalConsensus(ByGenesis(PEZKUWICHAIN_GENESIS_HASH)),
|
||||
[Teyrchain(1000)].into()
|
||||
),
|
||||
@@ -1189,7 +1189,7 @@ fn receive_reserve_asset_deposited_roc_from_asset_hub_pezkuwichain_fees_paid_by_
|
||||
bridging_to_asset_hub_pezkuwichain()
|
||||
},
|
||||
(
|
||||
[PalletInstance(bp_bridge_hub_zagros::WITH_BRIDGE_ZAGROS_TO_PEZKUWICHAIN_MESSAGES_PALLET_INDEX)].into(),
|
||||
[PalletInstance(pezbp_bridge_hub_zagros::WITH_BRIDGE_ZAGROS_TO_PEZKUWICHAIN_MESSAGES_PALLET_INDEX)].into(),
|
||||
GlobalConsensus(ByGenesis(PEZKUWICHAIN_GENESIS_HASH)),
|
||||
[Teyrchain(1000)].into()
|
||||
),
|
||||
@@ -1229,14 +1229,14 @@ fn report_bridge_status_from_xcm_bridge_router_for_pezkuwichain_works() {
|
||||
>(
|
||||
collator_session_keys(),
|
||||
bridging_to_asset_hub_pezkuwichain,
|
||||
|| bp_asset_hub_zagros::build_congestion_message(Default::default(), true).into(),
|
||||
|| bp_asset_hub_zagros::build_congestion_message(Default::default(), false).into(),
|
||||
|| pezbp_asset_hub_zagros::build_congestion_message(Default::default(), true).into(),
|
||||
|| pezbp_asset_hub_zagros::build_congestion_message(Default::default(), false).into(),
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_report_bridge_status_call_compatibility() {
|
||||
// if this test fails, make sure `bp_asset_hub_pezkuwichain` has valid encoding
|
||||
// if this test fails, make sure `pezbp_asset_hub_pezkuwichain` has valid encoding
|
||||
assert_eq!(
|
||||
RuntimeCall::ToPezkuwichainXcmRouter(
|
||||
pezpallet_xcm_bridge_hub_router::Call::report_bridge_status {
|
||||
@@ -1245,8 +1245,8 @@ fn test_report_bridge_status_call_compatibility() {
|
||||
}
|
||||
)
|
||||
.encode(),
|
||||
bp_asset_hub_zagros::Call::ToPezkuwichainXcmRouter(
|
||||
bp_asset_hub_zagros::XcmBridgeHubRouterCall::report_bridge_status {
|
||||
pezbp_asset_hub_zagros::Call::ToPezkuwichainXcmRouter(
|
||||
pezbp_asset_hub_zagros::XcmBridgeHubRouterCall::report_bridge_status {
|
||||
bridge_id: Default::default(),
|
||||
is_congested: true,
|
||||
}
|
||||
@@ -1261,7 +1261,7 @@ fn check_sane_weight_report_bridge_status() {
|
||||
let actual = <Runtime as pezpallet_xcm_bridge_hub_router::Config<
|
||||
ToPezkuwichainXcmRouterInstance,
|
||||
>>::WeightInfo::report_bridge_status();
|
||||
let max_weight = bp_asset_hub_zagros::XcmBridgeHubRouterTransactCallMaxWeight::get();
|
||||
let max_weight = pezbp_asset_hub_zagros::XcmBridgeHubRouterTransactCallMaxWeight::get();
|
||||
assert!(
|
||||
actual.all_lte(max_weight),
|
||||
"max_weight: {:?} should be adjusted to actual {:?}",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "assets-common"
|
||||
version = "0.7.0"
|
||||
name = "pez-assets-common"
|
||||
version = "0.7.1"
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
description = "Assets common utilities"
|
||||
|
||||
@@ -27,7 +27,7 @@ pezsp-io = { workspace = true }
|
||||
pezsp-runtime = { workspace = true }
|
||||
|
||||
# Pezcumulus
|
||||
assets-common = { workspace = true }
|
||||
pez-assets-common = { workspace = true }
|
||||
pezcumulus-pezpallet-teyrchain-system = { workspace = true }
|
||||
pezcumulus-pezpallet-xcmp-queue = { workspace = true }
|
||||
pezcumulus-primitives-core = { workspace = true }
|
||||
@@ -49,7 +49,7 @@ pezpallet-xcm-bridge-hub-router = { workspace = true }
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"assets-common/std",
|
||||
"pez-assets-common/std",
|
||||
"codec/std",
|
||||
"pezcumulus-pezpallet-teyrchain-system/std",
|
||||
"pezcumulus-pezpallet-xcmp-queue/std",
|
||||
@@ -75,7 +75,7 @@ std = [
|
||||
"xcm/std",
|
||||
]
|
||||
try-runtime = [
|
||||
"assets-common/try-runtime",
|
||||
"pez-assets-common/try-runtime",
|
||||
"pezcumulus-pezpallet-teyrchain-system/try-runtime",
|
||||
"pezcumulus-pezpallet-xcmp-queue/try-runtime",
|
||||
"pezframe-support/try-runtime",
|
||||
@@ -93,7 +93,7 @@ try-runtime = [
|
||||
"teyrchains-common/try-runtime",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"assets-common/runtime-benchmarks",
|
||||
"pez-assets-common/runtime-benchmarks",
|
||||
"pezcumulus-pezpallet-teyrchain-system/runtime-benchmarks",
|
||||
"pezcumulus-pezpallet-xcmp-queue/runtime-benchmarks",
|
||||
"pezcumulus-primitives-core/runtime-benchmarks",
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
use super::xcm_helpers;
|
||||
use crate::{assert_matches_reserve_asset_deposited_instructions, get_fungible_delivery_fees};
|
||||
use assets_common::local_and_foreign_assets::ForeignAssetReserveData;
|
||||
use pez_assets_common::local_and_foreign_assets::ForeignAssetReserveData;
|
||||
use codec::Encode;
|
||||
use core::ops::Mul;
|
||||
use pezcumulus_primitives_core::{UpwardMessageSender, XcmpMessageSource};
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
//! over a bridge.
|
||||
|
||||
use crate::{assert_matches_reserve_asset_deposited_instructions, get_fungible_delivery_fees};
|
||||
use assets_common::local_and_foreign_assets::ForeignAssetReserveData;
|
||||
use pez_assets_common::local_and_foreign_assets::ForeignAssetReserveData;
|
||||
use codec::Encode;
|
||||
use pezcumulus_primitives_core::XcmpMessageSource;
|
||||
use pezframe_support::{
|
||||
|
||||
Reference in New Issue
Block a user