Skip to main content
In this guide you verify a contract that is already deployed on BOT Chain testnet, using forge verify-contract and BOTScan’s Blockscout verifier.
Everything on this page uses testnet (chain 968). Get free test tokens from the faucet.

What you’ll build

A verified contract on BOTScan testnet. The example uses Counter from the quickstart and Greeter from Deploy with Foundry, which has a constructor argument.

Prerequisites

  • The Foundry project you deployed from, unchanged since the deploy. See Set up Foundry.
  • The deployed contract address.
If you deploy with forge script, add --verify --verifier blockscout --verifier-url https://scan.bohr.life/api/ to verify in the same command. Use this page when the contract is already on chain.

Steps

1

Verify a contract without constructor arguments

  • --verifier blockscout uses BOTScan’s verifier. No API key is needed.
  • The verifier URL must end in /api/, with the trailing slash.
  • --watch waits for the result instead of returning straight away.
The output ends with:
Output
2

Verify a contract with constructor arguments

Encode the arguments with cast abi-encode and pass them with --constructor-args:
The values must be exactly the ones you deployed with. Forge prints the encoded Constructor args before it submits, so you can compare them with the deploy transaction’s input on BOTScan.

Verify it worked

Open https://scan.bohr.life/address/0xYOUR_CONTRACT#code. You should see a verified badge, your source files and the compiler settings.

Mainnet

Use the mainnet explorer URL and chain ID. Verifying is free, but double-check the address so you don’t publish source against the wrong contract.

Troubleshooting

BOTScan already has the source, either from an earlier run or because it matched your bytecode to a contract verified before. Nothing else to do.
Your local settings differ from the deploy. Check solc_version, optimizer, optimizer_runs and evm_version = "cancun" in foundry.toml, and the constructor arguments.
The verifier URL is wrong. Use https://scan.bohr.life/api/ for testnet, with /api/ and the trailing slash.
You left out --verifier blockscout. Forge defaults to Etherscan.

Next steps

Verify in the BOTScan UI

Verify by hand when the CLI isn’t an option.

Set up wagmi

Call your verified contract from a web app.
Last modified on October 3, 2026