POST
https://blockscout.github.io/api/v1/solidity/sources:verify-standard-json
Vyper: POST
https://blockscout.github.io/api/v1/vyper/sources:verify-standard-json
Both Solidity and Vyper have the same standard JSON verification request and response structures.
Request
Name | Description |
---|---|
contracts | List of contracts to be verified. For each contract specify chainId and address. |
chainId | Numeric ID of chain List of supported chain IDs is available via: GET https://proxy-verifier.services.blockscout.com/api/v1/chains More info |
address | 0x address of the contract to be verified |
compiler | Compiler version. This can be retrieved via: Solidity: GET https://proxy-verifier.services.blockscout.com/api/v1/solidity/compilers Vyper: GET https://proxy-verifier.services.blockscout.com/api/v1/vyper/compilers Only one compiler version can be specified during verification. EVMVersions is only used for multi-part verification.More info |
input | Standard JSON input encoded as a string - More info available here: https://docs.soliditylang.org/en/latest/using-the-compiler.html#input-description |
contractValidationResults
- indicates that some (at least one) of the contracts do not support verification. This may mean that the address is not a contract, or that the contract at the given address self-destructed. For each provided contract, the corresponding VALID / INVALID
statuses with descriptions are returned in the same order the contracts were provided.
compilationFailure
- returned when the given source inputs cannot be compiled. This failure is ubiquitous and is not related to any particular provided contract. This means that the user provided invalid contract details during verification.
contractVerificationResults
- indicates that all provided contracts are valid and verification requests for each of them have been sent to the eth-bytecode-db
service. The verification may result in partial or full matches, or verification failure if the contract cannot be verified with the provided source details. The results are returned in the same order as the provided contracts.
POST
https://blockscout.github.io/api/v1/solidity/sources:verify-multi-part
compiler
and evmVersion
must be valid and chosen from thelist of supported compilers and EVM versions. Otherwise, a 400 BAD REQUEST error will be returned.
The optimizationRuns
option, if omitted, corresponds to the optimizer with enabled: false
setup. If present, it should be a correct u32 value and result in runs: {optimizationRuns}
setup with enabled: true
.
sourceFiles
is a mapping from file paths to corresponding contents.
libraries
is a mapping from library names to their hex-encoded addresses.
Vyper
POST
https://blockscout.github.io/api/v1/vyper/sources:verify-multi-part
compiler
and evmVersion
must be valid and chosen from the list of supported compilers and EVM versions. Otherwise, a 400 BAD REQUEST error will be returned.
sourceFiles
is a mapping from file paths that should be specified inside the sources
standard JSON option to corresponding contents.
interfaces
is a mapping from file paths that should be specified inside the interfaces
standard JSON option to corresponding contents.
GET
http://proxy-verifier.services.blockscout.com/api/v1/chains
id
is important. These are the chain IDs supported by the service and allowed to be used during contract verification.
GET
https://proxy-verifier.services.blockscout.com/api/v1/solidity/compilers
GET
https://proxy-verifier.services.blockscout.com/api/v1/vyper/compilers
Returns the list of supported compiler and corresponding EVM versions. Only one of these compiler and EVM (if the multi-part option is used) versions are allowed to be specified during contract verification.