Skip to content
This repository was archived by the owner on Dec 4, 2024. It is now read-only.

Commit 4d39492

Browse files
committed
Contract deployment
1 parent 1fc0c0c commit 4d39492

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

devenv/integration/docker/entrypoint

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ set -ueo >/dev/null
33

44
STACKS=$PROJECT_NAME-stacks-1
55
API_URL=http://$STACKS:20443/v2/info
6+
BITCOIN=$PROJECT_NAME-bitcoin-1
7+
8+
# --- make sure the node is ready before proceeding
69

7-
# makes sure the node is ready before proceeding
810
# stacks node get info
9-
echo "Waiting on Stacks API"
11+
echo "Waiting on Stacks API $API_URL"
1012
while ! curl -s $API_URL >/dev/null; do
1113
sleep 1
1214
done
@@ -18,10 +20,21 @@ echo "Waiting on burn block height $DEV_READY_HEIGHT"
1820
while [ "$(curl -s $API_URL | jq '.burn_block_height')" -lt $DEV_READY_HEIGHT ]; do
1921
sleep 2
2022
done
23+
24+
#stacks ready to take contracts
25+
STACKS_HEIGHT=1
26+
echo "Waiting on Stacks height $STACKS_HEIGHT"
27+
while [ "$(curl -s $API_URL | jq '.stacks_tip_height')" -lt $STACKS_HEIGHT ]; do
28+
sleep 2
29+
done
30+
2131
# any other service checks
32+
2233
# push contracts
2334
cd romeo/asset-contract
24-
clarinet deployments apply -d -p deployments/default.devnet-plan.yaml
35+
sed -i "s/localhost:20443/$STACKS:20443/" deployments/default.devnet-plan.yaml
36+
sed -i "s/localhost:18443/$BITCOIN:18443/" deployments/default.devnet-plan.yaml
37+
clarinet deployments apply --no-dashboard -d -p deployments/default.devnet-plan.yaml
2538
cd -
2639

2740
echo with filter: "'$@'"

0 commit comments

Comments
 (0)