Skip to main content
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.
All calls in this guide share the same base pattern:
Swap <chain_id> for the target chain (1 for Ethereum, 8453 for Base, 11155111 for Sepolia, and so on — full list at dev.blockscout.com).
Contract addresses, source code, and other variables in the examples below are illustrative. Replace them with your own contract’s details.
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 as string 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:
API license types:

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).

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).

Vyper contracts

action=verify_vyper_contract
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.
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.
cURL