1

I thought that any smart contract had open code. However, from time to time I'll encounter smart contracts that have no publicly available Solidiy code, on etherscan.

How can this be? Doesn't that go against the fundamental idea of the Ethereum as blockchain that everything is open and can be seen by anyone, publicly?

For instance

no source code???

1 Answer 1

2

When you deploy a smart contract written in Solidity, the Solidity code isn't deployed to the blockchain. The solidity code is first compiled to bytecode by a compiler, and then the bytecode is deployed to the blockchain.

When you see Solidity code on for example Etherscan, this means the contract is verified.

What you see in the screenshot is the bytecode of a smart contract. With a good decompiler you will be able to decompile the bytecode to Solidity code. This way every contract, verified or not, is fully 'open source' on the Ethereum blockchain. Etherscan has a decompiler build in which you can check out: decompiler

2
  • why has smart contract not been decompiled automatically by etherscan?
    – arumichi
    Commented Dec 21, 2021 at 1:43
  • For me the question sounds not like "How does it work" but rather "Why does it go against blockchain principles" Commented Jul 30, 2022 at 8:56

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.