Skip to content

[P1] Implement Soroban repayment tracking contract logic #12

@Obiajulu-gif

Description

@Obiajulu-gif

Priority

P1

Difficulty

Advanced

Task

Add repayment tracking logic to the ChainMove Soroban contract workspace.

Expected behavior

The contract should support:

  • assigning a driver to a pool or vehicle
  • recording repayment amount
  • tracking total repaid
  • tracking outstanding balance
  • defining overpayment behavior
  • querying repayment summary

Acceptance criteria

  • Repayment can be recorded for an active driver contract.
  • Outstanding balance updates correctly.
  • Overpayment behavior is defined and tested.
  • Unauthorized updates are rejected.
  • Query function returns repayment summary.

Test requirement

Add tests for first repayment, multiple repayments, full repayment completion, overpayment behavior, and unauthorized caller rejection.

Evidence required

  • Screenshot of cargo test passing.
  • Screenshot of repayment summary output from tests.

Commands

cargo test
npm run lint
npm run build

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official Campaign

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions