feat: Extend MultiSigContractV2 with Constructor, Constants, and Governance Controls #69
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
This PR significantly extends the functionality of
MultiSigContractV2by adding custom errors, governance-related constants, a reference to external contracts, and a constructor for initializing critical parameters. These changes lay the foundation for secure multisignature governance, attestation integration, and emergency management.Changes
🔒 New Custom Errors
MultiSigContract__TimelockActiveRaised when a transaction cannot execute due to an active timelock.
MultiSigContract__EmergencyModeActivePrevents execution of certain functions during emergency mode.
MultiSigContract__InvalidThresholdThrown when an invalid global signature threshold is set.
MultiSigContract__DuplicateSignerPrevents duplicate signer entries.
⚙️ New State Variables
Factory Token Reference
FactoryTokenContract public factoryTokenContract;Reference to the factory’s token contract for tighter integration.
Sign Protocol Instance
ISP public spInstance;Enables integration with Sign Protocol for attestations.
Schema IDs
uint64 public signatureSchemaId;uint64 public revocationSchemaId;uint64 public executionSchemaId;Each schema ID represents a different type of attestation (signatures, revocations, executions).
Signature Threshold
uint256 public signatureThreshold = 6000;Default 60% global signature threshold, represented as percentage * 100.
Emergency Controls
bool public emergencyMode;– Tracks whether the contract is in emergency mode.address public emergencyAdmin;– Privileged account capable of pausing/unpausing during emergencies.🏗 Constructor