This document explains the helper scripts under scripts/. None of these
are required to build or run the contract; they exist to keep common chores
reproducible across machines.
Builds the Soroban contracts to wasm32-unknown-unknown release artifacts.
scripts/build_wasm.sh # both contracts
scripts/build_wasm.sh credit # creditra-credit only
scripts/build_wasm.sh auction # gateway-auction onlyOutput lives at target/wasm32-unknown-unknown/release/*.wasm. The script
prints the resulting wasm file paths on completion.
Prerequisite:
rustup target add wasm32-unknown-unknown.
Thin wrapper around cargo check --workspace. Extra arguments are forwarded:
scripts/check_workspace.sh --all-targets
scripts/check_workspace.sh --release -p creditra-creditUseful as a hook target so contributors and CI invoke the same command.
Removes stray *.profraw coverage files that pile up outside target/
when running cargo llvm-cov interrupted mid-run. The script never touches
files under target/.
scripts/clean_profraw.sh # delete
scripts/clean_profraw.sh --dry-run # report-onlyParses contracts/credit/src/types.rs and prints every ContractError
variant with its discriminant. Has no third-party dependencies and runs on
Python 3.9+.
scripts/list_contract_errors.py # text table
scripts/list_contract_errors.py --json # machine-readableThe JSON output is convenient for keeping SDK / indexer error tables in sync with the contract source of truth.
- Shell scripts target
bashand useset -euo pipefail. - Python scripts target Python 3.9+ with the standard library only.
- All scripts are runnable from any cwd; they
cdto the repo root first. - Scripts must remain side-effect free against
target/(they never run destructivecargo clean, never touchCargo.lock).