Skip to content

Commit 9d18118

Browse files
committed
final pass
1 parent d36eef3 commit 9d18118

File tree

1 file changed

+9
-49
lines changed

1 file changed

+9
-49
lines changed

guides/hyperlane-use-tia-for-gas.md

Lines changed: 9 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ make install
6868
strided config chain-id stride-internal-1
6969
strided config node https://stride-testnet-rpc.polkachu.com:443
7070
strided config keyring-backend test
71+
cd ../wasmd
7172
```
7273

7374
Add the signer accounts to each keyring
@@ -353,56 +354,16 @@ yarn cw-hpl warp link \
353354
-n localwasm
354355
```
355356

356-
## Transfer Tokens
357-
358-
### Transfer STRD from Stride to localwasm
359-
360-
Initiate transfer
361-
362-
```bash
363-
warp_contract_address=$(jq -r '.deployments.warp.native[0].address' context/stride-internal-1.json)
364-
recipient=$(yarn cw-hpl wallet convert-cosmos-to-eth -n localwasm $(wasmd keys show my-key -a) | perl -pe 's/0x0x//g')
365-
strided tx wasm execute $warp_contract_address \
366-
'{"transfer_remote":{"dest_domain":963,"recipient":"'"$recipient"'","amount":"1"}}' \
367-
--amount 1ustrd \
368-
--from my-key -y \
369-
--gas 2000000 --fees 1000ustrd
370-
```
371-
372-
Observe logs in the validator and relayer to witness the transfer. Confirm the tokens landed in the wasm account with:
373-
374-
```bash
375-
wasmd q bank balances $(wasmd keys show my-key -a)
376-
```
377-
378-
### Transfer STRD from localwasm back to Stride
379-
380-
```bash
381-
warp_contract_address=$(jq -r '.deployments.warp.native[0].address' context/localwasm.json)
382-
recipient=$(yarn cw-hpl wallet convert-cosmos-to-eth -n stride-internal-1 $(strided keys show my-key -a) | perl -pe 's/0x0x//g')
383-
wasmd tx wasm execute $warp_contract_address \
384-
'{"transfer_remote":{"dest_domain":1651,"recipient":"'"$recipient"'","amount":"1"}}' \
385-
--amount 1factory/${warp_contract_address}/ustrd,101uwasm \
386-
--from my-key -y \
387-
--gas 2000000 --fees 50000uwasm
388-
```
389-
390-
Observe logs in the validator and relayer to witness the transfer. Confirm the tokens landed in the wasm account with:
391-
392-
```bash
393-
strided q bank balances $(strided keys show my-key -a)
394-
```
395-
396-
### Transfer from Celestia through Stride to the Rollup
357+
### Transfer TIA from Celestia through Stride to localwasm
397358

398359
Build the celestia binary
399360

400361
```bash
401-
git clone https://github.com/celestiaorg/celestia-app.git
402-
cd celestia-appd
362+
git clone https://github.com/celestiaorg/celestia-app.git ../celestia-appd
363+
cd ../celestia-appd
403364
make install
404-
cd ..
405-
rm -rf celestia-appd
365+
366+
cd - # return to previous directory
406367
```
407368

408369
Add your account
@@ -428,14 +389,13 @@ forward_msg='{"transfer_remote":{"dest_domain":963,"recipient":"'"$recipient"'",
428389
funds='[{"amount":1,"denom":"ibc/1A7653323C1A9E267FF7BEBF40B3EEA8065E8F069F47F2493ABC3E0B621BF793"}]'
429390
memo='{"wasm":{"contract":"'"$warp_contract_address"'","msg":'"$forward_msg"',"funds":'"$funds"'}}'
430391

431-
celestia-appd tx ibc-transfer transfer transfer channel-78 $warp_contract_address 1utia \
432-
--from my-key -y --fees 420utia --memo "$memo"
392+
celestia-appd tx ibc-transfer transfer transfer channel-78 $warp_contract_address 1utia --from my-key -y --fees 420utia --memo "$memo"
433393
```
434394

435395
:::tip
436396
Stride has IBC middleware installed that automatically forwards and routes transfers directly to the rollup, therefore we only need to sign one transaction on Celestia!
437397

438-
See the `memo` field in the above command to see how we can encode a message for the Wasm contract and send it along with the funds.
398+
See the `memo` field in the above command to see how we can encode a message for the wasm contract and send it along with the funds.
439399
:::
440400

441401
Confirm the tokens landed in the wasm account with:
@@ -458,7 +418,7 @@ docker exec "$localwasm_container_id" perl -i -pe "s;--minimum-gas-prices=0.025u
458418
Restart the wasmd container:
459419

460420
```bash
461-
docker compose -f example/docker-compose.yml restart localwasm
421+
docker compose -f example/docker-compose.yml restart "$localwasm_container_id"
462422
```
463423

464424
### Send a transaction on the localwasm using TIA to pay for gas

0 commit comments

Comments
 (0)