Trait pallet_loans::pallet::Config
source · pub trait Config: Config {
Show 23 associated items
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
type RuntimeChange: From<Change<Self>> + TryInto<Change<Self>>;
type CurrencyId: Parameter + Copy + MaxEncodedLen;
type CollectionId: Parameter + Member + Default + TypeInfo + Copy + MaxEncodedLen;
type ItemId: Parameter + Member + Default + TypeInfo + Copy + MaxEncodedLen;
type LoanId: Parameter + Member + Default + TypeInfo + MaxEncodedLen + Copy + EnsureAdd + One;
type PriceId: Parameter + Member + TypeInfo + Copy + MaxEncodedLen + Ord;
type Rate: Parameter + Member + FixedPointNumber + TypeInfo + MaxEncodedLen;
type Balance: Balance + FixedPointOperand;
type Quantity: Parameter + Member + FixedPointNumber + TypeInfo + MaxEncodedLen;
type PerThing: Parameter + Member + PerThing + TypeInfo + MaxEncodedLen;
type Time: TimeAsSecs;
type Moment: Parameter + Member + Copy + IntoSeconds;
type NonFungible: Transfer<Self::AccountId> + Inspect<Self::AccountId, CollectionId = Self::CollectionId, ItemId = Self::ItemId>;
type PoolId: Member + Parameter + Default + Copy + HasCompact + MaxEncodedLen;
type Pool: PoolReserve<Self::AccountId, Self::CurrencyId, Balance = Self::Balance, PoolId = Self::PoolId>;
type Permissions: Permissions<Self::AccountId, Scope = PermissionScope<Self::PoolId, Self::CurrencyId>, Role = Role, Error = DispatchError>;
type PriceRegistry: DataRegistry<Self::PriceId, Self::PoolId, Data = PriceOf<Self>>;
type InterestAccrual: InterestAccrual<Self::Rate, Self::Balance, Adjustment<Self::Balance>, NormalizedDebt = Self::Balance>;
type ChangeGuard: ChangeGuard<PoolId = Self::PoolId, ChangeId = Self::Hash, Change = Self::RuntimeChange>;
type MaxActiveLoansPerPool: Get<u32>;
type MaxWriteOffPolicySize: Get<u32> + Parameter;
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.
Required Associated Types§
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
sourcetype CurrencyId: Parameter + Copy + MaxEncodedLen
type CurrencyId: Parameter + Copy + MaxEncodedLen
Identify a currency.
sourcetype CollectionId: Parameter + Member + Default + TypeInfo + Copy + MaxEncodedLen
type CollectionId: Parameter + Member + Default + TypeInfo + Copy + MaxEncodedLen
Identify a non fungible collection
sourcetype ItemId: Parameter + Member + Default + TypeInfo + Copy + MaxEncodedLen
type ItemId: Parameter + Member + Default + TypeInfo + Copy + MaxEncodedLen
Identify a non fungible item
sourcetype LoanId: Parameter + Member + Default + TypeInfo + MaxEncodedLen + Copy + EnsureAdd + One
type LoanId: Parameter + Member + Default + TypeInfo + MaxEncodedLen + Copy + EnsureAdd + One
Identify a loan in the pallet
sourcetype PriceId: Parameter + Member + TypeInfo + Copy + MaxEncodedLen + Ord
type PriceId: Parameter + Member + TypeInfo + Copy + MaxEncodedLen + Ord
Identify a loan in the pallet
sourcetype Rate: Parameter + Member + FixedPointNumber + TypeInfo + MaxEncodedLen
type Rate: Parameter + Member + FixedPointNumber + TypeInfo + MaxEncodedLen
Defines the rate type used for math computations
sourcetype Quantity: Parameter + Member + FixedPointNumber + TypeInfo + MaxEncodedLen
type Quantity: Parameter + Member + FixedPointNumber + TypeInfo + MaxEncodedLen
Type to represent different quantities
sourcetype PerThing: Parameter + Member + PerThing + TypeInfo + MaxEncodedLen
type PerThing: Parameter + Member + PerThing + TypeInfo + MaxEncodedLen
Defines the perthing type used where values can not overpass 100%
sourcetype NonFungible: Transfer<Self::AccountId> + Inspect<Self::AccountId, CollectionId = Self::CollectionId, ItemId = Self::ItemId>
type NonFungible: Transfer<Self::AccountId> + Inspect<Self::AccountId, CollectionId = Self::CollectionId, ItemId = Self::ItemId>
Used to mint, transfer, and inspect assets.
sourcetype Pool: PoolReserve<Self::AccountId, Self::CurrencyId, Balance = Self::Balance, PoolId = Self::PoolId>
type Pool: PoolReserve<Self::AccountId, Self::CurrencyId, Balance = Self::Balance, PoolId = Self::PoolId>
Access to the pool
sourcetype Permissions: Permissions<Self::AccountId, Scope = PermissionScope<Self::PoolId, Self::CurrencyId>, Role = Role, Error = DispatchError>
type Permissions: Permissions<Self::AccountId, Scope = PermissionScope<Self::PoolId, Self::CurrencyId>, Role = Role, Error = DispatchError>
Used to verify permissions of users
sourcetype PriceRegistry: DataRegistry<Self::PriceId, Self::PoolId, Data = PriceOf<Self>>
type PriceRegistry: DataRegistry<Self::PriceId, Self::PoolId, Data = PriceOf<Self>>
Used to fetch and update Oracle prices
sourcetype InterestAccrual: InterestAccrual<Self::Rate, Self::Balance, Adjustment<Self::Balance>, NormalizedDebt = Self::Balance>
type InterestAccrual: InterestAccrual<Self::Rate, Self::Balance, Adjustment<Self::Balance>, NormalizedDebt = Self::Balance>
Used to calculate interest accrual for debt.
sourcetype ChangeGuard: ChangeGuard<PoolId = Self::PoolId, ChangeId = Self::Hash, Change = Self::RuntimeChange>
type ChangeGuard: ChangeGuard<PoolId = Self::PoolId, ChangeId = Self::Hash, Change = Self::RuntimeChange>
Used to notify the runtime about changes that require special treatment.
sourcetype MaxActiveLoansPerPool: Get<u32>
type MaxActiveLoansPerPool: Get<u32>
Max number of active loans per pool.
sourcetype MaxWriteOffPolicySize: Get<u32> + Parameter
type MaxWriteOffPolicySize: Get<u32> + Parameter
Max number of write-off groups per pool.
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Information of runtime weights