feat: governance cache SDK, payloads panel, and gasless voting#3063
feat: governance cache SDK, payloads panel, and gasless voting#3063JoaquinBattilana wants to merge 9 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
📦 Next.js Bundle Analysis for aave-uiThis analysis was generated by the Next.js Bundle Analysis action. 🤖
|
| Page | Size (compressed) |
|---|---|
global |
1.33 MB (🟡 +827 B) |
Details
The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.
Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis
If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!
New Page Added
The following page was added to the bundle from the code in this PR:
| Page | Size (compressed) | First Load |
|---|---|---|
/governance/timeline-preview |
9.85 KB |
1.34 MB |
Thirteen Pages Changed Size
The following pages changed size from the code in this PR compared to its base branch:
| Page | Size (compressed) | First Load |
|---|---|---|
/ |
95.93 KB (🟡 +53 B) |
1.42 MB |
/bridge |
38.1 KB (🟢 -51 B) |
1.36 MB |
/dashboard |
85.5 KB (-4 B) |
1.41 MB |
/faucet |
15.05 KB (-1 B) |
1.34 MB |
/governance |
43.1 KB (🟢 -46.97 KB) |
1.37 MB |
/governance/ipfs-preview |
100.36 KB (🟢 -1.44 KB) |
1.42 MB |
/governance/v3/proposal |
91.2 KB (🟢 -42.71 KB) |
1.42 MB |
/markets |
54.81 KB (🟡 +53 B) |
1.38 MB |
/reserve-overview |
39.85 KB (-2 B) |
1.37 MB |
/safety-module |
56.37 KB (🟡 +2 B) |
1.38 MB |
/sentry-example |
2.78 KB (🟡 +36 B) |
1.33 MB |
/sgho |
95.81 KB (🟡 +156 B) |
1.42 MB |
/staking |
33.48 KB (-2 B) |
1.36 MB |
Details
Only the gzipped size is provided here based on an expert tip.
First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.
Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis
Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.
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, revives gasless voting behind a server-side Gelato relay, and adds an experimental redesigned proposal timeline.
Changes
Governance cache SDK
src/services/governance-cache-sdk/(raw fetch +gqlauthoring + hand-written types) over the curated cache endpoints, plus the auto-generated/derived fields needed to fully replace the subgraph.src/hooks/governance/useGovernanceCache.ts; query keys centralized inqueryKeysFactory.governanceCache*.Payloads panel
ProposalPayloadspanel: per-payload chain, id, state, access level, creator, controller, executable targets, and Seatbelt report link.PayloadAction[](target/signature/callData/value/withDelegateCall/accessLevel) per payload.Gasless voting
pages/api/gelato/relay.tsserver route holds the Gelato sponsor key server-side (never bundled to the client) and relays via Gelato's sponsored-call REST endpoint.submitVoteBySignatureselector, so sponsored gas can't be spent on arbitrary transactions.NEXT_PUBLIC_ENABLE_GASLESS_VOTING(public on/off) plus the server-sideGELATO_SPONSOR_KEY; dormant unless both are set.Proposal timeline (experimental)
src/modules/governance/proposal/ProposalTimeline.tsx: a single-spine timeline that weaves the three state machines (proposal core / voting machine / per-chain payloads) onto one line, driven entirely by existing cache data.~) chained from the known durations, floored atnowso a step that's ready-but-awaiting-its-tx never reads as a past/overdue date.2 / 3 executed · 1 expired), hollow while still waiting.ProposalLifecycleCachefor side-by-side comparison, plus a dev-only preview route/governance/timeline-previewrendering all lifecycle states with mocked data.Notes
actionsdepend on the cache backend exposing the field (already live on staging).cooldownPeriod, payloaddelay/gracePeriod, tx hashes) pending cache exposure — marked with TODOs. Before it replaces the current timeline we'd remove the old component and the preview page.