pub trait BuyBackHandler<AccountId, AssetId> {
    // Required methods
    fn mint_buy_back_and_burn(
        mint_asset_id: &AssetId,
        buy_back_asset_id: &AssetId,
        amount: Balance
    ) -> Result<Balance, DispatchError>;
    fn buy_back_and_burn(
        account_id: &AccountId,
        asset_id: &AssetId,
        buy_back_asset_id: &AssetId,
        amount: Balance
    ) -> Result<Balance, DispatchError>;
}

Required Methods§

source

fn mint_buy_back_and_burn( mint_asset_id: &AssetId, buy_back_asset_id: &AssetId, amount: Balance ) -> Result<Balance, DispatchError>

Mint amount of mint_asset_id, exchange to buy_back_asset_id and burn result amount

Returns burned amount

source

fn buy_back_and_burn( account_id: &AccountId, asset_id: &AssetId, buy_back_asset_id: &AssetId, amount: Balance ) -> Result<Balance, DispatchError>

Exchange amount of asset_id from account_id to buy_back_asset_id and burn result amount

Returns burned amount

Implementations on Foreign Types§

source§

impl<AssetId, AccountId> BuyBackHandler<AccountId, AssetId> for ()

source§

fn mint_buy_back_and_burn( _mint_asset_id: &AssetId, _buy_back_asset_id: &AssetId, _amount: Balance ) -> Result<Balance, DispatchError>

source§

fn buy_back_and_burn( _account_id: &AccountId, _asset_id: &AssetId, _buy_back_asset_id: &AssetId, _amount: Balance ) -> Result<Balance, DispatchError>

Implementors§