Trait pallet_pool_system::pallet::Config
source · pub trait Config: Config {
Show 38 associated items
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
type AdminOrigin: EnsureOriginWithArg<Self::RuntimeOrigin, Self::PoolId>;
type Balance: Member + Parameter + AtLeast32BitUnsigned + Default + Copy + MaxEncodedLen + FixedPointOperand + From<u64> + From<u128> + TypeInfo + TryInto<u64>;
type TrancheWeight: Parameter + Copy + Convert<Self::TrancheWeight, Self::Balance> + From<u128>;
type BalanceRatio: Member + Parameter + Default + Copy + TypeInfo + FixedPointNumber<Inner = Self::Balance> + MaxEncodedLen;
type Rate: Member + Parameter + Default + Copy + TypeInfo + FixedPointNumber<Inner = Self::Balance> + MaxEncodedLen;
type PalletId: Get<PalletId>;
type PalletIndex: Get<u8>;
type PoolId: Member + Parameter + Default + Copy + HasCompact + MaxEncodedLen + Debug;
type TrancheId: Member + Parameter + Default + Copy + MaxEncodedLen + TypeInfo + From<[u8; 16]>;
type EpochId: Member + Parameter + Default + Copy + AtLeast32BitUnsigned + HasCompact + MaxEncodedLen + TypeInfo + Into<u32>;
type CurrencyId: Parameter + Copy + MaxEncodedLen;
type RuntimeChange: Parameter + Member + MaxEncodedLen + TypeInfo + Into<PoolChangeProposal>;
type PoolCurrency: Contains<Self::CurrencyId>;
type UpdateGuard: PoolUpdateGuard<PoolDetails = PoolDetailsOf<Self>, ScheduledUpdateDetails = ScheduledUpdateDetails<<Self as Config>::Rate, <Self as Config>::StringLimit, <Self as Config>::MaxTranches>, Moment = Seconds>;
type AssetRegistry: OrmlMutate<AssetId = Self::CurrencyId, Balance = Self::Balance, CustomMetadata = CustomMetadata, StringLimit = Self::StringLimit>;
type Currency: ReservableCurrency<Self::AccountId, Balance = Self::Balance>;
type Tokens: Mutate<Self::AccountId> + Inspect<Self::AccountId, AssetId = Self::CurrencyId, Balance = Self::Balance>;
type Permission: Permissions<Self::AccountId, Scope = PermissionScope<Self::PoolId, Self::CurrencyId>, Role = Role<Self::TrancheId>, Error = DispatchError>;
type AssetsUnderManagementNAV: PoolNAV<Self::PoolId, Self::Balance>;
type PoolFeesNAV: PoolNAV<Self::PoolId, Self::Balance>;
type TrancheCurrency: Into<Self::CurrencyId> + Clone + Copy + TrancheCurrencyT<Self::PoolId, Self::TrancheId> + Parameter + MaxEncodedLen + TypeInfo;
type Investments: OrderManager<Error = DispatchError, InvestmentId = Self::TrancheCurrency, Orders = TotalOrder<Self::Balance>, Fulfillment = FulfillmentWithPrice<Self::BalanceRatio>>;
type Time: TimeAsSecs;
type PoolFees: PoolFeesMutate<FeeInfo = PoolFeeInfo<<Self as Config>::AccountId, Self::Balance, Self::Rate>, PoolId = Self::PoolId> + PoolFeesInspect<PoolId = Self::PoolId>;
type OnEpochTransition: EpochTransitionHook<Balance = Self::Balance, PoolId = Self::PoolId, Time = Seconds, Error = DispatchError>;
type ChallengeTime: Get<BlockNumberFor<Self>>;
type DefaultMinEpochTime: Get<Seconds>;
type DefaultMaxNAVAge: Get<Seconds>;
type MinEpochTimeLowerBound: Get<Seconds>;
type MinEpochTimeUpperBound: Get<Seconds>;
type MaxNAVAgeUpperBound: Get<Seconds>;
type MinUpdateDelay: Get<Seconds>;
type StringLimit: Get<u32> + Copy + Member + TypeInfo;
type MaxTranches: Get<u32> + Member + PartialOrd + TypeInfo;
type PoolDeposit: Get<Self::Balance>;
type PoolCreateOrigin: EnsureOrigin<Self::RuntimeOrigin>;
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 AdminOrigin: EnsureOriginWithArg<Self::RuntimeOrigin, Self::PoolId>
type Balance: Member + Parameter + AtLeast32BitUnsigned + Default + Copy + MaxEncodedLen + FixedPointOperand + From<u64> + From<u128> + TypeInfo + TryInto<u64>
type TrancheWeight: Parameter + Copy + Convert<Self::TrancheWeight, Self::Balance> + From<u128>
sourcetype BalanceRatio: Member + Parameter + Default + Copy + TypeInfo + FixedPointNumber<Inner = Self::Balance> + MaxEncodedLen
type BalanceRatio: Member + Parameter + Default + Copy + TypeInfo + FixedPointNumber<Inner = Self::Balance> + MaxEncodedLen
A fixed-point number that represent a price with decimals
sourcetype Rate: Member + Parameter + Default + Copy + TypeInfo + FixedPointNumber<Inner = Self::Balance> + MaxEncodedLen
type Rate: Member + Parameter + Default + Copy + TypeInfo + FixedPointNumber<Inner = Self::Balance> + MaxEncodedLen
A fixed-point number which represents a Self::Balance in terms of this fixed-point representation.
type PalletId: Get<PalletId>
sourcetype PalletIndex: Get<u8>
type PalletIndex: Get<u8>
The immutable index of this pallet when instantiated within the context of a runtime where it is used.
type PoolId: Member + Parameter + Default + Copy + HasCompact + MaxEncodedLen + Debug
type TrancheId: Member + Parameter + Default + Copy + MaxEncodedLen + TypeInfo + From<[u8; 16]>
type EpochId: Member + Parameter + Default + Copy + AtLeast32BitUnsigned + HasCompact + MaxEncodedLen + TypeInfo + Into<u32>
type CurrencyId: Parameter + Copy + MaxEncodedLen
type RuntimeChange: Parameter + Member + MaxEncodedLen + TypeInfo + Into<PoolChangeProposal>
type PoolCurrency: Contains<Self::CurrencyId>
type UpdateGuard: PoolUpdateGuard<PoolDetails = PoolDetailsOf<Self>, ScheduledUpdateDetails = ScheduledUpdateDetails<<Self as Config>::Rate, <Self as Config>::StringLimit, <Self as Config>::MaxTranches>, Moment = Seconds>
type AssetRegistry: OrmlMutate<AssetId = Self::CurrencyId, Balance = Self::Balance, CustomMetadata = CustomMetadata, StringLimit = Self::StringLimit>
type Currency: ReservableCurrency<Self::AccountId, Balance = Self::Balance>
type Tokens: Mutate<Self::AccountId> + Inspect<Self::AccountId, AssetId = Self::CurrencyId, Balance = Self::Balance>
type Permission: Permissions<Self::AccountId, Scope = PermissionScope<Self::PoolId, Self::CurrencyId>, Role = Role<Self::TrancheId>, Error = DispatchError>
sourcetype AssetsUnderManagementNAV: PoolNAV<Self::PoolId, Self::Balance>
type AssetsUnderManagementNAV: PoolNAV<Self::PoolId, Self::Balance>
The provider for the positive NAV
sourcetype PoolFeesNAV: PoolNAV<Self::PoolId, Self::Balance>
type PoolFeesNAV: PoolNAV<Self::PoolId, Self::Balance>
The provider for the negative NAV
type TrancheCurrency: Into<Self::CurrencyId> + Clone + Copy + TrancheCurrencyT<Self::PoolId, Self::TrancheId> + Parameter + MaxEncodedLen + TypeInfo
type Investments: OrderManager<Error = DispatchError, InvestmentId = Self::TrancheCurrency, Orders = TotalOrder<Self::Balance>, Fulfillment = FulfillmentWithPrice<Self::BalanceRatio>>
type Time: TimeAsSecs
sourcetype PoolFees: PoolFeesMutate<FeeInfo = PoolFeeInfo<<Self as Config>::AccountId, Self::Balance, Self::Rate>, PoolId = Self::PoolId> + PoolFeesInspect<PoolId = Self::PoolId>
type PoolFees: PoolFeesMutate<FeeInfo = PoolFeeInfo<<Self as Config>::AccountId, Self::Balance, Self::Rate>, PoolId = Self::PoolId> + PoolFeesInspect<PoolId = Self::PoolId>
Add pool fees
sourcetype OnEpochTransition: EpochTransitionHook<Balance = Self::Balance, PoolId = Self::PoolId, Time = Seconds, Error = DispatchError>
type OnEpochTransition: EpochTransitionHook<Balance = Self::Balance, PoolId = Self::PoolId, Time = Seconds, Error = DispatchError>
Epoch transition hook required for Pool Fees
sourcetype ChallengeTime: Get<BlockNumberFor<Self>>
type ChallengeTime: Get<BlockNumberFor<Self>>
Challenge time
sourcetype DefaultMinEpochTime: Get<Seconds>
type DefaultMinEpochTime: Get<Seconds>
Pool parameter defaults
type DefaultMaxNAVAge: Get<Seconds>
sourcetype MinEpochTimeLowerBound: Get<Seconds>
type MinEpochTimeLowerBound: Get<Seconds>
Pool parameter bounds
type MinEpochTimeUpperBound: Get<Seconds>
type MaxNAVAgeUpperBound: Get<Seconds>
sourcetype MinUpdateDelay: Get<Seconds>
type MinUpdateDelay: Get<Seconds>
Pool update settings
type StringLimit: Get<u32> + Copy + Member + TypeInfo
sourcetype MaxTranches: Get<u32> + Member + PartialOrd + TypeInfo
type MaxTranches: Get<u32> + Member + PartialOrd + TypeInfo
Max number of Tranches
sourcetype PoolDeposit: Get<Self::Balance>
type PoolDeposit: Get<Self::Balance>
The amount that must be reserved to create a pool
sourcetype PoolCreateOrigin: EnsureOrigin<Self::RuntimeOrigin>
type PoolCreateOrigin: EnsureOrigin<Self::RuntimeOrigin>
The origin permitted to create pools
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight Information