feat(cli): multi-environment support#132
Conversation
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
CI Summary
Release - PassedTest this PR Download artifact (GitHub CLI required): gh run download 25775147485 -n cli-release-0.0.0-pr.132 -R paritytech/dotns-sdkInstall globally: npm install -g ./parity-dotns-cli-0.0.0-pr.132.tgzVerify: dotns --helpDeploy UI — FailedFailed at: Deploy — Deploy workflow failed — see run logs for upload/register/contenthash details
Deploy Example — FailedFailed at: Deploy — Deploy workflow failed — see run logs for upload/register/contenthash details
Benchmark UI - Passed (269s)
Labelspkg: cli, type: test, dependencies, pkg: ui Test - Passed167 passed, 0 failed across 167 tests. Waited for other CI summary workflows and hit the timeout; wrote the latest available summary. |
|
Looks good. CI deploys are failing for a few reasons. First, the address did not have enough funds on paseo v2. I ran Next issue looks like it relates to PoP status |
|
The deploy issues aren't related to this PR so I will merge and try to address them in a follow up |
## 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 #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.
Summary
--env/--networkselector so the CLI can target multiple DotNS deployments, with per-environment RPC and contract addresses.--envin the deploy and bulletin GitHub Actions.Test plan
bun run --cwd packages/cli test tests/unit/cli/environment.test.tsdotns --env paseo-v2 account infoagainst a configured accountdotns lookup name dotnsclishows correct token decimals/symbol from chainOrder
First in the stack. Depends on nothing. The next three PRs all build on it.