Skip to content

XCM Fungible Asset Implementation Design #384

Closed
@xlc

Description

@xlc

See #385

  • orml-xcm-support
    • Types
      • trait OnUnknownAssetDeposit
        • fn on_unknown_asset_deposit(id: &MultiLocation, val: u128)
      • trait AssetIdConversion
        • type Error
        • fn from_multi_asset(asset: &MultiAsset) -> Result<Self, Error>
        • fn to_multi_asset(self: &Self) -> Result<MultiAsset, Error>
      • struct MultiCurrencyAdapter<MultCurrency, LocationConversion, AssetId: AssetIdConversion, OnUnknownAssetDeposit>
        • impl TransactAsset
          • use LocationConversion to get origin
          • ues AssetIdConversion to get CurrencyId
          • use MultiCurrency to deposit/withdraw
      • other helper types as needed
  • orml-unknown-tokens
    • Notes
      • handle unknown tokens
      • allow to query balance
      • allow transfer to other chain (i.e. send money back)
    • Storages
      • map AccountId, MultiLocation => u128
    • Calls
      • transfer(origin, asset: MultiLocation, amount: u128, dest: MultiLocation)
    • Module
      • impl OnUnknownAssetDeposit
      • impl
        • fn burn(who: AccountId, asset: MultiLocation, amount: u128)
          • useful to migrate Unknown asset to known one
  • orml-xtokens
    • Config
      • XcmExecutor
      • CurrencyId
      • Balance
    • Calls
      • transfer(origin, currency_id: CurrencyId, amount: Balance, dest: MultiLocation)
      • transfer_xcm(origin, asset: MultiAsset, dest: MultiLocation)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions