Since the last week I have not been able to verify contracts on Etherscan if they use libraries. I was able to do this before. Apparently something has changed in Etherscan, Solidity compiler, or related that makes it not to picked up libraries I have linked in.

The contracts without libraries are fine.

What could such change to be? Any workaround (use specific Solidity version, etc.)?

2 Answers 2


If you're submitting source code to EtherScan to verify the bytecode of a contract, if your code includes an include command, remove that line and replace it with the contents of the file to be included, so all the contract definitions (libraries, other contract interfaces or full contracts) are all in one file. Submitting that as the source should be accepted.

Take for example, the Ethereum Alarm Clock source code. Note that that contract (Scheduler) in the Solidity source code uses library GroveLib. The Solidity source listed for the contract lists the definition of that library contract, and down lower, it also needs to indicate that the GroveLib contract it's using is at 0x7c1eb207c07e7ab13cf245585bd03d0fa478d034.

  • 1
    Thank you for the answer. This is not an answer I am looking for. I know how EtherScan works. However, it does not work anymore. I am asking why it is not working anymore. Commented Jun 7, 2017 at 1:00
  • 1
    @MikkoOhtamaa Oh, I see, not just an include, but a Library specifically. I edited my answer to show an example of that. When submitting the code, there are form fields at the bottom of the page to input the locations of Library contracts used by the contract, which need to match the deployed code in order to verify. Commented Jun 7, 2017 at 16:30

This was an issue on EtherScan service.

EtherScan resolved this issue yesterday.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.