Skip to content

Commit

Permalink
feat: impl deq adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
QEDK committed Jul 30, 2024
1 parent f515cf2 commit 560c610
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
23 changes: 23 additions & 0 deletions projects/deq/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
const ADDRESSES = require('../helper/coreAssets.json')
const sdk = require('@defillama/sdk')

const stAvailContract = ADDRESSES.ethereum.STAVAIL;

async function eth(timestamp, ethBlock, chainBlocks) {
const pooledAvail = await sdk.api.abi.call({
block: ethBlock,
target: stAvailContract,
abi: "uint256:assets"
})

return {
[ADDRESSES.ethereum.AVAIL]: pooledAvail.output
}
}

module.exports = {
doublecounted: true,
ethereum: {
tvl: eth
},
}
4 changes: 3 additions & 1 deletion projects/helper/coreAssets.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@
"USDM": "0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C",
"PRISMA": "0xdA47862a83dac0c112BA89c6abC2159b95afd71C",
"FXN": "0x365accfca291e7d3914637abf1f7635db165bb09",
"USDe": "0x4c9edd5852cd905f086c759e8383e09bff1e68b3"
"USDe": "0x4c9edd5852cd905f086c759e8383e09bff1e68b3",
"AVAIL": "0xEeB4d8400AEefafC1B2953e0094134A887C76Bd8",
"STAVAIL": "0x3742f3Fcc56B2d46c7B8CA77c23be60Cd43Ca80a"
},
"fantom": {
"WFTM": "0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83",
Expand Down

0 comments on commit 560c610

Please sign in to comment.