Skip to content

Instantly share code, notes, and snippets.

@mgild
Created November 22, 2022 21:55
Show Gist options
  • Select an option

  • Save mgild/5b154e1dca48ab7f1f01ca5e0c81c8a7 to your computer and use it in GitHub Desktop.

Select an option

Save mgild/5b154e1dca48ab7f1f01ca5e0c81c8a7 to your computer and use it in GitHub Desktop.
#[derive(Serialize, Debug)]
pub struct AggregatorOpenRoundEvent {
pub feed_key: Uuid,
pub oracles: Vec<Uuid>,
pub jobs: Vec<Uuid>,
}
impl NearEvent for AggregatorOpenRoundEvent {}
#[derive(Serialize, Debug)]
pub struct AggregatorValueUpdateEvent {
pub feed_key: Uuid,
pub oracles: Vec<Uuid>,
pub oracle_values: Vec<SwitchboardDecimal>,
pub timestamp: u64,
pub round_id: u128,
pub value: SwitchboardDecimal,
}
impl NearEvent for AggregatorValueUpdateEvent {}
#[derive(Serialize, Debug)]
pub struct OracleSlashEvent {
pub feed: Uuid,
pub oracle: Uuid,
pub amount: u128,
pub round_id: u128,
pub timestamp: u64,
}
impl NearEvent for OracleSlashEvent {}
#[derive(Serialize, Debug)]
pub struct OracleRewardEvent {
pub feed_key: Uuid,
pub oracle_key: Uuid,
pub amount: u128,
pub round_id: u128,
pub timestamp: u64,
}
impl NearEvent for OracleRewardEvent {}
#[derive(Serialize, Debug)]
pub struct OracleBootedEvent {
pub oracle: Uuid,
pub queue: Uuid,
pub timestamp: u64,
}
impl NearEvent for OracleBootedEvent {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment