Skip to main content
In this quickstart you deploy a smart contract to BOT Chain testnet, verify its source code on BOTScan and call it from your terminal. It takes about 15 minutes and needs nothing from Uzo, so it works today.
Everything on this page uses testnet (chain 968). Get free test tokens from the faucet.

What you’ll build

You’ll build a Counter contract that stores a number. You can increment the number and read it back. You will:
  1. Create a wallet that lives only on your machine.
  2. Fund it with free test tokens.
  3. Deploy the contract with Foundry.
  4. Verify the source on BOTScan.
  5. Send a transaction and read the result.

Prerequisites

  • A terminal. On Windows, use WSL or Git Bash, because the Foundry installer needs a Unix shell.
  • Git, which forge init uses.
  • About 15 minutes.
You don’t need MetaMask for this page. If you want to see your balance in a browser wallet later, follow Connect a wallet.

Steps

1

Install Foundry

Install foundryup, then use it to install forge, cast and anvil.
Open a new terminal so your PATH updates, then run:
Check that it worked:
These docs were tested with Foundry 1.8.3. Any later 1.x version should work.
2

Create a wallet

Create a new key and save it as an encrypted keystore named uzo-dev. Cast asks you for a password. Pick one you’ll remember, because you’ll type it each time you send a transaction.
The keystore is saved in ~/.foundry/keystores/uzo-dev. Cast prints your new address. You can print it again at any time:
Use this wallet for testnet only. Never send real funds to a key you created for testing, and never paste a private key into a file you might commit.
3

Get test tokens

  1. Open the BOT Chain faucet.
  2. Paste your address, complete the check and claim.
  3. Wait a few seconds, then check your balance:
Replace YOUR_ADDRESS with the address from the last step. You should see 10.000000000000000000. The faucet gives each address up to 10 tBOT every 24 hours, which is far more than this quickstart uses. If the BOT Chain faucet doesn’t work for you, the Uzo Labs faucet gives 0.1 tBOT, which is enough for this quickstart. See Get testnet tokens if nothing arrives.
4

Create a project

This creates src/Counter.sol, a test in test/Counter.t.sol and a deploy script in script/. The contract looks like this:
src/Counter.sol
5

Point Foundry at BOT Chain

Replace the contents of foundry.toml with this:
foundry.toml
evm_version = "cancun" matters. Newer Solidity compilers can target upgrades that BOT Chain doesn’t support yet. See Supported EIPs.Build and run the tests:
Both tests should pass.
6

Deploy the contract

Enter your keystore password when asked. The output ends like this, with your own addresses and hash:
Deploying Counter and calling it once cost about 0.004 tBOT when we tested on 2026-10-02.Copy the Deployed to address and save it in a shell variable so the next steps can use it:
7

Verify the source on BOTScan

BOTScan runs on Blockscout, so use Foundry’s Blockscout verifier. No API key is needed.
--watch makes Foundry wait for the result. Verification usually finishes in a few seconds. The output ends like this:
If Foundry says the contract is already verified, that’s fine. BOTScan verifies a contract automatically when its bytecode matches one that’s already verified, which often happens with the default Counter.
8

Call the contract

Send a transaction that increments the counter:
Then read the value back. Reads are free and need no wallet:
It prints 1.

Verify it worked

Open your contract on BOTScan. Replace the address at the end of this URL with yours:
BOTScan testnet Contract tab for the Counter contract, showing Contract Source Code Verified (Exact Match) and the Solidity source
You should see:
  • A green check next to Contract, which means the source is verified.
  • On the Contract tab, a Contract Source Code Verified banner, the contract name Counter and your source code.
  • Under Transactions, the deployment and your increment call.
  • Under Read/Write contract, number reads 1.

Troubleshooting

Your wallet has no tBOT on testnet. Check the balance with cast balance --ether YOUR_ADDRESS --rpc-url https://rpc.bohr.life, then claim from the faucet. Make sure you claimed for the same address that cast wallet address --account uzo-dev prints.
Your compiler targeted an EVM upgrade newer than BOT Chain supports. Set evm_version = "cancun" in foundry.toml, run forge clean, then build and deploy again.
Foundry only simulates unless you pass --broadcast. Run the command again with --broadcast at the end.
The explorer may not have indexed the deployment yet. Wait 10 to 20 seconds and run forge verify-contract again. Check that you used the address from Deployed to, not the transaction hash, and that --verifier-url ends in /api/.
--account uzo-dev looks in ~/.foundry/keystores/. Run cast wallet list to see the names you have. If you forgot the password, create a new wallet and claim from the faucet again.
Run the installer inside WSL or Git Bash, not PowerShell or Command Prompt. Open a new terminal after installing so foundryup is on your PATH.
More errors and fixes are in Troubleshooting.

Next steps

Build your first dApp

Read and write this contract from JavaScript and a web page.

Foundry setup

A fuller Foundry setup for real projects.

Connect a wallet

Add BOT Chain to MetaMask.

Known limitations

What works differently on BOT Chain.
Last modified on October 3, 2026