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

Upgrade to OpenZeppelin V5 #703

Merged
merged 12 commits into from
Oct 14, 2023
Merged

Upgrade to OpenZeppelin V5 #703

merged 12 commits into from
Oct 14, 2023

Conversation

andreivladbrg
Copy link
Member

Closes #702

@PaulRBerg
Copy link
Member

When introducing a large change like this, it is important to explain the changes so that the PR reviewer has context.

The change from _requireMinted to _requireOwned is obvious, but the one from _beforeTokenTransfer to _update is not. Could you please shed some light on it (by sharing the link to the relevant OpenZeppelin docs, at a minimum)?

@andreivladbrg
Copy link
Member Author

but the one from _beforeTokenTransfer to _update is not. Could you please shed some light on it (by sharing the link to the relevant OpenZeppelin docs, at a minimum)?

Well, you created the issue sharing the relevant OpenZeppelin docs 😅, it says in the link shared all informations needed.

I am going to share it again: https://github.com/OpenZeppelin/openzeppelin-contracts/releases/tag/v5.0.0

image

@PaulRBerg
Copy link
Member

Yep, "sharing again" would have been useful in the PR comment so that I don't have to hop through two links and identify the ERC-721 changes.

Copy link
Member

@PaulRBerg PaulRBerg left a comment

Choose a reason for hiding this comment

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

Generally looks good to me except for that comment below.

Also: don't we need to change the pragma to >0.8.20?

Compiling the code doesn't work with v0.8.19 (see my foundry-multibuild).

docs: document "_update" function
test: check IERC20Errors custom error revert
@andreivladbrg
Copy link
Member Author

don't we need to change the pragma to >0.8.20?

missed it, we should

@andreivladbrg
Copy link
Member Author

I changed the pragma solidity to >=0.8.20, does it look good now? @PaulRBerg if yes, can you approve?

@PaulRBerg
Copy link
Member

@andreivladbrg the PR looks good technically now but it might be worth reconsidering if we want to merge this on main because we've already signed the engagement contracts with the auditors.

@PaulRBerg
Copy link
Member

And it might also be worth holding off to upgrading to OpenZeppelin v5 until it gets a little more established in the industry, potential bugs are fixed, etc.

@andreivladbrg
Copy link
Member Author

we've already signed the engagement contracts with the auditors

as far as I know they'll start working on this in november, the change made in src is just refactoring the ERC721 hooks, we should ask them first, but i doubt it would be an issue

until it gets a little more established in the industry, potential bugs are fixed

agree with this

@PaulRBerg
Copy link
Member

PaulRBerg commented Oct 12, 2023

as far as I know they'll start working on this in november

That's correct but the engagement contracts specifically mention the v1.1.0 changes as specified in the CHANGELOG on main.

we should ask them first

we should

agree with this

Then maybe we should merge this PR on a staging branch

@PaulRBerg PaulRBerg changed the base branch from main to 2.2 October 14, 2023 12:02
Copy link
Member

@PaulRBerg PaulRBerg left a comment

Choose a reason for hiding this comment

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

Changed the base branch to 2.2. Merging now.

@PaulRBerg PaulRBerg merged commit 326a94e into 2.2 Oct 14, 2023
9 checks passed
@PaulRBerg PaulRBerg deleted the build/update-openzeppelin branch October 14, 2023 12:31
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.

Upgrade to OpenZeppelin V5
2 participants