Skip to content

Commit

Permalink
chore: rename empiric to pragma
Browse files Browse the repository at this point in the history
Because they changed name again.
  • Loading branch information
xJonathanLEI committed Sep 19, 2023
1 parent e3e6226 commit a205f8a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion scripts/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ compile zklend::market Market
compile zklend::z_token ZToken
compile zklend::default_price_oracle DefaultPriceOracle
compile zklend::irms::default_interest_rate_model DefaultInterestRateModel
compile zklend::oracles::empiric_oracle_adapter EmpiricOracleAdapter
compile zklend::oracles::pragma_oracle_adapter PragmaOracleAdapter

if [ -n "$USER_ID" ] && [ -n "$GROUP_ID" ]; then
chown -R $USER_ID:$GROUP_ID "$REPO_ROOT/build"
Expand Down
6 changes: 3 additions & 3 deletions src/interfaces.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,8 @@ trait IInterestRateModel<TContractState> {
}

#[starknet::interface]
trait IEmpiricOracle<TContractState> {
fn get_spot_median(self: @TContractState, pair_id: felt252) -> EmpiricOracleSpotMedian;
trait IPragmaOracle<TContractState> {
fn get_spot_median(self: @TContractState, pair_id: felt252) -> PragmaOracleSpotMedian;
}

#[starknet::interface]
Expand Down Expand Up @@ -308,7 +308,7 @@ struct PriceWithUpdateTime {
}

#[derive(Drop, Serde)]
struct EmpiricOracleSpotMedian {
struct PragmaOracleSpotMedian {
price: felt252,
decimals: felt252,
last_updated_timestamp: felt252,
Expand Down
2 changes: 1 addition & 1 deletion src/oracles.cairo
Original file line number Diff line number Diff line change
@@ -1 +1 @@
mod empiric_oracle_adapter;
mod pragma_oracle_adapter;
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#[starknet::contract]
mod EmpiricOracleAdapter {
mod PragmaOracleAdapter {
use traits::Into;

use starknet::ContractAddress;
Expand All @@ -8,8 +8,8 @@ mod EmpiricOracleAdapter {
use super::super::super as crate;

use crate::interfaces::{
IEmpiricOracleDispatcher, IEmpiricOracleDispatcherTrait, IPriceOracleSource,
EmpiricOracleSpotMedian, PriceWithUpdateTime
IPragmaOracleDispatcher, IPragmaOracleDispatcherTrait, IPriceOracleSource,
PragmaOracleSpotMedian, PriceWithUpdateTime
};
use crate::libraries::{pow, safe_math};

Expand Down Expand Up @@ -44,7 +44,7 @@ mod EmpiricOracleAdapter {
let oracle_addr = self.oracle.read();
let pair_key = self.pair.read();

let median = IEmpiricOracleDispatcher {
let median = IPragmaOracleDispatcher {
contract_address: oracle_addr
}.get_spot_median(pair_key);

Expand Down

0 comments on commit a205f8a

Please sign in to comment.