Skip to content

feat: add escrow contract with time-locked dispute resolution#31

Merged
portableDD merged 2 commits into
Nexacore-Org:mainfrom
truthixify:fix-19
Sep 28, 2025
Merged

feat: add escrow contract with time-locked dispute resolution#31
portableDD merged 2 commits into
Nexacore-Org:mainfrom
truthixify:fix-19

Conversation

@truthixify
Copy link
Copy Markdown
Contributor

Description

Introduced an escrow contract to securely hold funds for disputed transactions, with a time-locked release window and dispute resolution flow.

Related Issues

Closes #19

Changes Made

  • Implemented escrow.rs contract to lock funds during disputes.
  • Added functions for dispute initiation, resolution, and fund release.
  • Integrated time-lock mechanism for automatic release after dispute window.
  • Emitted events for all escrow actions (lock, dispute, resolve, release).
  • Added tests for fund locking/releasing, dispute lifecycle, and edge cases.

How to Test

  1. Deploy the escrow.rs contract.
  2. Lock funds in escrow for a test transaction.
  3. Initiate a dispute and verify funds remain locked.
  4. Resolve dispute manually → ensure funds release correctly.
  5. Wait for time-lock expiry without resolution → ensure automatic release.
  6. Run cargo test to verify all unit tests pass.

Screenshots (if applicable)

N/A

Checklist

  • My code follows the project's coding style.
  • I have tested these changes locally.
  • Documentation has been updated where necessary.

@truthixify
Copy link
Copy Markdown
Contributor Author

Fixed the CI issue @portableDD

You can approve the workflow now.

@truthixify
Copy link
Copy Markdown
Contributor Author

@portableDD turns out cargo fmt is not installed in the CI and that''s why its failing, you'll have to change the CI.

But the build and test passes.

Copy link
Copy Markdown
Contributor

@portableDD portableDD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@portableDD
Copy link
Copy Markdown
Contributor

@portableDD turns out cargo fmt is not installed in the CI and that''s why its failing, you'll have to change the CI.

But the build and test passes.

Thanks i will fix that

@portableDD portableDD merged commit d1dd507 into Nexacore-Org:main Sep 28, 2025
1 check failed
@truthixify truthixify deleted the fix-19 branch September 29, 2025 17:41
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.

Escrow Contract for Disputed Transactions

2 participants