Skip to content

feat(escrow): Soroban Escrow Contract Verification Suite (#849)#1069

Merged
sublime247 merged 2 commits into
sublime247:mainfrom
amankoli09:feat/soroban-escrow-verification-suite
May 30, 2026
Merged

feat(escrow): Soroban Escrow Contract Verification Suite (#849)#1069
sublime247 merged 2 commits into
sublime247:mainfrom
amankoli09:feat/soroban-escrow-verification-suite

Conversation

@amankoli09
Copy link
Copy Markdown
Contributor

Expands the Soroban escrow contract with lock-time enforcement, protocol fee distribution, and a self-refund mechanism.

Adds 28 comprehensive Rust tests covering all happy-path, failure, boundary, and fee edge-case scenarios.
Upgrades the CI pipeline to a 5-stage workflow with lint, WASM build, nextest split runs, tarpaulin coverage, and a final gate job.

Closes #849.

- Expand EscrowContract with lock-time, fee distribution, and self-refund
  - New fields: lock_until_ledger, fee_bps, fee_recipient
  - New entrypoint: self_refund (depositor-initiated after lock expiry)
  - EscrowState.split() computes fee / net split on release
  - Structured error codes via #[contracterror] (EscrowError 1-9)

- 28 test scenarios covering:
  - Happy paths: initialize, release with fee, zero-fee release, refund, self-refund
  - Premature release / refund attempts before lock expiry
  - Arbiter actions blocked after lock expiry (window enforcement)
  - Self-refund blocked at exact expiry ledger boundary
  - Double-initialize / double-release / double-refund guards
  - Invalid address combinations (beneficiary==depositor, arbiter conflicts)
  - Fee edge cases: 0 bps, max 10 000 bps (100%), rounding behaviour
  - Full lifecycle integration test with fee + time-lock

- Upgrade CI pipeline (contracts.yml) to 5-stage workflow:
  - lint: rustfmt + clippy (deny warnings)
  - build: wasm32 release build + artefact upload
  - test: cargo-nextest split into happy-path and failure-scenario runs
  - coverage: cargo-tarpaulin with Codecov upload
  - gate: explicit pass/fail summary job

Closes sublime247#849
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 29, 2026

@amankoli09 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@gitguardian
Copy link
Copy Markdown

gitguardian Bot commented May 30, 2026

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
While these secrets were previously flagged, we no longer have a reference to the
specific commits where they were detected. Once a secret has been leaked into a git
repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@sublime247 sublime247 merged commit 896ff37 into sublime247:main May 30, 2026
4 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[HARD] Build Soroban Escrow Contract Verification Suite

2 participants