Search code examples
blockchaincosmos

how to connect to cosmos hub


First,I build a cosmos hub testnet for single and local node,just like this

enter image description here

enter image description here

and then I use starport to build a blockchain. the new blockchain can work. But now I find that I have no idea to connect this new blockchain to cosmos hub

enter image description here

like this picture above, I click the button "connect to Cosmos Hub", but it doesn't work. My purpose is to build two blockchains with ibc, and connect these blockchain to the hub. And in this way, the two blockchains can transfer tokens to each other. Anyboby can help me?


Solution

  • Refer to this video: https://youtu.be/-AuExRijtrA, it neatly explains how can we connect with relayer and send tokens to Cosmos Hub with IBC.

    However, if it's not clear from the video, i am explaining the steps below:

    You need to remove the relayer configuration if you have used (otherwise you can ignore it)

    rm -rf ~/.starport/relayer

    Afterwards, start your chain in the development mode using starport c serve -r

    Use default values to configure a relayer: starport relayer configure and send small amount of real ATOMs to the relayer address on the Hub. The relayer address is printed by the command used above. Wait about 10-15 seconds to make sure the balance has been updated.

    starport relayer connect

    Wait for the connection to process, now you can send tokens to the Hub:

    appd tx ibc-transfer transfer ... ... --from alice