Skip to content

Update frontend for subgraph multi-chain split + schema changes #122

@hudsonhrh

Description

@hudsonhrh

Context

The subgraph has undergone significant changes across PRs #132, #137, #140, and #141. The frontend needs to be updated to reflect these changes. The subgraph now deploys as two separate subgraphs (poa-sepolia and poa-base-sepolia) instead of a single multi-chain subgraph.


1. Multi-Chain Subgraph Split (Breaking)

The subgraph is now split into two separate Graph Studio deployments:

  • poa-sepolia — indexes Sepolia (home chain)
  • poa-base-sepolia — indexes Base Sepolia (satellite chain)

What to update

  • Update the subgraph endpoint URL(s) to point to the two new subgraphs
  • Use @graphprotocol/graph-client with schema stitching to query across both subgraphs from a single client, OR query each subgraph separately depending on the data needed
  • Cross-chain name uniqueness (org names and usernames) is no longer enforced at the subgraph level — the isCanonicalName field has been removed. If cross-chain uniqueness matters, enforce it at the app layer

Removed fields

  • Organization.isCanonicalName — removed
  • Account.isCanonicalName — removed
  • NameReservation entity — removed entirely

2. Voting Contract Schema Changes (Breaking)

Both HybridVotingContract and DirectDemocracyVotingContract have been refactored to separate threshold (minimum support %) from quorum (minimum voter count):

HybridVotingContract

  • Added: thresholdPct: Int! — minimum support percentage (0-100)
  • Changed: quorum: Int! — was the threshold percentage, now means minimum voter count (type changed from percentage to absolute count)
  • Added: thresholdChanges derived relationship
  • Added: HybridVotingThresholdChange entity

DirectDemocracyVotingContract

  • Removed: quorumPercentage: Int!
  • Added: thresholdPct: Int! — minimum support percentage (0-100)
  • Added: quorum: Int! — minimum voter count
  • Added: thresholdChanges derived relationship
  • Added: DirectDemocracyVotingThresholdChange entity
  • Changed: DirectDemocracyVotingQuorumChange.newQuorumPercentagenewQuorum

What to update

  • Update all GraphQL queries that reference quorum on HybridVotingContract — the semantics have changed
  • Replace quorumPercentage with thresholdPct and quorum on DirectDemocracyVotingContract
  • Update any voting UI that displays threshold/quorum settings to show both values separately
  • Update DirectDemocracyVotingQuorumChange.newQuorumPercentagenewQuorum

3. Paymaster Bounty Removal (Breaking — PR #137)

All bounty-related functionality has been removed from the PaymasterHub:

Removed entities

  • PaymasterBountyConfig — entire entity removed
  • BountyEvent — entire entity removed
  • UserOpEvent — entire entity removed

Removed fields

  • PaymasterHubContract.bountyPoolBalance — removed
  • PaymasterOrgConfig.bountyConfig — derived relationship removed
  • PaymasterOrgStats.totalSuccessfulBounties — removed
  • PaymasterOrgStats.totalFailedBounties — removed
  • PaymasterOrgStats.totalBountyPaid — removed

Removed enums

  • BountyEventType — removed
  • ConfigChangeType.BountyConfigSet — removed from enum

What to update

  • Remove any bounty-related UI (bounty pool balance, bounty config, bounty events)
  • Remove postUserOp event display/tracking
  • Update paymaster stats display to remove bounty-related metrics
  • Remove any GraphQL queries referencing removed fields

4. New Cross-Chain Entities (New — informational)

New entities for cross-chain management have been added. These are mostly for admin/infrastructure monitoring but the frontend may want to display them:

Home chain (Sepolia) — PoaManagerHub

  • PoaManagerHubContract — hub contract state
  • SatelliteRegistration — registered satellite chains
  • CrossChainUpgradeDispatch — upgrade dispatches to satellites
  • CrossChainAddTypeDispatch — new contract type dispatches
  • CrossChainAdminCallDispatch — admin call dispatches

Satellite chain (Base Sepolia) — PoaManagerSatellite

  • PoaManagerSatelliteContract — satellite contract state
  • CrossChainUpgradeReceived — upgrades received from hub
  • CrossChainContractTypeReceived — contract types received
  • CrossChainAdminCallReceived — admin calls received

5. SwitchableBeacon Changes (Minor)

  • Beacon.id format changed from typeId to network-typeId (chain-aware to prevent collisions when stitching subgraphs)
  • BeaconOwnershipChange.changeType no longer includes "Cancelled" — only "Started" and "Completed" (migrated to OZ Ownable2Step)

6. Update Deployer Logic

The frontend's deployer/deployment logic also needs to be updated to reflect:

  • The new contract ABIs (voting threshold/quorum split, bounty removal)
  • Multi-chain deployment support (deploying orgs on Sepolia vs Base Sepolia)
  • Updated initialization parameters — thresholdPct_ replaces quorumPct/quorum_ in voting contract init functions
  • Removal of bounty-related deployment config from PaymasterHub
  • PaymasterHub ABI changes: fundBounty(), getBountyConfig(), bounty-related events all removed

Summary of breaking query changes

Old query field New field Entity
quorum (was threshold %) thresholdPct + quorum (voter count) HybridVotingContract
quorumPercentage thresholdPct + quorum DirectDemocracyVotingContract
newQuorumPercentage newQuorum DirectDemocracyVotingQuorumChange
isCanonicalName (removed) Organization, Account
bountyPoolBalance (removed) PaymasterHubContract
bountyConfig (removed) PaymasterOrgConfig
BountyEvent (removed)
UserOpEvent (removed)

Subgraph endpoints

  • Sepolia: poa-sepolia on Graph Studio
  • Base Sepolia: poa-base-sepolia on Graph Studio

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions