-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add support for AAVE governance contract-call #24
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,12 +25,20 @@ export default async function getValue( | |
| } | ||
|
|
||
| // AAVE effective balance from Liquidity Pool | ||
| if ( | ||
| const aaveFromLP = | ||
| params.address.toLowerCase() === | ||
| '0xC0259c59D9f980E3b5e2574cD78C9A9Bc6A8E3fc' && | ||
| params.methodABI?.name === 'balanceOf' && | ||
| params.network === 1 | ||
| ) { | ||
| params.network === 1; | ||
|
|
||
| // AAVE base/staked/lended token | ||
| const aaveToken = | ||
| params.address.toLowerCase() === | ||
| '0xa198Fac58E02A5C5F8F7e877895d50cFa9ad1E04' && | ||
| params.methodABI?.name === 'getFullVotingPower' && | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not exactly, it's returning the voting power, which is coming from the delegated balance. So if a user has 100 aave, and delegated to himself, he get 100
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok but that's always 1 vp = 1 AAVE token.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes |
||
| params.network === 1; | ||
|
|
||
| if (aaveFromLP || aaveToken) { | ||
| return erc20BalanceOf( | ||
| { | ||
| ...params, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And this has always the same value than AAVE right?