Crate pallet_xc_asset_config
source ·Expand description
§Cross-chain Asset Config Pallet
§Overview
This pallet provides mappings between local asset Id and remove asset location.
E.g. a multilocation like {parents: 0, interior: X1::(Junction::Parachain(1000))}
could ba mapped to local asset Id 789
.
The pallet ensures that the latest Location version is always used. Developers must ensure to properly migrate legacy versions to newest when they become available.
Additionally, it stores information whether a foreign asset is supported as a payment currency for execution on local network.
§Interface
§Dispatchable Function
register_asset_location
- used to register mapping between local asset Id and remote asset locationset_asset_units_per_second
- registers asset as payment currency and sets the desired payment per second of execution timechange_existing_asset_location
- changes the remote location of an existing local asset Idremove_payment_asset
- removes asset from the set of supported payment assetsremove_asset
- removes all information related to this asset
User is encouraged to refer to specific function implementations for more comprehensive documentation.
§Other
AssetLocationGetter
interface for mapping asset Id to asset location and vice versa
get_xc_asset_location
get_asset_id
ExecutionPaymentRate
interface for fetching units per second
if asset is supported payment asset
-
get_units_per_second
-
weight_to_fee
method is used to convert weight to fee based on units per second and weight.
Re-exports§
pub use weights::WeightInfo;
pub use pallet::*;
Modules§
- The
pallet
module in each FRAME pallet hosts the most important items needed to construct this pallet. - Autogenerated weights for pallet_xc_asset_config