You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 2, 2022. It is now read-only.
Could be that this field was not always available, but now it is, so yeah we should in general change it to always display the actual contract hash and not an excerpt of the contracts Wasm bytecode.
It would be even better to not use the source.hash field from the .contract file, but rather compute hash(source.wasm) and display the result of that. This way a user could be sure that the displayed hash always corresponds to what is to be submitted to the chain.
But I'm not sure if it is possible to do that, since AFAIU the type of hash which is used by the chain is generic and could be an arbitrary hashing algorithm. But maybe there is already some polkadot-js function for computing the hash?
But anyway, the easy fix would be to just use source.hash from the contract file.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The value which is shown as
Code Hash
is not actually the code hash, but instead the contract's Wasm bytecode.This is what the UI shows:
This is how the contract bundle looks:
So using
source.hash
instead ofsource.wasm
would be the fix.(Note: In an ideal world the Canvas UI would compute the hash
source.wasm
by itself and asserthash(source.wasm) == source.hash
.)The text was updated successfully, but these errors were encountered: