Proposals of #95

Badges v1.1 Update - Badge Nft

Exec Legacy Content
passed
Expected result
Turnout / Quorum
54.89% / 20.00%
Voting start 2022.12.07 at 22:12:45
Voting end 2022.12.10 at 22:12:45
94.90%
418 720 322 stars
Yes
0.00%
13 564 stars
No
0%
0 stars
Veto
5.10%
22 500 482 stars
Abstain

Details

Proposer
-
Total deposit
5 000 stars
Submit time
2022.12.07 at 22:12:45
Deposit end time
2022.12.21 at 22:12:45

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

Voter
Answer