4

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.)?

3

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. – Mikko Ohtamaa Jun 7 '17 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. – MidnightLightning Jun 7 '17 at 16:30
1

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, privacy policy and cookie policy

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