Usage
Subcommands
verify contract
Verify a deployed contract’s source code on Etherscan, Arbiscan, Sourcify, or Blockscout.
| Flag | Default | Description |
|---|---|---|
--platform | etherscan | Verification platform: etherscan, arbiscan, polygonscan, basescan, sourcify, blockscout |
--api-key | Explorer API key (or set ETHERSCAN_API_KEY / ARBISCAN_API_KEY env var) | |
--source | Path to Solidity source file (required) | |
--name | Contract name (defaults to filename) | |
--compiler | v0.8.20+commit.a1b79de6 | Solidity compiler version |
--optimize | true | Optimizer was enabled during compilation |
--opt-runs | 200 | Optimizer runs |
--constructor-args | ABI-encoded constructor arguments (hex) | |
--chain-id | 42161 | Chain ID (for Sourcify) |
--api-url | Custom API endpoint URL | |
--flatten | Path to flattened source file |
verify status
Check the status of a pending verification.
| Flag | Default | Description |
|---|---|---|
--platform | etherscan | Verification platform |
--api-key | Explorer API key | |
--api-url | Custom API endpoint URL |
verify sources
List all Solidity source files in a directory.
Supported Platforms
| Platform | API Key Env Var | Notes |
|---|---|---|
| Etherscan | ETHERSCAN_API_KEY | Ethereum mainnet |
| Arbiscan | ARBISCAN_API_KEY | Arbitrum One |
| Polygonscan | POLYGONSCAN_API_KEY | Polygon |
| Basescan | BASESCAN_API_KEY | Base |
| Optimistic Etherscan | OPTIMISTIC_API_KEY | Optimism |
| BscScan | BSCSCAN_API_KEY | BNB Chain |
| Sourcify | (none) | Decentralized, no API key needed |
| Blockscout | (none) | Requires --api-url |