pub trait Config: Config {
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
type HalvingInterval: Get<NonZeroU128>;
type MaxSupply: Get<NonZeroU128>;
type BlockEmission: Get<u128>;
type DefaultEmissionRecyclingPercentage: Get<Percent>;
type DefaultIncentivesRatio: Get<Percent>;
type Currency: Currency<Self::AccountId, Balance = u128> + Send + Sync;
type Torus: Torus0Api<Self::AccountId, <<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>;
type Governance: GovernanceApi<Self::AccountId>;
type Permission0: Permission0Api<OriginFor<Self>> + Permission0EmissionApi<Self::AccountId, OriginFor<Self>, BlockNumberFor<Self>, <<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance, <<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::NegativeImbalance>;
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 HalvingInterval: Get<NonZeroU128>
type HalvingInterval: Get<NonZeroU128>
Tokens emitted in an interval before halving the emissions in NANOs.
Sourcetype MaxSupply: Get<NonZeroU128>
type MaxSupply: Get<NonZeroU128>
Max token supply in NANOs.
Sourcetype BlockEmission: Get<u128>
type BlockEmission: Get<u128>
Emissions per block in NANOs. Not taking into account halving and recycling.
type DefaultEmissionRecyclingPercentage: Get<Percent>
type DefaultIncentivesRatio: Get<Percent>
type Currency: Currency<Self::AccountId, Balance = u128> + Send + Sync
type Torus: Torus0Api<Self::AccountId, <<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
type Governance: GovernanceApi<Self::AccountId>
type Permission0: Permission0Api<OriginFor<Self>> + Permission0EmissionApi<Self::AccountId, OriginFor<Self>, BlockNumberFor<Self>, <<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance, <<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::NegativeImbalance>
type WeightInfo: WeightInfo
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.