pub trait Config: Config<RuntimeCall: Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo, RuntimeOrigin = <Self as Config>::RuntimeOrigin>, RuntimeOrigin: AsTransactionAuthorizedOrigin + From<RawOrigin<Self::AccountId>>> {
type WeightInfo: WeightInfo;
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
type Extension: TransactionExtension<<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§
Sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for calls in this pallet.
Sourcetype RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
The overarching event type.
Sourcetype Extension: TransactionExtension<<Self as Config>::RuntimeCall>
type Extension: TransactionExtension<<Self as Config>::RuntimeCall>
Transaction extension/s for meta transactions.
The extensions that must be present in every meta transaction. This generally includes
extensions like pallet_verify_signature::VerifySignature
,
[frame_system::CheckSpecVersion], [frame_system::CheckTxVersion],
[frame_system::CheckGenesis], [frame_system::CheckMortality],
[frame_system::CheckNonce], etc. Check the mock
setup for the example.
The types implementing the [TransactionExtension
] trait can be composed into a tuple
type that will implement the same trait by piping invocations through each type.
In the runtime-benchmarks
environment the type must implement Default
trait.
The extension must provide an origin and the extension’s weight must be zero. Use
pallet_meta_tx::WeightlessExtension
type when the runtime-benchmarks
feature
enabled.
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.