Skip to content

feat(delivery_contract): implement delivery cancellation and escrow r… - #37

Merged
Tybravo merged 2 commits into
SwiftChainn:mainfrom
rexx010:feat/delivery-cancellation-escrow-refund
Apr 24, 2026
Merged

feat(delivery_contract): implement delivery cancellation and escrow r…#37
Tybravo merged 2 commits into
SwiftChainn:mainfrom
rexx010:feat/delivery-cancellation-escrow-refund

Conversation

@rexx010

@rexx010 rexx010 commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Closes #24

Description

This PR introduces the secure delivery cancellation flow and resolves compilation/testing issues within the Escrow contract.

Key Changes

  • Delivery Cancellation: Implemented cancel_delivery in the Delivery Contract with atomic cross-contract calls to trigger Escrow refunds (refund_escrow).
  • State Machine Updates: Expanded DeliveryStatus to include InTransit, Delivered, and Cancelled. Added sender validation to DeliveryRecord.
  • Event Emission Fix: Fixed missing &env arguments in escrow_contract for shared_types event emissions.
  • Test Suite Modernization: Replaced deprecated register_contract with register and fixed event tuple index assertions across the test suites.

Testing

  • Delivery cancellation state validation & atomic rollback tests added.
  • All delivery_contract and escrow_contract tests pass successfully.

@drips-wave

drips-wave Bot commented Apr 24, 2026

Copy link
Copy Markdown

@rexx010 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

@Tybravo
Tybravo merged commit b39166a into SwiftChainn:main Apr 24, 2026
1 check failed
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.

Smart Contract: Implement Delivery Cancellation and Escrow Refund Trigger

2 participants