Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.solidscipt.zoracle.xyz/llms.txt

Use this file to discover all available pages before exploring further.

SolidScript treats network selection as a deploy-time flag rather than a compile-time concern. You write and compile your contract once, then deploy it to any EVM-compatible network by passing -n with a network name. Five networks are built in. Any other chain you add to solidscript.config.ts becomes available by name immediately.

Built-in networks

NetworkChain IDRPC
anvil31337http://127.0.0.1:8545
sepolia11155111viem chain registry
mainnet1viem chain registry
base-sepolia84532https://sepolia.base.org
base8453https://mainnet.base.org
Pass -n to target any built-in network:
npx solidscript deploy MyToken -n base-sepolia -a 1000000
npx solidscript deploy MyToken -n optimism -a 1000000

Adding custom chains

Register additional networks in solidscript.config.ts with an rpcUrl and chainId. They become available to all CLI commands immediately:
solidscript.config.ts
import type { Config } from "solidscript";

const config: Config = {
  networks: {
    optimism: {
      rpcUrl: "https://mainnet.optimism.io",
      chainId: 10,
    },
  },
};

export default config;
You can define as many networks as you need in a single config file:
solidscript.config.ts
import type { Config } from "solidscript";

const config: Config = {
  networks: {
    arbitrum: {
      rpcUrl: "https://arb1.arbitrum.io/rpc",
      chainId: 42161,
    },
    polygon: {
      rpcUrl: "https://polygon-rpc.com",
      chainId: 137,
    },
  },
};

export default config;

Chain switching in the browser wallet flow

When you deploy using the browser wallet, the page handles chain switching automatically. If the target chain is not already in the wallet, it requests that the wallet add it before sending the transaction. See Browser Wallet for the full step-by-step flow.