Trait fee::pallet::Config

source ·
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§

source

type FeePalletId: Get<PalletId>

The fee module id, used for deriving its sovereign account ID.

source

type WeightInfo: WeightInfo

Weight information for the extrinsics in this module.

source

type SignedFixedPoint: FixedPointNumber<Inner = <Self as Config>::SignedInner> + Encode + EncodeLike + Decode

Signed fixed point type.

source

type SignedInner: Debug + CheckedDiv + TryFrom<<Self as Config>::Balance> + TryInto<<Self as Config>::Balance> + MaybeSerializeDeserialize

The Inner type of the SignedFixedPoint.

source

type CapacityRewards: RewardsApi<(), CurrencyId<Self>, <Self as Config>::Balance, CurrencyId = CurrencyId<Self>>

Capacity reward pool.

source

type VaultRewards: RewardsApi<CurrencyId<Self>, VaultId<<Self as Config>::AccountId, CurrencyId<Self>>, <Self as Config>::Balance, CurrencyId = CurrencyId<Self>>

Vault reward pool.

source

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.

source

type OnSweep: OnSweep<Self::AccountId, Amount<Self>>

Handler to transfer undistributed rewards.

source

type MaxExpectedValue: Get<UnsignedFixedPoint<Self>>

Maximum expected value to set the storage fields to.

source

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.

Implementors§