-
-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Feature and its Use Cases
Summary
burnToken() does not emit a custom event, unlike issueToken() and revokeToken().
This creates inconsistency in the token lifecycle event pattern.
Current Behavior
issueToken()→ emitsTokenIssued✅revokeToken()→ emitsTokenRevoked✅burnToken()→ no custom event ❌ (only ERC721'sTransfer)
Proposed Change
Add a TokenBurned event for consistency:
event TokenBurned(address indexed burner, uint256 indexed tokenId);Why Not Rely on ERC721 Transfer?
The TokenIssued event includes the issuer field, which is not available in ERC721's Transfer event.
This data is fundamental to TNT's trust model and enables efficient off-chain queries like:
"Show all tokens issued by X"
Removing custom events would break this capability.
Impact
- Consistent event pattern across all lifecycle operations
- Efficient off-chain filtering by burner address
- Better subgraph and analytics support
- Gas cost: ~375 gas per burn (acceptable trade-off)
Additional Context
Relevant code:
- Events: https://github.com/StabilityNexus/TNT/blob/main/contracts/src/TNT.sol#L38-L39
- burnToken(): https://github.com/StabilityNexus/TNT/blob/main/contracts/src/TNT.sol#L92-L99
Code of Conduct
- I have joined the Discord server and will post updates there
- I have searched existing issues to avoid duplicates
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request