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 shows you how to verify the source code of a SolidScript-deployed contract on Basescan. By the end, your contract’s source code will be publicly visible and marked as verified on the explorer, giving users and auditors full transparency into what’s running on-chain. SolidScript submits source verification to Etherscan-family explorers through the v2 multichain API. One Etherscan API key works across Base, Optimism, Arbitrum, Polygon, Ethereum, and supported testnets.

Prerequisites

You need a free Etherscan API key. Get one at etherscan.io.

One-time setup

Before verifying, store your API key in SolidScript’s user-level config so you don’t need to pass it on every command:
npx solidscript config set etherscan-key YOUR_KEY
SolidScript also reads the key from the ETHERSCAN_API_KEY environment variable or the --api-key flag on verify-source.

Automatic verification

When an etherscan-key is configured and the target network is not anvil, deploy verifies automatically after a successful deployment:
npx solidscript deploy MyToken -n base-sepolia -a 1000000
To deploy without verifying, pass --no-verify:
npx solidscript deploy MyToken -n base-sepolia -a 1000000 --no-verify

Manual verification

Use verify-source when you need to verify a contract that was deployed earlier, or when automatic verification was skipped:
npx solidscript verify-source MyToken -n base-sepolia
npx solidscript verify-source MyToken -n base-sepolia --address 0x... --args 1000000
SolidScript submits the solc standard JSON input generated during compile. The explorer recompiles it and checks that the bytecode matches the deployed bytecode.
If Basescan returns “Already Verified”, the deployment is fine. That usually means identical bytecode was verified earlier.