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§

source

type Currency: ReservableCurrency<Self::AccountId>

Currency type used in this pallet (used for reserve/slash)

source

type EvaluationPrice: Get<<Self::Currency as Currency<Self::AccountId>>::Balance>

Amount reserved during evaluation

source

type EvaluationPeriod: Get<u32>

Evaluation period number of blocks. As the evaluation is done using 3 pools, the evaluation will take 3 * EvaluationPeriod.

source

type MaxRefereeDistance: Get<u32>

Maximum distance used to define referee’s accessibility Unused by runtime but needed by client distance oracle

source

type MinAccessibleReferees: Get<Perbill>

Minimum ratio of accessible referees

source

type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>

The overarching event type.

source

type WeightInfo: WeightInfo

Type representing the weight of this pallet

source

type OnValidDistanceStatus: OnValidDistanceStatus<Self>

Handler for successful distance evaluation

source

type CheckRequestDistanceEvaluation: CheckRequestDistanceEvaluation<Self>

Trait to check that distance evaluation request is allowed

Object Safety§

This trait is not object safe.

Implementors§