Thank you for contributing! This document covers the development workflow, testing requirements, and operational scripts you need to know about.
- Rust (stable toolchain,
wasm32v1-nonetarget) - Stellar CLI
sha256sum(standard on Linux;brew install coreutilson macOS)
cargo test --workspaceAuth boundary tests for individual contracts can be run with:
cargo test --test auth_boundary -- --nocapturescripts/verify_contract_sync.sh checks that a locally-built WASM artifact
matches the bytecode currently deployed on staging and production. Run it after
any deployment, or before merging a release branch, to detect contract drift.
CONTRACT=markets \
STAGING_CONTRACT_ID=<staging-contract-id> \
PRODUCTION_CONTRACT_ID=<production-contract-id> \
./scripts/verify_contract_sync.shPass --help for the full list of options:
./scripts/verify_contract_sync.sh --helpThe script requires cargo, stellar, and sha256sum to be available on
your PATH. It builds the contract in release mode, fetches the deployed
bytecode via the Stellar CLI, and compares SHA-256 hashes. A non-zero exit
code means the deployed contract does not match the local build.
- Keep PRs focused on a single concern.
- All CI checks (tests + snapshot goldens) must pass before merge.
- Do not push directly to
main; open a pull request instead. - For contract or core code changes, update CHANGELOG.md in the
[Unreleased]section describing your changes - For contract changes, run
verify_contract_sync.shpost-deploy and attach the output to your PR description.
If your PR modifies code in contracts/ or crates/, you must update CHANGELOG.md:
- Open
CHANGELOG.mdand locate the[Unreleased]section - Add your changes under the appropriate subsection:
- Added: New features or contracts
- Changed: Changes to existing functionality
- Deprecated: Features being phased out
- Removed: Removed features
- Fixed: Bug fixes
- Security: Security-related changes
- Be descriptive and indicate which contract(s) are affected
Example:
### Fixed
- **markets**: Corrected fee calculation in `place_bet` (#1234)
- **disputes**: Fixed race condition in dispute resolution
### Added
- **validators**: New validator eligibility check in initializationSee Keep a Changelog for detailed guidelines on formatting.