Fix for checking account balance before deploying

This commit is contained in:
nabarun 2023-04-05 16:28:36 +05:30
parent 8b4417a5be
commit 15782fdb7b
2 changed files with 10 additions and 3 deletions

View File

@ -42,7 +42,7 @@ services:
- moby_data_server:/app/packages/server
- fixturenet_geth_accounts:/geth-accounts:ro
extra_hosts:
- "host.docker.internal:host-gateway"
- "host.docker.internal:host-gateway"
mobymask-watcher-server:
restart: unless-stopped
@ -73,6 +73,8 @@ services:
timeout: 5s
retries: 15
start_period: 5s
extra_hosts:
- "host.docker.internal:host-gateway"
# TODO: Move to a separate pod
mobymask-app:

View File

@ -19,7 +19,9 @@ jq --arg privateKey "$PRIVATE_KEY_DEPLOYER" '.privateKey = $privateKey' secrets-
export L2_GETH_URL="http://${L2_GETH_HOST}:${L2_GETH_PORT}"
jq --arg rpcUrl "$L2_GETH_URL" '.rpcUrl = $rpcUrl' secrets.json > secrets_updated.json && mv secrets_updated.json secrets.json
export RPC_URL=L2_GETH_URL
cd ../hardhat
export RPC_URL="${L2_GETH_URL}"
while true; do
ACCOUNT_BALANCE=$(yarn hardhat --network deployment balance $PRIVATE_KEY_DEPLOYER | grep ETH)
@ -28,7 +30,10 @@ while true; do
break # exit the loop
fi
sleep 2 # wait for 2 seconds before checking again
echo "Account balance not updated: $ACCOUNT_BALANCE"
echo "Checking after 2 seconds"
sleep 2
done
cd ../server
npm run deployAndGenerateInvite