pub trait Config: Config {
    type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
    type InvestmentId: Member + Parameter + Copy + MaxEncodedLen + Into<<<Self as Config>::Tokens as Inspect<<Self as Config>::AccountId>>::AssetId>;
    type Accountant: InvestmentAccountant<Self::AccountId, Error = DispatchError, InvestmentId = Self::InvestmentId, Amount = Self::Amount, InvestmentInfo = InvestmentInfo<Self::AccountId, <<Self as Config>::Tokens as Inspect<<Self as Config>::AccountId>>::AssetId, Self::InvestmentId>>;
    type Amount: Member + Parameter + AtLeast32BitUnsigned + Default + Copy + MaxEncodedLen + FixedPointOperand + From<u64> + From<u128> + TryInto<u64>;
    type BalanceRatio: Member + Parameter + Default + Copy + FixedPointNumber<Inner = Self::Amount> + FixedPointNumberExtension + MaxEncodedLen;
    type MaxOutstandingCollects: Get<u32>;
    type Tokens: Mutate<Self::AccountId> + Inspect<Self::AccountId, Balance = Self::Amount>;
    type PreConditions: PreConditions<OrderType<Self::AccountId, Self::InvestmentId, Self::Amount>, Result = DispatchResult>;
    type CollectedInvestmentHook: StatusNotificationHook<Error = DispatchError, Id = (Self::AccountId, Self::InvestmentId), Status = CollectedAmount<Self::Amount, Self::Amount>>;
    type CollectedRedemptionHook: StatusNotificationHook<Error = DispatchError, Id = (Self::AccountId, Self::InvestmentId), Status = CollectedAmount<Self::Amount, Self::Amount>>;
    type WeightInfo: WeightInfo;
}
Expand description

Configuration trait of this pallet.

The main purpose of this trait is to act as an interface between this pallet and the runtime in which it is embedded in. A type, function, or constant in this trait is essentially left to be configured by the runtime that includes this pallet.

Consequently, a runtime that wants to include this pallet must implement this trait. Configure the pallet by specifying the parameters and types on which it depends.

Required Associated Types§

source

type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>

Because this pallet emits events, it depends on the runtime’s definition of an event.

source

type InvestmentId: Member + Parameter + Copy + MaxEncodedLen + Into<<<Self as Config>::Tokens as Inspect<<Self as Config>::AccountId>>::AssetId>

The underlying investments one can invest into

source

type Accountant: InvestmentAccountant<Self::AccountId, Error = DispatchError, InvestmentId = Self::InvestmentId, Amount = Self::Amount, InvestmentInfo = InvestmentInfo<Self::AccountId, <<Self as Config>::Tokens as Inspect<<Self as Config>::AccountId>>::AssetId, Self::InvestmentId>>

Something that knows how to handle accounting for the given investments and provides metadata about them

source

type Amount: Member + Parameter + AtLeast32BitUnsigned + Default + Copy + MaxEncodedLen + FixedPointOperand + From<u64> + From<u128> + TryInto<u64>

A representation for an investment or redemption. Usually this is equal to the known Balance type of a system.

source

type BalanceRatio: Member + Parameter + Default + Copy + FixedPointNumber<Inner = Self::Amount> + FixedPointNumberExtension + MaxEncodedLen

A fixed-point number which represents the value of one currency type in terms of another.

source

type MaxOutstandingCollects: Get<u32>

The bound on how many fulfilled orders we cache until the user needs to collect them.

source

type Tokens: Mutate<Self::AccountId> + Inspect<Self::AccountId, Balance = Self::Amount>

Something that can handle payments and transfers of currencies

source

type PreConditions: PreConditions<OrderType<Self::AccountId, Self::InvestmentId, Self::Amount>, Result = DispatchResult>

A possible check if investors fulfill every condition to invest into a given investment

source

type CollectedInvestmentHook: StatusNotificationHook<Error = DispatchError, Id = (Self::AccountId, Self::InvestmentId), Status = CollectedAmount<Self::Amount, Self::Amount>>

The hook which acts upon a collected investment.

NOTE: NOOP if the investment is not foreign.

source

type CollectedRedemptionHook: StatusNotificationHook<Error = DispatchError, Id = (Self::AccountId, Self::InvestmentId), Status = CollectedAmount<Self::Amount, Self::Amount>>

The hook which acts upon a (partially) fulfilled order

NOTE: NOOP if the redemption is not foreign.

source

type WeightInfo: WeightInfo

The weight information for this pallet extrinsics.

Object Safety§

This trait is not object safe.

Implementors§