To verify the contents of the contract deployed on chain you will need
junod installed on your machine.
Compile contracts locally
Clone the repository and enter the directory:
git clone https://github.com/CosmosContracts/cw-unity-prop
git checkout v0.3.0
Compile the contracts:
docker run --rm -v "$(pwd)":/code \
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
This should output info about the contract sha256 hash:
Optimizing cw_unity_prop.wasm ...
Creating hashes ...
Info: sccache stats after build
Make note of this for later.
Verifying the contract code on chain
The contract has already been deployed on chain. You can view it on MintScan here.
junod tag you can find the address hard coded in the code:
// UnityContractByteAddress is the bytes of the public key for the address of the Unity contract
// $ junod keys parse juno1nz96hjc926e6a74gyvkwvtt0qhu22wx049c6ph6f4q8kp3ffm9xq5938mr
// human: juno
// bytes: 5BEF9E5318ED6716A11179C70B06656E9FB91D241A1C594F344B325D9110D94C
const UnityContractByteAddress = "5BEF9E5318ED6716A11179C70B06656E9FB91D241A1C594F344B325D9110D94C"
You can query info about this contract on chain:
junod q wasm contract juno1nz96hjc926e6a74gyvkwvtt0qhu22wx049c6ph6f4q8kp3ffm9xq5938mr --node https://rpc-juno.nodes.guru:443
This should return:
label: Juno Unity Prop v0.3.0
253, now lets download the wasm binary for that code:
junod q wasm code 253 cw_unity_prop.wasm --node https://rpc-juno.nodes.guru:443
Get the hash and not that it matches the checksums in v0.3.0:
shasum -a 256 cw_unity_prop.wasm --node https://rpc-juno.nodes.guru:443
It should output:
A service provided by Mintscan allows code to be uploaded by third parties for them to validate that contracts deployed on chain match the code found on GitHub and is uploaded to their storage medium.
Here is Juno Unity Prop v0.3.0, contract, aka contract 253.
You can see that this contract has not been verified, though following the steps above we have submitted the code and steps required to the team at Mintscan.
The verified contract now looks like this.