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

Remove code in preparation for v5.0 #4258

Merged
merged 37 commits into from
May 19, 2023
Merged

Conversation

Amxx
Copy link
Collaborator

@Amxx Amxx commented May 16, 2023

Fixes #3918

Fixes LIB-824
Fixes LIB-825
Fixes LIB-826

This PR removes:

  • Escrows & PullPayment
  • ERC777 & ERC1820Implementer
  • CrossChain (+vendor)
  • GovernorProposalThreshold
  • Timers library
  • Checkpoints.History
  • ERC20.safeApprove
  • AccessControl._setupRole
  • ifAdmin modifier
  • getters in the proxies
  • getter with error string (in Math.sol and EnumerableMap.sol
  • deprecated draft-xxx files
  • PullPayment

Note:
We keep the IERC777 interfaces in the contracts/interfaces folder. Should plan a migration script that rewrite the import part for these ?

PR Checklist

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

@changeset-bot
Copy link

changeset-bot bot commented May 16, 2023

🦋 Changeset detected

Latest commit: 41732d3

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 Major

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

@Amxx Amxx requested review from frangio and ernestognw and removed request for frangio May 16, 2023 15:32
@frangio
Copy link
Contributor

frangio commented May 17, 2023

Should plan a migration script that rewrite the import part for these ?

I wouldn't have a migration script this time because I expect that it will be very few renamed/moved files, we should list it in CHANGELOG.md under "How to upgrade from 4.x".

I would consider merging all the removal changesets into one, what do you think?

contracts/security/PullPayment.sol Outdated Show resolved Hide resolved
contracts/token/ERC20/utils/SafeERC20.sol Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

We need to explain the rationale for some of these removals, I think particularly this one, perhaps both in the PR description and the changesets/changelog.

Copy link
Contributor

Choose a reason for hiding this comment

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

So what's the rationale? There's none in the PR description and the changelog only states the removal 😆 Are these bridges or the removed contracts unsafe? Did universal bridges become so good that there's no reason to support custom ones?

Copy link
Member

@ernestognw ernestognw Jul 19, 2023

Choose a reason for hiding this comment

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

The rationale is basically that the contracts had really low usage and the Crosschain landscape went in a different direction, this includes other bridges' technology and use cases.

I think the changeset is fine as it is right now, perhaps some of these notes may be added to the changelog in a different fashion other than a changeset entry.

contracts/governance/README.adoc Outdated Show resolved Hide resolved
contracts/utils/math/SafeMath.sol Outdated Show resolved Hide resolved
@frangio
Copy link
Contributor

frangio commented May 17, 2023

We should remove Checkpoint.History as well (#4019). We had a PR for this that we may want to consider: #4170

@Amxx
Copy link
Collaborator Author

Amxx commented May 17, 2023

Removing History has been on my mind, but it was not listed anywhere, and we did not discuss it, so I wanted to bring it up latter. But if you agree, lets do it!

@ernestognw, is that ok with you as well ?

We should remove Checkpoint.History as well (#4019). We had a PR for this that we may want to consider: #4170

The PR is a bit old, an might create some conflicts. Possibly easier to re-do it here independently.

@RenanSouza2
Copy link
Contributor

Removing History has been on my mind, but it was not listed anywhere, and we did not discuss it, so I wanted to bring it up latter. But if you agree, lets do it!

@ernestognw, is that ok with you as well ?

We should remove Checkpoint.History as well (#4019). We had a PR for this that we may want to consider: #4170

The PR is a bit old, an might create some conflicts. Possibly easier to re-do it here independently.

I made this new branch but did not open a new PR

https://github.com/RenanSouza2/openzeppelin-contracts/tree/next-v5.0-Checkpoint-history-v2

@RenanSouza2
Copy link
Contributor

The PR is a bit old, an might create some conflicts. Possibly easier to re-do it here independently.

I closed that one myself for this reason and I also didn't want to spam PRs

@Amxx
Copy link
Collaborator Author

Amxx commented May 17, 2023

I would consider merging all the removal changesets into one, what do you think?

What syntax would you use? I think we should have one line per "important" removal.

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.

6 participants