Skip to content

Commit

Permalink
upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
alyn509 committed Oct 4, 2024
1 parent 046e77e commit f0f5a41
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion contracts/core/price-aggregator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ pub trait PriceAggregator:
self.set_paused(true);
}

#[upgrade]
fn upgrade(&self) {
self.set_paused(true);
}

#[only_owner]
#[endpoint(changeAmounts)]
fn change_amounts(&self, staking_amount: BigUint, slash_amount: BigUint) {
Expand Down Expand Up @@ -192,7 +197,12 @@ pub trait PriceAggregator:
round_id = wrapped_rounds.unwrap().len() + 1;
}
self.create_new_round(token_pair.clone(), round_id, submissions, decimals);
self.add_submission_event(&token_pair.from.clone(), &token_pair.to.clone(), round_id, &price);
self.add_submission_event(
&token_pair.from.clone(),
&token_pair.to.clone(),
round_id,
&price,
);
}

self.oracle_status()
Expand Down

0 comments on commit f0f5a41

Please sign in to comment.