Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

393 use fee per second from asset metadata in xcm config #432

Merged
merged 84 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
b1ad3f1
WIP
bogdanS98 Jan 11, 2024
dd83e1b
Fmt
bogdanS98 Jan 11, 2024
3ff7277
Add comment
bogdanS98 Jan 11, 2024
dcc6a4b
Still wip
bogdanS98 Jan 12, 2024
d998215
Fmt
bogdanS98 Jan 12, 2024
0afee4a
Add doc comments
bogdanS98 Jan 12, 2024
3e7b9bb
Address change requests
bogdanS98 Jan 12, 2024
edc4d94
Fmt
bogdanS98 Jan 12, 2024
1359c94
Add comment
bogdanS98 Jan 12, 2024
dc68751
Add fee for basic asset
bogdanS98 Jan 15, 2024
069d17e
Fmt
bogdanS98 Jan 15, 2024
67f3513
Return NoPrice error when price fetching fails
bogdanS98 Jan 15, 2024
beb234b
Add signed extension
bogdanS98 Jan 15, 2024
2479198
Add first iteration of mock
bogdanS98 Jan 26, 2024
449296a
Allow only XCM assets for buyout
bogdanS98 Jan 26, 2024
69a81c7
Update mock to only allow specific XCM assets
bogdanS98 Jan 26, 2024
b8cda83
Add tests and benchmarks - still wip
bogdanS98 Jan 30, 2024
95035a4
Fmt
bogdanS98 Jan 31, 2024
eebf511
Handle currency id in benchmarks
bogdanS98 Jan 31, 2024
a75ad1a
Update comments
bogdanS98 Jan 31, 2024
560268b
Remove benchmark comment
bogdanS98 Jan 31, 2024
be4f99a
Fix benchmarks and tests, add pallet to Foucoco, switch from UnixTime…
bogdanS98 Feb 1, 2024
19932f9
Merge remote-tracking branch 'origin' into 395-implement-pallet-that-…
bogdanS98 Feb 1, 2024
4aaee33
Fmt
bogdanS98 Feb 1, 2024
f2d1eda
Refactor dot currency id in tests
bogdanS98 Feb 2, 2024
8bae6e8
Small refactor for test attempt_buyout_after_buyout_limit_exceeded_fails
bogdanS98 Feb 2, 2024
11d9609
Update comments
bogdanS98 Feb 2, 2024
d224292
Small refactor
bogdanS98 Feb 2, 2024
e07318c
Add comment in Foucoco runtime
bogdanS98 Feb 2, 2024
fa68d4d
Add comment in Foucoco runtime
bogdanS98 Feb 2, 2024
de93547
Update comment
bogdanS98 Feb 2, 2024
9a19333
Update comment
bogdanS98 Feb 2, 2024
b2e2f17
Add signed extension to runtime
bogdanS98 Feb 2, 2024
f02fbc8
Add comment
bogdanS98 Feb 2, 2024
4fa8b91
Fix indentation in tests
bogdanS98 Feb 2, 2024
fe04294
Fix indentation in tests
bogdanS98 Feb 2, 2024
7c46f0b
Fix indentation in tests
bogdanS98 Feb 2, 2024
382b0d3
Fix indentation in tests
bogdanS98 Feb 2, 2024
66a86da
Update comment
bogdanS98 Feb 2, 2024
96af52c
Fix building project with runtime benchmarks flag
bogdanS98 Feb 2, 2024
d8c6738
Address change requests
bogdanS98 Feb 5, 2024
d31c2b0
Merge branch '395-implement-pallet-that-extends-our-current-treasury-…
bogdanS98 Feb 5, 2024
d4fcb93
Small refactor for asset registry benchmarks
bogdanS98 Feb 5, 2024
510b4ff
Fix compiler warning
bogdanS98 Feb 5, 2024
9e8f129
Address change requests
bogdanS98 Feb 5, 2024
f3ebd72
Update comment
bogdanS98 Feb 5, 2024
d020484
Optimise fetching oracle price for benchmarks and regenerate weights
bogdanS98 Feb 5, 2024
8352c1c
Merge branch '395-implement-pallet-that-extends-our-current-treasury-…
bogdanS98 Feb 5, 2024
470b0e7
Fmt
bogdanS98 Feb 5, 2024
5cc4cca
using fee per second value for relative fee adjusting
gianfra-t Feb 5, 2024
433206e
WIP
gianfra-t Feb 6, 2024
eb0de40
fixing xcm integration tests
gianfra-t Feb 6, 2024
420815f
fix pendulum integration tests, reuse v3 location
gianfra-t Feb 6, 2024
53bfb97
cleanup imports, reuse type for fee distribution
gianfra-t Feb 6, 2024
118b3d5
cleanup and format
gianfra-t Feb 6, 2024
e9f76e7
more cleanup
gianfra-t Feb 6, 2024
39ea1dc
Merge branch '395-implement-pallet-that-extends-our-current-treasury-…
gianfra-t Feb 6, 2024
d8674cf
more import cleaning and fixes after merging with future CustomMetada…
gianfra-t Feb 6, 2024
7ba5243
Merge branch 'main' into 393-use-fee_per_second-from-asset-metadata-i…
bogdanS98 Feb 7, 2024
87db579
moving implementation
gianfra-t Feb 16, 2024
dc679f1
Merge branch '393-use-fee_per_second-from-asset-metadata-in-xcm-confi…
gianfra-t Feb 16, 2024
fb74127
merged main
gianfra-t Feb 19, 2024
40628ce
modify expected fees in tests
gianfra-t Feb 19, 2024
d12ac51
added current xcm config to foucoco
gianfra-t Feb 19, 2024
b381318
removing unused constants
gianfra-t Feb 26, 2024
049c215
fully remove alice test account
gianfra-t Feb 27, 2024
b084a87
use multipliers for fee expected constants in tests
gianfra-t Feb 28, 2024
67abe63
merged current main
gianfra-t Mar 1, 2024
1391b74
merged with main
gianfra-t Mar 20, 2024
760f332
wip. addition of convertion functions from asset registry and partia…
gianfra-t Mar 20, 2024
07d6212
add coversion to fee per second
gianfra-t Mar 21, 2024
8458303
fix failing test
gianfra-t Mar 21, 2024
d220df1
fix failing test
gianfra-t Mar 21, 2024
9438c6c
Merge branch '393-use-fee_per_second-from-asset-metadata-in-xcm-confi…
gianfra-t Mar 21, 2024
8891238
cleanup unused imports, logs
gianfra-t Mar 21, 2024
e08b060
add convert from asset registry to Foucoco
gianfra-t Mar 21, 2024
ddabc24
migrate CurrencyIdConvert to common definitions
gianfra-t Mar 25, 2024
254754a
use Inspect trait from asset registry to simplify code
gianfra-t Apr 4, 2024
ff45e0c
use native asset, local perspective
gianfra-t Apr 4, 2024
5026906
fix incorrect native xcm representation
gianfra-t Apr 4, 2024
abae571
remove genesis change used for testing
gianfra-t Apr 4, 2024
80b5dc5
simplify implementation, remove reanchoring before convertion, remove…
gianfra-t Apr 5, 2024
6fc29e8
merged main
gianfra-t Apr 5, 2024
27c0191
modify foucoco SelfLocation
gianfra-t Apr 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,7 @@ fn foucoco_genesis(
.iter()
.flat_map(|k| vec![(k.0.clone(), XCM(0), u128::pow(10, 18))])
.collect();


let stakers: Vec<_> = invulnerables
.iter()
Expand Down
1 change: 1 addition & 0 deletions node/src/constants/foucoco.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ pub const COLLATOR_ADDITIONAL: Balance = 10 * UNIT;

pub const OFF_CHAIN_WORKER_ADDRESS: &str = "6m69vWMouLarYCbJGJisVaDDpfNGETkD5hsDWf2T7osW4Cn1";


pub const TOKEN_DECIMALS: u32 = 12;

pub const INITIAL_SUDO_SIGNATORIES: [&str; 5] = [
Expand Down
237 changes: 21 additions & 216 deletions runtime/amplitude/src/xcm_config.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
use core::marker::PhantomData;

use frame_support::{
log, match_types,
pallet_prelude::DispatchError,
parameter_types,
traits::{tokens::fungibles, ContainsPair, Everything, Nothing, ProcessMessageError},
weights::{Weight, WeightToFee as WeightToFeeTrait},
log, match_types, parameter_types,
traits::{ContainsPair, Everything, Nothing, ProcessMessageError},
};
use orml_asset_registry::{AssetRegistryTrader, FixedRateAssetRegistryTrader};
use orml_traits::{
location::{RelativeReserveProvider, Reserve},
parameter_type_with_key,
Expand All @@ -18,35 +16,22 @@ use sp_runtime::traits::Convert;
use xcm::latest::{prelude::*, Weight as XCMWeight};
use xcm_builder::{
AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom,
AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, ConvertedConcreteId, EnsureXcmOrigin,
FixedWeightBounds, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative,
SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
SovereignSignedViaLocation, TakeWeightCredit,
};
use xcm_executor::{
traits::{JustTry, ShouldExecute},
XcmExecutor,
AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, EnsureXcmOrigin, FixedWeightBounds,
ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit,
};
use xcm_executor::{traits::ShouldExecute, XcmExecutor};

use runtime_common::{parachains::kusama::asset_hub, RelativeValue};
use runtime_common::{asset_registry::{FixedConversionRateProvider}, CurrencyIdConvert};

use cumulus_primitives_utility::{
ChargeWeightInFungibles, TakeFirstAssetTrader, XcmFeesTo32ByteAccount,
};
use sp_runtime::traits::Zero;
use cumulus_primitives_utility::XcmFeesTo32ByteAccount;

use crate::{
assets::{
native_locations::{native_location_external_pov, native_location_local_pov},
xcm_assets,
},
ConstU32,
};
use crate::ConstU32;

use super::{
AccountId, AmplitudeTreasuryAccount, Balance, Balances, Currencies, CurrencyId, ParachainInfo,
ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, Tokens,
WeightToFee, XcmpQueue,
AccountId, AmplitudeTreasuryAccount, AssetRegistry, Balance, Balances, Currencies, CurrencyId,
ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin,
XcmpQueue,
};
use frame_system::EnsureRoot;

Expand All @@ -72,77 +57,6 @@ pub type LocationToAccountId = (
AccountId32Aliases<RelayNetwork, AccountId>,
);

/// CurrencyIdConvert
/// This type implements conversions from our `CurrencyId` type into `MultiLocation` and vice-versa.
/// A currency locally is identified with a `CurrencyId` variant but in the network it is identified
/// in the form of a `MultiLocation`, in this case a pCfg (Para-Id, Currency-Id).
pub struct CurrencyIdConvert;

impl Convert<CurrencyId, Option<MultiLocation>> for CurrencyIdConvert {
fn convert(id: CurrencyId) -> Option<MultiLocation> {
match id {
CurrencyId::XCM(index) => match index {
xcm_assets::RELAY_KSM => Some(MultiLocation::parent()),
xcm_assets::ASSETHUB_USDT => Some(asset_hub::USDT_location()),
_ => None,
},
CurrencyId::Native => Some(native_location_external_pov()),
_ => None,
}
}
}

impl Convert<MultiLocation, Option<CurrencyId>> for CurrencyIdConvert {
fn convert(location: MultiLocation) -> Option<CurrencyId> {
match location {
loc if loc == MultiLocation::parent() => Some(xcm_assets::RELAY_KSM_id()),
loc if loc == asset_hub::USDT_location() => Some(xcm_assets::ASSETHUB_USDT_id()),
// Our native currency location without re-anchoring
loc if loc == native_location_external_pov() => Some(CurrencyId::Native),
// Our native currency location with re-anchoring
// The XCM pallet will try to re-anchor the location before it reaches here
loc if loc == native_location_local_pov() => Some(CurrencyId::Native),
_ => None,
}
}
}

impl Convert<MultiAsset, Option<CurrencyId>> for CurrencyIdConvert {
fn convert(a: MultiAsset) -> Option<CurrencyId> {
if let MultiAsset { id: AssetId::Concrete(id), fun: _ } = a {
Self::convert(id)
} else {
None
}
}
}

type RelativeValueOf = RelativeValue<Balance>;

pub struct RelayRelativeValue;
impl RelayRelativeValue {
fn get_relative_value(id: CurrencyId) -> Option<RelativeValueOf> {
match id {
CurrencyId::XCM(index) => match index {
xcm_assets::RELAY_KSM => Some(RelativeValueOf { num: 100, denominator: 1 }),
xcm_assets::ASSETHUB_USDT => Some(RelativeValueOf { num: 20, denominator: 4 }),
_ => None,
},
CurrencyId::Native => Some(RelativeValueOf { num: 1, denominator: 1 }),
_ => Some(RelativeValueOf { num: 1, denominator: 1 }),
}
}
}

/// Convert an incoming `MultiLocation` into a `CurrencyId` if possible.
/// Here we need to know the canonical representation of all the tokens we handle in order to
/// correctly convert their `MultiLocation` representation into our internal `CurrencyId` type.
impl xcm_executor::traits::Convert<MultiLocation, CurrencyId> for CurrencyIdConvert {
fn convert(location: MultiLocation) -> Result<CurrencyId, MultiLocation> {
<CurrencyIdConvert as Convert<MultiLocation, Option<CurrencyId>>>::convert(location)
.ok_or(location)
}
}

/// A `FilterAssetLocation` implementation. Filters multi native assets whose
/// reserve is same with `origin`.
Expand All @@ -166,11 +80,11 @@ pub type LocalAssetTransactor = MultiCurrencyAdapter<
// Use this fungibles implementation
Currencies,
(), // We don't handle unknown assets.
IsNativeConcrete<CurrencyId, CurrencyIdConvert>,
IsNativeConcrete<CurrencyId, CurrencyIdConvert<AssetRegistry>>,
AccountId,
LocationToAccountId,
CurrencyId,
CurrencyIdConvert,
CurrencyIdConvert<AssetRegistry>,
DepositToAlternative<AmplitudeTreasuryAccount, Currencies, CurrencyId, AccountId, Balance>,
>;

Expand Down Expand Up @@ -199,18 +113,11 @@ parameter_types! {
// One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate.
pub UnitWeightCost: XCMWeight = XCMWeight::from_parts(1_000_000_000,0);
pub const MaxInstructions: u32 = 100;
pub SelfLocation: MultiLocation = MultiLocation::new(1, X1(Parachain(ParachainInfo::parachain_id().into())));
pub SelfLocation: MultiLocation = MultiLocation::here();
pub const BaseXcmWeight: XCMWeight = XCMWeight::from_parts(150_000_000,0);
pub const MaxAssetsForTransfer: usize = 2;
}

match_types! {
pub type ParentOrParentsExecutivePlurality: impl Contains<MultiLocation> = {
MultiLocation { parents: 1, interior: Here } |
MultiLocation { parents: 1, interior: X1(Plurality { id: BodyId::Executive, .. }) }
};
}

//TODO: move DenyThenTry to polkadot's xcm module.
/// Deny executing the xcm message if it matches any of the Deny filter regardless of anything else.
/// If it passes the Deny, and matches one of the Allow cases then it is let through.
Expand Down Expand Up @@ -292,112 +199,10 @@ pub type Barrier = (
AllowSubscriptionsFrom<Everything>,
);

pub struct ChargeWeightInFungiblesImplementation;
impl ChargeWeightInFungibles<AccountId, ConcreteAssets> for ChargeWeightInFungiblesImplementation {
fn charge_weight_in_fungibles(
asset_id: CurrencyId,
weight: Weight,
) -> Result<Balance, XcmError> {
let amount = <WeightToFee as WeightToFeeTrait>::weight_to_fee(&weight);

if let Some(relative_value) = RelayRelativeValue::get_relative_value(asset_id) {
let adjusted_amount =
RelativeValue::<Balance>::divide_by_relative_value(amount, relative_value);
log::info!("amount to be charged: {:?} in asset: {:?}", adjusted_amount, asset_id);
return Ok(adjusted_amount)
} else {
log::info!("amount to be charged: {:?} in asset: {:?}", amount, asset_id);
return Ok(amount)
}
}
}

// Workarround for TakeFirstAssetTrader
use frame_support::traits::tokens::{
DepositConsequence, Fortitude, Preservation, Provenance, WithdrawConsequence,
};

pub struct ConcreteAssets;
impl fungibles::Mutate<AccountId> for ConcreteAssets {}
impl fungibles::Balanced<AccountId> for ConcreteAssets {
type OnDropCredit = fungibles::DecreaseIssuance<AccountId, Self>;
type OnDropDebt = fungibles::IncreaseIssuance<AccountId, Self>;
}
// We only use minimum_balance of these implementations
impl fungibles::Inspect<AccountId> for ConcreteAssets {
type AssetId = <Tokens as fungibles::Inspect<AccountId>>::AssetId;
type Balance = <Tokens as fungibles::Inspect<AccountId>>::Balance;

fn minimum_balance(id: Self::AssetId) -> Self::Balance {
Tokens::minimum_balance(id)
}

fn total_issuance(asset_id: Self::AssetId) -> Self::Balance {
Tokens::total_issuance(asset_id)
}

fn balance(asset_id: Self::AssetId, account_id: &AccountId) -> Self::Balance {
Tokens::balance(asset_id, account_id)
}

fn total_balance(asset_id: Self::AssetId, account_id: &AccountId) -> Self::Balance {
Tokens::balance(asset_id, account_id)
}

fn reducible_balance(
_: Self::AssetId,
_: &AccountId,
_: Preservation,
_: Fortitude,
) -> Self::Balance {
Self::Balance::zero()
}

fn can_deposit(
_: Self::AssetId,
_: &AccountId,
_: Self::Balance,
_: Provenance,
) -> DepositConsequence {
DepositConsequence::UnknownAsset
}

fn can_withdraw(
_: Self::AssetId,
_: &AccountId,
_: Self::Balance,
) -> WithdrawConsequence<Self::Balance> {
WithdrawConsequence::UnknownAsset
}

fn asset_exists(_: Self::AssetId) -> bool {
false
}
}

// Not used
impl fungibles::Unbalanced<AccountId> for ConcreteAssets {
fn handle_dust(_: fungibles::Dust<AccountId, Self>) {}
fn write_balance(
_: Self::AssetId,
_: &AccountId,
_: Self::Balance,
) -> Result<Option<Self::Balance>, DispatchError> {
core::prelude::v1::Err(DispatchError::CannotLookup)
}

fn set_total_issuance(_: Self::AssetId, _: Self::Balance) {}
}

pub type Traders = (
TakeFirstAssetTrader<
AccountId,
ChargeWeightInFungiblesImplementation,
ConvertedConcreteId<CurrencyId, Balance, CurrencyIdConvert, JustTry>,
ConcreteAssets,
XcmFeesTo32ByteAccount<LocalAssetTransactor, AccountId, AmplitudeTreasuryAccount>,
>,
);
pub type Traders = AssetRegistryTrader<
FixedRateAssetRegistryTrader<FixedConversionRateProvider<AssetRegistry>>,
XcmFeesTo32ByteAccount<LocalAssetTransactor, AccountId, AmplitudeTreasuryAccount>,
>;

pub struct XcmConfig;
impl xcm_executor::Config for XcmConfig {
Expand Down Expand Up @@ -485,7 +290,7 @@ impl orml_xtokens::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Balance = Balance;
type CurrencyId = CurrencyId;
type CurrencyIdConvert = CurrencyIdConvert;
type CurrencyIdConvert = CurrencyIdConvert<AssetRegistry>;
type AccountIdToMultiLocation = AccountIdToMultiLocation;
type SelfLocation = SelfLocation;
type XcmExecutor = XcmExecutor<XcmConfig>;
Expand Down
2 changes: 2 additions & 0 deletions runtime/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ sp-runtime = { git = "https://github.com/paritytech/substrate", default-features
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" }
sp-consensus-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" }
sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" }
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus.git", default-features = false, branch = "polkadot-v0.9.42" }

xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.42" }
xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.42" }
Expand Down Expand Up @@ -58,6 +59,7 @@ std = [
"orml-xcm-support/std",
"zenlink-protocol/std",
"spacewalk-primitives/std",
"cumulus-primitives-core/std",
]

runtime-benchmarks = [
Expand Down
21 changes: 19 additions & 2 deletions runtime/common/src/asset_registry.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
use crate::*;
use frame_support::traits::AsEnsureOriginWithArg;
use frame_system::EnsureRoot;
use orml_traits::asset_registry::{AssetMetadata, AssetProcessor};
use orml_traits::{FixedConversionRateProvider as FixedConversionRateProviderTrait,
asset_registry::{AssetMetadata, AssetProcessor, Inspect}};
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
use scale_info::TypeInfo;
use sp_core::Get;
use sp_runtime::{BoundedVec, DispatchError};
use sp_runtime::{BoundedVec, DispatchError, traits::PhantomData};
use sp_std::fmt::Debug;
use spacewalk_primitives::CurrencyId;
use xcm::opaque::v3::{MultiLocation};

#[derive(Clone, PartialOrd, Ord, PartialEq, Eq, Debug, Encode, Decode, TypeInfo, MaxEncodedLen)]
pub struct StringLimit;
Expand Down Expand Up @@ -54,3 +56,18 @@ impl AssetProcessor<CurrencyId, AssetMetadata<Balance, CustomMetadata>> for Cust
}

pub type AssetAuthority = AsEnsureOriginWithArg<EnsureRoot<AccountId>>;
pub struct FixedConversionRateProvider<OrmlAssetRegistry>(PhantomData<OrmlAssetRegistry>);

impl<
OrmlAssetRegistry: Inspect<
AssetId = CurrencyId,
Balance = Balance,
CustomMetadata = asset_registry::CustomMetadata,
>,
> FixedConversionRateProviderTrait for FixedConversionRateProvider<OrmlAssetRegistry>
{
fn get_fee_per_second(location: &MultiLocation) -> Option<u128> {
let metadata = OrmlAssetRegistry::metadata_by_location(&location)?;
Some(metadata.additional.fee_per_second)
}
}
2 changes: 2 additions & 0 deletions runtime/common/src/benchmarking/orml_asset_registry.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
use crate::asset_registry::{CustomMetadata, DiaKeys};
use frame_benchmarking::v2::benchmarks;
use frame_support::assert_ok;
use frame_system::RawOrigin;
use orml_asset_registry::AssetMetadata;
use sp_runtime::BoundedVec;
use sp_std::{vec, vec::Vec};
use spacewalk_primitives::CurrencyId;
use xcm::{
Expand Down
Loading
Loading