Skip to content

Add missing signature-failure coverage for SignedExclusiveSwap#320

Merged
moodysalem merged 2 commits intosigned-exclusive-swapfrom
copilot/sub-pr-319
Feb 23, 2026
Merged

Add missing signature-failure coverage for SignedExclusiveSwap#320
moodysalem merged 2 commits intosigned-exclusive-swapfrom
copilot/sub-pr-319

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 23, 2026

PR feedback identified missing security-path coverage in SignedExclusiveSwap tests: the suite did not assert explicit reverts for expired signatures or payload/signature mismatches. This update adds focused tests for both failure modes.

  • Signature validation coverage

    • Added test_revert_signature_expired to assert ISignedExclusiveSwap.SignatureExpired when meta.deadline is in the past.
    • Added test_revert_invalid_signature to assert ISignedExclusiveSwap.InvalidSignature when the signed payload differs from the payload used at execution.
  • Targeted scope

    • Changes are isolated to test/extensions/SignedExclusiveSwap.t.sol.
    • No contract logic changes; this PR strengthens regression protection around signature gating behavior.
vm.expectRevert(ISignedExclusiveSwap.SignatureExpired.selector);
harness.swapSigned(
    address(signedExclusiveSwap),
    poolKey,
    params,
    meta,
    minBalanceUpdate,
    signature,
    address(this),
    address(this)
);

vm.expectRevert(ISignedExclusiveSwap.InvalidSignature.selector);
harness.swapSigned(
    address(signedExclusiveSwap),
    poolKey,
    params,
    meta,
    createPoolBalanceUpdate(-30_000, 50_000), // mismatched from signed payload
    signature,
    address(this),
    address(this)
);

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: moodysalem <7897876+moodysalem@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 23, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • foundry.paradigm.xyz
    • Triggering command: /usr/bin/curl curl -L REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Add SignedExclusiveSwap extension for Ekubo protocol Add missing signature-failure coverage for SignedExclusiveSwap Feb 23, 2026
Copilot AI requested a review from moodysalem February 23, 2026 17:31
@moodysalem moodysalem marked this pull request as ready for review February 23, 2026 17:34
@moodysalem moodysalem merged commit 9b5cd8b into signed-exclusive-swap Feb 23, 2026
@moodysalem moodysalem deleted the copilot/sub-pr-319 branch February 23, 2026 17:34
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.

2 participants