-
Notifications
You must be signed in to change notification settings - Fork 39
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: add claim-rewards-to-self functionality to incentives controller #4
base: aave-v2-incentives
Are you sure you want to change the base?
feat: add claim-rewards-to-self functionality to incentives controller #4
Conversation
2 comments @SeanJCasey :
|
I also suggest @SeanJCasey to create mainnet fork tests reproducing a real scenario of claiming rewards from a system that will be using this function. For that you will need to simulate the upgrade of the proxy contract with the new implementation |
@ernesto-usal I implemented the suggested contract changes and added the suggested mainnet fork test suite. I also added a script to package.json for running the mainnet fork test suite. I realized during this process that the current tests in Also, I wasn't sure if I needed to preserve the use of |
Also, I kept the |
@SeanJCasey actually the |
…date mainnet fork blocknumber
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.
I would change the name of the audit file to include the date.
@@ -19,7 +19,9 @@ | |||
"coverage": "hardhat coverage", | |||
"test": "npm run test-incentives", | |||
"test-incentives": "TS_NODE_TRANSPILE_ONLY=1 hardhat test ./test/__setup.spec.ts ./test/AaveIncentivesController/*.spec.ts", |
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.
Lets add FORKING_BLOCK=12290275
for the previous tests to make them work.
This PR adds a
claimRewardsToSelf()
function to the incentives controller that reuses the same underlying_claimRewards()
function as other claim functions, but auto-populating theto
field withmsg.sender
.