Trait OracleOps

Source
pub trait OracleOps<C> {
    // Required methods
    fn initialize_oracle<'a>(
        &'a self,
        store: &Pubkey,
        oracle: &'a dyn Signer,
        authority: Option<&Pubkey>,
    ) -> impl Future<Output = Result<(TransactionBuilder<'a, C>, Pubkey)>>;
    fn initialize_price_feed(
        &self,
        store: &Pubkey,
        index: u16,
        provider: PriceProviderKind,
        token: &Pubkey,
        feed_id: &Pubkey,
    ) -> (TransactionBuilder<'_, C>, Pubkey);
    fn update_price_feed_with_chainlink(
        &self,
        store: &Pubkey,
        price_feed: &Pubkey,
        chainlink: &Pubkey,
        access_controller: &Pubkey,
        signed_report: &[u8],
    ) -> Result<TransactionBuilder<'_, C>>;
}
Expand description

Oracle management for GMSOL.

Required Methods§

Source

fn initialize_oracle<'a>( &'a self, store: &Pubkey, oracle: &'a dyn Signer, authority: Option<&Pubkey>, ) -> impl Future<Output = Result<(TransactionBuilder<'a, C>, Pubkey)>>

Initialize Oracle account.

Source

fn initialize_price_feed( &self, store: &Pubkey, index: u16, provider: PriceProviderKind, token: &Pubkey, feed_id: &Pubkey, ) -> (TransactionBuilder<'_, C>, Pubkey)

Initialize Price Feed.

Update price feed with chainlink.

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.

Implementors§

Source§

impl<C, S> OracleOps<C> for Client<C>
where C: Deref<Target = S> + Clone, S: Signer,