second-state/smart-contract-search-engine

Create a tool (Python script) that can produce the contract version hash

tpmccallum opened this issue · 2 comments

We hash the ABI of a contract (abiSha3)
We also hash the Bytecode of a contract (bytecodeSha3)
We combine these to create a unique identifier (abiSha3BytecodeSha3)

This is a great way to deterministically identify a unique instance of a contract (in cases where different unique contract instances can share the same ABI but have different Bytecode etc.)

Whilst the search engine does all of this automatically as part of its normal operation, it would also be great to be able to generate the hashes manually. This would be useful for frontend developers who want to know what value to set as the dappVersion in their display etc.

This code could be kept in the Python utilities directory.