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

The Lottery’s pallet id

A dispatchable call.

The currency trait.

Something that provides randomness in the runtime.

The overarching event type.

The manager origin.

The max number of calls available in a single lottery.

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.

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.

Weight information for extrinsics in this pallet.

Implementors