Skip to content

Conversation

@mshrieve
Copy link
Contributor

@mshrieve mshrieve commented Jan 23, 2026

  • Add gas snapshot tests for matchOrders
  • install forge-std

Note

Adds a comprehensive gas snapshot suite for exchange.matchOrders and updates testing tooling.

  • New GasSnapshots_Test in src/exchange/test/GasSnapshots.t.sol covering complementary, mint, merge, and combo scenarios with varying maker counts; uses vm.startSnapshotGas/vm.stopSnapshotGas
  • Adds snapshot outputs in snapshots/GasSnapshots_Test.json
  • Updates lib/forge-std submodule to foundry-rs/forge-std and locks to tag v1.14.0; cleans up foundry.lock
  • Removes unused dev scripts src/dev/script/ZeroTx.s.sol and src/dev/script/poolBytecodeHash.s.sol

Written by Cursor Bugbot for commit 21d7471. This will update automatically on new commits. Configure here.

- Add GasSnapshots.t.sol with 16 tests covering:
  - Complementary (1/5/10/20 makers)
  - Mint (1/5/10/20 makers)
  - Merge (1/5/10/20 makers)
  - Combo complementary+mint (10/20 makers)
  - Combo complementary+merge (10/20 makers)
- Update forge-std to v1.11.0 for vm.startSnapshotGas support
- Remove unused dev scripts with broken imports
Copilot AI review requested due to automatic review settings January 23, 2026 20:05
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds comprehensive gas snapshot testing for the matchOrders function and updates the forge-std dependency to the official Foundry repository.

Changes:

  • Added gas snapshot tests covering complementary, mint, merge, and combination scenarios with varying numbers of maker orders (1, 5, 10, 20)
  • Updated forge-std submodule to official Foundry repository and newer commit
  • Removed unused script files (poolBytecodeHash.s.sol and ZeroTx.s.sol)

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/exchange/test/GasSnapshots.t.sol New test file implementing gas snapshot benchmarks for matchOrders scenarios
snapshots/GasSnapshots_Test.json Gas measurement results from running the snapshot tests
lib/forge-std Updated submodule pointer to newer commit
.gitmodules Changed forge-std source from brockelmore fork to official foundry-rs repository
src/dev/script/poolBytecodeHash.s.sol Removed unused script file
src/dev/script/ZeroTx.s.sol Removed unused script file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mshrieve mshrieve merged commit 80cbf37 into main Feb 3, 2026
4 checks passed
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