OpenZeppelin / OpenZeppelin/compact-contracts
Add Ownable two-step transfer
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 55
- Forks
- 29
- Avg merge
- 5d 7h
- Merged PRs (30d)
- 25
Description
🧐 Motivation
Single-step ownership transfer risks handing control to a wrong or uncontrolled address (typo, zero address, a multisig that doesn't exist on Midnight). Two-step transfer is the pattern OpenZeppelin recommends in every Solidity audit, and matters more as institutions adopt Midnight.
📝 Details
Add a two-step ownership transfer on top of the existing Ownable: transferOwnership sets a pending owner (accountId), and the transfer completes only when that account calls acceptOwnership. Mirrors Solidity Ownable2Step.
Roadmap: Libraries → Ownable 2step (Priority MNF: high).
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 by locating the existing Ownable implementation and its tests; the issue names no files or test entry points. Trace transferOwnership and the current ownership state, then define done as a pending accountId being set and ownership changing only after that account calls acceptOwnership, with coverage for the two-step flow.
Written by the indexing model from the issue text.
Assessment
- Domain
- authorization, blockchain, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100