pub trait Config: Config {
type AdIndex: Parameter + MaybeSerializeDeserialize + Bounded + AtLeast32BitUnsigned + Copy + MaxEncodedLen + Default;
type ApproveOrigin: EnsureOrigin<Self::RuntimeOrigin>;
type RejectOrigin: EnsureOrigin<Self::RuntimeOrigin>;
type OnSlash: OnUnbalanced<NegativeImbalanceOf<Self>>;
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
type Currency: Currency<Self::AccountId> + ReservableCurrency<Self::AccountId>;
type Randomness: Randomness<Self::Hash, Self::BlockNumber>;
type MaxAdDataLength: Get<u32>;
type MaxAdTags: Get<u32>;
type AdDepositBase: Get<BalanceOf<Self>>;
type AdDepositPerByte: Get<BalanceOf<Self>>;
}
Expand description
Configuration trait of this pallet.
Implement this type for a runtime in order to customize this pallet.
Required Associated Types§
type AdIndex: Parameter + MaybeSerializeDeserialize + Bounded + AtLeast32BitUnsigned + Copy + MaxEncodedLen + Default
sourcetype ApproveOrigin: EnsureOrigin<Self::RuntimeOrigin>
type ApproveOrigin: EnsureOrigin<Self::RuntimeOrigin>
Origin from which approvals must come.
sourcetype RejectOrigin: EnsureOrigin<Self::RuntimeOrigin>
type RejectOrigin: EnsureOrigin<Self::RuntimeOrigin>
Origin from which rejections must come.
sourcetype OnSlash: OnUnbalanced<NegativeImbalanceOf<Self>>
type OnSlash: OnUnbalanced<NegativeImbalanceOf<Self>>
Handler for the unbalanced decrease when slashing for a rejected proposal.
sourcetype RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
Because this pallet emits events, it depends on the runtime’s definition of an event.
sourcetype Currency: Currency<Self::AccountId> + ReservableCurrency<Self::AccountId>
type Currency: Currency<Self::AccountId> + ReservableCurrency<Self::AccountId>
Currency for balance reserving and unreserving operations
type Randomness: Randomness<Self::Hash, Self::BlockNumber>
sourcetype MaxAdDataLength: Get<u32>
type MaxAdDataLength: Get<u32>
Maximum acceptable Ad metadata length
sourcetype AdDepositBase: Get<BalanceOf<Self>>
type AdDepositBase: Get<BalanceOf<Self>>
The base deposit amount of an ad proposal
sourcetype AdDepositPerByte: Get<BalanceOf<Self>>
type AdDepositPerByte: Get<BalanceOf<Self>>
The deposit amount per byte of an ad’s metadata