OpenZeppelin / OpenZeppelin/openzeppelin-contracts
Consider simpler initializer modifier
Nobody has claimed this yet.
- Dominant language
- Solidity
- Stars
- 27.2k
- Forks
- 12.4k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 33
Description
The current version of the initializer modifier includes some logic for backwards compatibility that was added in #3450, which was in fact a simplification of the backwards compatibility code introduced in #3344.
We should consider further simplifications that break backwards compatibility for 5.0.
Haven't thought about this yet but it would probably come down to making initializer exactly equivalent to reinitializer(1). This means that instead of:
the code should look more like:
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 in contracts/proxy/utils/Initializable.sol, comparing the initializer implementation at the referenced lines 85-88 with reinitializer around line 119. Establish the intended 5.0 compatibility policy before deciding whether the two modifiers can be made equivalent; done requires a settled scope and validated behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- solidity
- Domain
- blockchain, security
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100