Contents
- Requirements
- Get testnet tokens
- Deploy to testnet
- Start frontend
- Test interactions
- Redeploy after changes
- Troubleshooting
Requirements
Get testnet tokens
- Visit the Hiro testnet faucet
- Request STX and sBTC
- Add your mnemonic to
Testnet.toml:
Deploy to testnet
--yes for non-interactive deploys (CI and agents). Preview without broadcasting:
deployments.json.
Start frontend
http://localhost:3000 connected to testnet.
Test interactions
- Connect Leather or Xverse (set to Testnet)
- Use the debug UI to call contract functions
- Verify wallet prompts and confirmations
Redeploy after changes
Contracts are immutable. Changes create new versions:--no-auto-version.
Troubleshooting
Transaction failures
- Check gas fees
- Verify mnemonic and derivation path
- Ensure sufficient testnet balance
- Add
--yesif deploy hangs on interactive prompts
Contract errors
- Run
stacksdapp checkfor syntax validation - Test locally with devnet first
- Check contract requirements
- For SIP tokens: omit
(impl-trait …)on testnet (templates ship without it)
Frontend issues
- Verify network configuration in
.env.local(NEXT_PUBLIC_NETWORK=testnet) - Check browser console for errors
- Ensure wallet is set to testnet
- After a testnet deploy, open the UI with
stacksdapp dev --network testnet. Barestacksdapp devstarts the local chain and does not serve the testnet app