Skip to content

Commit 1d272ef

Browse files
authored
feat: add fMoney adapter (DefiLlama#12948)
2 parents 55f742b + 8de3600 commit 1d272ef

File tree

1 file changed

+23
-17
lines changed

1 file changed

+23
-17
lines changed

projects/fMoney/index.js

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,30 @@
1-
21
const { compoundExports2 } = require('../helper/compound')
3-
const { sumBalancerLps } = require('../helper/unwrapLPs')
4-
5-
const addresses = {
6-
beetsVault: "0x8166994d9ebBe5829EC86Bd81258149B87faCfd3",
7-
fuBUX: "0xcf211d1022f0B1aEC7CbAdCa1472fc20E6dFe3c6",
8-
fBUX80lzUSDC20: "0x2ddcd6916ee7ccc6300cb0fe2919a341be0ee8bb"
9-
}
10-
11-
async function staking(api) {
12-
return sumBalancerLps({}, [[addresses.fBUX80lzUSDC20, addresses.beetsVault]], 0, 0, undefined, api)
13-
}
2+
const { unwrapBalancerToken } = require('../helper/unwrapLPs')
143

154
const config = {
16-
fantom: '0xB911d8064c0AA338241f349eD802Ad4bae6ec034',
5+
fantom: {
6+
unitroller: '0xB911d8064c0AA338241f349eD802Ad4bae6ec034',
7+
stakingPool: '0x9426d9077620efaae688d3c3b398fa814406ce4a',
8+
owner: '0x6B0B150A7a37b1E592F553E2b7D71d6D1439dc57'
9+
},
10+
sonic: {
11+
unitroller: '0xd41e9fa6EC7A33f0A6AAE5E9420c9D60eC1727e4',
12+
stakingPool: '0x3ec8254006658e11f9ab5eaf92d64f8528d09057',
13+
owner: '0x44ece28720dbe441bbf1363e17b0cd71839090c8'
14+
}
1715
}
1816

17+
async function staking(api) {
18+
await unwrapBalancerToken({
19+
api,
20+
balancerToken: config[api.chain].stakingPool,
21+
owner: config[api.chain].owner,
22+
isV2: true
23+
})
24+
return api.getBalances()
25+
}
1926

2027
Object.keys(config).forEach(chain => {
21-
module.exports[chain] = compoundExports2({ comptroller: config[chain] })
22-
});
23-
24-
module.exports.fantom.staking = staking
28+
module.exports[chain] = compoundExports2({ comptroller: config[chain].unitroller })
29+
module.exports[chain].staking = staking
30+
})

0 commit comments

Comments
 (0)