referrerpolicy=no-referrer-when-downgrade

Trait pallet_tips::pallet::Config

source ·
pub trait Config<I: 'static = ()>: Config + Config<I> {
    type RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>;
    type MaximumReasonLength: Get<u32>;
    type DataDepositPerByte: Get<BalanceOf<Self, I>>;
    type TipCountdown: Get<BlockNumberFor<Self>>;
    type TipFindersFee: Get<Percent>;
    type TipReportDepositBase: Get<BalanceOf<Self, I>>;
    type MaxTipAmount: Get<BalanceOf<Self, I>>;
    type Tippers: SortedMembers<Self::AccountId> + ContainsLengthBound;
    type OnSlash: OnUnbalanced<NegativeImbalanceOf<Self, I>>;
    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.

Required Associated Types§

source

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

The overarching event type.

source

type MaximumReasonLength: Get<u32>

Maximum acceptable reason length.

Benchmarks depend on this value, be sure to update weights file when changing this value

source

type DataDepositPerByte: Get<BalanceOf<Self, I>>

The amount held on deposit per byte within the tip report reason or bounty description.

source

type TipCountdown: Get<BlockNumberFor<Self>>

The period for which a tip remains open after is has achieved threshold tippers.

source

type TipFindersFee: Get<Percent>

The percent of the final tip which goes to the original reporter of the tip.

source

type TipReportDepositBase: Get<BalanceOf<Self, I>>

The non-zero amount held on deposit for placing a tip report.

source

type MaxTipAmount: Get<BalanceOf<Self, I>>

The maximum amount for a single tip.

source

type Tippers: SortedMembers<Self::AccountId> + ContainsLengthBound

Origin from which tippers must come.

ContainsLengthBound::max_len must be cost free (i.e. no storage read or heavy operation). Benchmarks depend on the value of ContainsLengthBound::max_len be sure to update weights file when altering this method.

source

type OnSlash: OnUnbalanced<NegativeImbalanceOf<Self, I>>

Handler for the unbalanced decrease when slashing for a removed tip.

source

type WeightInfo: WeightInfo

Weight information for extrinsics in this pallet.

Object Safety§

This trait is not object safe.

Implementors§