Skip to content

fix: add missing PaymasterHub config calls to deploy scripts#134

Merged
hudsonhrh merged 4 commits intomainfrom
hudsonhrh/fix-deploy-paymaster-config
Mar 18, 2026
Merged

fix: add missing PaymasterHub config calls to deploy scripts#134
hudsonhrh merged 4 commits intomainfrom
hudsonhrh/fix-deploy-paymaster-config

Conversation

@hudsonhrh
Copy link
Member

Summary

  • Add unpauseSolidarityDistribution() to MainDeploy home and satellite — without this, solidarity fund stays paused after initialize() and can't sponsor onboarding or org deploys
  • Add setOnboardingConfig(registry) to MainDeploy home and satellite — without this, accountRegistry defaults to address(0) causing InvalidOnboardingRequest (AA33 0x82ed6225) on every passkey onboarding
  • Add setOrgDeployConfig(orgDeployer) to all three deploy scripts (MainDeploy home, satellite, and DeployInfrastructure) — without this, org deploy sponsorship is disabled by default
  • Add onboarding and solidarity verification checks to VerifyDeployment

All three gaps were confirmed on-chain on the current Sepolia deployment via cast call.

Test plan

  • Redeploy testnet with updated script
  • Run VerifyDeployment — confirm onboarding config and solidarity checks pass
  • Test passkey onboarding (solidarity mode) — should no longer revert with AA33
  • Test sponsored org deployment — should succeed with gas sponsorship

🤖 Generated with Claude Code

hudsonhrh and others added 4 commits March 18, 2026 14:38
…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>
@github-actions
Copy link
Contributor

Coverage Report

Metric Coverage
Lines 100.00% (0/0)
Statements 100.00% (0/0)
Branches 100.00% (0/0)
Functions 100.00% (0/0)
Coverage by file
File Lines Statements Branches Functions

@hudsonhrh hudsonhrh merged commit 97b7523 into main Mar 18, 2026
8 checks passed
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.

1 participant