Skip to content

Commit 054615a

Browse files
paulcccccuserg1nt0ki
authored
feat: asBNB and asCAKE (DefiLlama#12876)
Co-authored-by: user <[email protected]> Co-authored-by: g1nt0ki <[email protected]>
1 parent 979ceac commit 054615a

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

projects/astherus-asBNB/index.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
const asBNB = "0x77734e70b6E88b4d82fE632a168EDf6e700912b6"
2+
3+
module.exports = {
4+
doublecounted: true,
5+
bsc: {
6+
tvl: async (api) => {
7+
8+
// cake tvl
9+
const locker = '0x8E6Ce60cbC6402B8b780AdCfc069A00c177D2B18'
10+
const veCake = await api.call({ abi: 'address:veToken', target: locker })
11+
const cake = await api.call({ abi: 'address:token', target: locker })
12+
const totalDeposits = await api.call({ abi: 'erc20:balanceOf', target: veCake, params: locker })
13+
api.add(cake, totalDeposits)
14+
15+
// asBNB tvl
16+
const asBNBMinter = '0x2f31ab8950c50080e77999fa456372f276952fd8'
17+
const token = await api.call({ abi: 'address:token', target: asBNBMinter})
18+
const bal = await api.call({ abi: 'uint256:totalTokens', target: asBNBMinter})
19+
api.add(token, bal)
20+
},
21+
}
22+
}

0 commit comments

Comments
 (0)