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

fix: remove unused errors, use LegacyAllocationAlreadyMigrated to prevent migrating a legacy allocation twice (OZ N-02) #1029

Merged
merged 6 commits into from
Sep 24, 2024

Conversation

MoonBoi9001
Copy link
Member

Motivation:

Title:

N-02 Unused Errors

Details:

Unused errors can negatively affect code intent and readability.

The AllocationManagerZeroTokensAllocation, DataServiceFeatureNotImplemented, and LegacyAllocationAlreadyMigrated errors are unused.

Consider deleting the AllocationManagerZeroTokensAllocation error since creating allocations with no tokens is allowed for altruistic allocations. In addition, consider deleting the DataServiceFeatureNotImplemented error and using LegacyAllocationAlreadyMigrated to prevent migrating a legacy allocation twice.

Key changes

  • removed unused AllocationManagerZeroTokensAllocation
  • removed unused DataServiceFeatureNotImplemented
  • now using LegacyAllocationAlreadyMigrated to prevent migrating a legacy allocation twice

Copy link

openzeppelin-code bot commented Sep 17, 2024

fix: remove unused errors, use LegacyAllocationAlreadyMigrated to prevent migrating a legacy allocation twice (OZ N-02)

Generated at commit: 3b6438722bc43569fd077ec9a4b736498bd7dd49

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
2
4
0
15
40
61
Dependencies Critical
High
Medium
Low
Note
Total
0
0
0
0
0
0

For more details view the full report in OpenZeppelin Code Inspector

Use LegacyAllocationAlreadyMigrated to prevent migrating a legacy allocation twice.
Copy link
Contributor

@tmigone tmigone left a comment

Choose a reason for hiding this comment

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

👍

@tmigone tmigone merged commit cf2109f into horizon Sep 24, 2024
10 of 11 checks passed
@MoonBoi9001 MoonBoi9001 deleted the fix_oz_n-02 branch October 1, 2024 16:42
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.

2 participants