Trait pallet_pool_registry::pallet::Config
source · pub trait Config: Config {
Show 15 associated items
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
type Balance: Member + Parameter + AtLeast32BitUnsigned + Default + Copy + MaxEncodedLen + FixedPointOperand + From<u64> + From<u128> + TypeInfo + TryInto<u64>;
type PoolId: Member + Parameter + Default + Copy + HasCompact + MaxEncodedLen + Debug;
type InterestRate: Member + Parameter + Default + Copy + TypeInfo + FixedPointNumber<Inner = Self::Balance>;
type ModifyPool: PoolMutate<Self::AccountId, Self::PoolId, CurrencyId = Self::CurrencyId, Balance = Self::Balance, PoolFeeInput = (PoolFeeBucket, PoolFeeInfo<Self::AccountId, Self::Balance, Self::InterestRate>)>;
type ModifyWriteOffPolicy: PoolWriteOffPolicyMutate<Self::PoolId>;
type CurrencyId: Parameter + Copy + From<(Self::PoolId, Self::TrancheId)>;
type TrancheId: Member + Parameter + Default + Copy + MaxEncodedLen + TypeInfo;
type PoolCreateOrigin: EnsureOrigin<Self::RuntimeOrigin>;
type MaxTranches: Get<u32> + Member + TypeInfo;
type MaxSizeMetadata: Get<u32> + Copy + Member + TypeInfo;
type Permission: Permissions<Self::AccountId, Scope = PermissionScope<Self::PoolId, Self::CurrencyId>, Role = Role<Self::TrancheId>, Error = DispatchError>;
type AssetRegistry: Mutate<AssetId = Self::CurrencyId, Balance = Self::Balance, CustomMetadata = CustomMetadata> + Inspect<AssetId = Self::CurrencyId, Balance = Self::Balance, CustomMetadata = CustomMetadata>;
type PoolFeesInspect: PoolFeesInspect<PoolId = Self::PoolId>;
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>
type Balance: Member + Parameter + AtLeast32BitUnsigned + Default + Copy + MaxEncodedLen + FixedPointOperand + From<u64> + From<u128> + TypeInfo + TryInto<u64>
type PoolId: Member + Parameter + Default + Copy + HasCompact + MaxEncodedLen + Debug
sourcetype InterestRate: Member + Parameter + Default + Copy + TypeInfo + FixedPointNumber<Inner = Self::Balance>
type InterestRate: Member + Parameter + Default + Copy + TypeInfo + FixedPointNumber<Inner = Self::Balance>
A fixed-point number which represents an interest rate.
type ModifyPool: PoolMutate<Self::AccountId, Self::PoolId, CurrencyId = Self::CurrencyId, Balance = Self::Balance, PoolFeeInput = (PoolFeeBucket, PoolFeeInfo<Self::AccountId, Self::Balance, Self::InterestRate>)>
type ModifyWriteOffPolicy: PoolWriteOffPolicyMutate<Self::PoolId>
type CurrencyId: Parameter + Copy + From<(Self::PoolId, Self::TrancheId)>
type TrancheId: Member + Parameter + Default + Copy + MaxEncodedLen + TypeInfo
sourcetype PoolCreateOrigin: EnsureOrigin<Self::RuntimeOrigin>
type PoolCreateOrigin: EnsureOrigin<Self::RuntimeOrigin>
The origin permitted to create pools
sourcetype MaxTranches: Get<u32> + Member + TypeInfo
type MaxTranches: Get<u32> + Member + TypeInfo
Max number of Tranches
sourcetype MaxSizeMetadata: Get<u32> + Copy + Member + TypeInfo
type MaxSizeMetadata: Get<u32> + Copy + Member + TypeInfo
Max size of Metadata
type Permission: Permissions<Self::AccountId, Scope = PermissionScope<Self::PoolId, Self::CurrencyId>, Role = Role<Self::TrancheId>, Error = DispatchError>
sourcetype AssetRegistry: Mutate<AssetId = Self::CurrencyId, Balance = Self::Balance, CustomMetadata = CustomMetadata> + Inspect<AssetId = Self::CurrencyId, Balance = Self::Balance, CustomMetadata = CustomMetadata>
type AssetRegistry: Mutate<AssetId = Self::CurrencyId, Balance = Self::Balance, CustomMetadata = CustomMetadata> + Inspect<AssetId = Self::CurrencyId, Balance = Self::Balance, CustomMetadata = CustomMetadata>
The registry type used for retrieving and updating tranche metadata
as part of the PoolMetadata
trait implementation
sourcetype PoolFeesInspect: PoolFeesInspect<PoolId = Self::PoolId>
type PoolFeesInspect: PoolFeesInspect<PoolId = Self::PoolId>
The source of truth for the pool fees counters;
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight Information
Object Safety§
This trait is not object safe.