Skip to content

refactor(morpho-sdk): drop useSimplePermit from vaultV1 migrateToV2#601

Merged
Foulks-Plb merged 4 commits into
mainfrom
Foulks-Plb/rm-useSimplePermit
May 4, 2026
Merged

refactor(morpho-sdk): drop useSimplePermit from vaultV1 migrateToV2#601
Foulks-Plb merged 4 commits into
mainfrom
Foulks-Plb/rm-useSimplePermit

Conversation

@Foulks-Plb
Copy link
Copy Markdown
Collaborator

@Foulks-Plb Foulks-Plb commented May 4, 2026

Summary

  • MorphoVaultV1.migrateToV2().getRequirements() no longer accepts useSimplePermit. V1 vault shares always implement EIP-2612, so the Permit2 fallback was unreachable on this code path.
  • Hardcodes useSimplePermit: true in the underlying getRequirements call.
  • Drops the now-unreachable permit2 entity test; updates the simple-permit test to call getRequirements() with no args.

Scope: only the vaultV1 → V2 migration entity. vaultV1.deposit, vaultV2.deposit, and marketV1 paths still expose useSimplePermit because they operate on underlying assets (USDC, WETH, …) that may not implement EIP-2612.

V1 vault shares always implement EIP-2612, so the Permit2 fallback was
unreachable on this path. `migrateToV2().getRequirements()` no longer
accepts the flag and always uses simple permit.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@Foulks-Plb Foulks-Plb self-assigned this May 4, 2026
@Foulks-Plb Foulks-Plb requested a review from alexbensimon May 4, 2026 15:49
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@Foulks-Plb
Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

devin-ai-integration[bot]

This comment was marked as resolved.

Comment thread packages/morpho-sdk/src/entities/vaultV1/vaultV1.ts
Foulks-Plb and others added 2 commits May 4, 2026 18:00
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@0xbulma 0xbulma changed the title refactor(morpho-sdk)!: drop useSimplePermit from vaultV1 migrateToV2 refactor(morpho-sdk): drop useSimplePermit from vaultV1 migrateToV2 May 4, 2026
@Foulks-Plb Foulks-Plb merged commit 4f412da into main May 4, 2026
7 checks passed
@Foulks-Plb Foulks-Plb deleted the Foulks-Plb/rm-useSimplePermit branch May 4, 2026 21:20
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