Trait pallet_ad::pallet::Config

source ·
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§

source

type AdIndex: Parameter + MaybeSerializeDeserialize + Bounded + AtLeast32BitUnsigned + Copy + MaxEncodedLen + Default

source

type ApproveOrigin: EnsureOrigin<Self::RuntimeOrigin>

Origin from which approvals must come.

source

type RejectOrigin: EnsureOrigin<Self::RuntimeOrigin>

Origin from which rejections must come.

source

type OnSlash: OnUnbalanced<NegativeImbalanceOf<Self>>

Handler for the unbalanced decrease when slashing for a rejected proposal.

source

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.

source

type Currency: Currency<Self::AccountId> + ReservableCurrency<Self::AccountId>

Currency for balance reserving and unreserving operations

source

type Randomness: Randomness<Self::Hash, Self::BlockNumber>

source

type MaxAdDataLength: Get<u32>

Maximum acceptable Ad metadata length

source

type MaxAdTags: Get<u32>

Maximum num of tags per Ad

source

type AdDepositBase: Get<BalanceOf<Self>>

The base deposit amount of an ad proposal

source

type AdDepositPerByte: Get<BalanceOf<Self>>

The deposit amount per byte of an ad’s metadata

Implementors§