Contract Verification

I noticed that parachain does not shows the compiled bytecode or human readable codes, in explorer. For example in moonbeam Subscan | Aggregate Substrate ecological network high-precision Web3 explorer

Why don’t we have similar features like Ethereum where the contract can be read by anyone in explorers?

Is there any existing tools that display codes in the explorer? Want to create it for fun projects

Are you asking about parachains themselves or smart contracts that run on parachains?

If smart contracts then this depends upon the specific smart contract parachain.

If parachains themselves, then one cannot necessarily always do so, because polkadot intentionally permits closed source commercial parachains. We’d need fancier ideas like SPREE to even send messages to close source parachains though, which makes doing close source parachains pretty hard right now.

An open source parachain team should ideally be doing reproducable builds, including trim-paths = "all". If they do, then you check out the parachain teams repository on github, gitlab, etc, check out the release tag being used on-chain right now, do a reproducable release build there, and check the hash matches what’s posted on-chain.

Yes, it’d be nice if some site gave build & comparison instructions for all current parachains. I’d suggest a github repository where parachain teams post their build instructions.

It’s likely this becomes slightly more complex in the future once we support dynamic linking.