Skip to main content
Download any Ready template, deploy its contract to BOT Chain Testnet and open its web app, using the same five steps every time.
Ready. This template is published in uzolabs/templates and has been deployed and verified on testnet. It’s a learning template and hasn’t been audited. Use test funds only.

What you’ll build

A copy of one template in a folder of your own, with its contract deployed and verified on testnet and its web app running at http://localhost:5173. The steps below use the token template. Swap token for nft, dex-integration or gasless-app to use another one.

Prerequisites

  • Node.js 20.19 or newer, Foundry, a browser wallet and some tBOT. See Prerequisites.
  • A fresh test wallet that holds nothing of value. You’ll paste its private key into a local .env file.

Steps

1

Download the template

giget copies one folder from GitHub without the rest of the repo or its git history.
Terminal
2

Install

Terminal
npm install also installs the web app in frontend/, so there’s no second install.
3

Add your test key

Terminal
Open .env and paste your test wallet’s private key after PRIVATE_KEY=. The file is in .gitignore, so git won’t commit it. Leave MAINNET=false.
.env
The RPC lines are optional. Leave them blank to use the public RPCs from @uzolabs/sdk. Each template adds its own settings below these, such as TOKEN_NAME for the token template.
4

Deploy

Terminal
This compiles the contract with Foundry, deploys it to BOT Chain Testnet (chain 968) and prints its address and a BOTScan link. It also writes:
  • deployments/968.json, with the address and constructor arguments.
  • frontend/.env, with VITE_CONTRACT_ADDRESS and VITE_CHAIN_ID.
  • frontend/src/abi.ts, refreshed from the compiled contract.
Prefer Hardhat? Run npm run deploy:hardhat. Both toolchains build the same contracts/ folder and run the same tests.The DEX integration template has no contract, so it skips this step. Run npm run quote instead.
5

Run the web app

Terminal
Open http://localhost:5173, connect your wallet and, if it asks, click “Switch to BOT Chain Testnet”.

Verify

BOTScan is a Blockscout explorer, so verifying source code needs no API key. Wait about a minute after deploying so the explorer can index the contract, then run:
Terminal
Use npm run verify:hardhat if you deployed with Hardhat. Open the BOTScan link from the deploy output and check that the Contract tab shows your source code.

Deploying to mainnet

Mainnet uses real BOT. The templates haven’t been audited. Deploy to mainnet only after you understand the code and have had it reviewed, and use a separate wallet whose key never goes into a file you share.
Add --mainnet to a command, or set MAINNET=true in .env. The script shows a warning and waits for you to type MAINNET. Anything else cancels. It also refuses to run in CI, where nobody can type the confirmation.
Terminal

Troubleshooting

Your wallet needs tBOT. Get 10 from the faucet (once per address every 24 hours) and check that the address in the error is the one you funded.
Run cp .env.example .env in the template folder and paste your test key after PRIVATE_KEY=.
Install Foundry and open a new terminal. On Windows, check that ~/.foundry/bin is on your PATH. See Prerequisites.
The public RPC is sometimes busy for a minute. The scripts retry for about 15 seconds. Wait and run the same command again. Steps that already went through are not repeated.
The explorer hasn’t indexed the contract yet. Wait a minute and run npm run verify again. It’s safe to run more than once.
Vite reads frontend/.env when it starts. Stop npm run frontend and start it again after each deploy.
npm 11 skips some packages’ install scripts until you approve them. The templates don’t need them, so you can ignore the warning.

Next steps

Token walkthrough

What each file in the token template does.

Deploy with Foundry

Deploy and verify by hand with Foundry.
Last modified on October 2, 2026