Skip to main content

Verify from Etherscan

Send address and chain of a verified Etherscan contract

URL : /verify/etherscan

Method : POST

The body should provide:

  • address
  • chain
caution

/verify/etherscan triggers a server side request to Etherscan API, this could cause reaching the Etherscan API Limit Rate.

Responses

Condition : The recompiled contract matches the deployed version perfectly.

Code : 200 OK

Content :

{
"result": [
{
"address": "0x0001Db7722Fb4211C24d4aC5E1127353116323d3",
"status": "perfect"
}
]
}

Condition : The recompiled contract matches the deployed version partially.

Code : 200 OK

Content :

{
"result": [
{
"address": "0x0001Db7722Fb4211C24d4aC5E1127353116323d3",
"status": "partial"
}
]
}

Condition : The contract at the provided address and chain has already been sourcified at timestamp indicated by storageTimestamp.

Code : 200 OK

Content :

{
"result": [
{
"address": "0x0001Db7722Fb4211C24d4aC5E1127353116323d3",
"status": "perfect",
"storageTimestamp": "2020-11-10T14:12:15.665Z"
}
]
}

Condition : Missing or invalid parameters received.

Code : 400 Bad Request

Content :

{
"message": "Validation Error: address, chain",
"errors": [
{
"field": "address",
"message": "Invalid value"
},
{
"field": "chain",
"message": "Invalid value"
}
]
}

Condition : Recompiled bytecode does not match the deployed bytecode.

Code : 500 Internal Server Error

Content :

{
"error": "The deployed and recompiled bytecode don't match."
}

Condition : The provided chain does not have a contract deployed at the provided address.

Code : 500 Internal Server Error

Content :

{
"error": "Contract name: RandomName. Ethereum Mainnet does not have a contract deployed at 0x7c90F0C9Eb46391c93d0545dDF4658d3B8DF1866."
}

Condition : The provided chain is temporarily unavailable.

Code : 500 Internal Server Error

Content :

{
"error": "Contract name: RandomName. Ethereum Mainnet is temporarily unavailable."
}

Condition : Some resources are missing and could not be fetched.

Code : 500 Internal Server Error

Content :

{
"error": "Resource missing; unsuccessful fetching: browser/RandomName.sol"
}

Condition : Verifying contracts with immutable variables is not supported for the provided chain.

Code : 500 Internal Server Error

Content :

{
"error": "Contract name: RandomName. Verifying contracts with immutable variables is not supported for Ethereum Mainnet."
}

Condition : Etherscan API Limit reached

Code : 400 Bad Request

Content :

{
"error": "Etherscan API rate limit reached, try later"
}

Condition : Contract not verified on Etherscan

Code : 400 Bad Request

Content :

{
"error": "This contract is not verified on Etherscan"
}