From b5a7618680b487b27a824732d215fedf3200ec53 Mon Sep 17 00:00:00 2001 From: Igor Papandinas <26460174+ipapandinas@users.noreply.github.com> Date: Tue, 10 Sep 2024 17:22:34 +0200 Subject: [PATCH] revert xcm api implementation in fake_runtime_apis --- Cargo.lock | 2 -- bin/collator/Cargo.toml | 5 --- .../src/parachain/fake_runtime_api.rs | 33 ------------------- 3 files changed, 40 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2444df7f4a..b0f928765d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -697,13 +697,11 @@ dependencies = [ "sp-transaction-pool", "sp-trie", "sp-version", - "staging-xcm", "substrate-build-script-utils", "substrate-frame-rpc-system", "substrate-prometheus-endpoint", "tokio", "url", - "xcm-fee-payment-runtime-api", ] [[package]] diff --git a/bin/collator/Cargo.toml b/bin/collator/Cargo.toml index cc72d0ce74..bfe5634ce5 100644 --- a/bin/collator/Cargo.toml +++ b/bin/collator/Cargo.toml @@ -139,10 +139,6 @@ polkadot-parachain = { workspace = true, features = ["std"] } polkadot-primitives = { workspace = true, features = ["std"] } polkadot-service = { workspace = true } -# xcm dependencies -xcm = { workspace = true } -xcm-fee-payment-runtime-api = { workspace = true } - # benchmark dependencies frame-benchmarking = { workspace = true, features = ["std"] } frame-benchmarking-cli = { workspace = true } @@ -192,7 +188,6 @@ runtime-benchmarks = [ "sp-runtime/runtime-benchmarks", "cumulus-primitives-core/runtime-benchmarks", "frame-support/runtime-benchmarks", - "xcm-fee-payment-runtime-api/runtime-benchmarks", ] try-runtime = [ "local-runtime/try-runtime", diff --git a/bin/collator/src/parachain/fake_runtime_api.rs b/bin/collator/src/parachain/fake_runtime_api.rs index cc6b6b2f58..6583330f4d 100644 --- a/bin/collator/src/parachain/fake_runtime_api.rs +++ b/bin/collator/src/parachain/fake_runtime_api.rs @@ -31,11 +31,6 @@ use sp_runtime::{ ApplyExtrinsicResult, Permill, }; use sp_version::RuntimeVersion; -use xcm::{VersionedAssetId, VersionedAssets, VersionedLocation, VersionedXcm}; -use xcm_fee_payment_runtime_api::{ - dry_run::{CallDryRunEffects, Error as XcmDryRunApiError, XcmDryRunEffects}, - fees::Error as XcmPaymentApiError, -}; pub struct Runtime; @@ -142,34 +137,6 @@ impl_runtime_apis! { } } - impl xcm_fee_payment_runtime_api::fees::XcmPaymentApi for Runtime { - fn query_acceptable_payment_assets(_: xcm::Version) -> Result, XcmPaymentApiError> { - unimplemented!() - } - - fn query_weight_to_asset_fee(_: Weight, _: VersionedAssetId) -> Result { - unimplemented!() - } - - fn query_xcm_weight(_: VersionedXcm<()>) -> Result { - unimplemented!() - } - - fn query_delivery_fees(_: VersionedLocation, _: VersionedXcm<()>) -> Result { - unimplemented!() - } - } - - impl xcm_fee_payment_runtime_api::dry_run::DryRunApi for Runtime { - fn dry_run_call(_: (), _: ()) -> Result, XcmDryRunApiError> { - unimplemented!() - } - - fn dry_run_xcm(_: VersionedLocation, _: VersionedXcm<()>) -> Result, XcmDryRunApiError> { - unimplemented!() - } - } - impl fp_rpc::EthereumRuntimeRPCApi for Runtime { fn chain_id() -> u64 { unimplemented!()