OpenZeppelin / OpenZeppelin/compact-contracts
Add RegulatedConfidentialNoteFungibleToken preset
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 55
- Forks
- 29
- Avg merge
- 5d 7h
- Merged PRs (30d)
- 25
Description
🧐 Motivation
The pieces are only useful together, and getting the wiring wrong silently breaks the compliance properties. A regulated deployment needs one reviewed composition it can deploy as-is.
📝 Details
contracts/src/token/presets/RegulatedConfidentialNoteFungibleToken.compact
- Wires core + Issuer + Authority + Audit + Delivery + supply, binding every role key in
initialize. - The whole design hangs off one chokepoint,
emitOutput(ownerPk, encPk, value, slot): audit first (which produces the nonce), deliver second, commit third. Every output note the preset ever creates — mint output, transfer output, transfer change, burn change, seizure recovery — flows through it, which is what makes the compliance properties structural. - Escrow-free
seize(k=17, ~75k rows): owner-spend and seizure race on the same shared nullifier, so the authority never holds spend keys and no escrow account exists. - Re-exports the ledger fields wallets, auditors, and indexers must read (a prefix-only import would keep them out of the generated
ledger()reader). - Costs:
transferk=18 / ~136k rows,burnk=17 / ~83k rows,mintk=17 / ~69k rows,attestSupplyk=13 / ~4.7k rows.
Landed in #679 (draft).
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
Read contracts/src/token/presets/RegulatedConfidentialNoteFungibleToken.compact and the draft work in #679 first. Trace emitOutput and initialize, then verify that the listed token operations use the reviewed composition and that the required ledger fields are re-exported.
Written by the indexing model from the issue text.
Assessment
- Domain
- blockchain
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100