Skip to content

Migrate adapter registries into src/periphery/registries - #960

Open
claude[bot] wants to merge 2 commits into
mainfrom
feat/migrate-registries
Open

Migrate adapter registries into src/periphery/registries#960
claude[bot] wants to merge 2 commits into
mainfrom
feat/migrate-registries

Conversation

@claude

@claude claude Bot commented Jul 31, 2026

Copy link
Copy Markdown

Requested by Mathis GD · Slack thread

Moves the adapter-registry contracts (RegistryList, MorphoMarketV1RegistryV2, MorphoVaultV1Registry) and their interfaces from the standalone vault-v2-adapter-registries repo into src/periphery/registries/.
Consolidates them alongside the other vault-v2 periphery so they live with the interfaces they depend on, dropping the cross-repo submodule imports.

Move RegistryList, MorphoMarketV1RegistryV2 and MorphoVaultV1Registry
(and their interfaces) from the standalone vault-v2-adapter-registries
repo into src/periphery/registries, rewriting the cross-repo submodule
imports to in-repo relative paths. Port the unit tests into
test/periphery and document the module in the periphery README.
Comment thread src/periphery/registries/RegistryList.sol
The adapter registries under src/periphery/registries are deployed on-chain
with bytecode compiled in the standalone vault-v2-adapter-registries repo,
which uses optimizer_runs = 999999. vault-v2's default is 100000, so a plain
move would silently change their bytecode.

Add a compilation restriction scoped to src/periphery/registries/** with
optimizer_runs = 999999 and evm_version = cancun, plus the matching
999999-cancun compiler profile. All other bytecode-relevant settings already
match the standalone repo (solc 0.8.28, via_ir, optimizer, cancun,
bytecode_hash = none), so the registries now compile to identical bytecode.
@MathisGD
MathisGD marked this pull request as ready for review July 31, 2026 16:48
@MathisGD MathisGD self-assigned this Jul 31, 2026
claude[bot]

This comment was marked as resolved.

@prd-carapulse prd-carapulse Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verified against canonical morpho-org/vault-v2-adapter-registries@722c001a5ebffcf5c50ad5abe0b61eef4ffe4273 (src/{RegistryList,MorphoMarketV1RegistryV2,MorphoVaultV1Registry}.sol and src/interfaces/*). Raw files are not byte-identical because the move updates copyright 2025→2026 and repo-local import paths/formatting; after normalizing only copyright/import declarations, all 3 contracts and 3 interfaces are identical with no logic/API differences.

Independent builds used Foundry v1.5.1 (verified forge SHA-256 a39fc1913b53dde6a35b603756f65d799e13817ef694107ec0d3704c20435cce), solc 0.8.28, via-IR, optimizer 999999 runs, Cancun, bytecode_hash=none. Full creation/runtime bytecode is identical (metadata stripping not needed):

  • RegistryList: creation d09870254cdb8b6768ffb603135ffa408b1ca01b0dfd0586f85dc00bcd5add68; runtime 7ccfbf1999fb0ead8f804856e66a43e928bdbc7b446c47905da745de60f5af25
  • MorphoMarketV1RegistryV2: creation a14bfc7c14a570c30eeccda16490cce7d9b91801dca69768674f3aa854416797; runtime 345f39a6281ea2e1529f5c3555c39cb8a8637a9c8f1039e7aec2316f63a2ea78
  • MorphoVaultV1Registry: creation 45fd34e1c81da2e45bc29103a5308d2da47a69ba6cf57cf3dc9352c676219658; runtime 322cdb0d2375ede2f288c4868f363fdb4b39422ccdefa355a468d057f88c69b0

Relevant tests: 14/14 pass in each repository; fmt and lint pass with the current repo toolchain; all PR checks are green. I found no copy/integration or security blocker.

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.

2 participants