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

[TASK] Revert when no change happens in a state-changing function #804

Open
alainncls opened this issue Nov 19, 2024 · 0 comments
Open

[TASK] Revert when no change happens in a state-changing function #804

alainncls opened this issue Nov 19, 2024 · 0 comments

Comments

@alainncls
Copy link
Collaborator

Title: Ensure State-Changing Functions Revert When No Actual State Change Occurs

Description:
Several state-changing functions in the codebase succeed and emit events even when no actual state change occurs. This can lead to misleading events being emitted, which may confuse off-chain consumers relying on event data to track on-chain activity. Additionally, allowing such calls to succeed provides no meaningful benefit and could indicate a mistake by the caller.

Examples:

  1. setIssuer function (PortalRegistry)

  2. removeIssuer function (PortalRegistry)

  3. updateRouter function (AttestationRegistry and similar contracts)

Task:
Update the implementation of the affected functions (and any other similar functions) to revert when no actual state change would take place.

@alainncls alainncls converted this from a draft issue Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready for development
Development

No branches or pull requests

1 participant