Trait pallet_lottery::pallet::Config [−][src]
pub trait Config: Config { type PalletId: Get<PalletId>; type Call: Parameter + Dispatchable<Origin = Self::Origin> + GetDispatchInfo + From<Call<Self>>; type Currency: ReservableCurrency<Self::AccountId>; type Randomness: Randomness<Self::Hash, Self::BlockNumber>; type Event: From<Event<Self>> + IsType<<Self as Config>::Event>; type ManagerOrigin: EnsureOrigin<Self::Origin>; type MaxCalls: Get<u32>; type ValidateCall: ValidateCall<Self>; type MaxGenerateRandom: Get<u32>; type WeightInfo: WeightInfo; }
Expand description
The pallet’s config trait.
Associated Types
type Call: Parameter + Dispatchable<Origin = Self::Origin> + GetDispatchInfo + From<Call<Self>>
type Call: Parameter + Dispatchable<Origin = Self::Origin> + GetDispatchInfo + From<Call<Self>>
A dispatchable call.
type Currency: ReservableCurrency<Self::AccountId>
type Currency: ReservableCurrency<Self::AccountId>
The currency trait.
type Randomness: Randomness<Self::Hash, Self::BlockNumber>
type Randomness: Randomness<Self::Hash, Self::BlockNumber>
Something that provides randomness in the runtime.
type ManagerOrigin: EnsureOrigin<Self::Origin>
type ManagerOrigin: EnsureOrigin<Self::Origin>
The manager origin.
type ValidateCall: ValidateCall<Self>
type ValidateCall: ValidateCall<Self>
Used to determine if a call would be valid for purchasing a ticket.
Be conscious of the implementation used here. We assume at worst that
a vector of MaxCalls
indices are queried for any call validation.
You may need to provide a custom benchmark if this assumption is broken.
type MaxGenerateRandom: Get<u32>
type MaxGenerateRandom: Get<u32>
Number of time we should try to generate a random number that has no modulo bias. The larger this number, the more potential computation is used for picking the winner, but also the more likely that the chosen winner is done fairly.
type WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for extrinsics in this pallet.