-
Notifications
You must be signed in to change notification settings - Fork 20
feat: add operator delegation mode support and deprecate rewards hooks #3095
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
Conversation
Implements Group 1 of TNT Core contract updates - delegation permission checks. Operators can now set delegation modes (Open, Whitelist, Disabled) and the UI respects these settings when delegating. - Add useCanDelegate hook for single operator eligibility check - Add useCanDelegateToOperators hook for batch operator checks - Add useOperatorDelegationModes hook for batch mode fetching - Update delegate page to check permissions before allowing delegation - Show delegation mode badges on operator selection - Disable non-delegatable operators in selection modal - Sync ABI files with new delegation functions Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
… integration Rewards functionality has been moved to a separate RewardsManager contract in TNT Core. These hooks are temporarily deprecated until the new contract integration is implemented. - Deprecate useClaimDelegatorRewardsTx with no-op for API compatibility - Remove rewards fetching from useUserRestakingStats - Update local testnet fixtures - Update credits tree data Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add delegation mode column to operator tables showing Open/Whitelist/Self Only badges. Updates Operator interface and GraphQL query to include delegationMode field from indexer. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Claude finished @vutuanlinh2k2's task —— View job PR Review: Operator Delegation Mode Support
|
Response to Claude's ReviewThanks for the detailed review! I've analyzed each issue raised and here's my assessment: Issues We'll Address
Issues That Are Actually Fine
Low Priority (Won't Fix Now)
Will push fixes for items 1-3 shortly. |
- Standardize stale time across delegation hooks using CACHE_CONFIG.DELEGATION - Normalize address casing in OperatorsTable for consistent Map lookups - Add safeBigInt helper to prevent crashes on invalid GraphQL data Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Reset notification tracking state when active EVM address changes to avoid showing notifications for already-persisted transactions when switching MetaMask accounts. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sort operators in the table the same way as the select operator modal: Open > Whitelist (whitelisted) > Whitelist (not whitelisted) > Self Only Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
@claude please review my recent changes |
|
Claude finished @vutuanlinh2k2's task —— View job Review of Recent Changes ✅I've reviewed your recent changes focusing on the fixes you mentioned implementing. Todo List:
Assessment of Fixes1. ✅ Stale Time Consistency Fixed
2. ✅ Map Key Casing Normalization Fixed
3. ✅ BigInt Parsing Safety Fixed
Additional Quality Improvements NoticedCode Organization:
Performance:
Type Safety:
No New Issues FoundThe recent changes are well-implemented and address all the concerns raised in my previous review. The code quality has actually improved with:
SummaryAll three promised fixes have been successfully implemented with good attention to detail. The cache configuration system is particularly well-designed and will benefit the entire codebase. The changes maintain backwards compatibility while fixing the identified issues. Status: All review concerns addressed ✅ |

Summary
Video
CleanShot.2026-01-26.at.22.19.04.mp4
(note: the flicker in the operator table at the end of the video is already fixed)
Test plan
🤖 Generated with Claude Code