fix(client): clean up deposit wallet deployment#129
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Verification
Note
Medium Risk
Changes which on-chain address clients bind to at creation and deploy time; wrong resolution could mis-route funds or deploy the wrong wallet type, though behavior is covered by new unit tests.
Overview
Updates default Deposit Wallet resolution when
walletis omitted on sync and async secure clients, replacing on-chain factory probing with a relayer-backed legacy check plus deterministic beacon derivation.When no wallet is passed, the client derives the legacy UUPS address and asks the relayer whether that wallet is already deployed; if yes, it keeps using the legacy address so existing users are unchanged. If not, it defaults to the beacon Deposit Wallet address for new deployments.
Deploy-on-create (
_deploy_default_deposit_wallet) now expects the resolved wallet to match the beacon-derived address only—no RPCderive_current_deposit_wallet_*calls in the client path.Unit tests cover both branches (legacy deployed vs beacon default) for
SecureClientandAsyncSecureClient.Reviewed by Cursor Bugbot for commit c098c9b. Bugbot is set up for automated code reviews on this repo. Configure here.