Trait shot_runtime::traits::RemoteAssetManager[][src]

pub trait RemoteAssetManager<AccountId, AssetId, Balance> {
    fn transfer_asset(
        who: AccountId,
        asset: AssetId,
        amount: Balance
    ) -> Result<(), DispatchError>;
fn deposit(asset: AssetId, amount: Balance);
fn announce_withdrawal(asset: AssetId, amount: Balance); }
Expand description

Facility for remote asset operations.

Required methods

Transfers the given amount of asset from the account’s sovereign account on PINT into the account on the asset’s destination.

This performs the following steps:

  • Ensure the account has enough free balance of the given asset
  • Depending on the asset’s location this will execute
    • an XCM InitiateReserveWithdraw followed by XCM Deposit order, if the location of the asset is a reserve location of PINT (Relay Chain)
    • an XCM InitiateReserveWithdraw followed by XCM DepositReserveAsset order will be dispatched as XCM ReserveAssetDeposit with an Xcm Deposit order

Notification of deposited funds in the index, ready to be bond to earn staking rewards.

This is an abstraction over how staking is supported on the asset’s native location. In general, this can be one of - None, staking is not supported, meaning this asset is idle. - Staking via the FRAME pallet_staking, (e.g. Relay Chain). - Liquid Staking, with support for early unbonding.

Notification of an upcoming withdrawal.

This tells the remote asset manager to either reserve the given amount from the idle remote balance or prepare to unbond those active funds.

Unbonding an asset will involve: - Nothing for assets that do not support staking (always idle asset). - Call pallet_staking::unbond + pallet_staking::withdraw on the asset’s native chain (e.g Relay Chain) - Execute the unbond mechanism of the liquid staking protocol

Implementations on Foreign Types

Implementors