forge_verify
Verify a deployed smart contract on Etherscan, Sourcify, or Blockscout to confirm its source code matches the on-chain bytecode.
Instructions
Verify a deployed contract on a block explorer (forge verify-contract). Supports Etherscan, Sourcify, and Blockscout.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"projectPath": "<projectPath>",
"contractAddress": "<contractAddress>",
"contractPath": "<contractPath>"
},
"name": "forge_verify"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| profile | No | Foundry profile to use (maps to FOUNDRY_PROFILE env var) | |
| retries | No | Number of retry attempts for verification | |
| verifier | No | Verification service to use | |
| extraArgs | No | Additional CLI flags | |
| projectPath | Yes | Absolute path to the foundry project directory | |
| verifierUrl | No | Block explorer verification API URL | |
| contractPath | Yes | Contract identifier, e.g. src/MyContract.sol:MyContract | |
| constructorArgs | No | ABI-encoded constructor arguments (hex string) | |
| contractAddress | Yes | Deployed contract address to verify | |
| etherscanApiKey | No | Etherscan API key (required for etherscan verifier) |