Skip to main content
In this guide you configure a Foundry project for BOT Chain so forge and cast know both networks by name, compile for the right EVM version and sign with an encrypted key.
Everything on this page uses testnet (chain 968). Get free test tokens from the faucet.

What you’ll build

A Foundry project with:
  • bot_testnet and bot_mainnet RPC aliases you can pass to any command.
  • evm_version = "cancun", so your bytecode runs on BOT Chain.
  • A keystore wallet called uzo-dev, so no private key sits in a file or your shell history.

Prerequisites

  • Foundry installed. If you followed the quickstart you already have it. Otherwise run curl -L https://foundry.paradigm.xyz | bash, then foundryup. These docs were tested with Foundry 1.8.3.
  • Some tBOT for the wallet you’ll create. See Get testnet tokens.

Steps

1

Create a project

Skip this step if you already have a project. The settings below go in its existing foundry.toml.
2

Configure foundry.toml

Replace the contents of foundry.toml with:
foundry.toml
  • evm_version = "cancun" matters most. Newer compilers default to a later EVM version that BOT Chain doesn’t support. See Supported EIPs.
  • [rpc_endpoints] lets you write --rpc-url bot_testnet instead of the full URL.
3

Create a keystore wallet

Create a new key and save it encrypted under the name uzo-dev. Cast asks you for a password.
To use a key you already have instead, import it. Cast prompts for the key, so it never appears in your shell history:
Keystores live in ~/.foundry/keystores/. List them and print the address:
From now on, add --account uzo-dev to any command that sends a transaction.
4

Fund the wallet

Claim tBOT for the address cast wallet address printed. See Get testnet tokens.

Verify it worked

Check that both aliases reach the right chain:
You should see 968 and then 677. Then check your balance and build:

Troubleshooting

Run the command from the folder that contains foundry.toml. Aliases are read from the project config, so they don’t work in other folders.
Foundry reads the 20 gwei minimum tip from the node, so this is rare. If you set --priority-gas-price or --gas-price yourself, use at least 20gwei. See Gas and fees.
The contract was compiled for a newer EVM version. Check evm_version = "cancun", then run forge clean and forge build.
--account only looks in ~/.foundry/keystores/. Run cast wallet list to check the name.

Next steps

Deploy with Foundry

Use forge create or a deploy script.

Verify with Foundry

Publish your source on BOTScan.
Last modified on October 3, 2026