Trait loans::pallet::Config

source ·
pub trait Config: Config + Config<Balance = Balance, UnsignedFixedPoint = FixedU128> {
    type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
    type PalletId: Get<PalletId>;
    type ReserveOrigin: EnsureOrigin<Self::RuntimeOrigin>;
    type UpdateOrigin: EnsureOrigin<Self::RuntimeOrigin>;
    type WeightInfo: WeightInfo;
    type UnixTime: UnixTime;
    type RewardAssetId: Get<<Self as Config>::CurrencyId>;
    type ReferenceAssetId: Get<<Self as Config>::CurrencyId>;
    type OnExchangeRateChange: OnExchangeRateChange<<Self as Config>::CurrencyId>;
}
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.

Required Associated Types§

source

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

source

type PalletId: Get<PalletId>

The loan’s module id, used to derive the account that holds the liquidity in all markets.

source

type ReserveOrigin: EnsureOrigin<Self::RuntimeOrigin>

The origin which can add/reduce reserves.

source

type UpdateOrigin: EnsureOrigin<Self::RuntimeOrigin>

The origin which can add or update markets (including interest rate model, liquidate incentive and collateral ratios).

source

type WeightInfo: WeightInfo

Weight information for extrinsics in this pallet.

source

type UnixTime: UnixTime

Unix time

source

type RewardAssetId: Get<<Self as Config>::CurrencyId>

Incentive reward asset id.

source

type ReferenceAssetId: Get<<Self as Config>::CurrencyId>

Reference currency for expressing asset prices. Example: USD, IBTC.

source

type OnExchangeRateChange: OnExchangeRateChange<<Self as Config>::CurrencyId>

Hook for exchangerate changes.

Implementors§