Skip to content
This repository was archived by the owner on Apr 10, 2026. It is now read-only.

Commit bbd7579

Browse files
authored
fix: ibc voucher denom issue (#745)
* Reduce length * Update walkthrough
1 parent 0fc6b6b commit bbd7579

2 files changed

Lines changed: 21 additions & 21 deletions

File tree

interchain-exchange/tutorial/05-order-initialization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ func VoucherDenom(port string, channel string, denom string) string {
319319

320320
voucher := denomTrace.IBCDenom()
321321

322-
return voucher
322+
return voucher[:16]
323323
}
324324

325325
// SaveVoucherDenom saves the voucher denom to be able to convert it back later

interchain-exchange/tutorial/09-walkthrough.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ Result
244244
```bash
245245
balances:
246246
- amount: "25"
247-
denom: ibc/50D70B7748FB8AA69F09114EC9E5615C39E07381FE80E628A1AF63A6F5C79833
247+
denom: ibc/50D70B7748FB
248248
- amount: "985"
249249
denom: mcx
250250
- amount: "0"
@@ -297,7 +297,7 @@ Result
297297
```bash
298298
balances:
299299
- amount: "100"
300-
denom: ibc/50D70B7748FB8AA69F09114EC9E5615C39E07381FE80E628A1AF63A6F5C79833
300+
denom: ibc/50D70B7748FB
301301
- amount: "985"
302302
denom: mcx
303303
- amount: "0"
@@ -314,7 +314,7 @@ Result
314314
```
315315
balances:
316316
- amount: "10"
317-
denom: ibc/99678A10AF684E33E88959727F2455AE42CCC64CD76ECFA9691E1B5A32342D33
317+
denom: ibc/99678A10AF68
318318
- amount: "900000000"
319319
denom: stake
320320
- amount: "1000"
@@ -364,7 +364,7 @@ Result
364364
```bash
365365
balances:
366366
- amount: "125"
367-
denom: ibc/50D70B7748FB8AA69F09114EC9E5615C39E07381FE80E628A1AF63A6F5C79833
367+
denom: ibc/50D70B7748FB
368368
- amount: "975"
369369
denom: mcx
370370
- amount: "0"
@@ -414,7 +414,7 @@ Result
414414
```bash
415415
balances:
416416
- amount: "20"
417-
denom: ibc/99678A10AF684E33E88959727F2455AE42CCC64CD76ECFA9691E1B5A32342D33
417+
denom: ibc/99678A10AF68
418418
- amount: "900000000"
419419
denom: stake
420420
- amount: "1000"
@@ -494,7 +494,7 @@ Result:
494494
```bash
495495
balances:
496496
- amount: "150"
497-
denom: ibc/50D70B7748FB8AA69F09114EC9E5615C39E07381FE80E628A1AF63A6F5C79833
497+
denom: ibc/50D70B7748FB
498498
- amount: "990"
499499
denom: mcx
500500
- amount: "0"
@@ -514,7 +514,7 @@ Result:
514514
```bash
515515
balances:
516516
- amount: "10"
517-
denom: ibc/99678A10AF684E33E88959727F2455AE42CCC64CD76ECFA9691E1B5A32342D33
517+
denom: ibc/99678A10AF68
518518
- amount: "900000000"
519519
denom: stake
520520
- amount: "1000"
@@ -535,7 +535,7 @@ Result:
535535
```bash
536536
DenomTrace:
537537
- channel: channel-0
538-
index: ibc/99678A10AF684E33E88959727F2455AE42CCC64CD76ECFA9691E1B5A32342D33
538+
index: ibc/99678A10AF68
539539
origin: mcx
540540
port: ibcdex
541541
```
@@ -551,7 +551,7 @@ Result:
551551
```bash
552552
DenomTrace:
553553
- channel: channel-0
554-
index: ibc/50D70B7748FB8AA69F09114EC9E5615C39E07381FE80E628A1AF63A6F5C79833
554+
index: ibc/50D70B7748FB
555555
origin: vcx
556556
port: ibcde
557557
```
@@ -562,29 +562,29 @@ To reverse the exchange path, create a new order book pair:
562562

563563
```bash
564564
# Create a pair in the opposite way
565-
interchanged tx ibcdex send-createPair ibcdex channel-0 ibc/50D70B7748FB8AA69F09114EC9E5615C39E07381FE80E628A1AF63A6F5C79833 ibc/99678A10AF684E33E88959727F2455AE42CCC64CD76ECFA9691E1B5A32342D33 --from alice --chain-id mars --home ~/.mars
565+
interchanged tx ibcdex send-createPair ibcdex channel-0 ibc/50D70B7748FB ibc/99678A10AF68 --from alice --chain-id mars --home ~/.mars
566566
```
567567

568568
The order book is now created on both blockchains. Check for the SellOrderbook on `Mars` and Buyorderbook on `Venus` respectively.
569569

570570
```bash
571571
# On Mars:
572572
SellOrderBook:
573-
- amountDenom: ibc/50D70B7748FB8AA69F09114EC9E5615C39E07381FE80E628A1AF63A6F5C79833
574-
index: ibcdex-channel-0-ibc/50D70B7748FB8AA69F09114EC9E5615C39E07381FE80E628A1AF63A6F5C79833-ibc/99678A10AF684E33E88959727F2455AE42CCC64CD76ECFA9691E1B5A32342D33
573+
- amountDenom: ibc/50D70B7748FB
574+
index: ibcdex-channel-0-ibc/50D70B7748FB-ibc/99678A10AF68
575575
orderIDTrack: 0
576576
orders: []
577-
priceDenom: ibc/99678A10AF684E33E88959727F2455AE42CCC64CD76ECFA9691E1B5A32342D33
577+
priceDenom: ibc/99678A10AF68
578578
```
579579

580580
```bash
581581
# On Venus
582582
BuyOrderBook:
583-
- amountDenom: ibc/50D70B7748FB8AA69F09114EC9E5615C39E07381FE80E628A1AF63A6F5C79833
584-
index: ibcdex-channel-0-ibc/50D70B7748FB8AA69F09114EC9E5615C39E07381FE80E628A1AF63A6F5C79833-ibc/99678A10AF684E33E88959727F2455AE42CCC64CD76ECFA9691E1B5A32342D33
583+
- amountDenom: ibc/50D70B7748FB
584+
index: ibcdex-channel-0-ibc/50D70B7748FB-ibc/99678A10AF68
585585
orderIDTrack: 1
586586
orders: []
587-
priceDenom: ibc/99678A10AF684E33E88959727F2455AE42CCC64CD76ECFA9691E1B5A32342D33
587+
priceDenom: ibc/99678A10AF68
588588
```
589589

590590
Exchange the token from the voucher back to the original token denomination with the following commands.
@@ -593,13 +593,13 @@ Create the sell order on `Mars`:
593593

594594
```bash
595595
# Exchange tokens back
596-
interchanged tx ibcdex send-sellOrder ibcdex channel-0 ibc/50D70B7748FB8AA69F09114EC9E5615C39E07381FE80E628A1AF63A6F5C79833 10 ibc/99678A10AF684E33E88959727F2455AE42CCC64CD76ECFA9691E1B5A32342D33 1 --from alice --chain-id mars --home ~/.mars
596+
interchanged tx ibcdex send-sellOrder ibcdex channel-0 ibc/50D70B7748FB 10 ibc/99678A10AF68 1 --from alice --chain-id mars --home ~/.mars
597597
```
598598

599599
Create the buy order on `Venus`:
600600

601601
```bash
602-
interchanged tx ibcdex send-buyOrder ibcdex channel-0 ibc/50D70B7748FB8AA69F09114EC9E5615C39E07381FE80E628A1AF63A6F5C79833 5 ibc/99678A10AF684E33E88959727F2455AE42CCC64CD76ECFA9691E1B5A32342D33 1 --from alice --chain-id venus --home ~/.venus --node tcp://localhost:26659
602+
interchanged tx ibcdex send-buyOrder ibcdex channel-0 ibc/50D70B7748FB 5 ibc/99678A10AF68 1 --from alice --chain-id venus --home ~/.venus --node tcp://localhost:26659
603603
```
604604

605605
See balances on `Mars`:
@@ -613,7 +613,7 @@ Result:
613613
```bash
614614
balances:
615615
- amount: "140"
616-
denom: ibc/50D70B7748FB8AA69F09114EC9E5615C39E07381FE80E628A1AF63A6F5C79833
616+
denom: ibc/50D70B7748FB
617617
- amount: "995"
618618
denom: mcx
619619
- amount: "0"
@@ -633,7 +633,7 @@ Result:
633633
```bash
634634
balances:
635635
- amount: "5"
636-
denom: ibc/99678A10AF684E33E88959727F2455AE42CCC64CD76ECFA9691E1B5A32342D33
636+
denom: ibc/99678A10AF68
637637
- amount: "900000000"
638638
denom: stake
639639
- amount: "1000"

0 commit comments

Comments
 (0)