Type Alias astar_runtime::Oracle

source ·
pub type Oracle = Pallet<Runtime>;

Aliased Type§

struct Oracle(/* private fields */);

Implementations

§

impl<T, I> Pallet<T, I>
where T: Config<I>, I: 'static,

pub fn feed_values( origin: <T as Config>::RuntimeOrigin, values: BoundedVec<(<T as Config<I>>::OracleKey, <T as Config<I>>::OracleValue), <T as Config<I>>::MaxFeedValues>, ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>

Feed the external value.

Require authorized operator.

§

impl<T, I> Pallet<T, I>
where T: Config<I>, I: 'static,

pub fn raw_values<KArg1, KArg2>( k1: KArg1, k2: KArg2, ) -> Option<TimestampedValue<<T as Config<I>>::OracleValue, <<T as Config<I>>::Time as Time>::Moment>>
where KArg1: EncodeLike<<T as Config>::AccountId>, KArg2: EncodeLike<<T as Config<I>>::OracleKey>,

An auto-generated getter for [RawValues].

§

impl<T, I> Pallet<T, I>
where T: Config<I>, I: 'static,

pub fn values<KArg>( k: KArg, ) -> Option<TimestampedValue<<T as Config<I>>::OracleValue, <<T as Config<I>>::Time as Time>::Moment>>
where KArg: EncodeLike<<T as Config<I>>::OracleKey>,

An auto-generated getter for [Values].

§

impl<T, I> Pallet<T, I>
where T: Config<I>, I: 'static,

pub fn read_raw_values( key: &<T as Config<I>>::OracleKey, ) -> Vec<TimestampedValue<<T as Config<I>>::OracleValue, <<T as Config<I>>::Time as Time>::Moment>>

pub fn get( key: &<T as Config<I>>::OracleKey, ) -> Option<TimestampedValue<<T as Config<I>>::OracleValue, <<T as Config<I>>::Time as Time>::Moment>>

Fetch current combined value.

pub fn get_all_values() -> Vec<(<T as Config<I>>::OracleKey, Option<TimestampedValue<<T as Config<I>>::OracleValue, <<T as Config<I>>::Time as Time>::Moment>>)>

Trait Implementations

§

impl<T, I> BeforeAllRuntimeMigrations for Pallet<T, I>
where T: Config<I>, I: 'static,

§

fn before_all_runtime_migrations() -> Weight

Something that should happen before runtime migrations are executed.
§

impl<T, I> Callable<T> for Pallet<T, I>
where T: Config<I>, I: 'static,

§

type RuntimeCall = Call<T, I>

§

impl<T, I> ChangeMembers<<T as Config>::AccountId> for Pallet<T, I>
where T: Config<I>, I: 'static,

§

fn change_members_sorted( _incoming: &[<T as Config>::AccountId], outgoing: &[<T as Config>::AccountId], _new: &[<T as Config>::AccountId], )

A number of members _incoming just joined the set and replaced some _outgoing ones. The new set is thus given by sorted_new and must be sorted. Read more
§

fn set_prime(_prime: Option<<T as Config>::AccountId>)

Set the prime member.
§

fn change_members( incoming: &[AccountId], outgoing: &[AccountId], new: Vec<AccountId>, )

A number of members incoming just joined the set and replaced some outgoing ones. The new set is given by new, and need not be sorted. Read more
§

fn set_members_sorted(new_members: &[AccountId], old_members: &[AccountId])

Set the new members; they must already be sorted. This will compute the diff and use it to call change_members_sorted. Read more
§

fn compute_members_diff_sorted( new_members: &[AccountId], old_members: &[AccountId], ) -> (Vec<AccountId>, Vec<AccountId>)

Compute diff between new and old members; they must already be sorted. Read more
§

fn get_prime() -> Option<AccountId>

Get the current prime.
§

impl<T, I> Clone for Pallet<T, I>

§

fn clone(&self) -> Pallet<T, I>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<T, I> DataFeeder<<T as Config<I>>::OracleKey, <T as Config<I>>::OracleValue, <T as Config>::AccountId> for Pallet<T, I>
where T: Config<I>, I: 'static,

§

fn feed_value( who: Option<<T as Config>::AccountId>, key: <T as Config<I>>::OracleKey, value: <T as Config<I>>::OracleValue, ) -> Result<(), DispatchError>

Provide a new value for a given key from an operator
§

impl<T, I> DataProvider<<T as Config<I>>::OracleKey, <T as Config<I>>::OracleValue> for Pallet<T, I>
where T: Config<I>, I: 'static,

§

fn get( key: &<T as Config<I>>::OracleKey, ) -> Option<<T as Config<I>>::OracleValue>

Get data by key
§

impl<T, I> DataProviderExtended<<T as Config<I>>::OracleKey, TimestampedValue<<T as Config<I>>::OracleValue, <<T as Config<I>>::Time as Time>::Moment>> for Pallet<T, I>
where T: Config<I>, I: 'static,

§

fn get_no_op( key: &<T as Config<I>>::OracleKey, ) -> Option<TimestampedValue<<T as Config<I>>::OracleValue, <<T as Config<I>>::Time as Time>::Moment>>

Get timestamped value by key
§

fn get_all_values() -> Vec<(<T as Config<I>>::OracleKey, Option<TimestampedValue<<T as Config<I>>::OracleValue, <<T as Config<I>>::Time as Time>::Moment>>)>

Provide a list of tuples of key and timestamped value
§

impl<T, I> Debug for Pallet<T, I>

§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<T, I> GetStorageVersion for Pallet<T, I>
where T: Config<I>, I: 'static,

§

type InCodeStorageVersion = NoStorageVersionSet

This type is generated by the pallet macro. Read more
§

fn in_code_storage_version() -> <Pallet<T, I> as GetStorageVersion>::InCodeStorageVersion

Returns the in-code storage version as specified in the storage_version attribute, or [NoStorageVersionSet] if the attribute is missing.
§

fn on_chain_storage_version() -> StorageVersion

Returns the storage version of the pallet as last set in the actual on-chain storage.
§

fn current_storage_version() -> Self::InCodeStorageVersion

👎Deprecated: This method has been renamed to in_code_storage_version and will be removed after March 2024.
DEPRECATED: Use [Self::current_storage_version] instead. Read more
§

impl<T, I> Hooks<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>
where T: Config<I>, I: 'static,

§

fn on_initialize( _n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, ) -> Weight

on_initialize to return the weight used in on_finalize.

§

fn on_finalize( _n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, )

Block finalization hook. This is called at the very end of block execution. Read more
§

fn on_idle(_n: BlockNumber, _remaining_weight: Weight) -> Weight

Hook to consume a block’s idle time. This will run when the block is being finalized (before [Hooks::on_finalize]). Read more
§

fn on_poll(_n: BlockNumber, _weight: &mut WeightMeter)

A hook to run logic after inherent application. Read more
§

fn on_runtime_upgrade() -> Weight

Hook executed when a code change (aka. a “runtime upgrade”) is detected by the FRAME Executive pallet. Read more
§

fn offchain_worker(_n: BlockNumber)

Implementing this function on a pallet allows you to perform long-running tasks that are dispatched as separate threads, and entirely independent of the main blockchain execution. Read more
§

fn integrity_test()

Check the integrity of this pallet’s configuration. Read more
§

impl<T, I> IntegrityTest for Pallet<T, I>
where T: Config<I>, I: 'static,

§

fn integrity_test()

See [Hooks::integrity_test].
§

impl<T, I> OffchainWorker<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>
where T: Config<I>, I: 'static,

§

fn offchain_worker( n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, )

This function is being called after every block import (when fully synced). Read more
§

impl<T, I> OnFinalize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>
where T: Config<I>, I: 'static,

§

fn on_finalize( n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, )

See [Hooks::on_finalize].
§

impl<T, I> OnGenesis for Pallet<T, I>
where T: Config<I>, I: 'static,

§

fn on_genesis()

Something that should happen at genesis.
§

impl<T, I> OnIdle<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>
where T: Config<I>, I: 'static,

§

fn on_idle( n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, remaining_weight: Weight, ) -> Weight

See [Hooks::on_idle].
§

impl<T, I> OnInitialize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>
where T: Config<I>, I: 'static,

§

fn on_initialize( n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, ) -> Weight

See [Hooks::on_initialize].
§

impl<T, I> OnPoll<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>
where T: Config<I>, I: 'static,

§

fn on_poll( n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, weight: &mut WeightMeter, )

Code to execute every now and then at the beginning of the block after inherent application. Read more
§

impl<T, I> OnRuntimeUpgrade for Pallet<T, I>
where T: Config<I>, I: 'static,

§

fn on_runtime_upgrade() -> Weight

See [Hooks::on_runtime_upgrade].
§

impl<T, I> PalletInfoAccess for Pallet<T, I>
where T: Config<I>, I: 'static,

§

fn index() -> usize

Index of the pallet as configured in the runtime.
§

fn name() -> &'static str

Name of the pallet as configured in the runtime.
§

fn name_hash() -> [u8; 16]

Two128 hash of name.
§

fn module_name() -> &'static str

Name of the Rust module containing the pallet.
§

fn crate_version() -> CrateVersion

Version of the crate containing the pallet.
§

impl<T, I> PalletsInfoAccess for Pallet<T, I>
where T: Config<I>, I: 'static,

§

fn count() -> usize

The number of pallets’ information that this type represents. Read more
§

fn infos() -> Vec<PalletInfoData>

All of the pallets’ information that this type represents.
§

impl<T, I> PartialEq for Pallet<T, I>

§

fn eq(&self, other: &Pallet<T, I>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl<T, I> StorageInfoTrait for Pallet<T, I>
where T: Config<I>, I: 'static,

§

fn storage_info() -> Vec<StorageInfo>

§

impl<T, I> WhitelistedStorageKeys for Pallet<T, I>
where T: Config<I>, I: 'static,

§

fn whitelisted_storage_keys() -> Vec<TrackedStorageKey>

Returns a Vec<TrackedStorageKey> indicating the storage keys that should be whitelisted during benchmarking. This means that those keys will be excluded from the benchmarking performance calculation.
§

impl<T, I> Eq for Pallet<T, I>