0

Since Ethereum contracts are stored on the blockchain as byte code but people will want to understand how to interact with contracts, I wonder if there is enough information stored about contracts on the blockchain to know how to understand what they do and what input is possible and required.

I see that tools exist that can be used to decompile smart contract byte code to solidity, as seeing the contract's instructions in a human readable form like Solidity would be ideal for me to know what the contract does and how to interact with it, but it seems this decompilation doesn't guarantee that the complete original Solidity code will be recovered.

So my question ultimately is if the only way to make sure that the complete understanding of the interface and inner working of a contract is not lost is by documenting and storing this information yourself? The original solidity code, it's abi, and possible other documentation for example.

1 Answer 1

1

I would say the best way to make sure that the complete understanding of the interface and inner working of a contract is not lost is by documenting and storing this information yourself, which includes the original solidity code, relevant comments, and the ABI. This is because it's difficult to recover the original code from bytecode because information such as names is lost during compilation. You can also store the original solidity code in code hosting platform for version control and collaboration such as Github. That way, even if the original code is lost in your local computer, you can still access them online.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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