Skip to content

Commit

Permalink
docs: migration docs for transfer multidenom (#6393)
Browse files Browse the repository at this point in the history
* docs: migration docs for transfer multidenom

* typo

* add changelog for multidenom

* add transfer function removals

* denomtrace migration docs

* Apply suggestions from code review

Co-authored-by: DimitrisJim <[email protected]>

---------

Co-authored-by: DimitrisJim <[email protected]>
  • Loading branch information
Carlos Rodriguez and DimitrisJim authored Jul 1, 2024
1 parent 8942179 commit 3456ac3
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion docs/docs/05-migrations/13-v8-to-v9.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,31 @@ func AssertEvents(

### ICS20 - Transfer

The functions [`SenderChainIsSource` and `ReceiverChainIsSource`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/apps/transfer/types/coin.go#L12-L32) have been replaced with the function `HasPrefix` of the newly added `Denom` type.
- With support for multidenom transfer packets, the `NewMsgTransfer` constructor function to create a new `MsgTransfer` instance now accepts multiple coins instead of just one:

```diff
func NewMsgTransfer(
sourcePort, sourceChannel string,
- token sdk.Coin,
+ tokens sdk.Coins,
sender, receiver string,
timeoutHeight clienttypes.Height, timeoutTimestamp uint64,
memo string,
)
```

- The `ibc_transfer` and `fungible_token_packet` events do not include the attributes `denom` and `amount` anymore; instead they include the attribute `tokens` with the list of coins transferred in the packet.
- The helper function [`GetTransferCoin`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/apps/transfer/types/coin.go#L46) has been removed.
- The helper function [`GetDenomPrefix`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/apps/transfer/types/coin.go#L35) has been removed.
- The helper function [`GetPrefixedDenom`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/apps/transfer/types/coin.go#L40) has been removed. Please construct the denom using the new [`Denom` type](https://github.com/cosmos/ibc-go/blob/7068760f7277cab75b760a0d6ca95ccbfe2f78ae/modules/apps/transfer/types/token.pb.go#L82).

### `DenomTrace` type

- The [`DenomTrace`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/apps/transfer/types/transfer.pb.go#L25-L33) type has been made private and will be completely removed in a later release.
- The [`DenomTrace` and `DenomTraces` gRPCs](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/apps/transfer/keeper/grpc_query.go#L22-L75) have therefore been removed as well. Please use the [`Denom` type](https://github.com/cosmos/ibc-go/blob/14fedae884e541779eefd01fc4aab5fe194856bc/modules/apps/transfer/types/token.pb.go#L81-L87) instead, and the [`Denom` and `Denoms` gRPCs](https://github.com/cosmos/ibc-go/blob/14fedae884e541779eefd01fc4aab5fe194856bc/modules/apps/transfer/keeper/grpc_query.go#L27-L80).
- An [automatic migration handler](https://github.com/cosmos/ibc-go/blob/14fedae884e541779eefd01fc4aab5fe194856bc/modules/apps/transfer/keeper/migrations.go#L75-L113) is also configured to migrate the storage from using `DenomTrace` to `Denom`.
- The [`denomination_trace` event emitted in the `OnRecvPacket` callback](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/apps/transfer/keeper/relay.go#L268-L274) has been replaced with the [`denom` event](https://github.com/cosmos/ibc-go/blob/18121380dec5cff5ec803f1088fd409e069c2c9e/modules/apps/transfer/keeper/relay.go#L247).
- The functions [`SenderChainIsSource` and `ReceiverChainIsSource`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/apps/transfer/types/coin.go#L12-L32) have been replaced with the function `HasPrefix` of the newly added `Denom` type.

### ICS27 - Interchain Accounts

Expand Down

0 comments on commit 3456ac3

Please sign in to comment.