Skip to content
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

Add internal functions inside modifiers #4472

Merged

Conversation

allwin199
Copy link
Contributor

@allwin199 allwin199 commented Jul 21, 2023

Fixes #4466

Some modifiers could use internal functions to reduce code size impact

_checkGovernance, _checkProxy , _checkNotDelegated and _checkInitializing internal functions has been added.

PR Checklist

  • Tests
  • Documentation
  • Changeset entry (run npx changeset add)

@changeset-bot
Copy link

changeset-bot bot commented Jul 21, 2023

🦋 Changeset detected

Latest commit: e7bf564

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
openzeppelin-solidity Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@allwin199 allwin199 closed this Jul 21, 2023
@allwin199 allwin199 reopened this Jul 21, 2023
@allwin199
Copy link
Contributor Author

couldn't able to run changeset command

@ernestognw ernestognw requested review from Amxx and frangio July 21, 2023 21:04
Copy link
Member

@ernestognw ernestognw left a comment

Choose a reason for hiding this comment

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

Thanks @worksofallwin! I'm not sure yet about the docs. Perhaps we should move the description from the modifiers to the internal functions.

Let's wait for other team members input :)

contracts/governance/Governor.sol Outdated Show resolved Hide resolved
contracts/proxy/utils/Initializable.sol Outdated Show resolved Hide resolved
contracts/proxy/utils/UUPSUpgradeable.sol Outdated Show resolved Hide resolved
contracts/proxy/utils/UUPSUpgradeable.sol Outdated Show resolved Hide resolved
@ernestognw
Copy link
Member

couldn't able to run changeset command

Curious to know, do you see any specific error? npx changeset should install the changesets package if not yet installed so I'm not sure what could've happened.

@allwin199
Copy link
Contributor Author

Sure! If anything has to be updated, let me know.

@frangio
Copy link
Contributor

frangio commented Jul 26, 2023

Looks good to me but I agree with @ernestognw's suggestions.

@allwin199
Copy link
Contributor Author

@ernestognw I have committed the suggested changes.

@Amxx
Copy link
Collaborator

Amxx commented Jul 26, 2023

LGTM, still missing the changeset though

@allwin199
Copy link
Contributor Author

allwin199 commented Jul 26, 2023

@ernestognw @Amxx
This is the way I am trying to add changeset
when I run yarn changeset

error Command "changeset" not found.

LMK, if this is the right way, If not can you help with any documentation on how to do this?
https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md
I followed this documentation

@Amxx
Copy link
Collaborator

Amxx commented Jul 26, 2023

The command is npx changeset add (as shown in the template of the first post of this discussion)

@allwin199
Copy link
Contributor Author

@Amxx Thanks!

frangio
frangio previously approved these changes Jul 26, 2023
Copy link
Contributor

@frangio frangio left a comment

Choose a reason for hiding this comment

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

Thanks!

@frangio frangio merged commit 7222a31 into OpenZeppelin:master Jul 26, 2023
11 checks passed
This was referenced Sep 10, 2024
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.

Some modifiers could use internal functions to reduce code size impact
4 participants