OpenZeppelin / OpenZeppelin/compact-contracts
dev: extract a shared nonce module for the multisig presets
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 55
- Forks
- 29
- Avg merge
- 5d 7h
- Merged PRs (30d)
- 25
Description
Every multisig preset declares its own signature replay counter:
NativeShieldedTokenIssuer has export ledger _counter: Counter,
ShieldedMultiSigV2 has ledger _nonce: Counter. Same pattern, same
read-into-digest-then-increment usage, two declarations.
Low priority. Duplication, not a defect.
Extract a shared utils/Nonces module the presets import instead. It must
stay a distinct counter from NativeShieldedTokenDerivedNonce's coin-nonce
counter: the two advance independently and binding them together would make
every burn consume a coin nonce.
Context: #887 carried this as a code TODO, now removed under #904.
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
Locate the NativeShieldedTokenIssuer and ShieldedMultiSigV2 preset definitions, plus the existing NativeShieldedTokenDerivedNonce coin-nonce counter. Read how _counter and _nonce are consumed, then trace the intended utils/Nonces import; done means both presets share it while the coin-nonce counter remains independent.
Written by the indexing model from the issue text.
Assessment
- Domain
- blockchain
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100