If I copy a SmartContract bytecode and deploy it with a different account on my private testnet, will it retain the same functionality? Assuming that owner address isn't hardcoded, will I be able to send identical calls from my local account and get the same results? I am looking to reverse engineer some contracts that don't provide ABI and use obfuscated input data.


Simply no, even if the contract deployer returns that, it will not happen, because the bytecode is formed by many variable data such as the deployer, publishing timestamp, the block number on the network, etc.


You can also look at bytecode decompilers that return somewhat readable Solidity code. I say "somewhat" owing to the inherent limitations of decompilers.

You will not get constructor code and those will factor into your question about owner privileges since such things are often set up during initialization. The reason is the constructor executes on deployment and is never needed again. Its bytecode isn't even stored in the address's data with the rest of the contract.

So ... you might be forced to decompile and discern what you imagine the constructor must be doing and then recreate the initialization process.

Hope it helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.