Skip to content

Omit missing initializer calls error for initializers named *_unchained #1161

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 20, 2025

Conversation

ericglau
Copy link
Member

This PR omits the "missing initializer calls" error when the child contract's initializer name is *_unchained. These by design should not need to call parent initializers, as described in https://docs.openzeppelin.com/contracts/5.x/upgradeable#multiple-inheritance.

Note we still need to check that other child initializers properly call parent initializers, and some of those parent initializers can also be named *_unchained. Tests have been added for these cases.

Fixes #1150

@ericglau ericglau requested review from a team and CoveMB May 16, 2025 19:25
Copy link
Contributor

@CoveMB CoveMB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@ericglau ericglau merged commit 01607b4 into OpenZeppelin:master May 20, 2025
14 checks passed
@ericglau ericglau deleted the 1150 branch May 20, 2025 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Potential false positive "Missing initializer calls for one or more parent contracts"
3 participants