Skip to content

Commit

Permalink
Merge pull request #499 from CosmWasm/migration-additions
Browse files Browse the repository at this point in the history
Add more points to MIGRATING.md
  • Loading branch information
chipshort authored Jan 18, 2024
2 parents a690c10 + ef0ba79 commit 2c49db8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/MIGRATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@
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.
- All entrypoint functions now return the full result with an `Ok` or `Err`
variant instead of just the data inside the `Ok`. This was previously only the
case for `IBCPacketReceive`. It is important to note that this means contract
errors are no longer returned in the `error` return value. Instead, the `Err`
field should be checked for errors.
- The field `BlockInfo.Time` now uses a wrapper type `Uint64` instead of
`uint64` to ensure string serialization. You can use `uint64(u)` to get the
underlying value.
- CosmWasm gas values were reduced by a factor of 1000, so each instruction now
consumes 150 CosmWasm gas instead of 150000. This should be taken into account
when converting between CosmWasm gas and Cosmos SDK gas.

## Renamings

Expand All @@ -22,5 +33,8 @@ where the old name was deprecated.
| `CanonicalizeAddress` | `CanonicalizeAddressFunc` | Follow [best practice for naming function types][ft] |
| `GoAPI.HumanAddress` | `GoAPI.HumanizeAddress` | Perfer verbs for converters |
| `GoAPI.CanonicalAddress` | `GoAPI.CanonicalizeAddress` | Perfer verbs for converters |
| `CosmosMsg.Stargate` | `Any` | The message has nothing to do with Stargate |
| `StargateMsg` | `AnyMsg` | The message has nothing to do with Stargate |
| `QueryResponse` | `QueryResult` | Brings consistency with the naming of the other results |

[ft]: https://stackoverflow.com/a/60073310

0 comments on commit 2c49db8

Please sign in to comment.