Contract verification is available through the PRO API’s Etherscan-compatible RPC route —
module=contract. One key works across every Blockscout-supported chain: swap chain_id to move between them. Get a free key at dev.blockscout.com.<chain_id> for the target chain (1 for Ethereum, 8453 for Base, 11155111 for Sepolia, and so on — full list at dev.blockscout.com).
If you’re running a self-hosted Blockscout instance, or verifying on a chain the PRO API doesn’t cover yet, the same actions work against that instance’s own API directly — see the Contract module RPC reference for the per-instance version of these calls.
License type
You can specify the license type of the smart contract asstring or number. For example, for GNU General Public License v2.0 (GNU GPLv2) you could pass either 4 or "gnu_gpl_v2".
We are supporting such types of license as:
Via flattened source code or standard JSON input
action=verifysourcecode
The same action handles both cases — set codeformat to solidity-single-file for a flattened contract, or solidity-standard-json-input for a standard JSON input file (the format most build tools, like Hardhat and Foundry, generate automatically).
- Params
- Example Result
Via Sourcify
action=verify_via_sourcify
If the contract is already verified on Sourcify, Blockscout fetches the match from the repo automatically. Otherwise, upload the source files and JSON metadata file(s).
- Params
- Example Result
Vyper contracts
action=verify_vyper_contract
- Params
- Example Result
Only single-file Vyper verification is confirmed on this route. If you need Vyper multi-part or Vyper standard-JSON-input verification specifically, those aren’t confirmed to have a PRO API equivalent yet — use the per-instance route for those cases in the meantime.
Multiple raw source files
Blockscout’s REST API has a dedicated “multi-part” mode for submitting several unflattened.sol files at once. The PRO API’s verifysourcecode action doesn’t have a direct equivalent for that — instead, build a standard JSON input file (most toolchains generate one automatically, e.g. under artifacts/build-info/ in Hardhat) and submit it with codeformat=solidity-standard-json-input in the flattened / standard JSON section above. That covers the same multi-file case.
Check verification status
action=checkverifystatus
guid is the value returned by verifysourcecode.- Params
- Example Result
cURL
Verify a proxy contract
action=verifyproxycontract, checked with action=checkproxyverification
Same route family as the actions above — pass the proxy’s own address and Blockscout resolves and links the implementation contract.
- Params
- Example Result
cURL