OpenZeppelin / OpenZeppelin/compact-contracts
dev: add integration tests for the moved multisig examples
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 55
- Forks
- 29
- Avg merge
- 5d 7h
- Merged PRs (30d)
- 25
Description
Context
The multisig examples (MultisigSignatureMintBurn, MultisigSignatureTreasury, MultisigProposalTreasury) were moved out of src/multisig/examples/ into test/integration/_mocks/ and converted from modules (+ test mocks) into self-contained top-level contracts. This keeps them as usage examples while positioning them to be exercised as integration-test fixtures — they compose production modules into one deployable contract, which is exactly what test/integration/ is for.
Their previous unit tests, simulators, and mocks were removed in the same change. No integration tests have been added yet — that is the purpose of this issue.
Moved contracts (point of reference)
contracts/test/integration/_mocks/MultisigSignatureMintBurn.compact— signature-authorized mint/burn of a native shielded token (3 signers, threshold 2).contracts/test/integration/_mocks/MultisigSignatureTreasury.compact— signature-authorized single-tx spend from a stateless shielded treasury.contracts/test/integration/_mocks/MultisigProposalTreasury.compact— caller-authorized on-chain proposal governance over a shielded treasury.
Task
Add integration coverage for the three, mirroring the existing test/integration/specs/nativeShieldedToken/ suite:
- Wire each contract into the integration compile step (
compact:integrationincontracts/package.json). - Add fixtures under
test/integration/fixtures/(signer commitments, salts, coins, recipients). - Add specs under
test/integration/specs/covering the happy paths (deposit / mint / burn / execute / propose→approve→execute) plus key failure modes (non-signer, below-threshold, wrong token color, replay). - Decide unit vs network suite — the
nativeShieldedToken/subtree runs undervitest.integration-net.config.ts; the signature examples may want a full-proof path too.
Notes
- ECDSA verification is stubbed in
EcdsaSignerManager(see #629), so signature-path tests can only verify membership / threshold / structure, not real signatures, until the primitive lands. - These examples were relocated from
src/multisig/examples/(originally introduced in #628).
Relates to #628.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with contracts/package.json and the existing test/integration/specs/nativeShieldedToken/ suite, then inspect the three contracts in test/integration/_mocks/. Add integration fixtures and specs for the listed happy paths and failure modes, wiring all contracts into compact:integration. Done means the suites compile and cover membership, thresholds, token color, replay, and proposal execution within the chosen test configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- blockchain, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100