Skip to content

Commit 5b6d745

Browse files
toschdevPantani
andauthored
docs: Update IBC tutorial (#4699)
Co-authored-by: Danilo Pantani <[email protected]>
1 parent dabccd1 commit 5b6d745

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/docs/02-guide/04-ibc.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ To identify the creator of the post in the receiving blockchain, add the
201201
command because it would automatically become a parameter in the `SendIbcPost`
202202
CLI command.
203203

204-
```protobuf title="proto/planet/blog/packet.proto"
204+
```protobuf title="proto/planet/blog/v1/packet.proto"
205205
message IbcPostPacketData {
206206
string title = 1;
207207
string content = 2;
@@ -338,6 +338,8 @@ from the packet.
338338
```go title="x/blog/keeper/ibc_post.go"
339339
package keeper
340340

341+
import transfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types"
342+
341343
func (k Keeper) OnAcknowledgementIbcPostPacket(ctx sdk.Context, packet channeltypes.Packet, data types.IbcPostPacketData, ack channeltypes.Acknowledgement) error {
342344
switch dispatchedAck := ack.Response.(type) {
343345
case *channeltypes.Acknowledgement_Error:
@@ -346,7 +348,7 @@ func (k Keeper) OnAcknowledgementIbcPostPacket(ctx sdk.Context, packet channelty
346348
case *channeltypes.Acknowledgement_Result:
347349
// Decode the packet acknowledgment
348350
var packetAck types.IbcPostPacketAck
349-
if err := types.ModuleCdc.UnmarshalJSON(dispatchedAck.Result, &packetAck); err != nil {
351+
if err := transfertypes.ModuleCdc.UnmarshalJSON(dispatchedAck.Result, &packetAck); err != nil {
350352
// The counter-party module doesn't implement the correct acknowledgment format
351353
return errors.New("cannot unmarshal acknowledgment")
352354
}
@@ -410,6 +412,7 @@ The `earth.yml` and `mars.yml` files are required in the project directory:
410412

411413
```yaml title="earth.yml"
412414
version: 1
415+
validation: sovereign
413416
build:
414417
proto:
415418
path: proto
@@ -438,6 +441,7 @@ validators:
438441
439442
```yaml title="mars.yml"
440443
version: 1
444+
validation: sovereign
441445
build:
442446
proto:
443447
path: proto

0 commit comments

Comments
 (0)