Skip to main content
GET
/
?module=contract&action=verifysourcecode
Verify Contract with Standard JSON Input
curl --request GET \
  --url 'https://eth.blockscout.com/api/?apikey=&module=contract&action=verifysourcecode'
{
  "message": "OK",
  "result": "guid-string-here",
  "status": "1"
}

Authorizations

apikey
string
query
required

Optional API key for increased rate limits.

Without API key:

  • 5 requests per second (shared pool)
  • No registration required

With API key:

  • 10 requests per second per key
  • Up to 3 free keys per account
  • Get your API key at https://blockscout.com (login required)

Usage: Add apikey=YOUR_KEY to any request query string.

Query Parameters

module
enum<string>
required

Module name (must be 'contract')

Available options:
contract
action
enum<string>
required

Action name (must be 'verifysourcecode')

Available options:
verifysourcecode
codeformat
string
required

Format solidity-standard-json-input or solidity-single-file

contractaddress
string
required

Contract address hash 40-character hexadecimal address hash with 0x prefix

Example:

"0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae"

contractname
string
required

Contract name

compilerversion
string
required

Compiler version

sourceCode
string
required

Standard JSON input or flattened source

optimizationUsed
string

Optimization (0 false 1 true) for single-file

runs
integer

Optimization runs

evmversion
string

EVM version for single-file

Response

200 - application/json

Successful response

status
enum<string>

Status code (1 = OK)

Available options:
1
message
string

Response message

Example:

"OK"