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§
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>
sourcetype Currency: MutateHold<<Self as Config>::AccountId, Reason = Self::RuntimeHoldReason>
type Currency: MutateHold<<Self as Config>::AccountId, Reason = Self::RuntimeHoldReason>
The currency that is used to reserve funds for each delegation.
sourcetype Deposit: Get<<<Self as Config>::Currency as Inspect<<Self as Config>::AccountId>>::Balance>
type Deposit: Get<<<Self as Config>::Currency as Inspect<<Self as Config>::AccountId>>::Balance>
The deposit that is required for storing a delegation.
type MaxSignatureByteLength: Get<u16>
sourcetype MaxRevocations: Get<u32>
type MaxRevocations: Get<u32>
Maximum number of revocations.
sourcetype MaxRemovals: Get<u32>
type MaxRemovals: Get<u32>
Maximum number of removals. Should be same as MaxRevocations
sourcetype MaxParentChecks: Get<u32>
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.
sourcetype MaxChildren: Get<u32> + Clone + TypeInfo
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
.
sourcetype BalanceMigrationManager: BalanceMigrationManager<<Self as Config>::AccountId, <<Self as Config>::Currency as Inspect<<Self as Config>::AccountId>>::Balance>
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