Skip to content

refactor: migrate DelegationController to @metamask/messenger - #6459

Merged
mikesposito merged 9 commits into
mainfrom
mikesposito/messenger/delegation-controller
Oct 27, 2025
Merged

refactor: migrate DelegationController to @metamask/messenger#6459
mikesposito merged 9 commits into
mainfrom
mikesposito/messenger/delegation-controller

Conversation

@mikesposito

@mikespositomikesposito commented Sep 4, 2025

Copy link
Copy Markdown
Member

Explanation

This PR migrates DelegationController to the new @metamask/messenger message bus, as opposed to the one exported from @metamask/base-controller.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed, highlighting breaking changes as necessary
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

Note

Migrates DelegationController to @metamask/messenger, updates controller/test imports to @metamask/base-controller/next, and renames metadata anonymous to includeInDebugSnapshot.

  • DelegationController:
    • Switch to @metamask/messenger (messenger.call, controller-specific messenger) and update types to Messenger.
    • Import BaseController/StateMetadata from @metamask/base-controller/next.
    • Rename metadata key anonymous -> includeInDebugSnapshot.
    • Replace internal calls from messagingSystem.call to messenger.call.
  • Tests:
    • Rework messenger mocks to use @metamask/messenger with namespacing/delegation.
    • Update deriveStateFromMetadata import and metadata key usage.
  • Package/Config:
    • Add dependency @metamask/messenger and TS project references.
    • Update changelog with BREAKING changes (new messenger, metadata key rename).
  • Docs:
    • Update README dependency graph (add delegation_controller --> messenger, add eip_7702_internal_rpc_middleware --> controller_utils).

Written by Cursor Bugbot for commit a3979fb. This will update automatically on new commits. Configure here.

@mikesposito
mikesposito marked this pull request as ready for review September 4, 2025 10:42
@mikesposito
mikesposito requested review from a team as code ownersSeptember 4, 2025 10:42
@mikespositomikesposito mentioned this pull request Sep 4, 2025
43 tasks
@mikesposito
mikespositoforce-pushed the mikesposito/messenger/delegation-controller branch from d676aaa to 2b596b6CompareSeptember 4, 2025 10:55
mcmire
mcmire previously approved these changes Sep 10, 2025
matallui
matallui previously approved these changes Sep 11, 2025
@mikesposito
mikesposito dismissed stale reviews from matallui and mcmire via db25b2cSeptember 23, 2025 13:34
@mikesposito
mikesposito enabled auto-merge (squash) September 23, 2025 13:35
matallui
matallui previously approved these changes Sep 23, 2025
@mcmire

Copy link
Copy Markdown
Collaborator

Need to resolve conflicts :(

matallui
matallui previously approved these changes Oct 14, 2025

@cryptodev-2scryptodev-2s 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.

LGTM!

@mikesposito
mikesposito added this pull request to the merge queueOct 27, 2025
@FrederikBolding
FrederikBolding removed this pull request from the merge queue due to the queue being cleared Oct 27, 2025
@mikesposito
mikesposito added this pull request to the merge queueOct 27, 2025
Merged via the queue into main with commit 4fbdc63Oct 27, 2025
256 of 257 checks passed
@mikesposito
mikesposito deleted the mikesposito/messenger/delegation-controller branch October 27, 2025 11:26
Sign up for freeto 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.

4 participants

@mikesposito@mcmire@matallui@cryptodev-2s