Skip to content

chore: add store commands and fix transfer workflow#11

Open
sphamjoli wants to merge 3 commits intomainfrom
spha/transfer_issue
Open

chore: add store commands and fix transfer workflow#11
sphamjoli wants to merge 3 commits intomainfrom
spha/transfer_issue

Conversation

@sphamjoli
Copy link
Member

Description

Adds dotns store command group for managing on-chain Store contracts (values, authorization, controllers). Moves the list command from dotns list (under lookup) to dotns store list where it belongs semantically. Ensures the registrar controller and registry are always authorized on a user's Store after registration. Fixes issue transfers using the DOTNS_SDK_ISSUE_TRANSFER PAT.

Store commands

dotns store info                              Show Store address and deployment status
dotns store list                              List all values in your Store
dotns store get <key>                         Get a value by key (hex bytes32 or string → keccak256)
dotns store set <key> <value>                 Set a key-value pair
dotns store delete <key>                      Delete a value by key
dotns store check <address>                   Check if address is authorized / controller
dotns store authorize <address>               Grant setValueFor access
dotns store unauthorize <address>             Revoke writer access
dotns store authorize-controller <address>    Grant DotNS controller status (locks keys on write)
dotns store unauthorize-controller <address>  Revoke DotNS controller status

Registration flow

Both regular and governance registration paths now call ensureStoreAuthorizations after displayDeployedStore. This checks whether the registrar controller is a DotNS controller and the registry is an authorized writer on the user's Store, and submits transactions for whichever are missing. Skips entirely if no Store exists.

Type

  • Bug fix
  • Feature
  • Breaking change
  • Documentation
  • Chore

Package

  • @dotns/cli
  • Root/monorepo
  • Documentation

Related Issues

Fixes

Checklist

Code

  • Follows project style
  • bun run lint passes
  • bun run format passes
  • bun run typecheck passes

Documentation

  • README updated if needed
  • Types updated if needed

Breaking Changes

  • Breaking changes documented below

Breaking changes:

dotns list is removed. Use dotns store list instead.

Testing

How to test:

  1. bun test ./tests/help/storeHelp.test.ts: verifies all 11 subcommand help outputs
  2. bun test ./tests/store/store.test.ts: runs 9 integration tests against live testnet (info, list, check, authorize round-trip, controller round-trip, set/get/delete round-trip)
  3. Register a new domain with dotns register domain --name <label> --status full --key-uri //Alice and verify the output includes "Store authorizations verified" or shows the authorization transactions
  4. Verify dotns list no longer works (removed), dotns store list --key-uri //Alice returns the same data

Notes

  • All store operations are owner-scoped via StoreFactory.getDeployedStore(evmAddress) so --key-uri is required on every test invocation (unlike lookup which queries a global registry by label)
  • ensureStoreAuthorizations is idempotent: re-running registration on an already-authorized Store skips the transactions
  • The governance registration path was missing displayDeployedStore entirely, now added alongside ensureStoreAuthorizations

@github-actions
Copy link

github-actions bot commented Feb 13, 2026

CI Summary

Check Result
Lint Passed
Format Passed
Typecheck Passed
Build Passed
Release Passed
PR Title Passed
Labels Passed

Release - Passed

Test this PR

Download artifact (GitHub CLI required):

gh run download 21992305769 -n cli-preview-0.0.0-pr.11 -R paritytech/dotns-sdk

Install globally:

Package Manager Command
npm npm install -g ./dotns-cli-0.0.0-pr.11.tgz
yarn yarn global add ./dotns-cli-0.0.0-pr.11.tgz
bun (macOS/Linux) bun add -g "$(pwd)/dotns-cli-0.0.0-pr.11.tgz"
bun (Windows) bun add -g "$PWD\dotns-cli-0.0.0-pr.11.tgz"

Verify:

dotns --help
Labels

pkg: cli, type: test, dependencies

substrateAddress,
storeAddress,
STORE_ABI,
"isDotnsController",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this the right call? Should this be an isAuthorized instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it is, isAuthorised is for veneral purpose isDotnsController is what we want for all things dotns related

Copy link
Member Author

Choose a reason for hiding this comment

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

We might not need two paths here, perhaps in the next reployment we can remove isDotnsController and just use isAuthorised

@sphamjoli
Copy link
Member Author

Once this PR is merged we can create a release and re-run the workflows which should fix some auth issues related to stores revoking access to dotns controllers

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