Skip to content

feat: add configurable governance parameter setters#78

Open
Tranquil-Flow wants to merge 1 commit into
devfrom
41-configurable-governance
Open

feat: add configurable governance parameter setters#78
Tranquil-Flow wants to merge 1 commit into
devfrom
41-configurable-governance

Conversation

@Tranquil-Flow
Copy link
Copy Markdown

Summary

Adds owner-controlled setter functions for governance parameters, allowing Safety Net creators to tune their group's rules after creation.

New Setters

  • setConsensusThreshold(id, newThreshold) — range: 1-100
  • setAutoThreshold(id, newAutoThreshold) — must be > 0
  • setSmallWithdrawsLimit(id, newLimit) — must be > 0
  • setContestWindow(id, newWindow) — must be > 0 and ≤ votingWindow
  • setVotingWindow(id, newWindow) — must be > 0 and ≥ contestWindow

Changes

  • ISafetyNet.sol: New event ParameterUpdated, 4 new errors, 5 function signatures
  • SafetyNet.sol: 5 setter implementations with owner check + validation + event emission
  • docs/PROTOCOL_EXPLAINER.md: ~300 line plain-language protocol overview

Testing

29 new tests: happy paths, unauthorized caller reverts, boundary validation (0/101 fail, 1/100 pass), cross-parameter constraints, event emission. All 126 tests pass.

Closes #41

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.

Give the design team a full list of configurable variables after finalization

1 participant