Secret IBC setup
Two local secrets can Inter-blockchainly communicate with each other via a Hermes relayer
For deployment of production level relaying services and config/guide information for both RLY and Hermes please refer to --> IBC relayers documentation
Secret IBC setup
In this demo, you will learn how to create two LocalSecret docker containers that can send IBC token transfers to each other using a Hermes relayer. This tutorial assumes that you already have SecretCLI installed on your machine. In order to follow along, clone the Secret-IBC-setup repo before proceeding.
Next, install Hermes relayer. You can use the hermes configuration found in the Secret Labs examples repository for your configuration of Hermes.
If you are using a Mac, you may need to press Command + Shift + .
(the period key) in order to see your Hermes configuration file.
The configuration file can be found in $HOME/.hermes/bin
Bootstrapping LocalSecret
Make sure you have Docker installed and running. Then, cd
into ./secret-ibc-setup/relayer and run:
This launches two LocalSecret containers:
localsecret-1 on port 26657
localsecret-2 on port 36657
Now let's establish an IBC channel with Hermes between the LocalSecret containers in order to make an IBC token transfer.
If you've never funded a Hermes wallet before, learn how to do so here.
If you would like to do further reading, refer to the LocalSecret wallet docs and the Hermes wallet docs.
Creating the IBC transfer channel
To create an IBC transfer channel, make sure both LocalSecret chains are running in Docker, open a new terminal window in your code editor, and then run:
SecretCLI will ask you to confirm the transaction before signing:
Query that the transaction was successful:
You have successfully created an IBC transfer channel on channel-0
🎉.
Next, start Hermes:
Send IBC Token transfers
Assuming you have the wallet key 'a'
which is not the relayer's key, run:
Query that the transaction was successful:
If you run into the error cannot send packet using client (07-tendermint-0) with status Expired: client is not active
it is because the LocalSecret trusting period is 79 seconds.
To resolve this error you must launch the LocalSecret containers, create the IBC transfer channel, and start Hermes within 79 seconds of each other.
Assuming you did not run into an error, switch to the destination network (secretdev-2) and query the bank balance of wallet a
to confirm that the transaction was successful:
Congrats 🎉 You should now see the ibc-denom returned in the transaction query:
Last updated