Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/transfer-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ jobs:
- name: Transfer to dotns
run: gh issue transfer "$ISSUE_URL" paritytech/dotns
env:
GH_TOKEN: ${{ secrets.DOTNS_SDK_WORKFLOW_ACCESS }}
GH_TOKEN: ${{ secrets.DOTNS_SDK_ISSUE_TRANSFER }}
ISSUE_URL: ${{ github.event.issue.html_url }}
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dotns/cli",
"module": "index.ts",
"version": "0.2.0",
"version": "0.3.0",
"type": "module",
"private": true,
"packageManager": "[email protected]",
Expand Down
28 changes: 1 addition & 27 deletions packages/cli/src/cli/commands/lookup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ import { createClient } from "polkadot-api";
import { getWsProvider } from "polkadot-api/ws-provider";
import { paseo } from "@polkadot-api/descriptors";
import { ReviveClientWrapper, type PolkadotApiClient } from "../../client/polkadotClient";
import {
performDomainLookup,
listMyRegisteredNames,
performOwnerOfLookup,
} from "../../commands/lookup";
import { performDomainLookup, performOwnerOfLookup } from "../../commands/lookup";
import { verifyDomainOwnership } from "../../commands/register";
import { resolveRpc } from "../env";
import {
Expand Down Expand Up @@ -379,26 +375,4 @@ export function attachLookupCommands(root: Command): void {
}
},
);

const listCommand = root.command("list").description("List all names registered by your account");

addAuthOptions(listCommand).action(async (options: any, cmd: any) => {
try {
const merged = { ...(options ?? {}), ...getAuthOptions(cmd) } as LookupActionOptions;

const { clientWrapper, account } = await prepareReadOnlyContext(merged);

console.log(chalk.bold("\n▶ My Registered Names\n"));

await listMyRegisteredNames(clientWrapper, account.address);

console.log(chalk.green("\n✓ Complete\n"));
process.exit(0);
} catch (error) {
console.error(
chalk.red(`\n✗ Error: ${error instanceof Error ? error.message : String(error)}\n`),
);
process.exit(1);
}
});
}
13 changes: 13 additions & 0 deletions packages/cli/src/cli/commands/register.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
registerSubnode,
verifyDomainOwnership,
displayDeployedStore,
ensureStoreAuthorizations,
setUserProofOfPersonhoodStatus,
} from "../../commands/register";
import {
Expand Down Expand Up @@ -241,6 +242,14 @@ async function executeGovernanceRegistration(
verifyDomainOwnership(clientWrapper, substrateAddress, label, evmAddress),
);

await step("Displaying store", async () =>
displayDeployedStore(clientWrapper, substrateAddress, evmAddress),
);

await step("Ensuring store authorizations", async () =>
ensureStoreAuthorizations(clientWrapper, substrateAddress, signer, evmAddress),
);

if (transferDestination) {
const recipient = await step("Resolving recipient", async () =>
resolveTransferRecipient(clientWrapper, substrateAddress, transferDestination),
Expand Down Expand Up @@ -325,6 +334,10 @@ async function executeRegularRegistration(
displayDeployedStore(clientWrapper, substrateAddress, evmAddress),
);

await step("Ensuring store authorizations", async () =>
ensureStoreAuthorizations(clientWrapper, substrateAddress, signer, evmAddress),
);

if (transferDestination) {
const recipient = await step("Resolving recipient", async () =>
resolveTransferRecipient(clientWrapper, substrateAddress, transferDestination),
Expand Down
Loading