Onchain starter for Shape with a minimal monorepo:
apps/web(Next.js + wagmi + RainbowKit)packages/contract(Hardhat)
![]() |
![]() |
Live site: builder-kit.vercel.app
- Node
v20.18.0(cat .nvmrc) - Bun
1.3.6+ - WalletConnect project ID
- Alchemy API key
- Funded deployer wallet for Shape Sepolia/Mainnet deploys
nvm use
bun --versiongit clone https://github.com/shape-network/builder-kit.git
cd builder-kit
bun installcp apps/web/.env-example apps/web/.envRequired values in apps/web/.env:
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_IDNEXT_PUBLIC_ALCHEMY_KEYNEXT_PUBLIC_CHAIN_ID(11011for Shape Sepolia,360for Shape Mainnet)
bun devOpen http://localhost:3000.
Other web commands:
bun build
bun start
bun lint
bun lint:fix
bun type-check
bun format
bun format:checkcp packages/contract/.env-example packages/contract/.envSet in packages/contract/.env:
DEPLOYER_PRIVATE_KEY(required for remote deploys)SHAPE_SEPOLIA_RPC_URLand/orSHAPE_MAINNET_RPC_URLSHAPE_EXPLORER_API_KEY(optional, for verify)INITIAL_MESSAGE(optional constructor arg override)
Compile and test:
bun contracts:compile
bun contracts:testbun contracts:compile also regenerates deployment artifacts for the web app and runs Wagmi CLI codegen.
Deploy locally (Hardhat network):
bun --filter=@builder-kit/contract run deployThis uses Hardhat Ignition (packages/contract/ignition/modules/HelloShape.js).
Deploy to Shape Sepolia:
bun contracts:deploy:shape-sepoliaSepolia deploy also regenerates deployment artifacts.
Deploy to Shape Mainnet:
bun --filter=@builder-kit/contract run deploy:shape-mainnetMainnet deploy also regenerates deployment artifacts.
Manual artifact generation:
bun contracts:artifactManual Wagmi generation:
bun wagmi:generateVerify on Shape explorer:
CONTRACT_ADDRESS=0xYourContractAddress \
bun --filter=@builder-kit/contract run verify --network shapeSepoliaFor mainnet verify, switch network flag to shapeMainnet.
bun dev: runapps/webdev serverbun build: production build forapps/webbun start: start builtapps/webbun lint: lintapps/webbun type-check: type-checkapps/webbun contracts:compile: compile Solidity contractsbun contracts:test: run Hardhat testsbun contracts:deploy:shape-sepolia: deploy sample contract to Shape Sepoliabun contracts:artifact: regenerate deployment artifacts consumed by the web appbun wagmi:generate: regenerate Wagmi typed ABI/hooks from Hardhat artifacts
/debug/contracts reads deployment artifacts and interacts with HelloShape.
- shows explicit deployment mismatch errors when chain/artifacts are out of sync
- reads current message/owner
- writes
setMessagefrom connected wallet
Generated outputs:
packages/contract/deployments/deployed-contracts.json(addresses)apps/web/lib/contracts/generated/deployed-contracts.ts(typed addresses)apps/web/lib/contracts/generated/wagmi.ts(Wagmi CLI ABI/hooks)
If deploying from Git integration in Vercel dashboard:
- Framework preset: Next.js
- Root Directory:
apps/web - Add env vars:
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_IDNEXT_PUBLIC_ALCHEMY_KEYNEXT_PUBLIC_CHAIN_ID
CLI path:
vercel link --cwd apps/web
vercel env add NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID production
vercel env add NEXT_PUBLIC_ALCHEMY_KEY production
vercel env add NEXT_PUBLIC_CHAIN_ID production
vercel --prod --cwd apps/web.
├── apps/
│ └── web/
│ ├── app/
│ ├── components/
│ ├── hooks/
│ ├── lib/
│ └── public/
├── packages/
│ └── contract/
│ ├── contracts/
│ ├── deployments/
│ ├── ignition/
│ ├── scripts/
│ └── test/
├── turbo.json
└── package.json
No projectId found:- missing
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_IDinapps/web/.env(or Vercel envs)
- missing
- Hardhat warns Node version unsupported:
- use Node 20 (
nvm use)
- use Node 20 (
HH501compiler download errors:- network access blocked when Hardhat tries to fetch solc

