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§
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
sourcetype PalletId: Get<PalletId>
type PalletId: Get<PalletId>
The loan’s module id, used to derive the account that holds the liquidity in all markets.
sourcetype ReserveOrigin: EnsureOrigin<Self::RuntimeOrigin>
type ReserveOrigin: EnsureOrigin<Self::RuntimeOrigin>
The origin which can add/reduce reserves.
sourcetype UpdateOrigin: EnsureOrigin<Self::RuntimeOrigin>
type UpdateOrigin: EnsureOrigin<Self::RuntimeOrigin>
The origin which can add or update markets (including interest rate model, liquidate incentive and collateral ratios).
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for extrinsics in this pallet.
sourcetype RewardAssetId: Get<<Self as Config>::CurrencyId>
type RewardAssetId: Get<<Self as Config>::CurrencyId>
Incentive reward asset id.
sourcetype ReferenceAssetId: Get<<Self as Config>::CurrencyId>
type ReferenceAssetId: Get<<Self as Config>::CurrencyId>
Reference currency for expressing asset prices. Example: USD, IBTC.
sourcetype OnExchangeRateChange: OnExchangeRateChange<<Self as Config>::CurrencyId>
type OnExchangeRateChange: OnExchangeRateChange<<Self as Config>::CurrencyId>
Hook for exchangerate changes.