-
Notifications
You must be signed in to change notification settings - Fork 8
feat: add supply and withdraw morpho market operations to morpho ability #251
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
base: main
Are you sure you want to change the base?
feat: add supply and withdraw morpho market operations to morpho ability #251
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Pull Request Overview
This PR extends the Morpho ability to support market operations directly, expanding beyond the existing vault operations. The changes enable users to interact with Morpho markets for supply and withdraw collateral operations without requiring intermediary vaults.
- Adds market operations (
market_supply
,market_withdrawCollateral
) alongside existing vault operations - Updates parameter validation to handle both vault and market contracts with appropriate market ID requirements
- Implements separate execution paths for vault vs market operations with dedicated ABIs and helper functions
Reviewed Changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
vincent-ability.ts | Main logic updates to handle both vault and market operations with unified validation and execution flows |
schemas.ts | Schema updates to rename operation types, add market contract support, and include market-specific fields |
helpers/index.ts | Adds Morpho Market ABI, new market operation execution function, and updates validation logic for market operations |
Comments suppressed due to low confidence (2)
packages/apps/ability-morpho/src/lib/helpers/index.ts:13
- The operation name 'market_withdrawCollateral' is inconsistent with the other operation names which use underscores throughout (e.g., 'vault_deposit'). Consider using 'market_withdraw_collateral' for consistency.
USDC: '0xA0b86991c6218A36c1D19D4a2e9Eb0cE3606eB48', // Circle USDC
packages/apps/ability-morpho/src/lib/helpers/index.ts:532
- This case should use the enum value MorphoOperation.MARKET_WITHDRAW_COLLATERAL instead of the string literal to maintain consistency and type safety.
case 'market_withdrawCollateral':
Description
This PR adds market operations supply and withdrawCollateral to the morpho ability. This way we will be able to operate on markets directly without using the intermediary vaults
Operation definitions have been updated to differentiate from vault and market operations
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist:
nx release plan
) describing my changes and the version bump