Skip to content

Fix/contract version detection 243#278

Merged
Mosas2000 merged 9 commits into
mainfrom
fix/contract-version-detection-243
Apr 25, 2026
Merged

Fix/contract version detection 243#278
Mosas2000 merged 9 commits into
mainfrom
fix/contract-version-detection-243

Conversation

@Mosas2000

Copy link
Copy Markdown
Owner

Implementation Highlights
On-Chain Versioning: Added a get-version read-only function to the sprintfund-core-v3.clar contract to allow the frontend to verify the protocol version.
Detection Service: Built a ContractVersionService that fetches the on-chain version once per session and caches it, reducing RPC overhead.
UI Guarding: Developed a ContractVersionGuard component that automatically disables interactive elements and provides clear, actionable feedback if a version mismatch is detected.
Transaction Gating: Integrated the version guard into all critical wallet interaction points:
Proposal Manifesting: Users cannot submit new proposals if the versions don't match.
Quadratic Voting: Voting controls are locked when a version mismatch is detected to prevent lost transaction fees.
Execution Safety: Proposal execution is gated to ensure the DAO's treasury is only interacted with through verified logic.
Vote Recovery: Users are protected when reclaiming stake costs from previous voting cycles.

Closes #243

@Mosas2000 Mosas2000 merged commit 645b2e6 into main Apr 25, 2026
9 of 28 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.

Bug: Add contract version detection before wallet actions

1 participant