Skip to content

Commit

Permalink
fix broken adapters
Browse files Browse the repository at this point in the history
  • Loading branch information
g1nt0ki committed Jan 24, 2025
1 parent ed004a9 commit af99c22
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 18 deletions.
1 change: 1 addition & 0 deletions projects/helper/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const DEFAULTS = {
ANKR_API_KEY: '79258ce7f7ee046decc3b5292a24eb4bf7c910d7e39b691384c7ce0cfb839a01',
RENEC_RPC: "https://api-mainnet-beta.renec.foundation:8899/",
FLOW_RPC: "https://rest-mainnet.onflow.org",
ELSM_RPC: "https://rpc.elysiumchain.tech",
ARTELA_RPC_MULTICALL: "0x80BC476a33a1b40a788dcC9bfe9dFdae9723b872",
}

Expand Down
2 changes: 1 addition & 1 deletion projects/jbtc/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const bitcoinAddressBook = require('../helper/bitcoin-book/index.js')
module.exports = {
methodology: 'Total amount of BTC locked in Bitcoin network on wallet bc1qmukuv7j57umsd5tgg9fw88eqap57rzphkfckyp',
bitcoin: {
tvl: sumTokensExport({ owner: bitcoinAddressBook.jbtc }),
tvl: sumTokensExport({ owners: bitcoinAddressBook.jbtc }),
},
ethereum: {
tvl: sumTokensExport({ owners: ['0x7e90Ef7D172843dB68e42FC5fAA8CB7C1803Dcfa'], tokens: [nullAddress] }),
Expand Down
2 changes: 1 addition & 1 deletion projects/kdswap/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const GAS_PRICE = 0.00000001;
const creationTime = () => Math.round(new Date().getTime() / 1000) - 10;

const graphQLUrls = {
"kadena": "https://kdswap-fd-prod-cpeabrdfgdg9hzen.z01.azurefd.net/graphql",
"kadena": "https://api.kdswap.exchange/graphql",
}

const getReserve = (tokenData) => {
Expand Down
2 changes: 1 addition & 1 deletion projects/popsicle/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const config = {

async function optimizerV3(time, block, _, {api}) {
const data = await getConfig('popsicle/'+api.chain, config[api.chain])
const pools = data.map(i => i.fragolaAddress)
const pools = data.map(i => i?.fragolaAddress).filter(i=>i)
const token0s = await api.multiCall({ abi: 'address:token0', calls: pools})
const token1s = await api.multiCall({ abi: 'address:token1', calls: pools})
const bals = await api.multiCall({ abi: 'function usersAmounts() returns (uint256,uint256)', calls: pools})
Expand Down
6 changes: 4 additions & 2 deletions projects/ramp/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ const { sumTokens2 } = require('../helper/unwrapLPs')

function getChainTVL(chain) {
return async (api) => {
const key = chain === 'ethereum' ? 'eth' : chain;
// https://appv2.rampdefi.com/#/lever
return {}
/* const key = chain === 'ethereum' ? 'eth' : chain;
const { [key]: config } = await getConfig('ramp', 'https://config.rampdefi.com/config/appv2/priceInfo');
const tokens = config.tokens;
delete tokens.RUSD
Expand All @@ -21,7 +23,7 @@ function getChainTVL(chain) {
const res = (await api.multiCall({ abi: abi.getPoolAmount, calls, permitFailure: true})).map(i => i ?? 0)
api.addTokens(iTokens, res)
return sumTokens2({ api, resolveLP: true, })
return sumTokens2({ api, resolveLP: true, }) */
}
}

Expand Down
15 changes: 3 additions & 12 deletions projects/stakeeasy/index.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,15 @@
const { get } = require('../helper/http')
const { toUSDTBalances } = require('../helper/balances');

async function tvl() {
var response = await get('https://arufaresearch.pythonanywhere.com/tvl')
return toUSDTBalances(response.tvl);
}

async function fetch_juno() {
var response = await get('https://arufaresearch.pythonanywhere.com/juno_tvl')

return toUSDTBalances(response.tvl);
return {}
}

module.exports = {
timetravel: false,
misrepresentedTokens: true,
// deadFrom: '2025-01-25',
secret: {
tvl
},
juno: {
tvl: fetch_juno
tvl: tvl
}
}
3 changes: 2 additions & 1 deletion projects/xbacked/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ module.exports = {
timetravel: false,
misrepresentedTokens: true,
methodology: "Sums the total locked collateral value in usd across all vaults.",
deadFrom: '2024-04-22', // part of compx now
algorand: {
tvl: async () => {
return { tether: await get('http://mainnet.collector.xbacked.io:4001/api/v1/getTVL') };
return {}
}
},
}

0 comments on commit af99c22

Please sign in to comment.