Badges v1.1 Update - Badge Nft
Details
Description
This proposal requests uploading the v1.2.0 version the Badges NFT contract. Code changes can be found at: here.
Changes:
-
Validation of claim keys. The Badge Hub contract supports distribution of badges using claim keys. Specifically, the badge creator generates an secp256k1 private-public key pair, provides the public key to the contract, and distribute the private key off-chain. Users who receives the private key can claim the badge by signing a message with the private key. Prior to v1.2.0, Badge Hub does not check the validity of the public key(s) when creating a new badge or adding claim keys to an existing badge. If a creator uses an invalid key, they would need to re-create a new badge with a valid key. v1.2.0 introduces validation of public to prevent this issue.
-
Fix badge #17. The creator of this badge used an Ed25519 pubkey instead of an secp256k1 one. This upgrade corrects this by substituting the invalid key with a valid one.
-
Bump all dependencies to latest versions. cosmwasm v1.1, cw-plus 0.16, cw-nfts 0.16, launchpad 0.21.
Wasm code info
The source code can be find at this repository. The binaries are compiled at commit 964af0e using workspace-optimizer v0.12.10. Specifically, the following command is used:
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 \
cosmwasm/workspace-optimizer:v0.12.10
This results in the following SHA256 checksums:
a89c462eaf880122ae55521121bb4ae8c2437974dd9d9619401ccd48059f8770 badge_hub.wasm
07db91e62126bbd76aa938b32d46df9fb15091935807c7ad5cb21eb9c500af5c badge_nft.wasm
Voters are encouraged to independently validate that the binary code proposed on-chain matches the Rust source code. The following command may be helpful:
starsd q gov proposal $id --output json \
| jq -r '.content.wasm_byte_code' \
| base64 -d \
| gzip -dc \
| sha256sum
where $id is the id of this proposal.
Votes