Skip to main content

Top-level npm scripts

The root package.json exposes shorter aliases for the most common flows. All workspace commands also work via npm run -w <workspace> <script>.

Daily-driver scripts

ScriptWhat it does
npm run wizardFull setup + launch (recommended)
npm run frontendStart next dev only (assumes contracts are deployed)
npm run devSame as frontend
npm run monitorReal-time ABI-decoded blockchain feed
npm run flushClear caches + kill servers
npm run lintLint the Next.js workspace

Build / production

ScriptWhat it does
npm run buildBuild the Next.js production bundle
npm run startRun the production Next.js server

Per-workspace shortcuts

You can always target a workspace directly:

npm run -w @scaffold-evvm/foundry compile     # forge build --via-ir
npm run -w @scaffold-evvm/foundry test # forge test -vvv
npm run -w @scaffold-evvm/foundry generate-abis

npm run -w @scaffold-evvm/hardhat compile # delegates to forge
npm run -w @scaffold-evvm/hardhat test
npm run -w @scaffold-evvm/hardhat chain # hardhat node --no-deploy

npm run -w @scaffold-evvm/nextjs type-check # tsc --noEmit

Environment variables

The frontend reads its config from packages/nextjs/.env, which is populated by the wizard. The relevant keys:

VarWhat it is
NEXT_PUBLIC_CHAIN_ID31337 for local
NEXT_PUBLIC_EVVM_ADDRESSDeployed Core address
NEXT_PUBLIC_STAKING_ADDRESSDeployed Staking address
NEXT_PUBLIC_ESTIMATOR_ADDRESSetc.
NEXT_PUBLIC_NAMESERVICE_ADDRESS
NEXT_PUBLIC_TREASURY_ADDRESS
NEXT_PUBLIC_P2PSWAP_ADDRESS
NEXT_PUBLIC_CUSTOM_<NAME>_ADDRESSPer-custom-service address (one per service)
NEXT_PUBLIC_CONFIG_VERSIONCache-busting key
NEXT_PUBLIC_PROJECT_IDReown / WalletConnect project ID (optional on local)

Restart next dev after changing any of these — Next.js bakes them into the bundle at server start.