Skip to content

chore(IAWPRegistry): remove unused WorknetTokenFactoryUpdated event#9

Open
fadai216 wants to merge 1 commit into
awp-core:mainfrom
fadai216:chore/remove-dead-event
Open

chore(IAWPRegistry): remove unused WorknetTokenFactoryUpdated event#9
fadai216 wants to merge 1 commit into
awp-core:mainfrom
fadai216:chore/remove-dead-event

Conversation

@fadai216

Copy link
Copy Markdown

Summary

IAWPRegistry.sol declares an event that is never emitted anywhere in the codebase:

event WorknetTokenFactoryUpdated(address indexed newFactory);

The worknetTokenFactory is an immutable passed to AWPRegistry in its constructor — there is no setWorknetTokenFactory setter and grep confirms zero emit sites. The event is therefore dead interface surface.

Why it matters

Downstream indexers and skills subscribe to interface events. The awp-core/awp-skill protocol preset currently lists WorknetTokenFactoryUpdated among its tracked events (see that repo's README), so skill users wire up a subscription that can never fire. Misleading for integrators.

Fix

Remove the event declaration from the interface. Zero behavior change (nothing ever emitted it).

A separate follow-up PR against awp-core/awp-skill should drop it from the protocol preset and adjust the count. Done separately to keep this PR minimal.

Diff

 interface IAWPRegistry {
     ...
     event WorknetPaused(uint256 indexed worknetId);
     event WorknetResumed(uint256 indexed worknetId);
     event WorknetCancelled(uint256 indexed worknetId);
     event WorknetRejected(uint256 indexed worknetId);
     event WorknetBanned(uint256 indexed worknetId);
     event WorknetUnbanned(uint256 indexed worknetId);

     // ── Governance parameter events ──
     event GuardianUpdated(address indexed newGuardian);
     event InitialAlphaPriceUpdated(uint256 newPrice);
     event InitialAlphaMintUpdated(uint256 amount);
-    event WorknetTokenFactoryUpdated(address indexed newFactory);
     event DefaultWorknetManagerImplUpdated(address indexed newImpl);
     ...
 }

@fadai216 fadai216 force-pushed the chore/remove-dead-event branch from 6a210d4 to 3dcae25 Compare April 24, 2026 10:32
The event is declared on the IAWPRegistry interface but never
emitted anywhere in the codebase. worknetTokenFactory is an
immutable set in the AWPRegistry constructor; there is no
setWorknetTokenFactory function.

Removing the dead event prevents downstream indexers and skills
from subscribing to something that can never fire.
@fadai216 fadai216 force-pushed the chore/remove-dead-event branch from 3dcae25 to 1095009 Compare April 24, 2026 10:32
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