[Feat]: Add @parity/dotns-abi, @parity/dotns-deployments, and @parity/dotns-sdk-vue; migrate packages/ui
Nobody has claimed this yet.
- Dominant language
- Solidity
- Stars
- 4
- Forks
- 2
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 24
Description
Component: Other
Priority: P1
Summary
both packages/ui and packages/cli currently ship their own abis/ folder containing the same 10 JSON files (9 dotns contracts + multicall3). any contract upgrade has to be applied to both in sync. there is already a casing inconsistency between them (Multicall3.json vs MultiCall3.json), which tells you something about how well the sync has worked in practice.
i think the right move is to make the abis one shared package consumed by everything downstream, and build the ui-layer composables on top. concretely: @parity/dotns-abi (raw typed artifacts), @parity/dotns-deployments (addresses per network), and @parity/dotns-sdk-vue (composables). then migrate packages/ui to consume them and delete packages/ui/abis/.
vue first because it's the most-actively-developed surface in this repo, and because the ts and rust non-ui bindings (#120 and #121) depend on the same @parity/dotns-abi + @parity/dotns-deployments foundation, so you want that part shipped before anything else builds on it.
depends on paritytech/dotns#118 for deployments.json as a first-class artifact. until that lands, @parity/dotns-deployments reads addresses from the readme via a scraping script as a stopgap. not great, but fine as a bridge.
Proposal
New packages:
packages/abipublished as@parity/dotns-abipackages/deploymentspublished as@parity/dotns-deploymentspackages/sdk-vuepublished as@parity/dotns-sdk-vue
Migration: packages/ui consumes the three new packages and drops its local abis/ folder.
Tasks, packages/abi
-
scripts/sync-abi.tsdownloadsdotns-abis-${TAG}.zipfrom a pinneddotnsrelease and unpacks intopackages/abi/artifacts/. - Pin the release version in
packages/abi/package.json("dotnsRelease": "v0.4.0"). - Publish as
@parity/dotns-abi.
Tasks, packages/deployments
- Consume
deployments.jsonfrom the artifact, re-export as a typeddeploymentsobject keyed by network. - Publish as
@parity/dotns-deployments. Mirrors the@safe-global/safe-deploymentspattern.
Tasks, packages/sdk-vue
- Pinia store
useDotnsClientStoreowningPublicClientandWalletClient. - Every function on every contract gets one composable. Nothing more, nothing less. Codegen script reads
packages/abi/artifacts/and emits one composable per function per contract. No curated or higher-level flows.- views return
{ data, error, isPending, refetch }using@vueuse/core(computedAsync,watchDebounced,AbortController). - writes return
{ hash, error, isPending, call }action-style viaWalletClient.
- views return
- Preserve viem ABI type inference through composable return types. No
any. - Publish as
@parity/dotns-sdk-vue.
Tasks, migrate packages/ui
- Delete
packages/ui/abis/. - Replace local ABI and address imports with
@parity/dotns-abi,@parity/dotns-deployments,@parity/dotns-sdk-vue. - Route all contract reads through composables. All writes through action composables.
- Regression pass on every screen that reads or writes to a contract, against an anvil fork.
Tasks, examples
-
examples/resolve-vue/: a minimal Vite + Vue 3 app that installs@parity/dotns-sdk-vue+@parity/dotns-abi+@parity/dotns-deployments, resolvesalice.doton Paseo, and displays the resolved address. - Example runs in CI on every PR.
Tasks, publishing hygiene
- Adopt
@changesets/cliat repo root. Each PR ships with a changeset. - Typedoc per package, published to GitHub Pages on release.
Acceptance criteria
-
packages/ui/abis/is deleted. -
packages/uiconsumes@parity/dotns-abi,@parity/dotns-deployments,@parity/dotns-sdk-vueonly. -
bun create vite@latest my-app -- --template vue-ts && bun add @parity/dotns-sdk-vueworks from a fresh project. -
examples/resolve-vue/resolves a name end to end. - Every UI screen that touches a contract passes an anvil-fork regression.
- Changesets adopted; Typedoc published for every new package.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading packages/ui, its local abis/ folder, and dependency issue #118 for the deployments artifact. Then map the proposed packages/abi, packages/deployments, packages/sdk-vue, and examples/resolve-vue work against the existing package and build setup. Done means the UI uses the published packages, the example resolves a name, and the stated anvil-fork, CI, changeset, and Typedoc checks pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bun, solidity, typescript, vite
- Domain
- blockchain, build-system, developer-experience, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100