1

New to all this so please be gentle.

Suppose a contract is deployed, eg: 0xfc0995dc31ff8986bedbb3e88c21a89997f54c12

Checking its contract tab under bscscan shows it hasnt been published, though its live/deployed: https://bscscan.com/address/0xfc0995dc31ff8986bedbb3e88c21a89997f54c12#code

Is there a way I can get the functions of the contract and interact with it directly in some other way thats not through bscscan.com?

1

To view the code:

On the Contract tab of a given contract on BscScan, there is a button that says "Decompile ByteCode". Click that and you'll be taken to a new page called "EVM bytecode decompiler". Then click the button on that page that also says "Decompile ByteCode". The tool will provide you with the decompilation result. Some code will be perfectly decompiled because the explorer has seen it before, while other code will be somewhat obfuscated.

To interact with the code:

This is a bit tricky if the author hasn't published the code. You'll need to send a transaction to the contract and pack the bytes in such a way that the contract understands them and processes them correctly. There may be a tool that helps with this but I have not yet come across it. You may just have to byte pack yourself and send a transaction to the contract using a script.

2
  • Thanks, was hoping for an easier solution for the latter part of your answer - but I suppose thats as good as it gets at this stage.
    – SupaMonkey
    Nov 29 '21 at 6:56
  • You're welcome! Unfortunately that's as good as it gets yeah. And thank you for approving my answer.
    – Ryan Shea
    Nov 29 '21 at 16:27

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.