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?
[Ethereum] way to view or otherwise verify a contract’s source code?
contract-verificationsolidity
Best Answer
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.