diff --git a/scripts/ibc/hub.json b/scripts/ibc/hub.json index e955eb4..86c3824 100644 --- a/scripts/ibc/hub.json +++ b/scripts/ibc/hub.json @@ -3,7 +3,7 @@ "value": { "key": "relayer-hub-key", "chain-id": "dymension_100-1", - "rpc-addr": "tcp://127.0.0.1:36657", + "rpc-addr": "http://127.0.0.1:36657", "account-prefix": "dym", "keyring-backend": "test", "gas-adjustment": 1.2, diff --git a/scripts/ibc/rollapp.json b/scripts/ibc/rollapp.json index e3c9f8f..a9ce2b1 100644 --- a/scripts/ibc/rollapp.json +++ b/scripts/ibc/rollapp.json @@ -2,8 +2,8 @@ "type": "cosmos", "value": { "key": "relayer-rollapp-key", - "chain-id": "rollappx", - "rpc-addr": "http://localhost:26657", + "chain-id": "demo-dymension-rollapp", + "rpc-addr": "http://127.0.0.1:26657", "account-prefix": "rol", "keyring-backend": "test", "gas-adjustment": 1.2, diff --git a/scripts/ibc/run_relayer.sh b/scripts/ibc/run_relayer.sh deleted file mode 100644 index 2a3a978..0000000 --- a/scripts/ibc/run_relayer.sh +++ /dev/null @@ -1,5 +0,0 @@ -BASEDIR=$(dirname "$0") -. "$BASEDIR"/../shared.sh - -echo '# ------------------------------ run the ibc relayer ----------------------------- #' -rly start "$RELAYER_PATH" --debug-addr "" \ No newline at end of file diff --git a/scripts/ibc/setup_ibc.sh b/scripts/ibc/setup_ibc.sh index af5e0d5..c47b1a7 100644 --- a/scripts/ibc/setup_ibc.sh +++ b/scripts/ibc/setup_ibc.sh @@ -5,18 +5,27 @@ BASEDIR=$(dirname "$0") IBC_PORT=transfer IBC_VERSION=ics20-1 +RELAYER_EXECUTABLE="rly" + +# settlement config +SETTLEMENT_EXECUTABLE="dymd" +SETTLEMENT_CHAIN_ID="dymension_100-1" +SETTLEMENT_KEY_NAME_GENESIS="local-user" + +EXECUTABLE="rollappd" RELAYER_KEY_FOR_ROLLAP="relayer-rollapp-key" RELAYER_KEY_FOR_HUB="relayer-hub-key" RELAYER_PATH="hub-rollapp" -ROLLAPP_RPC_FOR_RELAYER="tcp://127.0.0.1:26657" -SETTLEMENT_RPC_FOR_RELAYER="tcp://127.0.0.1:36657" +ROLLAPP_RPC_FOR_RELAYER="http://127.0.0.1:26657" +SETTLEMENT_RPC_FOR_RELAYER="http://127.0.0.1:36657" -SETTLEMENT_CHAIN_ID="dymension_100-1" - - -#FIXME: make sure the dymension-relayer is installed +if ! command -v $RELAYER_EXECUTABLE >/dev/null; then + echo "$RELAYER_EXECUTABLE does not exist" + echo "please run make install of github.com/dymensionxyz/dymension-relayer" + exit 1 +fi # --------------------------------- rly init --------------------------------- # RLY_PATH="$HOME/.relayer" @@ -69,7 +78,7 @@ RLY_ROLLAPP_ADDR=$(rly keys show "$ROLLAPP_CHAIN_ID") echo "# ------------------------------- balance of rly account on hub [$RLY_HUB_ADDR]------------------------------ #" $SETTLEMENT_EXECUTABLE q bank balances "$(rly keys show "$SETTLEMENT_CHAIN_ID")" --node "$SETTLEMENT_RPC_FOR_RELAYER" -echo "From within the hub node: \"$SETTLEMENT_EXECUTABLE tx bank send $KEY_NAME_GENESIS $RLY_HUB_ADDR 100000000udym --keyring-backend test --broadcast-mode block\"" +echo "From within the hub node: \"$SETTLEMENT_EXECUTABLE tx bank send $SETTLEMENT_KEY_NAME_GENESIS $RLY_HUB_ADDR 100000000000000000000udym --keyring-backend test --broadcast-mode block\"" echo "# ------------------------------- balance of rly account on rollapp [$RLY_ROLLAPP_ADDR] ------------------------------ #" $EXECUTABLE q bank balances "$(rly keys show "$ROLLAPP_CHAIN_ID")" --node "$ROLLAPP_RPC_FOR_RELAYER"