OpenZeppelin / OpenZeppelin/compact-contracts

dev: restructure multisig module layout and consolidate duplicated preset logic

Open
#619 0 comments 0 reactions 1 assignee View on GitHub

@0xisk is already working on this.

Since Jul 9, 2026.

  • #628 by @0xisk — closed without merging
1-medium enhancement
Dominant language
TypeScript
Stars
55
Forks
29
Avg merge
5d 7h
Merged PRs (30d)
25

Description

Summary

Reorganize multisig/ modules into concern-based subdirectories, retire the
duplicated signer module, and extract shared logic so presets become thin,
composable wirings instead of monolithic contracts.

Motivation

  • No contract-to-contract calls on Midnight → capabilities must be composed into
    one contract. The current presets can't compose: each is a top-level contract
    with its own constructor, and V2/V3 redefine the same structs/circuits.
  • Signer.compact and SignerManager.compact are one module in two generations
    (identical state; Signer adds init guards). Keeping both is leftover migration.
  • ShieldedMultiSig / V2 / V3 imply a version lineage, but they are three
    independent designs (proposal / signature / token mint-burn).
  • ECDSA-commitment verification is copy-pasted verbatim across V2 and V3; V1
    inlines proposal-approval tracking that belongs in ProposalManager.

Proposed change

Layout (modules grouped by concern; test/mocks/ mirrors it):

multisig/
├── signer/      SignerManager  (+ SignatureVerifier)
├── proposal/    ProposalManager
├── treasury/    ShieldedTreasury / ShieldedTreasuryStateless / UnshieldedTreasury
├── forwarder/   ForwarderPrivate / ForwarderShielded / ForwarderUnshielded
└── presets/     …  (presets/forwarder/ unchanged)
  • Retire legacy SignerManager; rename SignerSignerManager (hardened
    content). Migrate imports, mocks, and Signer:SignerManager: error strings.
  • Extract a SignatureVerifier module from the V2/V3 duplication.
  • Fold V1's approval tracking into ProposalManager.
  • Rename presets by behavior: ShieldedProposalMultiSig (V1),
    ShieldedSignatureMultiSig (V2), ShieldedTokenMultiSig (V3). Standardize
    MultiSig casing.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.