feat: add claim rewards functionality for morpho vaults#12701
feat: add claim rewards functionality for morpho vaults#12701frazarshad wants to merge 5 commits into
Conversation
d5e3ca0 to
abac886
Compare
dckc
left a comment
There was a problem hiding this comment.
I just started looking at this, but I found one change worth making.
| const { addresses: a } = ctx; | ||
| const distributor = | ||
| a.merkleDistributor || | ||
| assert.fail(X`merkleDistributor address not configured`); |
There was a problem hiding this comment.
Upgrade Considerations
this adds new addresses to the axelar-config, so redepolyment of ymax contract is required with new args
Please update these to include the new args:
Odd... the tests for ymax1 contract addresses match golden snapshot and such in evm-overrides.test.ts should have triggered an update. I wonder why they didn't. Maybe because the new stuff is optional?
dckc
left a comment
There was a problem hiding this comment.
I'd have to understand the project better to approve.
But I'm withdrawing my request for changes.
| ]); | ||
| }); | ||
|
|
||
| test('wayFromSrcToDest handles claimRewards for ERC4626 position', t => { |
There was a problem hiding this comment.
Testing Considerations
unit tests have been added, but e2e testing has not been performed, since that can only be done in a mainnet environment
contract-level tests are closer to e2e. A feat usually comes with one or more. In particular, vstorage snapshots help to understand how the feature impacts the rest of the system.
8b391af to
6ec75f2
Compare
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ff205f4 to
10dc999
Compare
closes: https://linear.app/agoric/issue/PAK-431/ymax-contract-should-be-able-to-claim-reward-tokens-on-morpho
Description
Adds a new claimRewards function in the to the erc4626 morpho protocol which can be used to claim rewards for a users position on a chain
rewards can be claimed by a step similar to this to the flow:
where the claimParams can be obtained from the merkl api. An example API call is here
Testing Considerations
unit tests have been added, but e2e testing has not been performed, since that can only be done in a mainnet environment
Upgrade Considerations
this adds new addresses to the axelar-config, so redepolyment of ymax contract is required with new args