Skip to main content

CLI: create-qorechain-dapp

Scaffold a new QoreChain dApp from an official starter template.

# interactive
npm create qorechain-dapp my-dapp
# or
npx create-qorechain-dapp my-dapp

# non-interactive (CI)
npx create-qorechain-dapp my-dapp --template evm-solidity --yes --no-install

Published to npm as create-qorechain-dapp (0.14.0, which also carries the 0.13.1 template fixes). The generated package.json files depend on @qorechain/sdk ^0.14.0 (the EVM templates on @qorechain/evm ^0.14.0). Version 0.8.0 of the scaffolder wrote ^0.3.0 ranges, which npm resolves to a 0.3 release that cannot sign for the live networks; if you scaffolded with 0.8.0, run npm i @qorechain/sdk@latest.

Templates​

TemplateDescription
evm-solidityA Solidity Counter contract + a viem deploy/interact script (@qorechain/evm). Run the script with pnpm run deploy (not pnpm deploy, which is a different pnpm command); it reads .env, and its README covers opening the EVM window before deploying.
fullstack-webA Vite + React + TypeScript dApp reading balances and tokenomics (@qorechain/sdk). REST goes through a Vite /lcd proxy because the public REST sends no CORS headers, so browser code calls /lcd/... in dev.
rollup-appA rollup + sidechain/paychain app using the RollupClient and the multilayer helper (@qorechain/sdk).
foundryA Foundry project for QoreChain's EVM Engine. pnpm window registers the account's ML-DSA-87 key and opens the EVM authorization window before a deploy (added in the npm-only 0.11.0).
hardhatThe same for Hardhat 3, with pnpm window status, register and open.
viem-wagmiA web dApp on viem and wagmi using @qorechain/evm's qorechain and qorechainTestnet chains. Pins viem ~2.53.1 and uses the same /lcd proxy for REST.
cosmwasmA QoreChain Native (Wasm) contract project. On the live networks code upload is governance-only; see the QoreChain Native guide.

The rollup-app template (since scaffolder 0.10.0) runs a dry run by default. With QORE_BROADCAST=1 it derives the account's ML-DSA-87 key from the mnemonic, registers it once and signs hybrid, which the earlier template could not do. Its sample rollup values (profile: "default", the stake) are illustrative: take the real profile names and stake from Preset profiles and the live module parameters before you broadcast.

The fullstack-web template reads the tokenomics overview through client.qor, a qor_ JSON-RPC call that the public endpoints do not serve, so on mainnet and testnet that panel shows an error; the balance read works. Switch it to a REST read such as client.rest.getBurnStats() for the public networks.

Options​

FlagDescription
-t, --template <name>Template to use (evm-solidity | fullstack-web | rollup-app | foundry | hardhat | viem-wagmi | cosmwasm).
--network <name>Network preset (testnet | mainnet). Writes the chosen network's public endpoints into the generated .env (since 0.13.1).
--package-manager <pm>pnpm | npm | yarn.
-y, --yesSkip prompts and use defaults.
--no-installDo not install dependencies after scaffolding.
--localRewrite @qorechain/* deps to local file: links into the SDK monorepo.
-h, --helpShow help.
-v, --versionPrint the version.

Local development against the workspace​

@qorechain/* packages are published to npm, so a plain npm install works. Use --local to point the scaffolded project at the monorepo packages instead (build them first with pnpm -r build):

npx create-qorechain-dapp my-dapp --template fullstack-web --local