Connect your tools
A testnet is a JSON-RPC endpoint, so anything that talks to a node talks to it.
Foundry
foundry.toml
[rpc_endpoints]
forkstate = "https://forkstate.forkscout.com/api/rpc/<your-key>"terminal
# Deploy with a script
forge script script/Deploy.s.sol --rpc-url forkstate --broadcast --private-key $PK
# Or as any address, no key needed
forge script script/Deploy.s.sol --rpc-url forkstate --broadcast \
--unlocked --sender 0xAnyAddressVerification works with forge verify-contract — see Contract verification.
Hardhat
hardhat.config.ts
networks: {
forkstate: {
url: "https://forkstate.forkscout.com/api/rpc/<your-key>",
chainId: <your testnet's chain id>,
accounts: [process.env.PK!],
},
},viem
ts
import { createPublicClient, createWalletClient, defineChain, http } from "viem";
const forkstate = defineChain({
id: <your testnet's chain id>,
name: "forkstate",
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
rpcUrls: { default: { http: ["https://forkstate.forkscout.com/api/rpc/<your-key>"] } },
});
const client = createPublicClient({ chain: forkstate, transport: http() });ethers
ts
import { JsonRpcProvider } from "ethers";
const provider = new JsonRpcProvider("https://forkstate.forkscout.com/api/rpc/<your-key>");MetaMask and other wallets
- Add a network with the RPC endpoint and your testnet's chain id, shown on its page.
- Currency symbol: the parent chain's (ETH, BNB, POL…).
- Block explorer: optional — the console's explorer is on the testnet page.
Keep the testnet's own chain id. If a testnet uses the real chain's id, a wallet answers balances from its own indexers instead of from the fork — so balances look wrong — and anything signed there is valid on the real chain.
What behaves differently from mainnet
- Every transaction is mined at once, one per block. A nonce must be exactly the next one: lower is
nonce too low, higher isnonce too high. - Gas is free. The base fee and gas price are 0, so balances never pay fees.
gasUsedin receipts is still exact. - Any address can send unsigned transactions (
eth_sendTransaction). Signed ones are checked like on a real chain.