pub enum OracleProcessorInstruction {
Report {
oracle_id: OracleId,
updates: Vec<OracleUpdate>,
},
}Expand description
Instructions supported by the Oracle Processor program. Made to report oracle updates from validators.
Variants§
Report
Report oracle updates from validators
Fields
§
updates: Vec<OracleUpdate>Updates from each validator
Implementations§
Source§impl OracleProcessorInstruction
impl OracleProcessorInstruction
Sourcepub fn report(
payer: Pubkey,
oracle_id: OracleId,
updates: Vec<OracleUpdate>,
) -> Instruction
pub fn report( payer: Pubkey, oracle_id: OracleId, updates: Vec<OracleUpdate>, ) -> Instruction
Creates an instruction for oracle reporting.
This function creates an instruction that will report an oracle update and emit an event that subscribers can listen to.
§Arguments
payer- The public key of the payeroracle_id- The ID of the oracleupdates- A vector of oracle updates
§Returns
An instruction that stores oracle data in a PDA and emits an event. Subscribers can listen to the instance-specific topic to receive notifications when oracle reports are stored.
§Accounts
[0]- Payer account (signer, writable)[1]- Report PDA account (writable)[2]- Event PDA account (writable)[3]- System program (readonly)
Trait Implementations§
Source§impl Clone for OracleProcessorInstruction
impl Clone for OracleProcessorInstruction
Source§fn clone(&self) -> OracleProcessorInstruction
fn clone(&self) -> OracleProcessorInstruction
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OracleProcessorInstruction
impl Debug for OracleProcessorInstruction
Source§impl<'de> Deserialize<'de> for OracleProcessorInstruction
impl<'de> Deserialize<'de> for OracleProcessorInstruction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for OracleProcessorInstruction
Auto Trait Implementations§
impl Freeze for OracleProcessorInstruction
impl RefUnwindSafe for OracleProcessorInstruction
impl Send for OracleProcessorInstruction
impl Sync for OracleProcessorInstruction
impl Unpin for OracleProcessorInstruction
impl UnwindSafe for OracleProcessorInstruction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more