Is there any way how to publish smart contract's decompiled bytecode from etherscan / bscscan?

I tried to google it but did not find anything useful. If smart contract is not verified on those platforms, it's solidity code is hidden and only bytecode can be decompiled from what was published.

Is there any way, how to take this bytecode and publish it as a smart contract? What if I know what functions are inside and can call them from outside because I have the code anyway but can anyone publish an unverified bytecode of smartcontract? If so, how?

Thank in advance!

The question is not very clear but it sounds like you want this post:

Thank you for a swift reply. No I mean the other way around. I am trying to understand whether it is possible to re-publish already published contract either by cloning or by decompiling it to bytecode and publishing bytecode instead. (I am not really trying to do that, just trying to understand).

Imagine you publish a contract on ethereum chain, you will NOT verify it, can I still take it's code (decompiled bytecode I guess) and publish it as if it was my own anyway?

Yes you can definitely do that. You don't need to decompyle it, you already have the bytecode. However, the bytecode you see in the Etherscan page for a contract doesn't include the constructor, and so it may not deploy correctly. You would have to find the creation transaction and copy the way that the contract was deployed.

Thank you for a reply. So I can just clone the transaction with Web3? I will try to google how but if you can point me to the right direction I would appreciate. Thanks a lot!

1 Like

you managed to decompile tecode, i'm also trying to do the same as you but now i can't get anything yet.