In Ethereum every smart contract is public. This can obviously have downsides, but an important upside is the auditability and trustworthiness of contracts. In EOS by default contracts are NOT public. How can I review if - f.e. BetDice - uses a trustable and fair Smart Contract?

How can a (d)app builders prove their integrity? How can they publish their smart contract and prove that this specific code is running?

Brandon Blumar referred to a solution in this (amazing) talk around min https://www.youtube.com/watch?v=ZiimIJnVXxU

  • publish your code on e.g. eospark or on any public platform along with the compiling instructions for people to compare the wasm – confused00 Oct 23 '18 at 15:50
  • 1
    The code of the contract is publicly available, you can use cleos get code (developers.eos.io/eosio-cleos/reference#cleos-get-code) to get wasm. There needs to be better tools to show the contract code in a readable way. – friedger Oct 23 '18 at 21:51

If the developer makes the code public, then you can compile it using eosio.cdt, and then compare the SHA256 hash to the one stored on chain. The one on chain can be accessed using: cleos get code account_name. If the 2 hashes match, then the open-source code is indeed the code that is stored on the smart contract account.

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.