OpenZeppelin / OpenZeppelin/compact-contracts

Add Ownable two-step transfer

Open
#543 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1-medium effort: 3-M feat:access
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

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.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.