Blockscout smart-contract verification API
Blockscout also offers a contract verification API.
This is the preferred option for contract verification via API. However, you can also use RPC endpoints, more info is available here.
License type
You can specify 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:
Verify smart contract
Use the appropriate Blockscout instance endpoint to verify if the smart contract microservice is enabled.
In the following examples we use https://eth.blockscout.com to query Ethereum.
0x
contract addresses in POST example urls below should be replaced with your contract hash supplied on contract creation. Variables in the body are examples and should be replaced with your contract details.
Flattened contract
For more information on parameters to pass, see the flattened source code information on the Verifying a smart contract page.
Via Standard JSON input
For more information on parameters to pass, see the flattened source code information on the Verifying a smart contract page. 0x
contract in POST example should be replaced with your contract hash.
Via Sourcify Files
For more information on parameters to pass, see the Contract Verification via Sourcify. 0x
contract in POST example url should be replaced with your contract hash, as should your relevant variables.
Multi-part Solidity files
Vyper Contracts
Vyper Multi-part files
Vyper Standard JSON input
Last updated