Verify Source Code

POST https://api.etherscan.io/api?module=contract&action=verifysourcecode&contractaddress=0x2A1D1C87d18dd13d7a1e91A42C9fFEc486EB6433&sourceCode=// SPDX-License-Identifier: MIT // compiler version must be greater than or equal to 0.8.10 and less than 0.9.0 pragma solidity ^0.8.10; contract HelloWorld { string public greet = "Hello World!"; } &codeformat=solidity-single-file&contractname=HelloWorld&compilerversion=v0.8.10+commit.fc410830&optimizationUsed=0&runs=200&licenseType=1&apikey=YourApiKeyToken

Request Params

KeyDatatypeRequiredDescription
modulestring
actionstring
contractaddressstring
sourceCodestring
codeformatstring
contractnamestring
compilerversionstring
optimizationUsednumber
runsnumber
licenseTypenumber
apikeystring