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.

This guide covers the most common errors you’ll encounter when setting up SolidScript, building contracts, deploying, and verifying on-chain. For each problem, you’ll find the likely cause and the fastest path to a fix. Start with doctor. It tells you whether Node, solc, Slither, Foundry, and other tools are available from cache, PATH, or Docker:
npx solidscript doctor

Common errors

Likely cause: npm cache issue from an unrelated package.Fix: Try bun install or npm install --legacy-peer-deps.
Likely cause: forge-std is not installed.Fix: Run solidscript test once to populate it, or check that out/forge/lib/forge-std/ exists.
Likely cause: OpenZeppelin v5 owner constructor behavior. SolidScript normally injects Ownable(msg.sender) automatically.Fix: Report unusual cases — this should not happen in a standard SolidScript deployment.
Likely cause: A base contract requires constructor arguments that were not provided.Fix: Pass them explicitly using super(...).
Likely cause: TypeScript-only casts leaked into generated output.Fix: Type bigint locals with : bigint and avoid Number() or BigInt() inside contract logic.
Likely cause: Slither is not available on PATH.Fix: Run npx solidscript doctor --fix, use Docker, or install native Slither.
Likely cause: Foundry is not installed or not on PATH.Fix: Run npx solidscript doctor --fix.
Likely cause: The browser tab did not open automatically, or the wallet was not connected.Fix: Copy the local URL from CLI output and open it in the browser manually.
Likely cause: The same bytecode was already verified under a previous deployment.Fix: Treat this as benign — your deployment is fine.
Likely cause: The local compiler input differs from the bytecode that was deployed.Fix: Re-run verify-source from the exact same project state that was used for the original deploy.
npx solidscript verify-source MyToken -n base-sepolia

Map stack traces to TypeScript

Use trace to map generated Solidity stack traces back to your TypeScript source. Pipe forge test output into it:
forge test 2>&1 | npx solidscript trace
You can also pass a saved output file:
npx solidscript trace -i forge-output.txt