This repo holds the boundless-events and boundless-profile Soroban contracts. Read this and BACKLOG.md before changing the contract surface or deploy scripts.
The Stellar Development Foundation publishes a Claude Code skill that bundles current Soroban patterns, audit checklists, SDK references, and SEP/CAP knowledge. Install once per machine:
/plugin marketplace add stellar/stellar-dev-skill
/plugin install stellar-dev@stellar-dev
After install, the seven sub-skills (soroban, dapp, assets, data, agentic-payments, zk-proofs, standards) become available across sessions. Lean on soroban/ for contract changes and audit prep; lean on dapp/ and assets/ only when the work crosses into the frontend wallet or trustline flows.
Source: https://github.com/stellar/stellar-dev-skill
- No
unwrap()on host-returnedOption/Resultin contract code. Return a typedErrorinstead. Existing patterns:Error::EventNotFound,Error::InsufficientEscrow,Error::WinnersAlreadySelected. - Storage layout is stable. Adding a field to
EventRecordor any persisted struct must extend, never reorder, and must ship with a corresponding migration story (seedocs/mainnet-deploy-runbook.mdand theupgrade()admin function). - Per-event configuration over global constants. Anything sales might want to vary per program (fees, windows, caps) belongs on
EventRecordor its variant payload, not in module constants. - Tests cover the math. Every payout split (single + multi-position + sweep) has a test that asserts both the recipient and the fee account deltas.
- Snapshots are inspection tooling, not history.
test_snapshots/is gitignored: snapshots are derived artifacts thatcargo testregenerates from any commit, and committing them made PR diffs so large that the security scanners skipped them. When reviewing a storage-layout or auth change, regenerate locally and inspect the snapshot diff — but never commit snapshot files. - Comment sparingly. A comment earns its place only by stating a constraint the code cannot: an invariant, a security ordering, a compatibility trap, a non-obvious "why". Do not narrate what the code does, restate the function name, tag changes with version/PR numbers, or leave banners over self-evident blocks. When in doubt, delete it — dense explanatory comments read as AI-generated and make review harder, not easier. Match the density of the surrounding file.
# Build
cd contracts/events && cargo build --target wasm32v1-none --release
# Test (host target)
cargo test -p boundless-events
# Deploy / upgrade testnet
./deploy_and_upgrade.sh
# Deploy / upgrade mainnet
./deploy_mainnet.sh # see docs/mainnet-deploy-runbook.mdMainnet admin operations live behind the multi-sig defined in docs/admin-custody-policy.md. Never touch mainnet without confirming the runbook prerequisites first.
cargo test -p boundless-events
cargo build --release --target wasm32v1-noneUpdate BACKLOG.md if your PR closes one of the entries there.
@AGENTS.md Never add "Co-Authored-By" lines to commits