Trait delegation::pallet::Config

source ·
pub trait Config: Config + Config {
Show 17 associated items type Signature: Parameter; type DelegationSignatureVerification: VerifySignature<SignerId = Self::DelegationEntityId, Payload = Vec<u8>, Signature = Self::Signature>; type DelegationEntityId: Parameter + TypeInfo + MaxEncodedLen; type DelegationNodeId: Parameter + Copy + AsRef<[u8]> + Eq + PartialEq + Ord + PartialOrd + MaxEncodedLen; type EnsureOrigin: EnsureOrigin<<Self as Config>::RuntimeOrigin, Success = <Self as Config>::OriginSuccess>; type OriginSuccess: CallSources<<Self as Config>::AccountId, DelegatorIdOf<Self>>; type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>; type WeightInfo: WeightInfo; type RuntimeHoldReason: From<HoldReason>; type Currency: MutateHold<<Self as Config>::AccountId, Reason = Self::RuntimeHoldReason>; type Deposit: Get<<<Self as Config>::Currency as Inspect<<Self as Config>::AccountId>>::Balance>; type MaxSignatureByteLength: Get<u16>; type MaxRevocations: Get<u32>; type MaxRemovals: Get<u32>; type MaxParentChecks: Get<u32>; type MaxChildren: Get<u32> + Clone + TypeInfo; type BalanceMigrationManager: BalanceMigrationManager<<Self as Config>::AccountId, <<Self as Config>::Currency as Inspect<<Self as Config>::AccountId>>::Balance>;
}
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 Signature: Parameter

source

type DelegationSignatureVerification: VerifySignature<SignerId = Self::DelegationEntityId, Payload = Vec<u8>, Signature = Self::Signature>

source

type DelegationEntityId: Parameter + TypeInfo + MaxEncodedLen

source

type DelegationNodeId: Parameter + Copy + AsRef<[u8]> + Eq + PartialEq + Ord + PartialOrd + MaxEncodedLen

source

type EnsureOrigin: EnsureOrigin<<Self as Config>::RuntimeOrigin, Success = <Self as Config>::OriginSuccess>

source

type OriginSuccess: CallSources<<Self as Config>::AccountId, DelegatorIdOf<Self>>

source

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

source

type WeightInfo: WeightInfo

source

type RuntimeHoldReason: From<HoldReason>

source

type Currency: MutateHold<<Self as Config>::AccountId, Reason = Self::RuntimeHoldReason>

The currency that is used to reserve funds for each delegation.

source

type Deposit: Get<<<Self as Config>::Currency as Inspect<<Self as Config>::AccountId>>::Balance>

The deposit that is required for storing a delegation.

source

type MaxSignatureByteLength: Get<u16>

source

type MaxRevocations: Get<u32>

Maximum number of revocations.

source

type MaxRemovals: Get<u32>

Maximum number of removals. Should be same as MaxRevocations

source

type MaxParentChecks: Get<u32>

Maximum number of upwards traversals of the delegation tree from a node to the root and thus the depth of the delegation tree.

source

type MaxChildren: Get<u32> + Clone + TypeInfo

Maximum number of all children for a delegation node. For a binary tree, this should be twice the maximum depth of the tree, i.e. 2 ^ MaxParentChecks.

source

type BalanceMigrationManager: BalanceMigrationManager<<Self as Config>::AccountId, <<Self as Config>::Currency as Inspect<<Self as Config>::AccountId>>::Balance>

Migration manager to handle new created entries

Implementors§