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
Key | Datatype | Required | Description |
---|---|---|---|
module | string | ||
action | string | ||
contractaddress | string | ||
sourceCode | string | ||
codeformat | string | ||
contractname | string | ||
compilerversion | string | ||
optimizationUsed | number | ||
runs | number | ||
licenseType | number | ||
apikey | string |