Skip to content

feat(soroban): implement repayment contract and verify unit tests#67

Open
Jess52487 wants to merge 2 commits into
Chainmove:mainfrom
Jess52487:feat/soroban-repayment-tracking
Open

feat(soroban): implement repayment contract and verify unit tests#67
Jess52487 wants to merge 2 commits into
Chainmove:mainfrom
Jess52487:feat/soroban-repayment-tracking

Conversation

@Jess52487

@Jess52487 Jess52487 commented Jun 24, 2026

Copy link
Copy Markdown

Description

Closes #12

This PR introduces the RepaymentContract (Soroban Smart Contract) written in Rust, along with its configuration files and unit tests.

Key Changes

  • Smart Contract Implementation: Created contracts/repayment/src/lib.rs implementing assignment and repayment tracking logic for driver contracts, handling overpayment logic, and providing query endpoints.
  • Security Check: Enforced authorization checks on admin/driver roles via require_auth().
  • Cargo Workspace Setup: Configured Cargo.toml and .cargo/config.toml in the repository root.
  • Warnings & Test Refactoring: Cleaned up compiler warnings and finalized the unit tests.
  • Git Ignore configuration: Added /target to .gitignore.

Verification & Testing

All 6 unit tests pass successfully under the stable-x86_64-pc-windows-gnu toolchain:

  • test_initialization_and_assignment
  • test_repayments
  • test_overpayment_behavior
  • test_unauthorized_repayment_fails (should panic)
  • test_unauthorized_assignment_fails (should panic)
  • test_unauthorized_caller_rejected
image

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.

[P1] Implement Soroban repayment tracking contract logic

1 participant