-
Notifications
You must be signed in to change notification settings - Fork 16
Add Snapshot integration for community governance voting and proposal creation #386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: rickstaa <[email protected]>
Co-authored-by: rickstaa <[email protected]>
Co-authored-by: rickstaa <[email protected]>
rickstaa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot looks good some smaak changed. The snapshot stuff should go on its own folder similar to treasury and governance under pages to not bloat the already exciting governance page code. Additionally it should be called snapshots and it should have a crwTe snapshot button and page.
…proposal page Co-authored-by: rickstaa <[email protected]>
Done! I've refactored the implementation: ✅ Moved Snapshot pages to Changes in commit 2504992. |
|
@copilot You should use https://snapshot.box/#/s:feifeifly.eth which has a ts sdk. Meaning people should be able to create directly from the Explorer. Not have to go to website. Also button has to be named create snapshot |
Co-authored-by: rickstaa <[email protected]>
Done! I've updated the implementation to support in-app Snapshot creation: ✅ Changed button text to "Create Snapshot" The SDK (@snapshot-labs/snapshot.js) works with both snapshot.org and snapshot.box as they share the same backend hub. Changes in commit 78d0d83. |
Integrates Snapshot to enable off-chain voting on community proposals outside LIPs and treasury funding, allowing orchestrators and delegators to express support or opposition to smaller governance changes and create new proposals directly in the Explorer.
Implementation
API Layer (
lib/api/snapshot.ts)castSnapshotVote()wrapper around@snapshot-labs/snapshot.jsSDK clientcreateSnapshotProposal()function for creating new proposals via SDKReact Integration
hooks/useSwr.tsx:useSnapshotProposals(),useSnapshotProposal(),useSnapshotVotingPower(),useSnapshotHasVoted()UI Components
SnapshotProposalRow: List view with status badges (active/pending/closed)SnapshotVotingWidget: Vote breakdown percentages, time remaining, voting interface with optional reason fieldSnapshotVoteButton: Handles wallet client integration for vote submissionPages
/snapshots- Proposal list from configured Snapshot space with "Create Snapshot" button/snapshots/[proposal]- Detail view with markdown description, vote distribution, metadata card (voting system, dates, snapshot block)/snapshots/create-proposal- In-app form interface for creating proposals directly with fields for title, description (Markdown support), voting choices, start date, and end dateNavigation
Configuration
Example Usage
Dependencies
@snapshot-labs/[email protected]: Official SDK for vote signing, submission, and proposal creationFixes Snapshot Integration for Non-LIP/Treasury Governance #324
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.