1- import { memoize } from 'lodash'
1+ import { memoize } from 'lodash' ;
22
3- import * as balancerMetaStablePoolAbi from '@abi/balancer-meta-stable-pool'
4- import * as balancerRateProvider from '@abi/balancer-rate-provider'
5- import * as chainlinkFeedRegistry from '@abi/chainlink-feed-registry'
6- import * as curveLpToken from '@abi/curve-lp-token'
7- import * as diaOracleAbi from '@abi/dia-oracle'
8- import * as eacAggregatorProxy from '@abi/eac-aggregator-proxy'
9- import * as frxEthFraxOracle from '@abi/frx-eth-frax-oracle'
10- import * as oethOracleRouter from '@abi/oeth-oracle-router'
11- import * as stakedFraxEth from '@abi/sfrx-eth'
12- import * as uniswapV3 from '@abi/uniswap-v3'
13- import * as woethAbi from '@abi/woeth'
14- import { Block , Context } from '@originprotocol/squid-utils'
15- import { getPriceFromSqrtPriceX96N } from '@templates/aerodrome/prices'
16- import { CURVE_ETH_OETH_POOL_ADDRESS , STETH_ADDRESS } from '@utils/addresses'
173
18- import { ousdDailyPrices } from './data/coingecko-ousd.json'
19- import {
20- CurrencySymbol ,
21- MainnetCurrency ,
22- MainnetCurrencyAddress ,
23- MainnetCurrencySymbol ,
24- mainnetCurrencies ,
25- mainnetCurrenciesByAddress ,
26- } from './mainnetCurrencies'
4+
5+ import * as balancerMetaStablePoolAbi from '@abi/balancer-meta-stable-pool' ;
6+ import * as balancerRateProvider from '@abi/balancer-rate-provider' ;
7+ import * as chainlinkFeedRegistry from '@abi/chainlink-feed-registry' ;
8+ import * as curveLpToken from '@abi/curve-lp-token' ;
9+ import * as diaOracleAbi from '@abi/dia-oracle' ;
10+ import * as eacAggregatorProxy from '@abi/eac-aggregator-proxy' ;
11+ import * as frxEthFraxOracle from '@abi/frx-eth-frax-oracle' ;
12+ import * as oethOracleRouter from '@abi/oeth-oracle-router' ;
13+ import * as stakedFraxEth from '@abi/sfrx-eth' ;
14+ import * as uniswapV3 from '@abi/uniswap-v3' ;
15+ import * as woethAbi from '@abi/woeth' ;
16+ import { Block , Context } from '@originprotocol/squid-utils' ;
17+ import { getPriceFromSqrtPriceX96N } from '@templates/aerodrome/prices' ;
18+ import { CURVE_ETH_OETH_POOL_ADDRESS , STETH_ADDRESS } from '@utils/addresses' ;
19+
20+
21+
22+ import { ousdDailyPrices } from './data/coingecko-ousd.json' ;
23+ import { CurrencySymbol , MainnetCurrency , MainnetCurrencyAddress , MainnetCurrencySymbol , mainnetCurrencies , mainnetCurrenciesByAddress } from './mainnetCurrencies' ;
24+
2725
2826const createChainlinkPriceFeed = ( address : string , decimals : bigint ) => {
2927 return async ( ctx : Context , height : number ) => {
@@ -341,6 +339,15 @@ export const priceMap: Partial<
341339 ] ,
342340 18 ,
343341 ) ,
342+ ...derived (
343+ 'CRV' ,
344+ 'OUSD' ,
345+ [
346+ { base : 'CRV' , quote : 'ETH' } ,
347+ { base : 'ETH' , quote : 'OUSD' } ,
348+ ] ,
349+ 18 ,
350+ ) ,
344351 ...twoWay ( 'USDC' , 'ETH' , ( ctx , block ) => getChainlinkPrice ( ctx , block . height , 'USDC' , 'ETH' ) ) ,
345352 ...twoWay ( 'USDT' , 'ETH' , ( ctx , block ) => getChainlinkPrice ( ctx , block . height , 'USDT' , 'ETH' ) ) ,
346353 ...twoWay ( 'CRV' , 'WETH' , ( ctx , block ) => getChainlinkPrice ( ctx , block . height , 'CRV' , 'ETH' ) ) ,
@@ -351,4 +358,4 @@ export const priceMap: Partial<
351358 ...twoWay ( 'CVX' , 'DAI' , ( ctx , block ) => getChainlinkPrice ( ctx , block . height , 'CVX' , 'USD' ) ) ,
352359 ...twoWay ( 'CRV' , 'DAI' , ( ctx , block ) => getChainlinkPrice ( ctx , block . height , 'CRV' , 'USD' ) ) ,
353360 ...twoWay ( 'COMP' , 'DAI' , ( ctx , block ) => getChainlinkPrice ( ctx , block . height , 'COMP' , 'USD' ) ) ,
354- }
361+ }
0 commit comments