chore: add store commands and fix transfer workflow#11
Open
chore: add store commands and fix transfer workflow#11
Conversation
CI Summary
Release - PassedTest this PR Download artifact (GitHub CLI required): gh run download 21992305769 -n cli-preview-0.0.0-pr.11 -R paritytech/dotns-sdkInstall globally:
Verify: dotns --helpLabelspkg: cli, type: test, dependencies |
| substrateAddress, | ||
| storeAddress, | ||
| STORE_ABI, | ||
| "isDotnsController", |
Collaborator
There was a problem hiding this comment.
Is this the right call? Should this be an isAuthorized instead?
Member
Author
There was a problem hiding this comment.
Yes, it is, isAuthorised is for veneral purpose isDotnsController is what we want for all things dotns related
Member
Author
There was a problem hiding this comment.
We might not need two paths here, perhaps in the next reployment we can remove isDotnsController and just use isAuthorised
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds
dotns storecommand group for managing on-chain Store contracts (values, authorization, controllers). Moves thelistcommand fromdotns list(under lookup) todotns store listwhere it belongs semantically. Ensures the registrar controller and registry are always authorized on a user's Store after registration. Fixes issue transfers using theDOTNS_SDK_ISSUE_TRANSFERPAT.Store commands
Registration flow
Both regular and governance registration paths now call
ensureStoreAuthorizationsafterdisplayDeployedStore. 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
Package
@dotns/cliRelated Issues
Fixes
Checklist
Code
bun run lintpassesbun run formatpassesbun run typecheckpassesDocumentation
Breaking Changes
Breaking changes:
dotns listis removed. Usedotns store listinstead.Testing
How to test:
bun test ./tests/help/storeHelp.test.ts: verifies all 11 subcommand help outputsbun 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)dotns register domain --name <label> --status full --key-uri //Aliceand verify the output includes "Store authorizations verified" or shows the authorization transactionsdotns listno longer works (removed),dotns store list --key-uri //Alicereturns the same dataNotes
StoreFactory.getDeployedStore(evmAddress)so--key-uriis required on every test invocation (unlike lookup which queries a global registry by label)ensureStoreAuthorizationsis idempotent: re-running registration on an already-authorized Store skips the transactionsdisplayDeployedStoreentirely, now added alongsideensureStoreAuthorizations