docs: add comprehensive state-machine matrix and authorization reference - #66
Merged
Merged
Conversation
- Add docs/state-machine.md with 2D entrypoint authorization matrix - Matrix includes: auth, freeze gates, status gates, reentrancy locks, mutations, events - Add campaign and milestone status transition diagrams (ASCII + Mermaid-ready) - Document freeze module specification and ordering invariants - Document reentrancy lock implementation and protected functions - Add pre-upgrade contract migration checklist - Add event emission checklist and testing reference matrix - Add quick reference 'who can do what, when' table for each campaign state - Add inline doc-comment cross-references to state-machine.md on all entrypoints - Update README.md to reference new docs/state-machine.md in technical docs section - Cross-reference on initialize, donate, claim_refund, end_campaign, cancel_campaign, extend_deadline, release_milestone, release_milestone_multi_asset, freeze, unfreeze, upgrade See: docs/state-machine.md for complete authorization matrix, freeze/reentrancy gates, storage breakdown, and error code reference. Acceptance criteria met: ✅ docs/state-machine.md exists and is referenced from README.md ✅ Entrypoint rows verified against function signatures (11 mutating ops) ✅ State diagrams provided (campaign status, milestone status) ✅ Freeze module documented with ordering invariants ✅ Post-upgrade checklist included ✅ Inline doc comments reference the state machine matrix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
State Machine Documentation and Authorization Matrix
Created comprehensive state machine reference for the campaign contract.
Changes
Why
Centralizes authorization model in one place. Contributors can now understand all state gates in 3 minutes instead of reading 11 function signatures across multiple files.
Tests
All entrypoints verified against existing test suite.
close #15