Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 21 additions & 7 deletions scripts/verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,27 @@ if [ "${1:-}" = "deploy-treasury" ]; then
echo "Deployed org id: ${ORG_ID}"

echo "=== Org record ==="
stellar contract invoke \
--id "${FACTORY_ADDRESS}" \
--source-account "${DEPLOYER}" \
--network "${NETWORK}" \
-- \
get_org \
--org_id "${ORG_ID}"
# deploy_treasury and get_org are separate RPC round-trips; on a slow testnet the
# read can race deploy propagation and return OrgNotFound. Poll briefly (#5).
ORG_READ_OK=0
for attempt in 1 2 3 4 5 6; do
if stellar contract invoke \
--id "${FACTORY_ADDRESS}" \
--source-account "${DEPLOYER}" \
--network "${NETWORK}" \
-- \
get_org \
--org_id "${ORG_ID}"; then
ORG_READ_OK=1
break
fi
echo "get_org attempt ${attempt} failed; retrying in 2s..." >&2
sleep 2
done
if [ "${ORG_READ_OK}" -ne 1 ]; then
echo "get_org failed after retries for org id ${ORG_ID}" >&2
exit 1
fi
fi

echo
Expand Down