pallet_time_release::module

Trait Config

Source
pub trait Config: Config {
Show 14 associated items type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>; type RuntimeFreezeReason: From<FreezeReason>; type RuntimeHoldReason: From<HoldReason>; type RuntimeOrigin: From<Origin<Self>> + From<<Self as Config>::RuntimeOrigin>; type Balance: Balance + MaybeSerializeDeserialize; type Currency: MutateFreeze<Self::AccountId, Id = Self::RuntimeFreezeReason> + InspectFungible<Self::AccountId, Balance = Self::Balance> + Mutate<Self::AccountId> + MutateHold<Self::AccountId, Reason = Self::RuntimeHoldReason> + InspectHold<Self::AccountId>; type MinReleaseTransfer: Get<<<Self as Config>::Currency as InspectFungible<<Self as Config>::AccountId>>::Balance>; type TransferOrigin: EnsureOrigin<<Self as Config>::RuntimeOrigin, Success = Self::AccountId>; type TimeReleaseOrigin: EnsureOrigin<<Self as Config>::RuntimeOrigin, Success = Self::AccountId>; type WeightInfo: WeightInfo; type MaxReleaseSchedules: Get<u32>; type BlockNumberProvider: BlockNumberProvider<BlockNumber = BlockNumberFor<Self>>; type RuntimeCall: Parameter + Dispatchable<RuntimeOrigin = <Self as Config>::RuntimeOrigin, PostInfo = PostDispatchInfo> + From<Call<Self>> + IsType<<Self as Config>::RuntimeCall>; type SchedulerProvider: SchedulerProviderTrait<<Self as Config>::RuntimeOrigin, BlockNumberFor<Self>, <Self as Config>::RuntimeCall>;
}
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.

Required Associated Types§

Source

type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>

The overarching event type.

Source

type RuntimeFreezeReason: From<FreezeReason>

The overarching freeze reason.

Source

type RuntimeHoldReason: From<HoldReason>

Overarching hold reason.

Source

type RuntimeOrigin: From<Origin<Self>> + From<<Self as Config>::RuntimeOrigin>

runtime origin

Source

type Balance: Balance + MaybeSerializeDeserialize

We need MaybeSerializeDeserialize because of the genesis config.

Source

type Currency: MutateFreeze<Self::AccountId, Id = Self::RuntimeFreezeReason> + InspectFungible<Self::AccountId, Balance = Self::Balance> + Mutate<Self::AccountId> + MutateHold<Self::AccountId, Reason = Self::RuntimeHoldReason> + InspectHold<Self::AccountId>

The currency trait used to set a freeze on a balance.

Source

type MinReleaseTransfer: Get<<<Self as Config>::Currency as InspectFungible<<Self as Config>::AccountId>>::Balance>

The minimum amount transferred to call transfer.

Source

type TransferOrigin: EnsureOrigin<<Self as Config>::RuntimeOrigin, Success = Self::AccountId>

Required origin for time-release transfer.

Source

type TimeReleaseOrigin: EnsureOrigin<<Self as Config>::RuntimeOrigin, Success = Self::AccountId>

Timerelase origin

Source

type WeightInfo: WeightInfo

Weight information for extrinsics in this module.

Source

type MaxReleaseSchedules: Get<u32>

The maximum release schedules.

Source

type BlockNumberProvider: BlockNumberProvider<BlockNumber = BlockNumberFor<Self>>

The block-number provider.

Source

type RuntimeCall: Parameter + Dispatchable<RuntimeOrigin = <Self as Config>::RuntimeOrigin, PostInfo = PostDispatchInfo> + From<Call<Self>> + IsType<<Self as Config>::RuntimeCall>

The aggregate call type

Source

type SchedulerProvider: SchedulerProviderTrait<<Self as Config>::RuntimeOrigin, BlockNumberFor<Self>, <Self as Config>::RuntimeCall>

The scheduler provider

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.

Implementors§