Skip to content

Feature/contract fixes 1026 1027 1028 1029#1108

Merged
Emeka000 merged 4 commits into
Emeka000:mainfrom
Saboleee:feature/contract-fixes-1026-1027-1028-1029
Jun 30, 2026
Merged

Feature/contract fixes 1026 1027 1028 1029#1108
Emeka000 merged 4 commits into
Emeka000:mainfrom
Saboleee:feature/contract-fixes-1026-1027-1028-1029

Conversation

@Saboleee

Copy link
Copy Markdown
Contributor

Summary

This PR addresses four critical contract issues: integer overflow handling, deprecated API removal, contract versioning, and testnet deployment verification.

Changes

#1026 — Fix integer overflow in FeeStructure::total()

  • Changed total() return type from Option<i128> to Result<i128, PaymentError>
  • Prevents silent overflow wrapping in release mode
  • Updated all callers and tests to handle Result

#1027 — Update deprecated env.events().publish() API

  • Removed deprecated single-argument tuple format from requests contract
  • Added #![deny(deprecated)] to all 10 lifebank-soroban contracts
  • Prevents future deprecation regressions

#1028 — Add contract versioning

  • Added const CONTRACT_VERSION: u32 = 1; to all contracts
  • Added pub fn version(env: Env) -> u32 accessor to all contracts
  • Backend can now detect stale clients on startup

#1029 — Add testnet deployment with smoke tests

  • GitHub Actions workflow now deploys to testnet on both PR and main push
  • Added smoke test step that calls version() on each deployed contract
  • Verifies returned value matches expected (1)
  • Smoke tests required to pass before PR merge

Notes

  • Code-only delivery: no build/test/script execution during implementation
  • Committer: Saboleee
  • All commits follow convention: type: description (#issue-number)

Closes #1026, Closes #1027, Closes #1028, Closes #1029

@Emeka000 Emeka000 merged commit cf7ca9a into Emeka000:main Jun 30, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment