Conversation
- Updated Hardhat compiler settings for improved optimization and added details for Yul. - Changed default compiler profile to use fastTestCompiler. - Modified snapshot commands in package.json to specify the production build profile. - Refactored CI workflow: renamed job from 'run-ci' to 'test', added caching for Hardhat artifacts, and created a separate job for snapshot checks.
- Updated test contracts to remove direct dependencies on MakerTraitsLib and TakerTraitsLib, replacing them with DeployCode and TraitsHelper for order creation. - Simplified order creation logic across multiple test files, enhancing maintainability and readability. - Adjusted inheritance in test contracts to remove OpcodesDebug where unnecessary.
| splitTestsCompilation: true, | ||
| profiles: { | ||
| default: { compilers: [swapVmCompiler] }, | ||
| default: { compilers: [fastTestCompiler] }, |
There was a problem hiding this comment.
Feels like change of default might lead to unexpected consequences
Maybe create new profile aka fast and use it in yarn test script?
…w fast profile with fastTestCompiler.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 6ac7e63. Configure here.
| profiles: { | ||
| default: { compilers: [swapVmCompiler] }, | ||
| production: { compilers: [swapVmCompiler] }, | ||
| fast: { compilers: [fastTestCompiler] }, |
There was a problem hiding this comment.
Production profile removed but still used
High Severity
The production Solidity profile is gone, but yarn build:production still passes --build-profile production. Hardhat 3 treats production as a built-in profile and Ignition compiles against it on deploy, so that path now either fails or uses Hardhat’s implicit optimizer/viaIR/preferWasm defaults instead of swapVmCompiler.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 6ac7e63. Configure here.


Change Summary
What does this PR change?
Related Issue/Ticket:
Testing & Verification
How was this tested?
Risk Assessment
Risk Level:
Risks & Impact
Note
Low Risk
Changes are confined to CI, Hardhat config, and test harness code; production contract logic is not modified in this diff.
Overview
Speeds up local and CI test runs by compiling Solidity tests with a new
fastHardhat profile (minimal optimizer settings, non-isolated compilation) while keeping thedefaultprofile for production-style builds.yarn testnow uses--build-profile fast; CI splits into paralleltestandsnapshotjobs, adds Hardhat artifact caching on the test job, and runs gas snapshot checks only in the snapshot job.Solidity tests are refactored to compile faster and stay slimmer: routers and mocks deploy via
DeployCode/TraitsHelperinSwapVMTestSetup.solinstead ofnewon contracts imported fromcontracts/, and most suites dropOpcodesDebuginheritance (only true VM dispatchers keep it). Maker/taker packing goes through the helper with reducedMakerTraitsLibArgs/TakerTraitsLibArgssurface area; assertions that referencedSwapVMerrors/events now targetSwapVMRouter. Foundry test docs in.cursor/rules/foundry-tests.mdcare updated to match.Aqua base tests pass explicit
takerDataintoswapwhere the helper API changed.Reviewed by Cursor Bugbot for commit 6ac7e63. Bugbot is set up for automated code reviews on this repo. Configure here.