Skip to content

Commit a1ab78d

Browse files
committed
cargo check -p kerria-runtime
1 parent 856b266 commit a1ab78d

File tree

1 file changed

+41
-42
lines changed

1 file changed

+41
-42
lines changed

runtime/kerria/src/lib.rs

Lines changed: 41 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -410,12 +410,12 @@ impl orml_xcm::Config for Runtime {
410410
// pub const LoansPalletId: PalletId = PalletId(*b"par/loan");
411411
// }
412412

413-
// parameter_types! {
413+
parameter_types! {
414414
// pub SelfLocation: MultiLocation = MultiLocation::new(1, X1(Parachain(ParachainInfo::parachain_id().into())));
415-
// pub const BaseXcmWeight: Weight = Weight::from_ref_time(150_000_000);
416-
// pub const MaxInstructions: u32 = 100;
415+
pub const BaseXcmWeight: Weight = Weight::from_ref_time(150_000_000);
416+
pub const MaxInstructions: u32 = 100;
417417
// pub const MaxAssetsForTransfer: usize = 2;
418-
// }
418+
}
419419

420420
// impl orml_xtokens::Config for Runtime {
421421
// type RuntimeEvent = RuntimeEvent;
@@ -1252,15 +1252,15 @@ impl TakeRevenue for ToTreasury {
12521252

12531253
// Min fee required when transferring non-reserve asset back to sibling chain
12541254
// It will use another asset(e.g Relaychain's asset) as fee
1255-
parameter_type_with_key! {
1256-
pub ParachainMinFee: |location: MultiLocation| -> Option<u128> {
1257-
#[allow(clippy::match_ref_pats)] // false positive
1258-
match (location.parents, location.first_interior()) {
1259-
(1, Some(Parachain(paras::statemint::ID))) => Some(XcmHelper::get_xcm_weight_fee_to_sibling(*location).fee),//default fee should be enough even if not configured
1260-
_ => Some(u128::MAX),
1261-
}
1262-
};
1263-
}
1255+
// parameter_type_with_key! {
1256+
// pub ParachainMinFee: |location: MultiLocation| -> Option<u128> {
1257+
// #[allow(clippy::match_ref_pats)] // false positive
1258+
// match (location.parents, location.first_interior()) {
1259+
// (1, Some(Parachain(paras::statemint::ID))) => Some(XcmHelper::get_xcm_weight_fee_to_sibling(*location).fee),//default fee should be enough even if not configured
1260+
// _ => Some(u128::MAX),
1261+
// }
1262+
// };
1263+
// }
12641264

12651265
parameter_types! {
12661266
pub CheckingAccount: AccountId = PolkadotXcm::check_account();
@@ -1880,20 +1880,20 @@ parameter_types! {
18801880
pub const NotifyTimeout: BlockNumber = 100;
18811881
}
18821882

1883-
impl pallet_xcm_helper::Config for Runtime {
1884-
type RuntimeEvent = RuntimeEvent;
1885-
type UpdateOrigin = EnsureRootOrMoreThanHalfGeneralCouncil;
1886-
type Assets = Assets;
1887-
type XcmSender = XcmRouter;
1888-
type RelayNetwork = RelayNetwork;
1889-
type PalletId = XcmHelperPalletId;
1890-
type NotifyTimeout = NotifyTimeout;
1891-
type AccountIdToMultiLocation = AccountIdToMultiLocation<AccountId>;
1892-
type RefundLocation = RefundLocation;
1893-
type BlockNumberProvider = frame_system::Pallet<Runtime>;
1894-
type WeightInfo = weights::pallet_xcm_helper::WeightInfo<Runtime>;
1895-
type RelayCurrency = RelayCurrency;
1896-
}
1883+
// impl pallet_xcm_helper::Config for Runtime {
1884+
// type RuntimeEvent = RuntimeEvent;
1885+
// type UpdateOrigin = EnsureRootOrMoreThanHalfGeneralCouncil;
1886+
// type Assets = Assets;
1887+
// type XcmSender = XcmRouter;
1888+
// type RelayNetwork = RelayNetwork;
1889+
// type PalletId = XcmHelperPalletId;
1890+
// type NotifyTimeout = NotifyTimeout;
1891+
// type AccountIdToMultiLocation = AccountIdToMultiLocation<AccountId>;
1892+
// type RefundLocation = RefundLocation;
1893+
// type BlockNumberProvider = frame_system::Pallet<Runtime>;
1894+
// type WeightInfo = weights::pallet_xcm_helper::WeightInfo<Runtime>;
1895+
// type RelayCurrency = RelayCurrency;
1896+
// }
18971897

18981898
// parameter_types! {
18991899
// pub const MaxLengthRoute: u8 = 10;
@@ -2016,7 +2016,7 @@ construct_runtime!(
20162016
// Bridge: pallet_bridge::{Pallet, Call, Storage, Event<T>} = 90,
20172017
// EmergencyShutdown: pallet_emergency_shutdown::{Pallet, Call, Storage, Event<T>} = 91,
20182018
// Farming: pallet_farming::{Pallet, Call, Storage, Event<T>} = 92,
2019-
XcmHelper: pallet_xcm_helper::{Pallet, Call, Storage, Event<T>} = 93,
2019+
// XcmHelper: pallet_xcm_helper::{Pallet, Call, Storage, Event<T>} = 93,
20202020
// Streaming: pallet_streaming::{Pallet, Call, Storage, Event<T>} = 94,
20212021
AssetRegistry: pallet_asset_registry::{Pallet, Call, Storage, Event<T>} = 95,
20222022

@@ -2054,12 +2054,11 @@ pub type SignedExtra = (
20542054
);
20552055
/// Unchecked extrinsic type as expected by this runtime.
20562056
pub type UncheckedExtrinsic =
2057-
fp_self_contained::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;
2057+
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;
20582058
/// The payload being signed in transactions.
20592059
pub type SignedPayload = generic::SignedPayload<RuntimeCall, SignedExtra>;
20602060
/// Extrinsic type that has already been checked.
2061-
pub type CheckedExtrinsic =
2062-
fp_self_contained::CheckedExtrinsic<AccountId, RuntimeCall, SignedExtra, H160>;
2061+
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, RuntimeCall, SignedExtra>;
20632062
/// Executive: handles dispatch to the various modules.
20642063
pub type Executive = frame_executive::Executive<
20652064
Runtime,
@@ -2263,19 +2262,19 @@ impl_runtime_apis! {
22632262
}
22642263
}
22652264

2266-
impl pallet_loans_rpc_runtime_api::LoansApi<Block, AccountId, Balance> for Runtime {
2267-
fn get_account_liquidity(account: AccountId) -> Result<(Liquidity, Shortfall, Liquidity, Shortfall), DispatchError> {
2268-
Loans::get_account_liquidity(&account)
2269-
}
2265+
// impl pallet_loans_rpc_runtime_api::LoansApi<Block, AccountId, Balance> for Runtime {
2266+
// fn get_account_liquidity(account: AccountId) -> Result<(Liquidity, Shortfall, Liquidity, Shortfall), DispatchError> {
2267+
// Loans::get_account_liquidity(&account)
2268+
// }
22702269

2271-
fn get_market_status(asset_id: CurrencyId) -> Result<(Rate, Rate, Rate, Ratio, Balance, Balance, sp_runtime::FixedU128), DispatchError> {
2272-
Loans::get_market_status(asset_id)
2273-
}
2270+
// fn get_market_status(asset_id: CurrencyId) -> Result<(Rate, Rate, Rate, Ratio, Balance, Balance, sp_runtime::FixedU128), DispatchError> {
2271+
// Loans::get_market_status(asset_id)
2272+
// }
22742273

2275-
fn get_liquidation_threshold_liquidity(account: AccountId) -> Result<(Liquidity, Shortfall, Liquidity, Shortfall), DispatchError> {
2276-
Loans::get_account_liquidation_threshold_liquidity(&account)
2277-
}
2278-
}
2274+
// fn get_liquidation_threshold_liquidity(account: AccountId) -> Result<(Liquidity, Shortfall, Liquidity, Shortfall), DispatchError> {
2275+
// Loans::get_account_liquidation_threshold_liquidity(&account)
2276+
// }
2277+
// }
22792278

22802279
// impl pallet_router_rpc_runtime_api::RouterApi<Block, Balance> for Runtime {
22812280
// fn get_best_route(amount: Balance, token_in: CurrencyId, token_out: CurrencyId, reversed: bool) -> Result<(Vec<CurrencyId>, Balance), DispatchError> {

0 commit comments

Comments
 (0)