Skip to content

fix: index onboarding and org deploy configs at template creation#154

Merged
hudsonhrh merged 1 commit intomainfrom
hudsonhrh/fix-paymaster-init-config
Apr 7, 2026
Merged

fix: index onboarding and org deploy configs at template creation#154
hudsonhrh merged 1 commit intomainfrom
hudsonhrh/fix-paymaster-init-config

Conversation

@hudsonhrh
Copy link
Copy Markdown
Member

Summary

The OnboardingConfig and OrgDeployConfig subgraph entities were always empty because their events (OnboardingConfigUpdated, OrgDeployConfigUpdated) fire during deployment BEFORE registerInfrastructure creates the PaymasterHub template. The subgraph misses events emitted before its template exists.

Root cause

Deployment sequence (Gnosis):

  1. Block 45408022: setOnboardingConfig called → OnboardingConfigUpdated emitted
  2. Block 45408023: setOrgDeployConfig called → OrgDeployConfigUpdated emitted
  3. Block 45408029: registerInfrastructure called → PaymasterHub template created

Events at blocks 22-23 are missed because the template doesn't exist until block 29.

Fix

In handleInfrastructureDeployed, after creating the template, read the current config state from the contract using try_getOnboardingConfig() and try_getOrgDeployConfig(). This is the same pattern already used for the solidarity fund balance (try_getSolidarityFund()).

Also reads try_getGracePeriodConfig() for accurate grace period values instead of hardcoded defaults.

Build

graph codegen ✓, graph build

After deploying

Both Arbitrum and Gnosis subgraphs need redeployment. After reindexing, the /protocol dashboard's Paymaster Configuration section will show the correct config values.

🤖 Generated with Claude Code

The OnboardingConfigUpdated and OrgDeployConfigUpdated events are
emitted during deployment (via adminCall) BEFORE registerInfrastructure
creates the PaymasterHub template. This means the subgraph never
indexes these events, leaving OnboardingConfig and OrgDeployConfig
entities empty.

Fix: In handleInfrastructureDeployed, after creating the PaymasterHub
template, read the current config state from the contract using
try_getOnboardingConfig() and try_getOrgDeployConfig(), and populate
the entities. Same pattern already used for solidarity fund balance
and PaymasterInitialized data.

Also reads getGracePeriodConfig() to get accurate grace period values
instead of hardcoded defaults.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@hudsonhrh hudsonhrh merged commit 27d8535 into main Apr 7, 2026
5 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