Skip to content

Commit

Permalink
Clean redis + make relayer networks configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysztofziobro committed Dec 18, 2023
1 parent f8960e2 commit 7eed74f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,14 @@ clean-eth: # Remove eth node data
clean-eth:
cd devnet-eth && ./clean.sh && echo "Done eth clean"

.PHONY: clean-redis
clean-redis: # Remove redis data
clean-redis:
docker-compose -f ./relayer/scripts/redis-compose.yml down -v && echo "Done redis clean"

.PHONY: clean
clean: # Remove all node data
clean: clean-azero clean-eth
clean: clean-azero clean-eth clean-redis

.PHONY: bootstrap-azero
bootstrap-azero: # Bootstrap the node data
Expand Down
15 changes: 14 additions & 1 deletion relayer/scripts/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,19 @@ function get_address {
cat $addresses_file | jq --raw-output ".$contract_name"
}

# --- NETWORKS

#ETH_NETWORK="https://rpc-eth-bridgenet.dev.azero.dev"
#AZERO_NETWORK="wss://ws-fe-bridgenet.dev.azero.dev"

ETH_NETWORK=${ETH_NETWORK:-"ws://127.0.0.1:8546"}
AZERO_NETWORK=${AZERO_NETWORK:-"ws://127.0.0.1:9944"}

# --- RELAYER ID

RELAYER_ID=${RELAYER_ID:-0}

# --- RUN

cargo run -- --rust-log=info --name "guardian1" --azero-contract-address=$(get_address $AZERO_ADDRESSES_FILE most) --eth-contract-address=$(get_address $ETH_ADDRESSES_FILE most)
cargo run -- --rust-log=info --name "guardian1" --azero-contract-address=$(get_address $AZERO_ADDRESSES_FILE most) --eth-contract-address=$(get_address $ETH_ADDRESSES_FILE most) \
--eth-node-wss-url=${ETH_NETWORK} --azero-node-wss-url=${AZERO_NETWORK} --dev-account-index=${RELAYER_ID}

0 comments on commit 7eed74f

Please sign in to comment.