SoraSwap Web is the Vue 3 frontend for the SoraSwap DEX on Sora Nexus. It keeps the six-tab Tonswap shell, replaces TON-specific services with direct Torii reads, and targets IPFS deployment without middleware or centralized servers.
- Direct runtime reads from Torii: API versions, node capabilities, Connect status, contract instance discovery, account assets, and account transactions
- Browser-safe Iroha Connect session bootstrap for wallet pairing
- Connect preview/session bootstrap now comes from the sibling
@iroha/iroha-js/connect-browserhelper, while the encrypted live channel remains app-local - Runtime-configurable Torii endpoint, chain id, dataspace, and poll interval with TAIRA/local presets persisted in browser storage
- Generated SoraSwap manifest registry synced from
../soraswapso the frontend can compare runtime discovery against expected contract metadata - Sora-specific red/black/white UI, hash-routing support, and IPFS-friendly asset resolution
- Capability-gated execution surfaces for Spot, Perps, Options, Launchpad, DeFi, and Crosschain
The browser write path now covers Torii draft scaffolds, encrypted live Connect signing, detached contract-call submit, and pipeline-status polling.
The frontend prefers deployment-backed contract addresses from ../soraswap/deployments/<env>/*.deploy.json. When the current sibling deployment root has no live deploy records, registry sync falls back to compiled manifests and disables live write targeting until fresh deploy evidence exists.
The remaining blocker is canonical browser-side transaction assembly. The app now prefers SIGN_REQUEST_TX using Torii's scaffold transaction (transaction_scaffold_b64, with legacy signed_transaction_b64 fallback) and falls back to SIGN_REQUEST_RAW for older draft responses, but it still does not construct full transactions in-browser.
Copy .env.example to .env.local if you need build-time defaults.
The More tab can override the runtime endpoint, dataspace, Connect chain id, app URL, and refresh interval without rebuilding the IPFS bundle.
Default values:
VITE_TORII_URL=https://taira.sora.orgVITE_SORASWAP_DATASPACE=universalVITE_CONNECT_CHAIN_ID=809574f5-fee7-5e69-bfcf-52451e42d50fVITE_CONNECT_APP_NAME=SoraSwapVITE_TORII_API_VERSION=1.1
npm installnpm run sync:iroha-sdknpm run sync:registrynpm run doctor:localnpm run doctor:testnetnpm run build:iroha-clinpm run compile:soraswapnpm run verify:local:draftsnpm run verify:localnpm run verify:siblingsnpm run devnpm run typechecknpm run testnpm run buildnpm run build:ipfsnpm run ipfs:publishnpm run preview
The repo now has the same publish workflow shape as ../tonswap_web.
yarn ipfs:publishornpm run ipfs:publishbuilds withVITE_BASE=./, addsdist/to IPFS, and prints the CID plus local gateway anddweb.linkURLs.- The script uses your writable
~/.ipfsrepo if available. Otherwise it falls back to a repo-local.ipfs/directory and will start a local daemon if needed. - Optional IPNS publish is enabled when an
ipfskey namedsoraswap-webexists locally. Override that withIPFS_IPNS_KEY_NAME=<name>, or force the printed IPNS id withIPFS_IPNS_KEY_ID=<peer-id>. - Runtime Nexus settings still come from the More tab, so changing TAIRA vs local Torii does not require rebuilding the IPFS bundle.
../soraswap: Kotodama contracts, deployment scripts, parity register../iroha: Torii, Connect, and SDK/runtime patches../tonswap_web: UX shell and route-structure reference
npm run sync:registry scans the sibling ../soraswap repo for deployment manifests.
Default resolution order:
deployments/testnet/*.manifest.jsononly when matching*.deploy.jsonfiles with canonical contract addresses existartifacts/compiled/**/*.manifest.json
Explicit local resolution:
SORASWAP_REGISTRY_ENV=local npm run sync:registry
Override the default selection with SORASWAP_REGISTRY_ENV=testnet, SORASWAP_REGISTRY_ENV=local, or SORASWAP_REGISTRY_ENV=compiled when you need a specific environment. The local verifier now uses local automatically.
The generated output is committed at src/generated/soraswapRegistry.ts so the app can build without needing sibling-repo access at runtime.
npm run verify:siblings runs the full local integration chain for the neighboring repos:
- refresh the sibling
@iroha/iroha-jsbrowser helper dist and local file dependency - build the sibling
../irohaCLI - compile the sibling
../soraswapcontracts - refresh the generated frontend registry
- report current TAIRA readiness and deployment blockers
npm run verify:local runs the local Nexus and SoraSwap contract flow end to end:
- stop any stale sibling localnet
- start
../soraswaplocal Nexus - deploy all local SoraSwap contracts
- execute the local
n3x.n3x_hub.quote_mintsmoke call - verify both detached-sign submit and scaffold re-sign submit directly against local Torii
- refresh the frontend registry and report local readiness
npm run doctor:local reads the generated sibling localnet config, checks Torii health, and compares live universal instances against ../soraswap/deployments/local.