Skip to content

Move HCA to ens-modules repo#257

Draft
zeroknots wants to merge 4 commits intoensdomains:feat/hca-cleanfrom
zeroknots:rhinestone/hca/recommendations
Draft

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

Conversation

@zeroknots
Copy link

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?

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