Integrate multi-sig governance for admin functions#175
Merged
Conversation
Introduce is-admin guard that checks if caller is either the direct contract owner or an authorized multisig contract. Admin functions (set-paused, set-fee-basis-points, propose/execute/cancel fee and pause changes) now accept calls from the multisig contract when authorized. Add set-multisig and get-multisig for managing the authorized multisig principal. Only the direct owner can set or revoke the multisig authorization.
Replace no-op execute-tx with dispatch-action that routes multisig proposals to the core tipstream contract. Supported action types: set-paused, set-fee, propose-fee, execute-fee, cancel-fee, propose-pause, execute-pause. Actions are executed before marking the transaction as completed, ensuring failed operations can be retried.
Cover the full multisig governance lifecycle: authorizing the multisig contract, pausing via multi-sig proposal/sign/execute, changing fees through governance, rejecting execution without sufficient signatures, and revoking multisig authorization. All 29 tests pass including 6 new multisig governance tests.
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.
Summary
Integrate the existing tipstream-multisig contract with the core tipstream contract so that admin operations can be executed through multi-signature governance rather than relying solely on a single owner key.
Changes
Core Contract (tipstream.clar)
is-adminprivate function that authorizes both direct owner and multisig contract callersauthorized-multisigdata var for storing the authorized governance contractset-multisig/get-multisigfor managing authorization (owner-only)is-admininstead of owner-only checkspropose-new-ownerandset-multisigremain strictly owner-only for securityMultisig Contract (tipstream-multisig.clar)
dispatch-actionprivate function that routes approved proposals to the core contractTests
Closes #62