From 5aec11e9feaf560b1031a06e4be0eee3037bec3e Mon Sep 17 00:00:00 2001 From: Pablo Labarta Date: Wed, 26 Feb 2025 11:08:30 -0300 Subject: [PATCH] setup asset-rate on moonbase --- runtime/moonbase/src/lib.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/runtime/moonbase/src/lib.rs b/runtime/moonbase/src/lib.rs index 82cc15e691..b27083e87c 100644 --- a/runtime/moonbase/src/lib.rs +++ b/runtime/moonbase/src/lib.rs @@ -65,7 +65,7 @@ use frame_support::{ pallet_prelude::DispatchResult, parameter_types, traits::{ - fungible::{Balanced, Credit, HoldConsideration, Inspect}, + fungible::{Balanced, Credit, HoldConsideration, Inspect, NativeOrWithId}, tokens::{PayFromAccount, UnityAssetBalanceConversion}, ConstBool, ConstU128, ConstU16, ConstU32, ConstU64, ConstU8, Contains, EitherOf, EitherOfDiverse, EqualPrivilegeOnly, FindAuthor, InstanceFilter, LinearStoragePrice, @@ -557,6 +557,16 @@ impl pallet_preimage::Config for Runtime { >; } +impl pallet_asset_rate::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = pallet_asset_rate::weights::SubstrateWeight; + type CreateOrigin = EnsureRoot; + type RemoveOrigin = EnsureRoot; + type UpdateOrigin = EnsureRoot; + type Currency = Balances; + type AssetKind = NativeOrWithId; +} + parameter_types! { pub const ProposalBond: Permill = Permill::from_percent(5); pub const TreasuryId: PalletId = PalletId(*b"pc/trsry"); @@ -1416,6 +1426,8 @@ construct_runtime! { EvmForeignAssets: pallet_moonbeam_foreign_assets::{Pallet, Call, Storage, Event} = 56, Parameters: pallet_parameters = 57, XcmWeightTrader: pallet_xcm_weight_trader::{Pallet, Call, Storage, Event} = 58, + AssetRate: pallet_asset_rate::{Pallet, Call, Storage, Event} = 59, + } }