pub trait Config:
CreateSignedTransaction<Call<Self>>
+ CreateAuthorizedTransaction<Call<Self>>
+ Config
+ Config<RuntimeEvent: From<Event<Self>>> {
type AuthorityId: AppCrypto<Self::Public, Self::Signature>;
type GracePeriod: Get<BlockNumberFor<Self>>;
type AuthorizedTxInterval: Get<BlockNumberFor<Self>>;
type AuthorizedTxPriority: Get<TransactionPriority>;
type MaxPrices: Get<u32>;
}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. This pallet’s configuration trait
§Requirements
This pallet requires frame_system::AuthorizeCall to be included in the runtime’s
transaction extension pipeline.
The integrity test will verify this at runtime.
Required Associated Types§
Sourcetype AuthorityId: AppCrypto<Self::Public, Self::Signature>
type AuthorityId: AppCrypto<Self::Public, Self::Signature>
The identifier type for an offchain worker.
Sourcetype GracePeriod: Get<BlockNumberFor<Self>>
type GracePeriod: Get<BlockNumberFor<Self>>
A grace period after we send transaction.
To avoid sending too many transactions, we only attempt to send one
every GRACE_PERIOD blocks. We use Local Storage to coordinate
sending between distinct runs of this offchain worker.
Sourcetype AuthorizedTxInterval: Get<BlockNumberFor<Self>>
type AuthorizedTxInterval: Get<BlockNumberFor<Self>>
Number of blocks of cooldown after an authorized transaction is included.
This ensures that we only accept authorized transactions once, every
AuthorizedTxInterval blocks.
Sourcetype AuthorizedTxPriority: Get<TransactionPriority>
type AuthorizedTxPriority: Get<TransactionPriority>
A configuration for base priority of authorized transactions.
This is exposed so that it can be tuned for particular runtime, when multiple pallets send authorized transactions.
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.