Skip to content

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.
@MoonBoi9001 MoonBoi9001 requested a review from tmigone September 20, 2024 11:45
Copy link
Member

@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