pub trait InvestmentCollector<AccountId> {
    type Error: Debug;
    type InvestmentId;
    type Result;

    // Required methods
    fn collect_investment(
        who: AccountId,
        investment_id: Self::InvestmentId
    ) -> Result<Self::Result, Self::Error>;
    fn collect_redemption(
        who: AccountId,
        investment_id: Self::InvestmentId
    ) -> Result<Self::Result, Self::Error>;
}
Expand description

A trait which allows to collect existing investments and redemptions.

Required Associated Types§

Required Methods§

source

fn collect_investment( who: AccountId, investment_id: Self::InvestmentId ) -> Result<Self::Result, Self::Error>

Collect the results of a user’s invest orders for the given investment. If any amounts are not fulfilled they are directly appended to the next active order for this investment.

source

fn collect_redemption( who: AccountId, investment_id: Self::InvestmentId ) -> Result<Self::Result, Self::Error>

Collect the results of a users redeem orders for the given investment. If any amounts are not fulfilled they are directly appended to the next active order for this investment.

Object Safety§

This trait is not object safe.

Implementors§