Skip to content

Commit

Permalink
fluid: add on Base (#11284)
Browse files Browse the repository at this point in the history
  • Loading branch information
bergben authored Aug 14, 2024
1 parent 93edaff commit 6712581
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion projects/fluid/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ const config = {
arbitrum: {
liquidityResolver: (block) => "0x46859d33E662d4bF18eEED88f74C36256E606e44",
},
base: {
liquidityResolver: (block) => "0x35A915336e2b3349FA94c133491b915eD3D3b0cd",
},
};

async function getListedTokens(api) {
Expand Down Expand Up @@ -62,7 +65,7 @@ async function borrowed(api) {
const tokens = await getListedTokens(api);
const borrowed = await api.call({
target: config[api.chain].liquidityResolver(api.block),
abi: api.block < 19992056 ? abi.getOverallTokensDataLegacy : abi.getOverallTokensData,
abi: api.chain == "ethereum" && api.block < 19992056 ? abi.getOverallTokensDataLegacy : abi.getOverallTokensData,
params: [tokens],
});
api.add(
Expand All @@ -75,5 +78,6 @@ module.exports = {
methodology: methodologies.lendingMarket,
ethereum: { tvl, borrowed },
arbitrum: { tvl, borrowed },
base: { tvl, borrowed },
};
// node test.js projects/fluid/index.js

0 comments on commit 6712581

Please sign in to comment.