Skip to content

Commit

Permalink
feat: set up local osmosis and dex contract
Browse files Browse the repository at this point in the history
  • Loading branch information
dtkhanh-smartosc committed May 3, 2024
1 parent dfed6a0 commit 9b64b67
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
16 changes: 9 additions & 7 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,20 @@
SCRIPT_DIR=$(dirname $(realpath $0))

# Build mainchain
cd ${SCRIPT_DIR}/cardano/chains && docker compose build
# cd ${SCRIPT_DIR}/cardano/chains && docker compose build

cd ${SCRIPT_DIR}/cardano/cardano-node-services && docker compose build
# cd ${SCRIPT_DIR}/cardano/cardano-node-services && docker compose build

cd ${SCRIPT_DIR}/cardano/gateway && docker compose build --no-cache
# cd ${SCRIPT_DIR}/cardano/gateway && docker compose build --no-cache

# Build sidechain
cd ${SCRIPT_DIR}/cosmos && docker compose build
# # Build sidechain
# cd ${SCRIPT_DIR}/cosmos && docker compose build

# Build relayer
cd ${SCRIPT_DIR}/relayer && docker compose build
# Build osmosis
cd ${SCRIPT_DIR}/chains/osmosis && make localnet-init

# Build relayer
# cd ${SCRIPT_DIR}/relayer && docker compose build



1 change: 1 addition & 0 deletions chains/osmosis
Submodule osmosis added at c5cdf7
7 changes: 4 additions & 3 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#please check the directory settings before running
CARDANO_SCRIPT_DIR="cardano/scripts"
COSMOS_SCRIPT_DIR="cosmos/scripts"
OSMOSIS_SCRIPT_DIR="chains/osmosis/scripts"
RELAYER_SCRIPT_DIR="relayer/scripts"

SCRIPT_DIR=$(dirname $(realpath $0))
Expand All @@ -17,14 +18,14 @@ echo "╚$(printf '═%.0s' $(seq 1 $((title_length + 2))))╝"
set_permission() {
chmod +x ${SCRIPT_DIR}/${CARDANO_SCRIPT_DIR}/start.sh || return 1
chmod +x ${SCRIPT_DIR}/${COSMOS_SCRIPT_DIR}/start.sh || return 1
chmod +x ${SCRIPT_DIR}/${OSMOSIS_SCRIPT_DIR}/start.sh || return 1
chmod +x ${SCRIPT_DIR}/${RELAYER_SCRIPT_DIR}/start.sh || return 1
return 0
}

run() {
bash ${SCRIPT_DIR}/${CARDANO_SCRIPT_DIR}/start.sh && \
bash ${SCRIPT_DIR}/${COSMOS_SCRIPT_DIR}/start.sh &&
bash ${SCRIPT_DIR}/${RELAYER_SCRIPT_DIR}/start.sh || return 1

bash ${SCRIPT_DIR}/${OSMOSIS_SCRIPT_DIR}/start.sh || return 1
return 0
}

Expand Down
6 changes: 3 additions & 3 deletions stop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
CARDANO_SCRIPT_DIR="cardano/scripts"
COSMOS_SCRIPT_DIR="cosmos/scripts"
RELAYER_SCRIPT_DIR="relayer/scripts"
OSMOSIS_SCRIPT_DIR="chains/osmosis/scripts"

SCRIPT_DIR=$(dirname $(realpath $0))

Expand All @@ -18,13 +19,12 @@ set_permission() {
chmod +x ${SCRIPT_DIR}/${CARDANO_SCRIPT_DIR}/stop.sh || return 1
chmod +x ${SCRIPT_DIR}/${COSMOS_SCRIPT_DIR}/stop.sh || return 1
chmod +x ${SCRIPT_DIR}/${RELAYER_SCRIPT_DIR}/stop.sh || return 1
chmod +x ${SCRIPT_DIR}/${OSMOSIS_SCRIPT_DIR}/stop.sh || return 1
return 0
}

run() {
bash ${SCRIPT_DIR}/${CARDANO_SCRIPT_DIR}/stop.sh && \
bash ${SCRIPT_DIR}/${COSMOS_SCRIPT_DIR}/stop.sh &&
bash ${SCRIPT_DIR}/${RELAYER_SCRIPT_DIR}/stop.sh || return 1
bash ${SCRIPT_DIR}/${OSMOSIS_SCRIPT_DIR}/stop.sh || return 1
return 0
}

Expand Down

0 comments on commit 9b64b67

Please sign in to comment.