Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(earn): fetch apy from contract #5389

Merged
merged 7 commits into from
May 7, 2024
Merged

feat(earn): fetch apy from contract #5389

merged 7 commits into from
May 7, 2024

Conversation

satish-ravi
Copy link
Contributor

@satish-ravi satish-ravi commented May 3, 2024

Description

Add a fetch function that gets APY from aave contract

Test plan

Unit tests, manual

Related issues

Backwards compatibility

Yes

Network scalability

N/A

src/earn/EarnCta.tsx Outdated Show resolved Hide resolved
src/earn/EarnCta.tsx Outdated Show resolved Hide resolved
Copy link

codecov bot commented May 3, 2024

Codecov Report

Attention: Patch coverage is 88.00000% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 86.07%. Comparing base (6df3859) to head (1e6ed91).
Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5389      +/-   ##
==========================================
- Coverage   86.08%   86.07%   -0.01%     
==========================================
  Files         737      739       +2     
  Lines       30016    30040      +24     
  Branches     5143     5143              
==========================================
+ Hits        25838    25858      +20     
- Misses       3950     3954       +4     
  Partials      228      228              
Files Coverage Δ
src/abis/AavePoolV3.ts 100.00% <100.00%> (ø)
src/web3/networkConfig.ts 100.00% <100.00%> (ø)
src/earn/poolInfo.ts 85.00% <85.00%> (ø)

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6df3859...1e6ed91. Read the comment docs.

src/earn/poolInfo.ts Outdated Show resolved Hide resolved
const ARB_USDC_TOKEN_ID_MAINNET = `${NetworkId['arbitrum-one']}:0xaf88d065e77c8cc2239327c5edb3a432268e5831`

const ARB_AAVE_CONTRACT_ADDRESS_STAGING = '0xBfC91D59fdAA134A4ED45f7B584cAf96D7792Eff'
const ARB_AAVE_CONTRACT_ADDRESS_MAINNET = '0x794a61358D6845594F94dc1DB02A252b5b4814aD'
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: change the name to specify that this is the Pool contract.

Copy link
Collaborator

Choose a reason for hiding this comment

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

can you add "v3" too? e.g., ...AAVE_POOL_V3_CONTRACT...

@satish-ravi satish-ravi changed the title feat(earn): fetch apy from contract and use in cta component feat(earn): fetch apy from contract May 7, 2024
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a place to verify the contents of this file for Aave?

Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: add the V3 to the filename

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@MuckT added a link to arbiscan and docs for ABI
@silasbw renamed

@satish-ravi satish-ravi added this pull request to the merge queue May 7, 2024
Merged via the queue into main with commit 4379675 May 7, 2024
16 checks passed
@satish-ravi satish-ravi deleted the satish/act-1174-2 branch May 7, 2024 19:26
shottah pushed a commit to zed-io/kolektivo that referenced this pull request May 15, 2024
### Description

Add a fetch function that gets APY from aave contract

### Test plan

Unit tests, manual

### Related issues

- Fixes ACT-1174

### Backwards compatibility

Yes

### Network scalability

N/A
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.

None yet

4 participants