feat: Add DeviceWrapRegistry with Hats-based Guardian System#49
Open
feat: Add DeviceWrapRegistry with Hats-based Guardian System#49
Conversation
Add guardian council for device wrap and account recovery management: - DeviceWrapRegistry: Guardian-gated approval for over-cap device wraps - UniversalAccountRegistry: Add recovery mechanism with authorized caller - Hats Protocol integration for guardian role management - Configurable thresholds and instant wrap limits - Comprehensive test suite with 12/12 tests passing Key features: - Instant approval for first 3 devices (configurable) - Guardian quorum required for 4th+ devices - Account recovery via guardian consensus - POA Manager controls guardian hat and thresholds 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Fix formatting issues flagged by CI: - Align comment spacing in UniversalAccountRegistry - Consolidate function signature in DeviceWrapRegistry 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Only run CI on pull requests and manual workflow dispatch. This prevents duplicate CI runs on push and PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Key Features
DeviceWrapRegistry
maxInstantWraps)isWearerOfHat()instead of simple mappingUniversalAccountRegistry
recoverAccount(from, to)function for authorized account recoveryrecoveryCallerfield to authorize DeviceWrapRegistry as recovery executororgApproverfield for additional recovery authorization layerPOA Manager Controls
setGuardianHat(hatId)- Set which hat grants guardian permissionssetGuardianThreshold(n)- Configure approval quorum (default: 1)setMaxInstantWraps(n)- Configure instant approval limit (default: 3)Architecture
Test Plan
Files Changed
src/DeviceWrapRegistry.sol- New guardian-gated registry (337 lines)src/UniversalAccountRegistry.sol- Added recovery mechanismtest/DeviceWrapRegistry.t.sol- Comprehensive test suite (12 tests)IMPLEMENTATION_SUMMARY.md- Detailed documentationDeployment Flow
🤖 Generated with Claude Code