Skip to content

Add two Aave endpoints to get reserve data and reserve token addresses#4112

Open
tmcollins4 wants to merge 1 commit intobitpay:masterfrom
tmcollins4:addGetAaveTokenAddressesAndReserveData
Open

Add two Aave endpoints to get reserve data and reserve token addresses#4112
tmcollins4 wants to merge 1 commit intobitpay:masterfrom
tmcollins4:addGetAaveTokenAddressesAndReserveData

Conversation

@tmcollins4
Copy link
Contributor

Description

Added two new endpoints to get reserve data and reserve token addresses from Aave.

Changelog

  • Added AaveReserveData and AaveReserveTokensAddresses interfaces in packages/bitcore-node/src/providers/chain-state/evm/api/aave.ts.
  • Added /api/:chain/:network/aave/reserve/:asset endpoint; returns currentVariableBorrowRate.
  • Added /api/:chain/:network/aave/reserve-tokens/:asset endpoint; returns variableDebtTokenAddress.
  • Added CSP methods getAaveReserveData and getAaveReserveTokensAddresses.
  • Added unit tests for both methods covering v2 and v3.
  • Added integration tests for both endpoints covering v2 (mainnet RPC), v3 (sepolia), and 400 error cases.

Testing Notes

I made a script to call both endpoints across multiple chains/versions with USDC addresses.


Checklist

  • I have read CONTRIBUTING.md and verified that this PR follows the guidelines and requirements outlined in it.
  • I have added the appropriate package tag(s) (e.g. BWC if modifying the bitcore-wallet-client package, CLI if modifying the bitcore-cli package, etc.)
  • I have verified that this is not an existing PR (open or closed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant