Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

feat(iron-bank): added iron bank to Zapper #617

Merged
merged 5 commits into from
Jun 16, 2022
Merged

feat(iron-bank): added iron bank to Zapper #617

merged 5 commits into from
Jun 16, 2022

Conversation

reganwrench
Copy link
Contributor

Description

Adding integration of Iron Bank (ETH, FTM, AVAX)

Checklist

How to test?

  1. Checked TVL against Iron Bank's website
  2. Check account balance with a sample from USDC market on Ethereum
  3. Check account balance with a sample from WFTM market on Fantom
  4. Check account balance with a sample from USDT.e market on Avalanche

@immasandwich
Copy link
Contributor

Hello @reganwrench !

Instead of copying the helpers from src/apps/compound/helpers, please reference those directly in your fetcher classes (the helpers are intended to be used for Compound and any fork of Compound contracts). You'll also need CompoundAppModule to the imports array in your IronBankModule.

@immasandwich
Copy link
Contributor

I'll add a recipe this weekend to the Studio documentation to clarify why/how that works.

@reganwrench
Copy link
Contributor Author

Hello @reganwrench !

Instead of copying the helpers from src/apps/compound/helpers, please reference those directly in your fetcher classes (the helpers are intended to be used for Compound and any fork of Compound contracts). You'll also need CompoundAppModule to the imports array in your IronBankModule.

ser, i have pushed an update that uses the helpers from compound directly. thank you.

@@ -0,0 +1,63 @@
import { Inject, forwardRef } from '@nestjs/common';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rename the file to iron-bank.balance-fetcher.ts (use kebab case for filenames 🙏 )

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

const lendingProduct = { label: 'Lending', assets: [...supplyBalances, ...borrowBalances], meta };

return presentBalanceFetcherResponse([lendingProduct]);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you have some lint errors, run pnpm lint:fix to resolve.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

network,
appId,
groupId,
comptrollerAddress: '0x2eE80614Ccbc5e28654324a66A396458Fa5cD7Cc',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lowercase address 🙏

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

network,
appId,
groupId,
comptrollerAddress: '0xAB1c342C7bf5Ec5F02ADEA1c2270670bCa144CbB',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lowercase 🙏

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

network,
appId,
groupId,
comptrollerAddress: '0x4250A6D3BD57455d7C6821eECb6206F507576cD2',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lowercase 🙏

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@immasandwich
Copy link
Contributor

@reganwrench Last few requests:

  • Ensure filenames use iron-bank instead of ironBank (this includes the JSON ABI files in src/apps/iron-bank/contracts/abi, and then re-generate your contract factory).
  • Fix the lint errors
  • Lowercase comptroller addresses

Then we're ready! I'll slap an approval on this too right now.

reganwrench and others added 5 commits June 15, 2022 05:52
* added iron bank integration

* add avax and ftm

* update ib integration

* update file name and comptroller address, and fixed lint issues

* fixed module import paths
@reganwrench
Copy link
Contributor Author

@reganwrench Last few requests:

  • Ensure filenames use iron-bank instead of ironBank (this includes the JSON ABI files in src/apps/iron-bank/contracts/abi, and then re-generate your contract factory).
  • Fix the lint errors
  • Lowercase comptroller addresses

Then we're ready! I'll slap an approval on this too right now.

all done. thank you ser

@immasandwich immasandwich merged commit 05eef48 into Zapper-fi:main Jun 16, 2022
This was referenced Jun 16, 2022
@SamIam-0x
Copy link
Contributor

Hello @reganwrench !

Looks like you did not provide an address when submitting your PR. I recognize it may have seemed kind of random that we were asking for a wallet address with a PR submission, but we are actually looking for ways to reward Studio contributors in the future.

Is there an address you’d want to provide? Could even be an empty address, if you do not have an doxxed address

Let me know! Also, if you’d like to privately provide it, feel free to shoot me a TG https://t.me/SamIAm_0x or DM on the Zapper Discord.

Thanks!
Sam

@reganwrench
Copy link
Contributor Author

@SamIam-0x
thank you ser
0x51e5Ba55bF3D66A78108DA9D0444178880139881

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants