feat: helper scripts to debug validation allow list#461
Merged
Conversation
The upgrade went badly because it wasn't saving the SSO beacon to the upgrade file, so a new beacon was deployed and used in the factory. The new beacon wasn't in the validation allow list, so any transactions using the proxy failed which means all accounts deployed via that factory were bad. Upgrading the factory helps, but we also need to upgrade the sso account beacon to the latest implemention. This can't fix existing accounts, but can work for new accounts. The factory upgrade might not have worked, so we need to deploy another paymaster to go with a new factory that deploys the allowed SSO beacon address. What a mess and I still can't get it working in PR...
There was a problem hiding this comment.
Pull Request Overview
This PR adds helper scripts to debug validation allowlist issues, specifically to troubleshoot why accounts are getting validation failures in contract upgrades and deployments.
- Introduces debugging scripts for paymaster and factory contract verification
- Provides tools to check beacon versions, proxy configurations, and deployment mismatches
- Adds utilities to deploy new contracts with proper configurations and sync beacon implementations
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/verify-paymaster-factory.ts | Verifies paymaster compatibility with factory addresses and modules |
| scripts/upgrade-factory-beacon.ts | Attempts factory beacon upgrades (identifies immutable beacon limitation) |
| scripts/sync-beacon-implementations.ts | Synchronizes beacon implementations between different beacons |
| scripts/fund-paymaster.ts | Sends ETH to paymaster contracts for funding |
| scripts/deploy-new-paymaster.ts | Deploys new paymasters with specified factory and module configurations |
| scripts/deploy-new-factory.ts | Deploys new factories pointing to specified beacons |
| scripts/debug-paymaster-error.ts | Debugs paymaster rejection issues with detailed analysis |
| scripts/check-factory-proxy-type.ts | Analyzes factory proxy type and admin configuration |
| scripts/check-deployment-mismatch.ts | Identifies mismatches between expected and actual beacon addresses |
| scripts/check-beacon-versions.ts | Checks beacon versions and proxy contract configurations |
| hardhat.config.ts | Imports all new debugging scripts into Hardhat configuration |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
ly0va
approved these changes
Sep 4, 2025
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.
Description
scripts to debug contract upgrade and deployment
Additional context
Trying to figure out why all accounts are getting validation failures