Context & Problem Statement
During invoice escrow settlement, the escrow contract invokes burn or burn_from on the InvoiceToken contract to retire the tokenized invoice representations in exchange for distributed payout capital. While unit tests verify token burning in isolation, end-to-end integration tests proving cross-contract authorization, allowance consumption, and post-settlement transfer unlock are needed.
This issue introduces a MockSettlementEscrow contract harness in contracts/invoice-token/src/integration_test.rs to validate the complete escrow-to-token settlement flow.
Architectural Motivation & Technical Requirements
- In
contracts/invoice-token/src/integration_test.rs:
- Implement a
MockSettlementEscrow contract and setup harness.
- Implement integration tests covering:
- Happy-path
burn_on_settlement and burn_from_on_settlement.
- Allowance deduction and verification on
burn_from.
- Failure paths:
InsufficientBalance, InvalidAmount, InsufficientAllowance, AllowanceExpired, Paused.
- Verify that after full settlement, token transfers are unlocked and residual balances persist accurately.
- Assert emitted event logs on both contracts.
Acceptance Criteria
Target Branch: dev
Estimated Effort: 5–12 hours | Delivery: 3–5 days
Difficulty: Medium
Context & Problem Statement
During invoice escrow settlement, the escrow contract invokes
burnorburn_fromon theInvoiceTokencontract to retire the tokenized invoice representations in exchange for distributed payout capital. While unit tests verify token burning in isolation, end-to-end integration tests proving cross-contract authorization, allowance consumption, and post-settlement transfer unlock are needed.This issue introduces a
MockSettlementEscrowcontract harness incontracts/invoice-token/src/integration_test.rsto validate the complete escrow-to-token settlement flow.Architectural Motivation & Technical Requirements
contracts/invoice-token/src/integration_test.rs:MockSettlementEscrowcontract and setup harness.burn_on_settlementandburn_from_on_settlement.burn_from.InsufficientBalance,InvalidAmount,InsufficientAllowance,AllowanceExpired,Paused.Acceptance Criteria
cargo test -p invoice-tokenpasses.Target Branch:
devEstimated Effort: 5–12 hours | Delivery: 3–5 days
Difficulty: Medium