pub trait Config: Config + Config<RuntimeEvent: From<Event<Self>>> {
type CurrencyBalance: AtLeast32BitUnsigned + FullCodec + DecodeWithMemTracking + HasCompact<Type: DecodeWithMemTracking> + Copy + MaybeSerializeDeserialize + Debug + Default + From<u64> + TypeInfo + Send + Sync + MaxEncodedLen;
type AssetHubOrigin: EnsureOrigin<Self::RuntimeOrigin>;
type AdminOrigin: EnsureOrigin<Self::RuntimeOrigin>;
type SendToAssetHub: SendToAssetHub<AccountId = Self::AccountId>;
type MinimumValidatorSetSize: Get<u32>;
type UnixTime: UnixTime;
type PointsPerBlock: Get<u32>;
type SessionInterface: SessionInterface<ValidatorId = Self::AccountId>;
type Fallback: SessionManager<Self::AccountId> + OnOffenceHandler<Self::AccountId, (Self::AccountId, Exposure<Self::AccountId, BalanceOf<Self>>), Weight> + RewardsReporter<Self::AccountId> + EventHandler<Self::AccountId, BlockNumberFor<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.
Required Associated Types§
Sourcetype CurrencyBalance: AtLeast32BitUnsigned + FullCodec + DecodeWithMemTracking + HasCompact<Type: DecodeWithMemTracking> + Copy + MaybeSerializeDeserialize + Debug + Default + From<u64> + TypeInfo + Send + Sync + MaxEncodedLen
type CurrencyBalance: AtLeast32BitUnsigned + FullCodec + DecodeWithMemTracking + HasCompact<Type: DecodeWithMemTracking> + Copy + MaybeSerializeDeserialize + Debug + Default + From<u64> + TypeInfo + Send + Sync + MaxEncodedLen
The balance type of the runtime’s currency interface.
Sourcetype AssetHubOrigin: EnsureOrigin<Self::RuntimeOrigin>
type AssetHubOrigin: EnsureOrigin<Self::RuntimeOrigin>
An origin type that ensures an incoming message is from asset hub.
Sourcetype AdminOrigin: EnsureOrigin<Self::RuntimeOrigin>
type AdminOrigin: EnsureOrigin<Self::RuntimeOrigin>
The origin that can control this pallet’s operations.
Sourcetype SendToAssetHub: SendToAssetHub<AccountId = Self::AccountId>
type SendToAssetHub: SendToAssetHub<AccountId = Self::AccountId>
Our communication interface to AssetHub.
Sourcetype MinimumValidatorSetSize: Get<u32>
type MinimumValidatorSetSize: Get<u32>
A safety measure that asserts an incoming validator set must be at least this large.
Sourcetype PointsPerBlock: Get<u32>
type PointsPerBlock: Get<u32>
Number of points to award a validator per block authored.
Sourcetype SessionInterface: SessionInterface<ValidatorId = Self::AccountId>
type SessionInterface: SessionInterface<ValidatorId = Self::AccountId>
Interface to talk to the local Session pallet.
Sourcetype Fallback: SessionManager<Self::AccountId> + OnOffenceHandler<Self::AccountId, (Self::AccountId, Exposure<Self::AccountId, BalanceOf<Self>>), Weight> + RewardsReporter<Self::AccountId> + EventHandler<Self::AccountId, BlockNumberFor<Self>>
type Fallback: SessionManager<Self::AccountId> + OnOffenceHandler<Self::AccountId, (Self::AccountId, Exposure<Self::AccountId, BalanceOf<Self>>), Weight> + RewardsReporter<Self::AccountId> + EventHandler<Self::AccountId, BlockNumberFor<Self>>
A fallback implementation to delegate logic to when the pallet is in
OperatingMode::Passive
.
This type must implement the historical::SessionManager
and OnOffenceHandler
interface and is expected to behave as a stand-in for this pallet’s core logic when
delegation is active.
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.