Quaiscan smart-contract verification API
Quaiscan also offers a contract verification API.
License type
1. No License (None)
2. The Unlicense (Unlicense)
3. MIT License (MIT)
4. GNU General Public License v2.0 (GNU GPLv2)
5. GNU General Public License v3.0 (GNU GPLv3)
6. GNU Lesser General Public License v2.1 (GNU LGPLv2.1)
7. GNU Lesser General Public License v3.0 (GNU LGPLv3)
8. BSD 2-clause "Simplified" license (BSD-2-Clause)
9. BSD 3-clause "New" Or "Revised" license* (BSD-3-Clause)
10. Mozilla Public License 2.0 (MPL-2.0)
11. Open Software License 3.0 (OSL-3.0)
12. Apache 2.0 (Apache-2.0)
13. GNU Affero General Public License (GNU AGPLv3)
14. Business Source License (BSL 1.1)Verify smart contract
Flattened contract
Body
objectOptionalExample:
{"compiler_version":"v0.8.17+commit.8df45f5f","license_type":"mit","source_code":"// SPDX-License-Identifier: GPL-3.0\n\npragma solidity >=0.7.0 <0.9.0;\n\n/**\n * @title Owner\n * @dev Set & change owner\n */\ncontract Owner {\n\n address private owner;\n \n // event for EVM logging 2345678ewqwertyui54567890987654345678\n event OwnerSet(address indexed oldOwner, address indexed newOwner);\n \n // modifier to check if caller is owner\n modifier isOwner() {\n // If the first argument of 'require' evaluates to 'false', execution terminates and all\n // changes to the state and to Ether balances are reverted.\n // This used to consume all gas in old EVM versions, but not anymore.\n // It is often a good idea to use 'require' to check if functions are called correctly.\n // As a second argument, you can also provide an explanation about what went wrong.\n require(msg.sender == owner, \"Caller is not owner\");\n _;\n }\n \n /**\n * @dev Set contract deployer as owner\n */\n constructor(uint112 abc, address abb, bytes32 ghnc) {\n // console.log(\"Owner contract deployed by:\", msg.sender);\n owner = msg.sender; // 'msg.sender' is sender of current call, contract deployer for a constructor\n emit OwnerSet(address(0), owner);\n }\n\n /**\n * @dev Change owner\n * @param newOwner address of new owner\n */\n function changeOwner(address newOwner) public isOwner {\n emit OwnerSet(owner, newOwner);\n owner = newOwner;\n }\n\n /**\n * @dev Return owner address \n * @return address of owner\n */\n function getOwner() external view returns (address) {\n return owner;\n }\n}","is_optimization_enabled":true,"optimization_runs":199,"contract_name":"Owner","libraries":{"Libcheck":"0x030f7c7dbd472864220bcf9e37ede1b8a3125970","Libcheck_1":"0x030f7c7dbd472864220bcf9e37ede1b8a3125970"},"evm_version":"berlin","autodetect_constructor_args":true}Responses
200
Successful response
application/json
post
/api/v2/smart-contracts/0xb12cad649a56e67188bbaa56583c18dc7d2812ed/verification/via/flattened-code200
Successful response
Via Standard JSON input
Body
compiler_versionnumberOptionalExample:
v0.8.17+commit.8df45f5fcontract_namestringOptionalExample:
Ownerfiles[0]string · binaryOptional
autodetect_constructor_argsbooleanOptionalExample:
falseconstructor_argsstringOptionalExample:
00000000000000000000000000000000000000000000000000000002d2982db3000000000000000000000000bb36c792b9b45aaf8b848a1392b0d6559202729e666f6f0000000000000000000000000000000000000000000000000000000000license_typestringOptionalExample:
gnu_gpl_v2Responses
200
Successful response
application/json
post
/api/v2/smart-contracts/0x9c1c619176b4f8521a0ab166945d785b92aef453/verification/via/standard-input200
Successful response
Multi-part Solidity files
Body
compiler_versionnumberOptionalExample:
v0.8.17+commit.8df45f5flicense_typestringOptionalExample:
gnu_gpl_v3is_optimization_enabledbooleanOptionalExample:
truelibrariesstringOptionalExample:
{"Libcheck": "0x030f7c7dbd472864220bcf9e37ede1b8a3125970"}evm_versionstringOptionalExample:
londonoptimization_runsintegerOptionalExample:
199files[0]stringOptional
files[1]string · binaryOptional
Responses
200
Successful response
application/json
post
/api/v2/smart-contracts/0x030f7c7dbd472864220bcf9e37ede1b8a3125970/verification/via/multi-part200
Successful response
Last updated