Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Rubilmax
Copy link
Collaborator

Fixes DVXSDK-33

@linear
Copy link

linear bot commented Oct 13, 2025

@Rubilmax Rubilmax changed the base branch from main to next October 13, 2025 15:51
@Foulks-Plb Foulks-Plb changed the title Feat/vault v2 market v1 adapter feat(vault-v2): market v1 adapter Oct 15, 2025
@Foulks-Plb Foulks-Plb marked this pull request as ready for review October 15, 2025 17:25
Copilot AI review requested due to automatic review settings October 16, 2025 07:57
Copy link
Contributor

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 adds support for Morpho Market V1 adapters in the VaultV2 system by introducing VaultV2MorphoMarketV1Adapter classes and their corresponding fetch utilities. This extends the existing VaultV2 adapter architecture to support direct market interactions alongside the existing vault V1 adapters.

Key Changes:

  • Introduced VaultV2MorphoMarketV1Adapter and AccrualVaultV2MorphoMarketV1Adapter classes for handling market-based adapters
  • Added fetch utilities and deployless query contracts for market V1 adapters
  • Made the timestamp parameter optional in accrual methods to support both adapter types

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/blue-sdk/src/vault/v2/index.ts Exports the new market V1 adapter
packages/blue-sdk/src/vault/v2/VaultV2MorphoMarketV1Adapter.ts Defines core market V1 adapter classes with allocation logic
packages/blue-sdk/src/vault/v2/VaultV2MorphoVaultV1Adapter.ts Makes timestamp parameter optional for consistency
packages/blue-sdk/src/vault/Vault.ts Makes timestamp parameter optional in accrual methods
packages/blue-sdk-viem/src/fetch/vault-v2/VaultV2Adapter.ts Updates adapter detection to support market V1 adapters
packages/blue-sdk-viem/src/fetch/vault-v2/VaultV2MorphoMarketV1Adapter.ts Implements fetch logic for market V1 adapters
packages/blue-sdk-viem/src/queries/vault-v2/GetVaultV2MorphoMarketV1Adapter.ts Deployless query contract bytecode and ABI
packages/blue-sdk-viem/src/abis.ts Adds ABIs for market V1 adapter and factory contracts
packages/blue-sdk-viem/contracts/vault-v2/interfaces/IMorphoMarketV1Adapter.sol Defines Solidity interface for market V1 adapters
packages/blue-sdk-viem/contracts/vault-v2/GetVaultV2MorphoMarketV1Adapter.sol Deployless query contract implementation
packages/blue-sdk-viem/test/VaultV2Adapter.test.ts Adds tests for market V1 adapter and refactors existing tests
packages/blue-sdk-viem/test/setup.ts Updates fork block number for testing
packages/blue-sdk-viem/src/fetch/Vault.ts Minor refactor from Array.from to .map()

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

});

describe("LiquidityAdapter", () => {
describe("maxDeposit function", () => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO we should add a maxWithdraw test case limited by market liquidity

@Rubilmax Rubilmax merged commit 671afb8 into next Oct 16, 2025
17 checks passed
@Rubilmax Rubilmax deleted the feat/vault-v2-market-v1-adapter branch October 16, 2025 10:03
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.

3 participants