//Submit Source Code for Verification$.ajax({ type:"POST",//Only POST supported url:"//api.polygonscan.com/api",//Set to the correct API url for Other Networks data: { apikey:$('#apikey').val(),//A valid API-Key is required module:'contract',//Do not change action:'verifysourcecode',//Do not change contractaddress:$('#contractaddress').val(),//Contract Address starts with 0x... sourceCode:$('#sourceCode').val(),//Contract Source Code (Flattened if necessary) codeformat:$('#codeformat').val(),//solidity-single-file (default) or solidity-standard-json-input (for std-input-json-format support contractname:$('#contractname').val(),//ContractName (if codeformat=solidity-standard-json-input, then enter contractname as ex: erc20.sol:erc20) compilerversion:$('#compilerversion').val(),// see https://amoy.polygonscan.com/solcversions for list of support versions optimizationUsed:$('#optimizationUsed').val(),//0 = No Optimization, 1 = Optimization used (applicable when codeformat=solidity-single-file) runs:200,//set to 200 as default unless otherwise (applicable when codeformat=solidity-single-file) constructorArguements:$('#constructorArguements').val(),//if applicable evmversion:$('#evmVersion').val(),//leave blank for compiler default, homestead, tangerineWhistle, spuriousDragon, byzantium, constantinople, petersburg, istanbul (applicable when codeformat=solidity-single-file) licenseType:$('#licenseType').val(),//Valid codes 1-12 where 1=No License .. 12=Apache 2.0, see https://amoy.polygonscan.com/contract-license-types libraryname1:$('#libraryname1').val(),//if applicable, a matching pair with libraryaddress1 required libraryaddress1:$('#libraryaddress1').val(),//if applicable, a matching pair with libraryname1 required libraryname2:$('#libraryname2').val(),//if applicable, matching pair required libraryaddress2:$('#libraryaddress2').val(),//if applicable, matching pair required libraryname3:$('#libraryname3').val(),//if applicable, matching pair required libraryaddress3:$('#libraryaddress3').val(),//if applicable, matching pair required libraryname4:$('#libraryname4').val(),//if applicable, matching pair required libraryaddress4:$('#libraryaddress4').val(),//if applicable, matching pair required libraryname5:$('#libraryname5').val(),//if applicable, matching pair required libraryaddress5:$('#libraryaddress5').val(),//if applicable, matching pair required libraryname6:$('#libraryname6').val(),//if applicable, matching pair required libraryaddress6:$('#libraryaddress6').val(),//if applicable, matching pair required libraryname7:$('#libraryname7').val(),//if applicable, matching pair required libraryaddress7:$('#libraryaddress7').val(),//if applicable, matching pair required libraryname8:$('#libraryname8').val(),//if applicable, matching pair required libraryaddress8:$('#libraryaddress8').val(),//if applicable, matching pair required libraryname9:$('#libraryname9').val(),//if applicable, matching pair required libraryaddress9:$('#libraryaddress9').val(),//if applicable, matching pair required libraryname10:$('#libraryname10').val(),//if applicable, matching pair required libraryaddress10:$('#libraryaddress10').val() //if applicable, matching pair required },success:function (result) {console.log(result);if (result.status =="1") {//1 = submission success, use the guid returned (result.result) to check the status of your submission.// Average time of processing is 30-60 secondsdocument.getElementById("postresult").innerHTML =result.status +";"+result.message +";"+result.result;// result.result is the GUID receipt for the submission, you can use this guid for checking the verification status } else {//0 = errordocument.getElementById("postresult").innerHTML =result.status +";"+result.message +";"+result.result; }console.log("status : "+result.status);console.log("result : "+result.result); },error:function (result) {console.log("error!");document.getElementById("postresult").innerHTML ="Unexpected Error" }});
Current daily limit of 100 submissions per day per user (subject to change)
Only supports HTTP post
Upon successful submission you will receive a GUID (50 characters) as a receipt
You may use this GUID to track the status of your submission
Verified proxy contracts will display the "Read/Write as Proxy" of the implementation contract under the contract address's contract tab
Verifying Proxy Contract using cURL
// example with only the mandatory contract address parametercurl -d "address=0xcbdcd3815b5f975e1a2c944a9b2cd1c985a1cb7f""https://api-amoy.polygonscan.com/api?module=contract&action=verifyproxycontract&apikey=YourApiKeyToken"// example using the expectedimplementation optional parameter// the expectedimplementation enforces a check to ensure the returned implementation contract address == address picked up by the verifiercurl -d "address=0xbc46363a7669f6e12353fa95bb067aead3675c29&expectedimplementation=0xe45a5176bc0f2c1198e2451c4e4501d4ed9b65a6""https://api-amoy.polygonscan.com/api?module=contract&action=verifyproxycontract&apikey=YourApiKeyToken"
// OK{"status":"1","message":"OK","result":"gwgrrnfy56zf6vc1fljuejwg6pelnc5yns6fg6y2i6zfpgzquz"}// NOTOK{"status":"0","message":"NOTOK","result":"Invalid API Key"}
Checking Proxy Contract Verification Submission Status using cURL
// OK{"status":"1","message":"OK","result":"The proxy's (0xbc46363a7669f6e12353fa95bb067aead3675c29) implementation contract is found at 0xe45a5176bc0f2c1198e2451c4e4501d4ed9b65a6 and is successfully updated."}// NOTOK{"status":"0","message":"NOTOK","result":"A corresponding implementation contract was unfortunately not detected for the proxy address."}
Tip : You can also download a CSV list of Verified Contract Addresses of which the code publishers have provided a corresponding Open Source license for redistribution.