pub trait Config: Config + Config + Config {
type FeePalletId: Get<PalletId>;
type WeightInfo: WeightInfo;
type SignedFixedPoint: FixedPointNumber<Inner = <Self as Config>::SignedInner> + Encode + EncodeLike + Decode;
type SignedInner: Debug + CheckedDiv + TryFrom<<Self as Config>::Balance> + TryInto<<Self as Config>::Balance> + MaybeSerializeDeserialize;
type CapacityRewards: RewardsApi<(), CurrencyId<Self>, <Self as Config>::Balance, CurrencyId = CurrencyId<Self>>;
type VaultRewards: RewardsApi<CurrencyId<Self>, VaultId<<Self as Config>::AccountId, CurrencyId<Self>>, <Self as Config>::Balance, CurrencyId = CurrencyId<Self>>;
type VaultStaking: StakingApi<VaultId<<Self as Config>::AccountId, CurrencyId<Self>>, Self::Nonce, <Self as Config>::Balance> + RewardsApi<(Option<Self::Nonce>, VaultId<<Self as Config>::AccountId, CurrencyId<Self>>), Self::AccountId, <Self as Config>::Balance, CurrencyId = CurrencyId<Self>>;
type OnSweep: OnSweep<Self::AccountId, Amount<Self>>;
type MaxExpectedValue: Get<UnsignedFixedPoint<Self>>;
type NominationApi: NominationApi<VaultId<<Self as Config>::AccountId, CurrencyId<Self>>, Amount<Self>>;
}
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.
Configuration
The pallet’s configuration trait.
Required Associated Types§
sourcetype FeePalletId: Get<PalletId>
type FeePalletId: Get<PalletId>
The fee module id, used for deriving its sovereign account ID.
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for the extrinsics in this module.
sourcetype SignedFixedPoint: FixedPointNumber<Inner = <Self as Config>::SignedInner> + Encode + EncodeLike + Decode
type SignedFixedPoint: FixedPointNumber<Inner = <Self as Config>::SignedInner> + Encode + EncodeLike + Decode
Signed fixed point type.
sourcetype SignedInner: Debug + CheckedDiv + TryFrom<<Self as Config>::Balance> + TryInto<<Self as Config>::Balance> + MaybeSerializeDeserialize
type SignedInner: Debug + CheckedDiv + TryFrom<<Self as Config>::Balance> + TryInto<<Self as Config>::Balance> + MaybeSerializeDeserialize
The Inner
type of the SignedFixedPoint
.
sourcetype CapacityRewards: RewardsApi<(), CurrencyId<Self>, <Self as Config>::Balance, CurrencyId = CurrencyId<Self>>
type CapacityRewards: RewardsApi<(), CurrencyId<Self>, <Self as Config>::Balance, CurrencyId = CurrencyId<Self>>
Capacity reward pool.
sourcetype VaultRewards: RewardsApi<CurrencyId<Self>, VaultId<<Self as Config>::AccountId, CurrencyId<Self>>, <Self as Config>::Balance, CurrencyId = CurrencyId<Self>>
type VaultRewards: RewardsApi<CurrencyId<Self>, VaultId<<Self as Config>::AccountId, CurrencyId<Self>>, <Self as Config>::Balance, CurrencyId = CurrencyId<Self>>
Vault reward pool.
sourcetype VaultStaking: StakingApi<VaultId<<Self as Config>::AccountId, CurrencyId<Self>>, Self::Nonce, <Self as Config>::Balance> + RewardsApi<(Option<Self::Nonce>, VaultId<<Self as Config>::AccountId, CurrencyId<Self>>), Self::AccountId, <Self as Config>::Balance, CurrencyId = CurrencyId<Self>>
type VaultStaking: StakingApi<VaultId<<Self as Config>::AccountId, CurrencyId<Self>>, Self::Nonce, <Self as Config>::Balance> + RewardsApi<(Option<Self::Nonce>, VaultId<<Self as Config>::AccountId, CurrencyId<Self>>), Self::AccountId, <Self as Config>::Balance, CurrencyId = CurrencyId<Self>>
Vault staking pool.
sourcetype OnSweep: OnSweep<Self::AccountId, Amount<Self>>
type OnSweep: OnSweep<Self::AccountId, Amount<Self>>
Handler to transfer undistributed rewards.
sourcetype MaxExpectedValue: Get<UnsignedFixedPoint<Self>>
type MaxExpectedValue: Get<UnsignedFixedPoint<Self>>
Maximum expected value to set the storage fields to.
sourcetype NominationApi: NominationApi<VaultId<<Self as Config>::AccountId, CurrencyId<Self>>, Amount<Self>>
type NominationApi: NominationApi<VaultId<<Self as Config>::AccountId, CurrencyId<Self>>, Amount<Self>>
Api of the nomination pallet; used to make sure that commission can only be set if opted in.