pub trait Config: Config {
    type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
    type MaxWellKnownNodes: Get<u32>;
    type MaxPeerIdLength: Get<u32>;
    type AddOrigin: EnsureOrigin<Self::RuntimeOrigin>;
    type RemoveOrigin: EnsureOrigin<Self::RuntimeOrigin>;
    type SwapOrigin: EnsureOrigin<Self::RuntimeOrigin>;
    type ResetOrigin: EnsureOrigin<Self::RuntimeOrigin>;
    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. The module configuration trait

Required Associated Types§

source

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

The overarching event type.

source

type MaxWellKnownNodes: Get<u32>

The maximum number of well known nodes that are allowed to set

source

type MaxPeerIdLength: Get<u32>

The maximum length in bytes of PeerId

source

type AddOrigin: EnsureOrigin<Self::RuntimeOrigin>

The origin which can add a well known node.

source

type RemoveOrigin: EnsureOrigin<Self::RuntimeOrigin>

The origin which can remove a well known node.

source

type SwapOrigin: EnsureOrigin<Self::RuntimeOrigin>

The origin which can swap the well known nodes.

source

type ResetOrigin: EnsureOrigin<Self::RuntimeOrigin>

The origin which can reset the well known nodes.

source

type WeightInfo: WeightInfo

Weight information for extrinsics in this pallet.

Implementors§