pub trait Config<I: 'static = ()>: Config {
type RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>;
type OnNewData: OnNewData<Self::AccountId, Self::OracleKey, Self::OracleValue>;
type CombineData: CombineData<Self::OracleKey, TimestampedValue<<Self as Config<I>>::OracleValue, <<Self as Config<I>>::Time as Time>::Moment>>;
type Time: Time;
type OracleKey: Parameter + Member + MaxEncodedLen;
type OracleValue: Parameter + Member + Ord + MaxEncodedLen;
type RootOperatorAccountId: Get<Self::AccountId>;
type Members: SortedMembers<Self::AccountId>;
type WeightInfo: WeightInfo;
type MaxHasDispatchedSize: Get<u32>;
type MaxFeedValues: 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.
Required Associated Types§
type RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>
Sourcetype OnNewData: OnNewData<Self::AccountId, Self::OracleKey, Self::OracleValue>
type OnNewData: OnNewData<Self::AccountId, Self::OracleKey, Self::OracleValue>
Hook on new data received
Sourcetype CombineData: CombineData<Self::OracleKey, TimestampedValue<<Self as Config<I>>::OracleValue, <<Self as Config<I>>::Time as Time>::Moment>>
type CombineData: CombineData<Self::OracleKey, TimestampedValue<<Self as Config<I>>::OracleValue, <<Self as Config<I>>::Time as Time>::Moment>>
Provide the implementation to combine raw values to produce aggregated value
Sourcetype OracleKey: Parameter + Member + MaxEncodedLen
type OracleKey: Parameter + Member + MaxEncodedLen
The data key type
Sourcetype OracleValue: Parameter + Member + Ord + MaxEncodedLen
type OracleValue: Parameter + Member + Ord + MaxEncodedLen
The data value type
Sourcetype RootOperatorAccountId: Get<Self::AccountId>
type RootOperatorAccountId: Get<Self::AccountId>
The root operator account id, record all sudo feeds on this account.
Sourcetype Members: SortedMembers<Self::AccountId>
type Members: SortedMembers<Self::AccountId>
Oracle operators.
Sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for extrinsics in this module.
Sourcetype MaxHasDispatchedSize: Get<u32>
type MaxHasDispatchedSize: Get<u32>
Maximum size of HasDispatched
Sourcetype MaxFeedValues: Get<u32>
type MaxFeedValues: Get<u32>
Maximum size the vector used for feed values
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.