Skip to content

feat: governance cache SDK, payloads panel, and gasless voting#3063

Open
JoaquinBattilana wants to merge 6 commits into
mainfrom
feat/governance-cache-sdk
Open

feat: governance cache SDK, payloads panel, and gasless voting#3063
JoaquinBattilana wants to merge 6 commits into
mainfrom
feat/governance-cache-sdk

Conversation

@JoaquinBattilana

Copy link
Copy Markdown
Member

Summary

Migrates governance/proposal pages off the TheGraph subgraph onto the governance-v3-cache GraphQL API, adds a payloads panel with executable targets and Seatbelt links, and revives gasless voting behind a server-side Gelato relay.

Changes

Governance cache SDK

  • New typed fetching layer in src/services/governance-cache-sdk/ (raw fetch + gql authoring + hand-written types) over the curated cache endpoints, plus the auto-generated/derived fields needed to fully replace the subgraph.
  • React Query hooks consolidated into src/hooks/governance/useGovernanceCache.ts; query keys centralized in queryKeysFactory.governanceCache*.
  • Old subgraph data path removed from governance.

Payloads panel

  • New ProposalPayloads panel: per-payload chain, id, state, access level, creator, controller, executable targets, and Seatbelt report link.
  • Lifecycle panel heading renamed to "Timeline"; the Seatbelt link moved into the payloads panel.
  • SDK now surfaces PayloadAction[] (target/signature/callData/value/withDelegateCall/accessLevel) per payload.

Gasless voting

  • New pages/api/gelato/relay.ts server route holds the Gelato sponsor key server-side (never bundled to the client) and relays via Gelato's sponsored-call REST endpoint.
  • The route whitelists the target against known voting machines and requires the submitVoteBySignature selector, so sponsored gas can't be spent on arbitrary transactions.
  • Client gasless path is a single step (sign EIP-712 -> relay -> poll public task status); the dead two-step approval scaffolding was removed.
  • Gated by NEXT_PUBLIC_ENABLE_GASLESS_VOTING (public on/off) plus the server-side GELATO_SPONSOR_KEY; dormant unless both are set.

Notes

  • Payload actions depend on the cache backend exposing the field (already live on staging).
  • No new npm dependencies.

@vercel

vercel Bot commented Jul 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
interface Ready Ready Preview, Comment Jul 3, 2026 2:53pm

Request Review

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