| File | Purpose |
|---|---|
.github/workflows/contract-attestation.yml |
Triggered on version tags — builds WASM reproducibly, generates a GitHub-signed attestation, and creates a release |
Push a version tag (e.g. v1.0.0-mvp) and the workflow:
- Builds the WASM with a pinned Rust toolchain and
SOURCE_DATE_EPOCHset to the commit timestamp for reproducibility - Optimizes the WASM using
soroban contract optimize - Hashes the optimized binary with SHA-256
- Generates a GitHub Attestation via
actions/attest-build-provenance— this creates a signed SLSA provenance record linking the binary to the exact commit SHA - Creates a GitHub Release with the WASM binary and attestation details attached
cargo install soroban-cli --lockedcurl -L -o prediction_market.optimized.wasm \
https://github.com/Idrhas/Stellar-PolyMarket/releases/download/v1.0.0-mvp/prediction_market.optimized.wasmsha256sum prediction_market.optimized.wasmThe output must match the SHA-256 published in the release body. If it doesn't, the binary has been tampered with.
gh attestation verify prediction_market.optimized.wasm \
--repo Idrhas/Stellar-PolyMarketA successful output confirms the binary was built by GitHub Actions from the exact commit shown in the attestation — not from a developer's local machine.
- Deploy the contract to Stellar testnet/mainnet
- Visit
https://stellar.expert/explorer/testnet/contract/<CONTRACT_ID> - The contract's WASM hash shown in the explorer must match the SHA-256 from Step 3
git tag v1.0.0-mvp
git push origin v1.0.0-mvpThe attestation and release will be created automatically.
(Attach screenshot of
https://github.com/Idrhas/Stellar-PolyMarket/attestationsshowing the verified build after the first tag push)