-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for fCOIN on multiple chains (#11268)
* report nav for fCOIN on all deployed chains * merge fortunafi adapters --------- Co-authored-by: eukadish <[email protected]>
- Loading branch information
Showing
3 changed files
with
35 additions
and
63 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) | ||
} | ||
} | ||
}) |