Trait pallet_example_offchain_worker::pallet::Config
source · pub trait Config: CreateSignedTransaction<Call<Self>> + Config {
type AuthorityId: AppCrypto<Self::Public, Self::Signature>;
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
type GracePeriod: Get<Self::BlockNumber>;
type UnsignedInterval: Get<Self::BlockNumber>;
type UnsignedPriority: Get<TransactionPriority>;
type MaxPrices: Get<u32>;
}
Expand description
This pallet’s configuration trait
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 RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
The overarching event type.
sourcetype GracePeriod: Get<Self::BlockNumber>
type GracePeriod: Get<Self::BlockNumber>
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 UnsignedInterval: Get<Self::BlockNumber>
type UnsignedInterval: Get<Self::BlockNumber>
Number of blocks of cooldown after unsigned transaction is included.
This ensures that we only accept unsigned transactions once, every UnsignedInterval
blocks.
sourcetype UnsignedPriority: Get<TransactionPriority>
type UnsignedPriority: Get<TransactionPriority>
A configuration for base priority of unsigned transactions.
This is exposed so that it can be tuned for particular runtime, when multiple pallets send unsigned transactions.