Fix for checking account balance before deploying
This commit is contained in:
parent
8b4417a5be
commit
15782fdb7b
@ -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:
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user