This question already has an answer here:

In token sales usually the source code for the contract is published. Is there a way to verify whether the published code is actually deployed in the given address?

marked as duplicate by carver, Richard Horrocks, lungj, Rob Hitchens - B9lab, Ismael Sep 23 '17 at 5:23

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


If the source code is published you can verify it with the deployed code the using tool like Etherscan Verify Contract Code.

You can only view the byte code or the opcode of a contract from a explorer like etherscan (See here). If the source code is not published, due to the optimizations done by the compiler you can't get the source code back from opcode/bytecode.

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