Skip to content

Commit

Permalink
Merge pull request #498 from CosmWasm/checksum-in-CodeInfoResponse
Browse files Browse the repository at this point in the history
Mark CodeInfoResponse.Checksum as non-optional
  • Loading branch information
webmaster128 authored Jan 16, 2024
2 parents 8643df9 + 7f92c98 commit 0ced826
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions docs/MIGRATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

- The `supportedCapabilities` argument in `NewVM` changed from a comma separated
list to a list of type `[]string`.
- The field `CodeInfoResponse.Checksum` is now explicitly marked as
non-optional. It has always been set to a 32 byte value in the past.

## Renamings

Expand Down
8 changes: 5 additions & 3 deletions types/queries.go
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,9 @@ type CodeInfoQuery struct {
}

type CodeInfoResponse struct {
CodeID uint64 `json:"code_id"`
Creator string `json:"creator"`
Checksum Checksum `json:"checksum,omitempty"`
CodeID uint64 `json:"code_id"`
Creator string `json:"creator"`
// Checksum is the hash of the Wasm blob. This field must always be set to a 32 byte value.
// Everything else is considered a bug.
Checksum Checksum `json:"checksum"`
}

0 comments on commit 0ced826

Please sign in to comment.