Skip to content

Hotfixes refixes#29

Merged
Steake merged 6 commits intomasterfrom
hotfixes-refixes
Nov 19, 2025
Merged

Hotfixes refixes#29
Steake merged 6 commits intomasterfrom
hotfixes-refixes

Conversation

@Steake
Copy link
Copy Markdown
Member

@Steake Steake commented Nov 19, 2025

This pull request introduces full support for deterministic, human-readable "word handles" using a new AddressHandleRegistry smart contract and BIP39 vocabulary, alongside major improvements to contract compilation, developer tooling, and documentation. The AddressClaim contract is also enhanced with efficient tracking and pagination of claimed addresses. The changes are organized into three main themes: new smart contracts and features, build tooling and scripts, and documentation/user experience.

Key changes:

1. New Smart Contracts & Features

  • AddressHandleRegistry contract and interface:
    Added AddressHandleRegistry.sol and IAddressHandleRegistry.sol to enable wallets to claim unique, deterministic handles (BIP39 phrases) mapped to their address. Includes validation, uniqueness guarantees, and support for multiple vocabularies. [1] [2]

  • BIP39 vocabulary integration:
    The handle registry uses a vocabulary contract generated from the BIP39 English word list, enabling deterministic phrase handles.

  • Active claim tracking and pagination in AddressClaim:
    The AddressClaim contract now tracks active claims, supports efficient addition/removal, and provides paginated queries for claimed addresses. [1] [2] [3] [4] [5]

2. Build Tooling & Scripts

  • Modular contract compilation scripts:
    Introduced separate scripts for compiling AddressClaim, AddressHandleRegistry, and all contracts at once. Scripts also auto-generate the BIP39 vocabulary contract and update relevant .env variables with bytecodes. [1] [2] [3] [4] [5] [6] [7]

  • Environment variable management:
    Updated .env.example and added a shell script to manage contract and handle registry addresses per network, ensuring smooth local setup and CI/CD integration. [1] [2]

3. Documentation & User Experience

  • Expanded documentation for word handles:
    Updated README.md and DOCUMENTATION.md to explain word handles, how to deploy the registry, and how to enable/disable it per network. Also clarified compilation steps and feature lists. [1] [2] [3]

These changes collectively enable a robust, multi-chain identity system with human-readable handles, improved contract management, and clear developer onboarding.

Copilot AI review requested due to automatic review settings November 19, 2025 21:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request introduces comprehensive support for deterministic, human-readable word handles built on the BIP39 vocabulary standard, alongside significant improvements to contract compilation infrastructure, developer tooling, and multi-chain identity management. The implementation enables wallets to claim unique, memorable phrases (e.g., "ocean-guitar-sunset") that map directly to their Ethereum addresses through a new on-chain registry system.

Key Changes

  • Word Handle System: New AddressHandleRegistry smart contract with BIP39 vocabulary support enables deterministic phrase claiming with validation, uniqueness guarantees, and multiple vocabulary support
  • Contract Compilation Refactor: Modular compilation scripts for AddressClaim, AddressHandleRegistry, and Bip39Vocabulary with automatic bytecode updates to environment variables
  • Enhanced Address Tracking: AddressClaim contract now efficiently tracks active claims with pagination support via getClaimedAddressesPaginated() and related view functions

Reviewed Changes

Copilot reviewed 30 out of 40 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/utils/wordhandles.js PRNG-based handle generation, BIP39 encoding/decoding, and deterministic phrase suggestions
src/stores/multichain.js Handle registry integration with claim/release operations and cross-chain handle lookups
src/stores/toast.js Improved toast ID generation with crypto.randomUUID() fallback
src/components/Explorer.svelte Major refactor with adaptive log fetching, handle display, and chain stats grid
src/components/AddressClaim.svelte Handle claiming UI with suggestion generation and vocabulary loading
src/components/AddressView.svelte Handle display with format-aware rendering and loading states
src/components/AdminPanel.svelte Multi-contract deployment support with per-contract configuration
src/components/Header.svelte Navigation menu refactor with active state tracking
src/components/MultiChainView.svelte Handle enrichment for multi-chain claim display
src/config/networks.js Handle registry address configuration per network
src/config/handleRegistryABI.js ABI definitions for handle registry interface
src/config/handleRegistryArtifact.js Artifact utilities for handle registry deployment
src/config/bip39VocabularyArtifact.js Artifact utilities for BIP39 vocabulary contract
src/config/addressClaimArtifact.js Updated ABI with pagination methods
scripts/utils/contractCompiler.cjs Refactored compiler with import resolution and shared infrastructure
scripts/utils/generateBip39Vocabulary.cjs Auto-generation of Solidity vocabulary contract from BIP39 word list
scripts/compile-handle-registry.cjs Compilation script for handle registry and vocabulary
scripts/compile-contract.cjs Simplified compilation script for AddressClaim
scripts/set-contract-env.sh Shell utility for environment variable management
contracts/AddressHandleRegistry.sol Core handle registry with validation and ownership tracking
contracts/IAddressHandleRegistry.sol Interface definition for handle registry
contracts/generated/Bip39Vocabulary.sol Auto-generated on-chain BIP39 vocabulary (2048 words)
contracts/AddressClaim.sol Enhanced with active claim tracking and pagination
public/wordlists/bip39-english.txt Standard BIP39 English word list (2048 entries)
package.json Added compile scripts and require-from-string dependency
README.md Expanded documentation for word handles and compilation
DOCUMENTATION.md Added handle registry architecture and configuration guide
COMPILATION.md Updated with multi-contract compilation instructions
.env.example Added handle registry address variables per network

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

claimTime: claimTimestamp * 1000,
isActive: true,
handle: handleSummary,
network: networkLabel || fallbackClaim.network,
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable networkLabel is referenced but not defined in this scope. This will cause a runtime error when executing this line.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback

Comment thread src/utils/wordhandles.js Outdated
if (!encoded || encoded.length === 0) {
return [];
}
const bytes = typeof encoded === 'string' ? ethers.getBytes(encoded) : ethers.getBytes(encoded);
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 92 has redundant type checking. The expression typeof encoded === 'string' ? ethers.getBytes(encoded) : ethers.getBytes(encoded) applies ethers.getBytes() in both branches, making the ternary operator unnecessary.

Copilot uses AI. Check for mistakes.
Comment thread src/stores/multichain.js Outdated
Comment on lines +81 to +83
"function getTotalClaims() public view returns (uint256)",
"function getClaimedAddresses(uint256 start, uint256 count) public view returns (address[] memory)",
"function getClaimedAddressesPaginated(uint256 offset, uint256 limit) public view returns (address[] memory)",
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 815 includes a duplicate ABI entry. getTotalClaims() is already defined at line 57, making line 81's definition redundant.

Copilot uses AI. Check for mistakes.
@Steake
Copy link
Copy Markdown
Member Author

Steake commented Nov 19, 2025

@copilot open a new pull request to apply changes based on the comments in this thread

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 19, 2025

@Steake I've opened a new pull request, #30, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits November 19, 2025 21:57
…cate ABI

Co-authored-by: Steake <530040+Steake@users.noreply.github.com>
Fix undefined variable, redundant code, and duplicate ABI entry
Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 19, 2025

@Steake I've opened a new pull request, #31, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 30 out of 40 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Steake Steake merged commit 789c166 into master Nov 19, 2025
6 checks passed
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.

3 participants