pub trait ForeignInvestmentHooks<AccountId> {
type Amount;
type TrancheAmount;
type CurrencyId;
type InvestmentId;
// Required methods
fn fulfill_cancel_investment(
who: &AccountId,
investment_id: Self::InvestmentId,
currency_id: Self::CurrencyId,
amount_cancelled: Self::Amount,
fulfilled: Self::Amount
) -> DispatchResult;
fn fulfill_collect_investment(
who: &AccountId,
investment_id: Self::InvestmentId,
currency_id: Self::CurrencyId,
amount_collected: Self::Amount,
tranche_tokens_payout: Self::TrancheAmount
) -> DispatchResult;
fn fulfill_collect_redemption(
who: &AccountId,
investment_id: Self::InvestmentId,
currency_id: Self::CurrencyId,
tranche_tokens_collected: Self::TrancheAmount,
amount_payout: Self::Amount
) -> DispatchResult;
}
Expand description
Trait used to receive information asynchronously from a ForeignInvestment implementation
Required Associated Types§
Required Methods§
sourcefn fulfill_cancel_investment(
who: &AccountId,
investment_id: Self::InvestmentId,
currency_id: Self::CurrencyId,
amount_cancelled: Self::Amount,
fulfilled: Self::Amount
) -> DispatchResult
fn fulfill_cancel_investment( who: &AccountId, investment_id: Self::InvestmentId, currency_id: Self::CurrencyId, amount_cancelled: Self::Amount, fulfilled: Self::Amount ) -> DispatchResult
An async cancellation has been done
sourcefn fulfill_collect_investment(
who: &AccountId,
investment_id: Self::InvestmentId,
currency_id: Self::CurrencyId,
amount_collected: Self::Amount,
tranche_tokens_payout: Self::TrancheAmount
) -> DispatchResult
fn fulfill_collect_investment( who: &AccountId, investment_id: Self::InvestmentId, currency_id: Self::CurrencyId, amount_collected: Self::Amount, tranche_tokens_payout: Self::TrancheAmount ) -> DispatchResult
An async investment collection has been done
sourcefn fulfill_collect_redemption(
who: &AccountId,
investment_id: Self::InvestmentId,
currency_id: Self::CurrencyId,
tranche_tokens_collected: Self::TrancheAmount,
amount_payout: Self::Amount
) -> DispatchResult
fn fulfill_collect_redemption( who: &AccountId, investment_id: Self::InvestmentId, currency_id: Self::CurrencyId, tranche_tokens_collected: Self::TrancheAmount, amount_payout: Self::Amount ) -> DispatchResult
An async redemption collection has been done
Object Safety§
This trait is not object safe.