pub trait Config: Config + Config {
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
type RuntimeCall: Parameter + Dispatchable<RuntimeOrigin = Self::RuntimeOrigin> + GetDispatchInfo + From<Call<Self>> + IsSubType<Call<Self>> + IsType<<Self as Config>::RuntimeCall>;
type Currency: ReservableCurrency<Self::AccountId>;
type PotId: Member + Parameter + MaxEncodedLen + Copy + From<u32>;
type SponsorshipType: Parameter + Member + Ord + PartialOrd + InstanceFilter<<Self as Config>::RuntimeCall> + MaxEncodedLen + Default;
type UserDeposit: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>;
type PotDeposit: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>;
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. Configure the pallet by specifying the parameters and types on which it depends.
Required Associated Types§
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 RuntimeCall: Parameter + Dispatchable<RuntimeOrigin = Self::RuntimeOrigin> + GetDispatchInfo + From<Call<Self>> + IsSubType<Call<Self>> + IsType<<Self as Config>::RuntimeCall>
type RuntimeCall: Parameter + Dispatchable<RuntimeOrigin = Self::RuntimeOrigin> + GetDispatchInfo + From<Call<Self>> + IsSubType<Call<Self>> + IsType<<Self as Config>::RuntimeCall>
The overarching call type.
Sourcetype Currency: ReservableCurrency<Self::AccountId>
type Currency: ReservableCurrency<Self::AccountId>
The currency mechanism, used for paying for reserves.
Sourcetype SponsorshipType: Parameter + Member + Ord + PartialOrd + InstanceFilter<<Self as Config>::RuntimeCall> + MaxEncodedLen + Default
type SponsorshipType: Parameter + Member + Ord + PartialOrd + InstanceFilter<<Self as Config>::RuntimeCall> + MaxEncodedLen + Default
The type for the categories of the calls that could be sponsored. The instance filter determines whether a given call may be sponsored under this type.
IMPORTANT 1: Default
must be provided and MUST BE the the most permissive value.
IMPORTANT 2: Never sponsor proxy calls or utility calls which allow other calls internally.
This would allow a user to bypass the instance filter or alter the origin of the calls.
Sourcetype UserDeposit: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
type UserDeposit: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
The deposit that must be reserved form the sponsor per their sponsored user.
Sourcetype PotDeposit: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
type PotDeposit: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
The deposit that must be locked in order to create a pot.
Sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Type representing the weight of this pallet
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.