Skip to content

valNodeOne/IBC-transfers-KiChain

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

IBC-transfers-KiChain

Road map

Welcome to my guide 😃

I would like to tell you how to set up a relayer for cross-broadcasting for 2 networks that are built on Cosmos and use IBC.

Let's take KiChain and Umee as a basis.

Relayer can be located on the same server as the node, or also located on another server

In this example, I will be installing the relayer on the same server as the node


To check if your network supports IBC, you need to run the following command

kid q ibc-transfer params #

instead of kid, you can substitute the name of your network

If the answer looks like this

receive_enabled: 
true send_enabled: true  

So you have successfully taken the first step!

  1. git clone https://github.com/cosmos/relayer.git
  2. cd relayer
  3. make install
  4. cd
  5. rly version

If you get a reply

version: 1.0.0-rc1–152-g112205b

This means the Relayer has been successfully installed.

rly config init

First, you must create a folder where the network configuration files will be located.

  1. mkdir rly_config
  2. cd rly_config

Let's create a file for Kichain

nano kichain-t-4.json

  • CTRL + O - save file
  • CTRL + X - close file

In the opened editor window, we must insert the following json

{ "chain-id": "kichain-t-4", "rpc-addr": "https://rpc-challenge.blockchain.ki:443", "account-prefix": "tki", "gas-adjustment": 1.5, "gas-prices": "0.025utki", "trusting-period": "48h" }

Now let's create a configuration file for Umee

nano umee-betanet-1.json

In the opened editor window, we must insert the following json

{ "chain-id": "umee-betanet-1", "rpc-addr": "http://localhost:26657", "account-prefix": "umee", "gas-adjustment": 1.5, "gas-prices": "0.025uumee", "trusting-period": "48h" }

Adding settings to the Relayer configuration

  1. rly chains add -f umee-betanet-1.json
  2. rly chains add -f kichain-t-4.json
  3. cd

Create a new wallet

rly keys add umee-betanet-1 YOUR_WALLET_NAME
rly keys add kichain-t-4 YOUR_WALLET_NAME

Restore wallet

rly keys restore umee-betanet-1 YOUR_WALLET_NAME "MNEMONIC PHRASE"
rly keys restore kichain-t-4 YOUR_WALLET_NAME "MNEMONIC PHRASE"

Adding the generated keys to the Relayer configuration

rly chains edit umee-betanet-1 key YOUR_WALLET_NAME
rly chains edit kichain-t-4 key YOUR_WALLET_NAME

Change the wait timeout

nano ~/.relayer/config/config.yaml

Change the timeout to 10 seconds

timeout: 30s -> timeout: 10s

Both wallets must have coins, check it out

rly q balance umee-betanet-1
rly q balance kichain-t-4

If you have coins on your balance, then you can proceed to the next step.

Light client initialization

rly light init umee-betanet-1 -f
rly light init kichain-t-4 -f

Generating a channel between networks

rly paths generate umee-betanet-1 kichain-t-4 transfer --port=transfer

Opening a channel for relaying (debug)

rly tx link transfer --debug

If you see an error

image

You need to go to the config file

nano /root/.relayer/config/config.yaml

And remove the following lines:

  • client-id
  • connection-id
  • channel-id

kichain

Light client reinitialization

rly light init umee-betanet-1 -f rly light init kichain-t-4 -f

Opening the channel (debug)

rly tx link transfer --debug

We wait until the log appears

image

Checking

rly paths list -d

As a result, you should see the following text

image

Transaction template

rly transact transfer [source-chain] [destination-chain] [amount-token] [destination-wallet-address] [flags]

Example:

rly tx transfer umee-betanet-1 kichain-t-4 1000000uumee tki1v2eghxgmamlkwd4jtsxkev0csgzknhu7lcxwtl --path transfer

If the transaction was successful, you will see the following text:

image

The details of the transaction can be viewed in the explorer of your network.

sudo tee /etc/systemd/system/rlyd.service > /dev/null <<EOF
[Unit]
Description=relayer client
After=network-online.target,starsd.service

[Service]
User=$USER
ExecStart=$(which rly) start transfer
Restart=always
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF
  1. sudo systemctl daemon-reload
  2. sudo systemctl enable rlyd
  3. sudo systemctl start rlyd

kid tx ibc-transfer transfer transfer channel-0 umee16vp4e0cft3052h59zlrfluvmjclaajxt9n4rsj 1000utki --from $kichain_wallet_name --fees=5000utki --gas=auto --chain-id kichain-t-4 --home $HOME/kichain/kid

  • Find out the channel number

rly paths show transfer --yaml

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published