Refactoring Checkpoint: (WIP)
This commit is contained in:
@@ -121,7 +121,7 @@ use xcm::{
|
||||
VersionedXcm,
|
||||
};
|
||||
use xcm_builder::PayOverXcm;
|
||||
use xcm_runtime_apis::{
|
||||
use xcm_runtime_pezapis::{
|
||||
dry_run::{CallDryRunEffects, Error as XcmDryRunApiError, XcmDryRunEffects},
|
||||
fees::Error as XcmPaymentApiError,
|
||||
};
|
||||
@@ -2647,7 +2647,7 @@ pezsp_api::impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl xcm_runtime_apis::fees::XcmPaymentApi<Block> for Runtime {
|
||||
impl xcm_runtime_pezapis::fees::XcmPaymentApi<Block> for Runtime {
|
||||
fn query_acceptable_payment_assets(xcm_version: xcm::Version) -> Result<Vec<VersionedAssetId>, XcmPaymentApiError> {
|
||||
let acceptable_assets = vec![AssetId(xcm_config::TokenLocation::get())];
|
||||
XcmPallet::query_acceptable_payment_assets(xcm_version, acceptable_assets)
|
||||
@@ -2661,11 +2661,11 @@ pezsp_api::impl_runtime_apis! {
|
||||
Ok(WeightToFee::weight_to_fee(&weight))
|
||||
},
|
||||
Ok(asset_id) => {
|
||||
log::trace!(target: "xcm::xcm_runtime_apis", "query_weight_to_asset_fee - unhandled asset_id: {asset_id:?}!");
|
||||
log::trace!(target: "xcm::xcm_runtime_pezapis", "query_weight_to_asset_fee - unhandled asset_id: {asset_id:?}!");
|
||||
Err(XcmPaymentApiError::AssetNotFound)
|
||||
},
|
||||
Err(_) => {
|
||||
log::trace!(target: "xcm::xcm_runtime_apis", "query_weight_to_asset_fee - failed to convert asset: {asset:?}!");
|
||||
log::trace!(target: "xcm::xcm_runtime_pezapis", "query_weight_to_asset_fee - failed to convert asset: {asset:?}!");
|
||||
Err(XcmPaymentApiError::VersionedConversionFailed)
|
||||
}
|
||||
}
|
||||
@@ -2681,7 +2681,7 @@ pezsp_api::impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl xcm_runtime_apis::dry_run::DryRunApi<Block, RuntimeCall, RuntimeEvent, OriginCaller> for Runtime {
|
||||
impl xcm_runtime_pezapis::dry_run::DryRunApi<Block, RuntimeCall, RuntimeEvent, OriginCaller> for Runtime {
|
||||
fn dry_run_call(origin: OriginCaller, call: RuntimeCall, result_xcms_version: xcm::prelude::XcmVersion) -> Result<CallDryRunEffects<RuntimeEvent>, XcmDryRunApiError> {
|
||||
XcmPallet::dry_run_call::<Runtime, xcm_config::XcmRouter, OriginCaller, RuntimeCall>(origin, call, result_xcms_version)
|
||||
}
|
||||
@@ -2691,12 +2691,12 @@ pezsp_api::impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl xcm_runtime_apis::conversions::LocationToAccountApi<Block, AccountId> for Runtime {
|
||||
impl xcm_runtime_pezapis::conversions::LocationToAccountApi<Block, AccountId> for Runtime {
|
||||
fn convert_location(location: VersionedLocation) -> Result<
|
||||
AccountId,
|
||||
xcm_runtime_apis::conversions::Error
|
||||
xcm_runtime_pezapis::conversions::Error
|
||||
> {
|
||||
xcm_runtime_apis::conversions::LocationToAccountHelper::<
|
||||
xcm_runtime_pezapis::conversions::LocationToAccountHelper::<
|
||||
AccountId,
|
||||
xcm_config::LocationConverter,
|
||||
>::convert_location(location)
|
||||
@@ -3018,11 +3018,11 @@ pezsp_api::impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl xcm_runtime_apis::trusted_query::TrustedQueryApi<Block> for Runtime {
|
||||
fn is_trusted_reserve(asset: VersionedAsset, location: VersionedLocation) -> Result<bool, xcm_runtime_apis::trusted_query::Error> {
|
||||
impl xcm_runtime_pezapis::trusted_query::TrustedQueryApi<Block> for Runtime {
|
||||
fn is_trusted_reserve(asset: VersionedAsset, location: VersionedLocation) -> Result<bool, xcm_runtime_pezapis::trusted_query::Error> {
|
||||
XcmPallet::is_trusted_reserve(asset, location)
|
||||
}
|
||||
fn is_trusted_teleporter(asset: VersionedAsset, location: VersionedLocation) -> Result<bool, xcm_runtime_apis::trusted_query::Error> {
|
||||
fn is_trusted_teleporter(asset: VersionedAsset, location: VersionedLocation) -> Result<bool, xcm_runtime_pezapis::trusted_query::Error> {
|
||||
XcmPallet::is_trusted_teleporter(asset, location)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ use crate::{xcm_config::LocationConverter, *};
|
||||
use pezframe_support::traits::WhitelistedStorageKeys;
|
||||
use pezsp_core::{crypto::Ss58Codec, hexdisplay::HexDisplay};
|
||||
use pezsp_keyring::Sr25519Keyring::Alice;
|
||||
use xcm_runtime_apis::conversions::LocationToAccountHelper;
|
||||
use xcm_runtime_pezapis::conversions::LocationToAccountHelper;
|
||||
|
||||
#[test]
|
||||
fn remove_keys_weight_is_sensible() {
|
||||
|
||||
Reference in New Issue
Block a user