You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
setIssuer function (PortalRegistry)
Emits an IssuerAdded event even if the issuer address is already registered as an issuer.
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:
setIssuer
function (PortalRegistry)IssuerAdded
event even if theissuer
address is already registered as an issuer.contracts/src/PortalRegistry.sol:L87-L96
removeIssuer
function (PortalRegistry)IssuerRemoved
event even if theissuer
address is not an issuer.contracts/src/PortalRegistry.sol:L107-L115
updateRouter
function (AttestationRegistry and similar contracts)RouterUpdated
event even if the router address doesn’t actually change.contracts/src/AttestationRegistry.sol:L82-L90
contracts/src/ModuleRegistry.sol:L72-L80
contracts/src/PortalRegistry.sol:L78-L86
contracts/src/SchemaRegistry.sol:L83-L91
Task:
Update the implementation of the affected functions (and any other similar functions) to revert when no actual state change would take place.
The text was updated successfully, but these errors were encountered: