Skip to content

refactor(cli): drop setPop command and use personhood precompile#133

Merged
andrew-ifrita merged 2 commits into
mainfrom
spha/cli-remove-setpop
May 13, 2026
Merged

refactor(cli): drop setPop command and use personhood precompile#133
andrew-ifrita merged 2 commits into
mainfrom
spha/cli-remove-setpop

Conversation

@sphamjoli
Copy link
Copy Markdown
Member

@sphamjoli sphamjoli commented May 13, 2026

Summary

  • Personhood status is no longer mutable from the CLI. The precompile is the source of truth for reads. Drops dotns pop set, the --status flag on dotns register, and the helpers that supported them.
  • getUserProofOfPersonhoodStatus now calls the personhood precompile via the env-aware constants from PR feat(cli): multi-environment support #132.
  • finalizeRegularRegistration threads native token decimals through.

Test plan

  • bun run --cwd packages/cli test tests/unit/pop
  • dotns register domain --name <new> succeeds without --status
  • dotns pop info --key-uri //Alice reads from the precompile

Order

Second in the stack. Base is spha/cli-multi-env (#132). Merge after PR #132 lands so the precompile constants resolve cleanly.

sphamjoli added 2 commits May 13, 2026 04:41
Adds a `--env` / `--network` selector that lets the CLI target
multiple DotNS deployments, with per-environment RPC and contract
addresses. Native token decimals and symbol are read from chain
spec metadata instead of being hard-coded.

* Adds `resolveDotnsEnvironment` and `getChainTokenInfo`
* Threads env into auth options, lookup, info, and context
* Adds per-env entries in `CONTRACTS` and shared constants
* Mirrors the env mapping in the UI network store
* Surfaces `--env` in deploy and bulletin GitHub Actions
Personhood status is no longer mutable from the CLI; the precompile is
now the source of truth for reads. This PR removes the `dotns pop set`
command, the `--status` flag on `dotns register`, and the helper
plumbing that supported them. `getUserProofOfPersonhoodStatus` now
calls the personhood precompile via the env-aware constants added in
the previous PR, and `finalizeRegularRegistration` threads native
token decimals through.

Depends on the multi-environment PR.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 13, 2026

CI Summary

Check Result
Benchmark UI Passed
PR Title Passed
Labels Passed

Benchmark UI - Passed (258s)
Property Value
Duration 258s
Domain pr133-ui.bulletin-benchmarks.dot
CID bafybeicfipejobie7bcn7u4be2vnqwnwspzycd235tvnhymqno2nflzsua
Preview (dot.li) open
Preview (direct) open
Workflow view
Labels

pkg: cli, type: test, dependencies, pkg: ui

Base automatically changed from spha/cli-multi-env to main May 13, 2026 11:40
Copy link
Copy Markdown
Collaborator

@andrew-ifrita andrew-ifrita left a comment

Choose a reason for hiding this comment

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

Looks reasonable

@andrew-ifrita andrew-ifrita merged commit c1bf790 into main May 13, 2026
14 checks passed
@andrew-ifrita andrew-ifrita deleted the spha/cli-remove-setpop branch May 13, 2026 13:13
andrew-ifrita pushed a commit that referenced this pull request May 13, 2026
## Summary
- Refreshes `StoreFactory.json` for the redesigned factory (split into
protocol-managed `LabelStore` and user-claimed `UserStore`).
- Removes `displayDeployedStore` and `ensureStoreAuthorizations`, both
of which called selectors that no longer exist on chain and were
misreported as "origin not mapped" failures.
- Adds `claimUserStoreIfNeeded`, which reads `getUserStore` and claims
one for the signer if absent. The two prior register stages collapse
into a single "Claiming user store" step.

## Test plan
- [ ] `bun run --cwd packages/cli test
tests/integration/register/register.test.ts`
- [ ] `dotns register domain --name <new>` shows the claimed user store
address
- [ ] Re-running `dotns register domain` for the same account does not
re-claim

## Order
Third in the stack. Base is `spha/cli-remove-setpop` (#133). The `dotns
store` subcommand still uses the old single-store API and is out of
scope here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants