feat: add scripts/verify_contract.sh to check deployed contract on Stellar Expert#1028
Open
joshuaolabodebello2020-cyber wants to merge 1 commit into
Conversation
…ation Closes StellarCheckMate#897 - Reads CONTRACT_ESCROW (required) and CONTRACT_ORACLE (optional) from .env - Prints Stellar Expert explorer URLs for testnet and mainnet - Optionally fetches the WASM hash via `stellar contract info` (skip with --no-wasm) - Runs a liveness probe via `stellar contract invoke … get_admin` when the Stellar CLI is present, printing ✅/❌ per check - Validates contract ID format (56 uppercase base32 chars) and warns on mismatch - --network flag overrides STELLAR_NETWORK from .env (default: testnet) - Exits non-zero on failure so it composes cleanly with CI and deploy.sh - Matches project script conventions (set -euo pipefail, repo-root resolution, emoji output style)
Contributor
|
please resolve conflicts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #897
After deployment there was no quick way to confirm a contract is live and accessible on Stellar Expert — developers had to manually visit the explorer. This PR adds
scripts/verify_contract.shto solve that.What this does
CONTRACT_ESCROW(required) andCONTRACT_ORACLE** (optional) from.envautomatically — no manual argument required for the common casehttps://stellar.expert/explorer/testnet/contract/<id>https://stellar.expert/explorer/public/contract/<id>stellar contract infowhen the Stellar CLI is present (skip with--no-wasm)stellar contract invoke … get_adminfor each contract and prints ✅/❌ per check--networkflag to overrideSTELLAR_NETWORKfrom.envwithout editing filesdeploy.shAcceptance criteria
scripts/verify_contract.shcreatedCONTRACT_ESCROWfrom.envstellar contract infoTesting
The script was validated locally against all error paths before the commit:
Files changed
scripts/verify_contract.sh— new file, executable (chmod +x)