From 8f76b4a689a64b0b0b7e03db1335ab3e91a70861 Mon Sep 17 00:00:00 2001 From: Alexander Popiak Date: Tue, 5 Dec 2023 17:08:05 +0100 Subject: [PATCH] incomplete compile fixes --- runtime/basilisk/src/assets.rs | 8 +++----- runtime/basilisk/src/system.rs | 3 ++- runtime/basilisk/src/weights/payment.rs | 12 +++--------- runtime/basilisk/src/weights/route_executor.rs | 3 +++ runtime/basilisk/src/weights/xcmp_queue.rs | 8 ++++---- runtime/basilisk/src/xcm.rs | 2 +- 6 files changed, 16 insertions(+), 20 deletions(-) diff --git a/runtime/basilisk/src/assets.rs b/runtime/basilisk/src/assets.rs index 9532853d9b..dc05cdf956 100644 --- a/runtime/basilisk/src/assets.rs +++ b/runtime/basilisk/src/assets.rs @@ -438,17 +438,15 @@ impl AmmTradeWeights> for RouterWeightInfo { fn buy_and_calculate_buy_trade_amounts_weight(_route: &[Trade]) -> Weight { Weight::zero() } -} - -parameter_types! { - pub const MaxNumberOfTrades: u8 = 5; + fn set_route_weight(_: &[Trade]) -> Weight { + Weight::zero() + } } impl pallet_route_executor::Config for Runtime { type RuntimeEvent = RuntimeEvent; type AssetId = AssetId; type Balance = Balance; - type MaxNumberOfTrades = MaxNumberOfTrades; type Currency = MultiInspectAdapter; type AMM = (XYK, LBP); type WeightInfo = RouterWeightInfo; diff --git a/runtime/basilisk/src/system.rs b/runtime/basilisk/src/system.rs index 15dae02dbe..61f1b92565 100644 --- a/runtime/basilisk/src/system.rs +++ b/runtime/basilisk/src/system.rs @@ -226,10 +226,11 @@ impl pallet_transaction_multi_payment::Config for Runtime { type RuntimeEvent = RuntimeEvent; type AcceptedCurrencyOrigin = MajorityTechCommitteeOrRoot; type Currencies = Currencies; - type SpotPriceProvider = pallet_xyk::XYKSpotPrice; type WeightInfo = weights::payment::BasiliskWeight; type WeightToFee = WeightToFee; type NativeAssetId = NativeAssetId; + type RouteProvider = Router; + type OraclePriceProvider = OraclePriceProvider; } /// The type used to represent the kinds of proxying allowed. diff --git a/runtime/basilisk/src/weights/payment.rs b/runtime/basilisk/src/weights/payment.rs index ac4366bc57..217a07c18e 100644 --- a/runtime/basilisk/src/weights/payment.rs +++ b/runtime/basilisk/src/weights/payment.rs @@ -76,14 +76,8 @@ impl WeightInfo for BasiliskWeight { .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - // Storage: XYK ShareToken (r:1 w:0) - // Proof: XYK ShareToken (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:0) - // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - // Storage: Tokens Accounts (r:1 w:0) - // Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen) - fn get_spot_price() -> Weight { - // Minimum execution time: 21_535 nanoseconds. - Weight::from_parts(21_794_000, 0).saturating_add(T::DbWeight::get().reads(3 as u64)) + fn get_oracle_price() -> Weight { + // TODO update weights + Weight::from_parts(22_029_000, 0) } } diff --git a/runtime/basilisk/src/weights/route_executor.rs b/runtime/basilisk/src/weights/route_executor.rs index bf040f2e1c..0fe2ccaeb3 100644 --- a/runtime/basilisk/src/weights/route_executor.rs +++ b/runtime/basilisk/src/weights/route_executor.rs @@ -56,4 +56,7 @@ impl WeightInfo for BasiliskWeight { fn calculate_and_execute_buy_in_lbp(_c: u32, _b: u32) -> Weight { Weight::zero() } + fn set_route_for_xyk() -> Weight { + Weight::zero() + } } diff --git a/runtime/basilisk/src/weights/xcmp_queue.rs b/runtime/basilisk/src/weights/xcmp_queue.rs index a5f94838d3..bb147790d3 100644 --- a/runtime/basilisk/src/weights/xcmp_queue.rs +++ b/runtime/basilisk/src/weights/xcmp_queue.rs @@ -67,16 +67,16 @@ impl WeightInfo for BasiliskWeight { .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } - fn service_deferred() -> Weight { + fn service_deferred(_b: u32) -> Weight { Weight::zero() } - fn discard_deferred_bucket() -> Weight { + fn discard_deferred_bucket(_m: u32) -> Weight { Weight::zero() } - fn discard_deferred_individual() -> Weight { + fn discard_deferred_individual(_m: u32) -> Weight { Weight::zero() } - fn try_place_in_deferred_queue() -> Weight { + fn try_place_in_deferred_queue(_m: u32) -> Weight { Weight::zero() } } diff --git a/runtime/basilisk/src/xcm.rs b/runtime/basilisk/src/xcm.rs index ab54ed7b9b..65165cd765 100644 --- a/runtime/basilisk/src/xcm.rs +++ b/runtime/basilisk/src/xcm.rs @@ -162,7 +162,7 @@ impl Config for XcmConfig { type ResponseHandler = PolkadotXcm; type AssetTrap = PolkadotXcm; type AssetLocker = (); - type AssetExchanger = XcmAssetExchanger; + type AssetExchanger = XcmAssetExchanger; type AssetClaims = PolkadotXcm; type SubscriptionService = PolkadotXcm; type PalletInstancesInfo = AllPalletsWithSystem;