Skip to content

Commit

Permalink
Add WAGMI clm on Sonic
Browse files Browse the repository at this point in the history
  • Loading branch information
MirthFutures committed Jan 3, 2025
1 parent e01d149 commit e33455c
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 6 deletions.
2 changes: 2 additions & 0 deletions src/api/cowcentrated/getCowClms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import rootstockPools from '../../data/rootstock/beefyCowVaults.json';
import scrollPools from '../../data/scroll/beefyCowVaults.json';
import modePools from '../../data/mode/beefyCowVaults.json';
import liskPools from '../../data/lisk/beefyCowVaults.json';
import sonicPools from '../../data/sonic/beefyCowVaults.json';
const chainToClms: Readonly<Partial<Record<ApiChain, CowClm[]>>> = {
optimism: validateCowClms(optimismPools),
base: validateCowClms(basePools),
Expand All @@ -33,6 +34,7 @@ const chainToClms: Readonly<Partial<Record<ApiChain, CowClm[]>>> = {
scroll: validateCowClms(scrollPools),
mode: validateCowClms(modePools),
lisk: validateCowClms(liskPools),
sonic: validateCowClms(sonicPools),
};

const chainsWithClms = (Object.keys(chainToClms) as ReadonlyArray<ApiChain>).filter(
Expand Down
2 changes: 2 additions & 0 deletions src/api/stats/getNonAmmPrices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ import getVenusArbPrices from './arbitrum/getVenusArbPrices';
import getVenusZkPrices from './zksync/getVenusZkPrices';
import getTokemakEthPrices from './ethereum/getTokemakEthPrices';
import getTokemakBasePrices from './base/getTokemakBasePrices';
import { getBeefyCowSonicPrices } from './sonic/getBeefySonicCowPrices';

export type NonAmmPrices = {
prices: Record<string, number>;
Expand Down Expand Up @@ -236,6 +237,7 @@ export async function getNonAmmPrices(
getBeefyCowScrollPrices(tokenPrices),
getBeefyCowModePrices(tokenPrices),
getBeefyCowLiskPrices(tokenPrices),
getBeefyCowSonicPrices(tokenPrices),
getFtmIchiPrices(tokenPrices),
getPendleCommonPrices(ARB_CHAIN_ID, require('../../data/arbitrum/equilibriaPools.json'), tokenPrices),
getPendleCommonPrices(ARB_CHAIN_ID, require('../../data/arbitrum/pendlePools.json'), tokenPrices, {}),
Expand Down
5 changes: 5 additions & 0 deletions src/api/stats/sonic/getBeefyCowSonicApys.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { getCowApys } from '../common/getCowVaultApys';

export const getBeefyCowSonicApys = async () => {
return await getCowApys('sonic');
};
5 changes: 5 additions & 0 deletions src/api/stats/sonic/getBeefySonicCowPrices.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { getBeefyCowcentratedVaultPrices } from '../common/getBeefyCowcentratedVaultPrices';

export const getBeefyCowSonicPrices = async tokenPrices => {
return await getBeefyCowcentratedVaultPrices('sonic', tokenPrices);
};
7 changes: 2 additions & 5 deletions src/api/stats/sonic/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
//const { getBeefyCowSonicApys } = require('./getBeefyCowSonicApys');
const getEqualizerApys = require('./getEqualizerApys');
const getBeetsSonicApys = require('./getBeetsSonicApys');
const { getBeefyCowSonicApys } = require('./getBeefyCowSonicApys');

const getApys = [
// getBeefyCowSonicApys,
getEqualizerApys,
getBeetsSonicApys,
];
const getApys = [getBeefyCowSonicApys, getEqualizerApys, getBeetsSonicApys];

const getSonicApys = async () => {
const start = Date.now();
Expand Down
15 changes: 14 additions & 1 deletion src/data/sonic/beefyCowVaults.json
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
[]
[
{
"address": "0xE7e6a718218d737945E6f039c161D3C3c550CBA8",
"lpAddress": "0x25f746bB206041Ed8dA6F08Ed1D32454A5856D37",
"tokens": ["0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38", "0x29219dd400f2Bf60E5a23d13Be72B486D4038894"],
"tokenOracleIds": ["wS", "sUSDCe"],
"decimals": [18, 6],
"oracleId": "wagmi-cow-sonic-ws-usdc.e",
"rewardPool": {
"address": "0x52115E698dC76Fc0ac75145c4f3F5d986E4CE162",
"oracleId": "wagmi-cow-sonic-ws-usdc.e-rp"
}
}
]

0 comments on commit e33455c

Please sign in to comment.