Skip to content

Commit

Permalink
Add support for fCOIN on multiple chains (#11268)
Browse files Browse the repository at this point in the history
* report nav for fCOIN on all deployed chains

* merge fortunafi adapters

---------

Co-authored-by: eukadish <[email protected]>
  • Loading branch information
g1nt0ki and eukadish authored Aug 13, 2024
1 parent 26fb3a4 commit 0a0c357
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 63 deletions.
32 changes: 0 additions & 32 deletions projects/fortunafi-fbill/index.js

This file was deleted.

31 changes: 0 additions & 31 deletions projects/fortunafi-ifbill/index.js

This file was deleted.

35 changes: 35 additions & 0 deletions projects/fortunafi/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

const config = {
canto: {
fbill: '0x79ECCE8E2D17603877Ff15BC29804CbCB590EC08',
fCOIN: '0x855EA9979189383ef5A85eB74Ed3a02E2604EA81',
ifBill: '0x45bafad5a6a531Bc18Cf6CE5B02C58eA4D20589b',
},
arbitrum: {
fbill: '0x79ECCE8E2D17603877Ff15BC29804CbCB590EC08',
fCOIN: '0x108Ec61bd5A91F5596F824832524C6b6002E3F03',
ifBill: '0x45bafad5a6a531Bc18Cf6CE5B02C58eA4D20589b',
},
blast: {
fbill: '0x79ECCE8E2D17603877Ff15BC29804CbCB590EC08',
fCOIN: '0xE85Ae7e8Fa0Ee69426019b7D3E77843673807ABE',
ifBill: '0x45bafad5a6a531Bc18Cf6CE5B02C58eA4D20589b',
},
ethereum: {
fCOIN: '0x2378aC4EEAAe44695E1e3d0fcAEEd6ba8b0F5108',
},
}

module.exports = {
misrepresentedTokens: true,
}

Object.keys(config).forEach(chain => {
const tConfig = config[chain]
module.exports[chain] = {
tvl: async (api) => {
const nav = await api.multiCall({ abi: 'uint256:nav', calls: Object.values(tConfig), permitFailure: true })
api.addCGToken('tether', nav.reduce((acc, i) => acc + (i ?? 0)/1e18, 0))
}
}
})

0 comments on commit 0a0c357

Please sign in to comment.