I'm doing a hobby project of blockchain exploration project. One thing I'd like to do is to see what contracts are deployed, maybe do some exploration analysis.

One thing I'd like to see is the source code of contracts.

There were quite a bit of questions on this matter, but I'd like take look at it from different angle: I'd like to be able to download source code somewhat automatically. Is there any standardish way to do it?

Things I have considered:

  • Download code from swarm, however it looks like that it is not widely used (is that true?);
  • Use service like: https://etherscan.io --- however API doesn't provide source code and their Terms And Conditions forbid scraping;

4 Answers 4


EtherScan.io offer the possibility to see the Solidity source code of a contract address.

  1. Enter the contract address in the search bar.
  2. Click on the contract tab.

To illustrate, this is the Solidity source code of the Tether token, as it has been deployed on the Ethereum blockchain.


Possible duplicate How to get Source code of an already deployed contract? : How to get Source code of an already deployed contract?

  • I'm aware of that question. However there are some extra angle of trying to do this more or less automatically.
    – Joe
    Commented Dec 2, 2017 at 16:04

I basically see two options

  • download source-code from the various blockchain explorers if it was published (etherscan.io, ...) (here's my sample code to automate dumping of smart contract sources from etherchain.org)
  • decompile to a source-code equivalent from byte-code with porosity

Cindercloud also offers an easy to use API to fetch the source and ABI. Underlying, it uses other APIs to fetch and cache the information.

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.