How to construct deployable bytecode from runtime bytecode?

by hellopeach   Last Updated August 13, 2019 06:28 AM

For example I want to redeploy/clone a contract to another address but don't have the original source code, so I only have the runtime bytecode stored on the blockchain. If I try to deploy the runtime bytecode directly, it will result in a failure. So is there any way to construct valid deployable bytecode from runtime bytecode, so that the exact same contract code can be deployed/cloned to another address?

I'm not looking to deploy a forwarder proxy, I know how to do that in both solidity assembly and vyper, what I need is to deploy the exact same runtime bytecode to a new address without the original source code. Thanks.

Related Questions

Updated November 17, 2017 04:28 AM

Updated November 08, 2017 11:28 AM

Updated April 16, 2018 15:28 PM

Updated May 16, 2019 14:28 PM

Updated April 25, 2018 14:28 PM