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 generatedpackage.jsonfiles 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.0ranges, which npm resolves to a 0.3 release that cannot sign for the live networks; if you scaffolded with 0.8.0, runnpm i @qorechain/sdk@latest.
Templates
| Template | Description |
|---|---|
evm-solidity | A 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-web | A 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-app | A rollup + sidechain/paychain app using the RollupClient and the multilayer helper (@qorechain/sdk). |
foundry | A 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). |
hardhat | The same for Hardhat 3, with pnpm window status, register and open. |
viem-wagmi | A 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. |
cosmwasm | A 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
| Flag | Description |
|---|---|
-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, --yes | Skip prompts and use defaults. |
--no-install | Do not install dependencies after scaffolding. |
--local | Rewrite @qorechain/* deps to local file: links into the SDK monorepo. |
-h, --help | Show help. |
-v, --version | Print 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