Skip to content

Commit

Permalink
Setup IBC transfer channel between Osmosis and frogchain
Browse files Browse the repository at this point in the history
  • Loading branch information
in-eth committed Jul 19, 2023
1 parent afd9395 commit 65639ec
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ release/
.idea/
.vscode/
.DS_Store
data/
4 changes: 2 additions & 2 deletions network/hermes/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ key_name = 'lo-test1'
store_prefix = 'ibc'
default_gas = 9000000
max_gas = 30000000
gas_price = { price = 0.1, denom = 'atom' }
gas_price = { price = 0.1, denom = 'uosmo' }
gas_multiplier = 1.5
max_msg_num = 30
max_tx_size = 2097152
clock_drift = '5s'
max_block_time = '10s'
trusting_period = '14days'
trusting_period = '239s'
trust_threshold = { numerator = '1', denominator = '3' }
address_type = { derivation = 'cosmos' }

Expand Down
2 changes: 1 addition & 1 deletion network/hermes/key2
Original file line number Diff line number Diff line change
@@ -1 +1 @@
satisfy adjust timber high purchase tuition stool faith fine install that you unaware feed domain license impose boss human eager hat rent enjoy dawn
notice oak worry limit wrap speak medal online prefer cluster roof addict wrist behave treat actual wasp year salad speed social layer crew genius
5 changes: 4 additions & 1 deletion network/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ RESTPORT_1=1316
RESTPORT_2=1317
ROSETTA_1=8080
ROSETTA_2=9080
pprof_laddr_1=6061

# Stop if it is already running
if pgrep -x "$BINARY" >/dev/null; then
Expand Down Expand Up @@ -59,10 +60,12 @@ sed -i -e 's#"tcp://127.0.0.1:26657"#"tcp://0.0.0.0:'"$RPCPORT_1"'"#g' $CHAIN_DI
sed -i -e 's/timeout_commit = "5s"/timeout_commit = "1s"/g' $CHAIN_DIR/$CHAINID_1/config/config.toml
sed -i -e 's/timeout_propose = "3s"/timeout_propose = "1s"/g' $CHAIN_DIR/$CHAINID_1/config/config.toml
sed -i -e 's/index_all_keys = false/index_all_keys = true/g' $CHAIN_DIR/$CHAINID_1/config/config.toml
sed -i -e 's#"localhost:6060"#"localhost:'"$pprof_laddr_1"'"#g' $CHAIN_DIR/$CHAINID_1/config/config.toml
sed -i -e 's/enable = false/enable = true/g' $CHAIN_DIR/$CHAINID_1/config/app.toml
sed -i -e 's/swagger = false/swagger = true/g' $CHAIN_DIR/$CHAINID_1/config/app.toml
sed -i -e 's/1317/'"$RESTPORT_1"'/g' $CHAIN_DIR/$CHAINID_1/config/app.toml
sed -i -e 's/":8080"/":'"$ROSETTA_1"'"/g' $CHAIN_DIR/$CHAINID_1/config/app.toml

# Update host chain genesis to allow x/bank/MsgSend ICA tx execution
cat $CHAIN_DIR/$CHAINID_1/config/genesis.json | jq '(.app_state.interchainaccounts.host_genesis_state.params.allow_messages) |= ["/cosmos.bank.v1beta1.MsgSend", "/cosmos.staking.v1beta1.MsgDelegate"]' > $CHAIN_DIR/$CHAINID_1/config/genesis.json.tmp && mv $CHAIN_DIR/$CHAINID_1/config/genesis.json.tmp $CHAIN_DIR/$CHAINID_1/config/genesis.json
# cat $CHAIN_DIR/$CHAINID_1/config/genesis.json | jq '(.app_state.interchainaccounts.host_genesis_state.params.allow_messages) |= ["/cosmos.bank.v1beta1.MsgSend"]' > $CHAIN_DIR/$CHAINID_1/config/genesis.json.tmp
# mv $CHAIN_DIR/$CHAINID_1/config/genesis.json.tmp $CHAIN_DIR/$CHAINID_1/config/genesis.json
9 changes: 2 additions & 7 deletions network/start.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#!/bin/bash

BINARY=icad
BINARY=frogchaind
CHAIN_DIR=./data
CHAINID_1=test-1
CHAINID_2=test-2
CHAINID_1=frogchain
GRPCPORT_1=8090
GRPCPORT_2=9090
GRPCWEB_1=8091
Expand All @@ -13,7 +12,3 @@ GRPCWEB_2=9091
echo "Starting $CHAINID_1 in $CHAIN_DIR..."
echo "Creating log file at $CHAIN_DIR/$CHAINID_1.log"
$BINARY start --log_level debug --log_format json --home $CHAIN_DIR/$CHAINID_1 --pruning=nothing --grpc.address="0.0.0.0:$GRPCPORT_1" --grpc-web.address="0.0.0.0:$GRPCWEB_1" > $CHAIN_DIR/$CHAINID_1.log 2>&1 &

echo "Starting $CHAINID_2 in $CHAIN_DIR..."
echo "Creating log file at $CHAIN_DIR/$CHAINID_2.log"
$BINARY start --log_level debug --log_format json --home $CHAIN_DIR/$CHAINID_2 --pruning=nothing --grpc.address="0.0.0.0:$GRPCPORT_2" --grpc-web.address="0.0.0.0:$GRPCWEB_2" > $CHAIN_DIR/$CHAINID_2.log 2>&1 &

0 comments on commit 65639ec

Please sign in to comment.