Trait orml_oracle::module::Config

source ·
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§

source

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

source

type OnNewData: OnNewData<Self::AccountId, Self::OracleKey, Self::OracleValue>

Hook on new data received

source

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

source

type Time: Time

Time provider

source

type OracleKey: Parameter + Member + MaxEncodedLen

The data key type

source

type OracleValue: Parameter + Member + Ord + MaxEncodedLen

The data value type

source

type RootOperatorAccountId: Get<Self::AccountId>

The root operator account id, record all sudo feeds on this account.

source

type Members: SortedMembers<Self::AccountId>

Oracle operators.

source

type WeightInfo: WeightInfo

Weight information for extrinsics in this module.

source

type MaxHasDispatchedSize: Get<u32>

Maximum size of HasDispatched

source

type MaxFeedValues: Get<u32>

Maximum size the vector used for feed values

Object Safety§

This trait is not object safe.

Implementors§