Skip to content

Conversation

FedericoAmura
Copy link
Contributor

@FedericoAmura FedericoAmura commented Aug 1, 2025

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

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

  • Test A
  • Test B

Checklist:

  • I created a release plan (nx release plan) describing my changes and the version bump
  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Copy link

vercel bot commented Aug 1, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
vincent-app-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 1, 2025 6:36pm
vincent-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 1, 2025 6:36pm

Copy link
Contributor

@Copilot Copilot AI left a 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':

Base automatically changed from feature/drel-865-migrate-morpho-and-other-tools-to-vincent-monorepo to main August 5, 2025 16:40
@FedericoAmura FedericoAmura marked this pull request as draft August 18, 2025 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant