test(invoice-token): cross-contract integration test suite for escrow… - #424
Open
neyij wants to merge 1 commit into
Open
test(invoice-token): cross-contract integration test suite for escrow…#424neyij wants to merge 1 commit into
neyij wants to merge 1 commit into
Conversation
…-triggered burn-on-settlement callback (StellarState#382)
|
@neyij 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! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…-triggered burn-on-settlement callback (#382)
Description
Added a cross-contract integration test suite for the escrow-triggered invoice token burn-on-settlement flow.
The new
MockSettlementEscrowharness simulates the interaction between the settlement escrow andInvoiceTokencontracts, covering both directburnand allowance-basedburn_fromsettlement flows.The integration tests verify successful settlement, allowance consumption, authorization behavior, expected failure paths, emitted events, residual balances, and transfer unlock behavior after full settlement.
Closes #382
Type of Change
Checklist
Testing
Added a cross-contract integration test suite using a
MockSettlementEscrowcontract to exercise the complete escrow-to-token settlement flow.How to Test
cargo test -p invoice-tokenInvoiceTokencontracts using the test environment and configure the required authorization and token state.burn_on_settlementandburn_from_on_settlementflows and verify successful token burning, allowance deduction, and emitted events.Test Coverage
Screenshots (if applicable)
Not applicable — this change adds Soroban cross-contract integration tests and does not affect the user interface.
Additional Notes
The integration test harness validates the interaction between the settlement escrow and
InvoiceTokenrather than testing token burning in isolation.Coverage includes:
burn_on_settlementflowburn_from_on_settlementflowInsufficientBalanceInvalidAmountInsufficientAllowanceAllowanceExpiredPausedThis provides coverage for the authorization and state transitions that occur when invoice tokens are burned as part of escrow settlement.
For Reviewers
Please focus on:
In particular, review the cross-contract authorization flow, allowance consumption during
burn_from, error propagation, event assertions, and the post-settlement transfer unlock behavior.