Skip to content

Commit

Permalink
Add migration docs
Browse files Browse the repository at this point in the history
  • Loading branch information
chipshort committed Jan 26, 2024
1 parent 90de448 commit 5028757
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions docs/MIGRATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,30 @@
whether the given string is a valid address. This was previously done
internally using separate calls to `CanonicalizeAddress` and `HumanizeAddress`
but can be done more efficiently using a single call.
- `AnalysisReport.RequiredCapabilities` was changed to `[]string`, so the
splitting does not need to be done by the caller anymore. Additionally, the
`Entrypoints` were added, containing the list of detected entrypoints of a
contract.

## Renamings

This section contains renamed symbols that do not require any further
explanation. Some of the new names may be available in 1.x already in cases
where the old name was deprecated.

| Old name | New name | Note |
| ------------------------ | --------------------------- | ----------------------------------------------------------- |
| `VM.Create` | `VM.StoreCode` | StoreCode brings consistency with wasmd naming |
| `SubcallResult` | `SubMsgResult` | Contracts do not "call" each other but send messages around |
| `SubcallResponse` | `SubMsgResponse` | Contracts do not "call" each other but send messages around |
| `HumanizeAddress` | `HumanizeAddressFunc` | Follow [best practice for naming function types][ft] |
| `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` | `CosmosMsg.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 |
| `VoteMsg.Vote` | `VoteMsg.Option` | Brings consistency with Cosmos SDK naming |
| Old name | New name | Note |
| --------------------------------- | ------------------------------------- | ------------------------------------------------------------ |
| `VM.Create` | `VM.StoreCode` | StoreCode brings consistency with wasmd naming |
| `AnalysisReport.RequiredFeatures` | `AnalysisReport.RequiredCapabilities` | Renamed for a long time, but now the old version was removed |
| `SubcallResult` | `SubMsgResult` | Contracts do not "call" each other but send messages around |
| `SubcallResponse` | `SubMsgResponse` | Contracts do not "call" each other but send messages around |
| `HumanizeAddress` | `HumanizeAddressFunc` | Follow [best practice for naming function types][ft] |
| `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` | `CosmosMsg.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 |
| `VoteMsg.Vote` | `VoteMsg.Option` | Brings consistency with Cosmos SDK naming |

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

0 comments on commit 5028757

Please sign in to comment.