Description
The CI workflow at .github/workflows/contracts.yml currently uses an inconsistent WASM build target, mixing wasm32-unknown-unknown and wasm32v1-none in different job steps. Soroban SDK 23.4.1 requires wasm32-unknown-unknown for contract compilation, and using wasm32v1-none causes linker errors or silently produces incompatible binaries that fail on-network deployment. All CI build steps must be normalized to wasm32-unknown-unknown with the mismatch documented in the build guide.
Requirements and context
- Audit all
cargo build and stellar contract build invocations in .github/workflows/contracts.yml for target flags
- Replace all occurrences of
wasm32v1-none with wasm32-unknown-unknown
- Update
.cargo/config.toml if a default target override exists and is incorrect
- Must be secure, tested, and documented
- Should be efficient and easy to review
Suggested execution
Fork the repo and create a branch
git checkout -b feature/standardize-wasm-build-target
Implement changes
- Update/Write contract:
onchain/contracts/stello_pay_contract/src/lib.rs
- Write comprehensive tests:
onchain/contracts/stello_pay_contract/tests/build_target_tests.rs
- Add documentation:
docs/build-targets.md
- Include NatSpec-style doc comments
- Validate security assumptions
Test and commit
- Run tests:
cargo test -p stello_pay_contract
- Cover edge cases
- Include test output and security notes
Example commit message
feat: standardize WASM build target to wasm32-unknown-unknown across all CI jobs
Guidelines
- Minimum 95 percent test coverage
- Clear documentation
- Timeframe: 96 hours
Description
The CI workflow at
.github/workflows/contracts.ymlcurrently uses an inconsistent WASM build target, mixingwasm32-unknown-unknownandwasm32v1-nonein different job steps. Soroban SDK 23.4.1 requireswasm32-unknown-unknownfor contract compilation, and usingwasm32v1-nonecauses linker errors or silently produces incompatible binaries that fail on-network deployment. All CI build steps must be normalized towasm32-unknown-unknownwith the mismatch documented in the build guide.Requirements and context
cargo buildandstellar contract buildinvocations in.github/workflows/contracts.ymlfor target flagswasm32v1-nonewithwasm32-unknown-unknown.cargo/config.tomlif a default target override exists and is incorrectSuggested execution
Fork the repo and create a branch
Implement changes
onchain/contracts/stello_pay_contract/src/lib.rsonchain/contracts/stello_pay_contract/tests/build_target_tests.rsdocs/build-targets.mdTest and commit
cargo test -p stello_pay_contractExample commit message
Guidelines