Trait pallet_distance::pallet::Config
source · pub trait Config: Config + Config + Config<IdtyIndex = u32> {
type Currency: ReservableCurrency<Self::AccountId>;
type EvaluationPrice: Get<<Self::Currency as Currency<Self::AccountId>>::Balance>;
type EvaluationPeriod: Get<u32>;
type MaxRefereeDistance: Get<u32>;
type MinAccessibleReferees: Get<Perbill>;
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
type WeightInfo: WeightInfo;
type OnValidDistanceStatus: OnValidDistanceStatus<Self>;
type CheckRequestDistanceEvaluation: CheckRequestDistanceEvaluation<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 Currency: ReservableCurrency<Self::AccountId>
type Currency: ReservableCurrency<Self::AccountId>
Currency type used in this pallet (used for reserve/slash)
sourcetype EvaluationPrice: Get<<Self::Currency as Currency<Self::AccountId>>::Balance>
type EvaluationPrice: Get<<Self::Currency as Currency<Self::AccountId>>::Balance>
Amount reserved during evaluation
sourcetype EvaluationPeriod: Get<u32>
type EvaluationPeriod: Get<u32>
Evaluation period number of blocks. As the evaluation is done using 3 pools, the evaluation will take 3 * EvaluationPeriod.
sourcetype MaxRefereeDistance: Get<u32>
type MaxRefereeDistance: Get<u32>
Maximum distance used to define referee’s accessibility Unused by runtime but needed by client distance oracle
sourcetype MinAccessibleReferees: Get<Perbill>
type MinAccessibleReferees: Get<Perbill>
Minimum ratio of accessible referees
sourcetype RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
The overarching event type.
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Type representing the weight of this pallet
sourcetype OnValidDistanceStatus: OnValidDistanceStatus<Self>
type OnValidDistanceStatus: OnValidDistanceStatus<Self>
Handler for successful distance evaluation
sourcetype CheckRequestDistanceEvaluation: CheckRequestDistanceEvaluation<Self>
type CheckRequestDistanceEvaluation: CheckRequestDistanceEvaluation<Self>
Trait to check that distance evaluation request is allowed