Skip to content

Commit

Permalink
prismalst fix
Browse files Browse the repository at this point in the history
  • Loading branch information
slasher125 committed Jan 6, 2025
1 parent 51f77c0 commit 55aa03e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/adaptors/prismalst/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@ const apy = async () => {
(i) => ({ target: factory, params: i })
),
abi: factoryAbi.find((i) => i.name === 'troveManagers'),
permitFailure: true,
})
).output.map((i) => i.output);

const collateralTokens = (
await sdk.api.abi.multiCall({
calls: troveManagers.map((i) => ({ target: i })),
abi: troveManagerAbi.find((i) => i.name === 'collateralToken'),
permitFailure: true,
})
).output.map((i) => i.output);

Expand All @@ -39,41 +41,47 @@ const apy = async () => {
params: troveManagers[i],
})),
abi: 'erc20:balanceOf',
permitFailure: true,
})
).output.map((i) => i.output);

const MCR = (
await sdk.api.abi.multiCall({
calls: troveManagers.map((i) => ({ target: i })),
abi: troveManagerAbi.find((i) => i.name === 'MCR'),
permitFailure: true,
})
).output.map((i) => i.output);

const systemDebt = (
await sdk.api.abi.multiCall({
calls: troveManagers.map((i) => ({ target: i })),
abi: troveManagerAbi.find((i) => i.name === 'getEntireSystemDebt'),
permitFailure: true,
})
).output.map((i) => i.output);

const maxSystemDebt = (
await sdk.api.abi.multiCall({
calls: troveManagers.map((i) => ({ target: i })),
abi: troveManagerAbi.find((i) => i.name === 'maxSystemDebt'),
permitFailure: true,
})
).output.map((i) => i.output);

const rewardRate = (
await sdk.api.abi.multiCall({
calls: troveManagers.map((i) => ({ target: i })),
abi: troveManagerAbi.find((i) => i.name === 'rewardRate'),
permitFailure: true,
})
).output.map((i) => i.output);

const interestRate = (
await sdk.api.abi.multiCall({
calls: troveManagers.map((i) => ({ target: i })),
abi: troveManagerAbi.find((i) => i.name === 'interestRate'),
permitFailure: true,
})
).output.map((i) => i.output);

Expand Down

0 comments on commit 55aa03e

Please sign in to comment.