Skip to content

Commit

Permalink
incomplete compile fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
apopiak committed Dec 5, 2023
1 parent abfdad7 commit 8f76b4a
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 20 deletions.
8 changes: 3 additions & 5 deletions runtime/basilisk/src/assets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -438,17 +438,15 @@ impl AmmTradeWeights<Trade<AssetId>> for RouterWeightInfo {
fn buy_and_calculate_buy_trade_amounts_weight(_route: &[Trade<AssetId>]) -> Weight {
Weight::zero()
}
}

parameter_types! {
pub const MaxNumberOfTrades: u8 = 5;
fn set_route_weight(_: &[Trade<AssetId>]) -> 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<AccountId, AssetId, Balance, Balances, Tokens, NativeAssetId>;
type AMM = (XYK, LBP);
type WeightInfo = RouterWeightInfo;
Expand Down
3 changes: 2 additions & 1 deletion runtime/basilisk/src/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Runtime>;
type WeightInfo = weights::payment::BasiliskWeight<Runtime>;
type WeightToFee = WeightToFee;
type NativeAssetId = NativeAssetId;
type RouteProvider = Router;
type OraclePriceProvider = OraclePriceProvider<AssetId, EmaOracle, BSX>;
}

/// The type used to represent the kinds of proxying allowed.
Expand Down
12 changes: 3 additions & 9 deletions runtime/basilisk/src/weights/payment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,8 @@ impl<T: frame_system::Config> WeightInfo for BasiliskWeight<T> {
.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)
}
}
3 changes: 3 additions & 0 deletions runtime/basilisk/src/weights/route_executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,7 @@ impl<T: frame_system::Config> WeightInfo for BasiliskWeight<T> {
fn calculate_and_execute_buy_in_lbp(_c: u32, _b: u32) -> Weight {
Weight::zero()
}
fn set_route_for_xyk() -> Weight {
Weight::zero()
}
}
8 changes: 4 additions & 4 deletions runtime/basilisk/src/weights/xcmp_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,16 @@ impl<T: frame_system::Config> WeightInfo for BasiliskWeight<T> {
.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()
}
}
2 changes: 1 addition & 1 deletion runtime/basilisk/src/xcm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ impl Config for XcmConfig {
type ResponseHandler = PolkadotXcm;
type AssetTrap = PolkadotXcm;
type AssetLocker = ();
type AssetExchanger = XcmAssetExchanger<Runtime, TempAccount, CurrencyIdConvert, Currencies, DefaultPoolType>;
type AssetExchanger = XcmAssetExchanger<Runtime, TempAccount, CurrencyIdConvert, Currencies>;
type AssetClaims = PolkadotXcm;
type SubscriptionService = PolkadotXcm;
type PalletInstancesInfo = AllPalletsWithSystem;
Expand Down

0 comments on commit 8f76b4a

Please sign in to comment.