Trait pallet_oracle_collection::pallet::Config
source · pub trait Config: Config {
Show 15 associated items
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
type RuntimeChange: From<Change<Self>> + TryInto<Change<Self>>;
type FeederId: Parameter + Member + Ord + MaxEncodedLen;
type CollectionId: Parameter + Member + Copy + MaxEncodedLen;
type OracleKey: Parameter + Member + Copy + MaxEncodedLen + Ord;
type OracleValue: Parameter + Member + Copy + MaxEncodedLen + Ord;
type Timestamp: Parameter + Member + Copy + MaxEncodedLen + Ord + EnsureSub;
type Time: Time<Moment = Self::Timestamp>;
type OracleProvider: ValueProvider<(Self::FeederId, Self::CollectionId), Self::OracleKey, Value = OracleValuePair<Self>>;
type AggregationProvider: AggregationProvider<Self::OracleValue, Self::Timestamp>;
type IsAdmin: PreConditions<(Self::AccountId, Self::CollectionId), Result = bool>;
type ChangeGuard: ChangeGuard<PoolId = Self::CollectionId, ChangeId = Self::Hash, Change = Self::RuntimeChange>;
type MaxCollectionSize: Get<u32>;
type MaxFeedersPerKey: Get<u32> + Parameter;
type WeightInfo: WeightInfo;
}
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>> + IsType<<Self as Config>::RuntimeEvent>
sourcetype CollectionId: Parameter + Member + Copy + MaxEncodedLen
type CollectionId: Parameter + Member + Copy + MaxEncodedLen
Identify an oracle value
sourcetype OracleValue: Parameter + Member + Copy + MaxEncodedLen + Ord
type OracleValue: Parameter + Member + Copy + MaxEncodedLen + Ord
Represent an oracle value
sourcetype Timestamp: Parameter + Member + Copy + MaxEncodedLen + Ord + EnsureSub
type Timestamp: Parameter + Member + Copy + MaxEncodedLen + Ord + EnsureSub
Represent the time moment when the value was fed
sourcetype OracleProvider: ValueProvider<(Self::FeederId, Self::CollectionId), Self::OracleKey, Value = OracleValuePair<Self>>
type OracleProvider: ValueProvider<(Self::FeederId, Self::CollectionId), Self::OracleKey, Value = OracleValuePair<Self>>
A way to obtain oracle values from feeders
sourcetype AggregationProvider: AggregationProvider<Self::OracleValue, Self::Timestamp>
type AggregationProvider: AggregationProvider<Self::OracleValue, Self::Timestamp>
A way to perform aggregations from a list of feeders feeding the same keys
sourcetype IsAdmin: PreConditions<(Self::AccountId, Self::CollectionId), Result = bool>
type IsAdmin: PreConditions<(Self::AccountId, Self::CollectionId), Result = bool>
Used to verify collection admin permissions
sourcetype ChangeGuard: ChangeGuard<PoolId = Self::CollectionId, ChangeId = Self::Hash, Change = Self::RuntimeChange>
type ChangeGuard: ChangeGuard<PoolId = Self::CollectionId, ChangeId = Self::Hash, Change = Self::RuntimeChange>
Used to notify the runtime about changes that require special treatment.
sourcetype MaxCollectionSize: Get<u32>
type MaxCollectionSize: Get<u32>
Max size of a data collection
sourcetype MaxFeedersPerKey: Get<u32> + Parameter
type MaxFeedersPerKey: Get<u32> + Parameter
Max number of collections
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
The weight information for this pallet extrinsics.