feat(deploy): zero-tap dev-mode playground publish#193
Open
UtkarshBhardwaj007 wants to merge 1 commit into
Open
feat(deploy): zero-tap dev-mode playground publish#193UtkarshBhardwaj007 wants to merge 1 commit into
UtkarshBhardwaj007 wants to merge 1 commit into
Conversation
`dot deploy --signer dev --playground` now requires zero phone taps
when a phone session is active. Every on-chain step (storage, DotNS,
registry publish) is signed by a synthesised dev signer derived from
bulletin-deploy's DEFAULT_MNEMONIC bare-root account; the user's
session H160 is passed as the registry contract's new `owner` arg so
their app still appears in MyApps.
`resolveSignerSetup` reshape:
- dev + session: publishSigner = synthesised Alice (source `dev`),
claimedOwnerH160 = session.addresses.productH160. No phone tap.
- dev + `--suri`: publishSigner = SURI signer. SURI account is
recorded as owner; claimedOwnerH160 stays null.
- dev + nothing: publishSigner = synthesised Alice; Alice owns.
stderr warning + telemetry tag surfaced — "forgot dot init" case.
- phone: unchanged.
Sign-event proxy now skipped when publishSigner.source === `dev`, so
the "check your phone" callout doesn't flash for in-process Alice
signing. Summary card gains an "App owner" row when claimedOwnerH160
is set. Both the TUI and headless code paths source the signer row
from setup.publishSigner.address so dev+session shows Alice, not a
blank.
`ResolvedSigner` gains an optional `addresses` field forwarded from
SessionHandle so signerMode can read the user's productH160 without
re-deriving from the raw session. Snapshot test pins the dev-publish
address against the canonical bulletin-deploy bare-root SS58.
Pairs with playground-app feat/registry-claimed-owner (the new 4-arg
`publish(domain, metadata_uri, visibility, owner)`). Requires that
contract to be redeployed on Paseo Next v2 before this can run end-
to-end against the live network.
Contributor
|
Dev build ready — try this branch: |
Contributor
E2E Test Pass · ❌ FAILTag:
Sentry traces: view spans for this run |
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.
Summary
dot deploy --signer dev --playgroundnow requires zero phone taps when a phone session is active. Every on-chain step — Bulletin storage, DotNSregister/setContenthash, and registrypublish— is signed by a synthesised dev signer derived from bulletin-deploy'sDEFAULT_MNEMONICbare-root account (5DfhGyQd…). The user's session H160 is passed as the registry contract's newownerparameter, so their app still appears in MyApps even though Alice signed the tx.resolveSignerSetupreshape: dev+session → synthesised Alice publishes withclaimedOwnerH160=session.addresses.productH160. dev+--suri→ SURI signer publishes as itself. dev+nothing → Alice publishes + owns; stderr warning + telemetry tag fire (covers the "forgotdot init" footgun). Phone mode unchanged.publishSigner.source === "dev"so the "check your phone" callout doesn't flash for in-process Alice signing.ResolvedSignergains an optionaladdressesfield forwarded fromSessionHandle. Regression test pins the forwarding so a refactor can't silently drop it.signerModeAlice.test.tssnapshot pins three independent equivalences: signerMode's publish address, bulletin-deploy's bare-root, and the canonical SS58 literal. Catches both upstream churn and a CLI-side revert tocreateDevSigner("Alice")(which would be Substrate//Alice=5Grwva…, a different account).Pairs with
playground-app#193— the contract change that adds the 4thOption<Address> ownerarg topublish()and thepublisherfield onAppInfo. Must merge + redeploy first; this CLI change callsregistry.publish(domain, cid, vis, owner)with the 4-arg signature.Changeset:
playground-cli: minor. CLAUDE.md updated in two places (Deploy/Bulletin invariants).Behaviour matrix
--signer--suriTest plan
pnpm test— 555 passing locally (2 new —signer.test.tsaddresses forwarding,signerModeAlice.test.tssnapshot).pnpm format:check,pnpm lint:license,pnpm build— green.dot deploy --signer dev --playground --suri //Aliceagainst Paseo Next v2 — expect zero phone taps,getOwner(domain.dot)returns SURI account's H160. E2E testfrontend-only deploy completes end-to-endcovers this.dot deploy --signer dev --playgroundwith an activedot initsession — manual smoke. Expect zero phone taps, app appears in MyApps under the user's account on the phone.dot deploy --signer dev --playgroundwith NO session and NO--suri— stderr warning fires, app is published under Alice; verify viagetOwner.dot deploy --signer phone --playground— unchanged behaviour, 4 taps.is_authorized_to_republish).Unauthorizedrevert (intentional asymmetric lock-in; documented in the contract and CLAUDE.md).Notes / deferred
.skiptest is in place with a clear comment pointing at unit-level coverage (run.test.ts)..skip-gated write-test stubs added to the contract suite in playground-app#193 to document the on-chain assertions for when the local-target wiring lands.ownerparameter is deferred — testnet-only relaxation per spec.