Skip to content

Move HCA to ens-modules repo#257

Open
zeroknots wants to merge 5 commits intoensdomains:feat/hca-cleanfrom
zeroknots:rhinestone/hca/recommendations
Open

Move HCA to ens-modules repo#257
zeroknots wants to merge 5 commits intoensdomains:feat/hca-cleanfrom
zeroknots:rhinestone/hca/recommendations

Conversation

@zeroknots
Copy link
Copy Markdown

Move HCA to ens-modules repo

Moves the HCA (Hardware-Controlled Accounts) implementation and module contracts out of ens-contracts-v2 and into the ens-modules repo. The factory and context contracts remain here.

What stays in this repo

  • HCAFactory — Deploys deterministic NexusProxy instances via CREATE3, keyed by primary owner. Supports idempotent createAccount and owner-controlled implementation upgrades via setImplementation.
  • HCAContext / HCAContextUpgradeable — Base contracts that wire up factory references and UUPS upgrade guards for HCA account implementations.
  • HCAEquivalence — On-chain equivalence checking for HCA deployments.
  • ProxyLib — Library for proxy deployment operations.
  • InterfacesIHCAFactory, IHCAFactoryBasic, IHCAInitDataParser.
  • Tests — Unit tests for HCAContext, HCAContextUpgradeable, and HCAEquivalence.

What moved to ens-modules

  • HCA — The account implementation (extends Nexus with locked-down module config, NFT rejection, upgrade guards).
  • HCAModule — The validator module (extends OwnableValidator with HCA-specific constraints).
  • OwnableValidator — Base ERC-7579 validator with multi-sig, owner expiration, and dual validation modes.

Other changes

  • Added a README to the HCA directory linking to the full HCA documentation.
  • Gas improvements and cleanup.

Improvements

the deployment gas cost was reduced by approx 140.000 gas units

@TateB unfortunately the diff is quite large due to linting. could you run linting on feat/hca-clean so the diff gets smaller?

@zeroknots zeroknots marked this pull request as ready for review March 30, 2026 06:27
@immunefi-magnus
Copy link
Copy Markdown

🛡️ Immunefi PR Reviews

We noticed that your project isn't set up for automatic code reviews. If you'd like this PR reviewed by the Immunefi team, you can request it manually using the link below:

🔗 Send this PR in for review

Once submitted, we'll take care of assigning a reviewer and follow up here.

@makoto makoto requested a review from TateB March 30, 2026 06:33
fmt
@zeroknots zeroknots force-pushed the rhinestone/hca/recommendations branch from 9db561f to 1e55207 Compare March 30, 2026 07:04
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.

1 participant