fix: add missing PaymasterHub config calls to deploy scripts#134
Merged
fix: add missing PaymasterHub config calls to deploy scripts#134
Conversation
…solidation Extract errors, events, and business logic into four specialized libraries to reduce PaymasterHub from 25,434 bytes (858 over limit) to 24,030 bytes (546 under limit), while improving code organization and maintainability. Changes: - PaymasterHubErrors: all 38 errors and 22 events with full NatSpec - PaymasterGraceLib: grace period checks and solidarity tier matching - PaymasterPostOpLib: budget adjustments and clamped deductions - PaymasterCalldataLib: execute() envelope validation and selector extraction Additional optimizations: - Remove RULE_ID_EXECUTOR (identical to RULE_ID_COARSE, created SDK confusion) - Remove totalDeposited field from OrgFinancials (no on-chain readers, event history sufficient) - Move getOrgGraceStatus view function to PaymasterHubLens - Consolidate duplicate _validateBatchRules loop bodies - Extract _setRulesBatch internal helper to deduplicate rule-setting code All 1089 tests pass. Contract is production-ready under size limit. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
MainDeploy.s.sol (both home and satellite) was missing three critical PaymasterHub configuration calls that DeployInfrastructure.s.sol had: 1. unpauseSolidarityDistribution() — initialize() sets distributionPaused=true, so without unpausing, the solidarity fund can't sponsor onboarding or org deploys. This caused SolidarityDistributionIsPaused reverts. 2. setOnboardingConfig(registry) — accountRegistry defaulted to address(0), causing InvalidOnboardingRequest reverts on every passkey onboarding attempt (AA33 0x82ed6225). 3. setOrgDeployConfig(orgDeployer) — org deploy sponsorship was disabled by default (enabled=false) and orgDeployer was address(0), so sponsored org deployments silently failed. Also adds setOrgDeployConfig to DeployInfrastructure.s.sol (same gap) and onboarding/solidarity verification checks to VerifyDeployment. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Coverage Report
Coverage by file
|
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
unpauseSolidarityDistribution()to MainDeploy home and satellite — without this, solidarity fund stays paused afterinitialize()and can't sponsor onboarding or org deployssetOnboardingConfig(registry)to MainDeploy home and satellite — without this,accountRegistrydefaults toaddress(0)causingInvalidOnboardingRequest(AA33 0x82ed6225) on every passkey onboardingsetOrgDeployConfig(orgDeployer)to all three deploy scripts (MainDeploy home, satellite, and DeployInfrastructure) — without this, org deploy sponsorship is disabled by defaultVerifyDeploymentAll three gaps were confirmed on-chain on the current Sepolia deployment via
cast call.Test plan
VerifyDeployment— confirm onboarding config and solidarity checks pass🤖 Generated with Claude Code