feat: add claim-rewards-to-self functionality to incentives controller#4
feat: add claim-rewards-to-self functionality to incentives controller#4SeanJCasey wants to merge 24 commits intoaave:aave-v2-incentivesfrom
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
miguelmtzinf
left a comment
There was a problem hiding this comment.
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.
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 thetofield withmsg.sender.