-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
Context
Several test files in the codebase use a mix of prank patterns:
- Some tests use
vm.startPrank(relayer)/vm.stopPrank()blocks - Other structurally similar tests use per-call
vm.prank(relayer)before each interaction
For consistency and clarity, we should standardize on the per-call pattern throughout the test suite. Per-call pranks make it explicit which exact calls are executed under which identity, improving test readability and reducing the risk of unintended side effects from lingering prank contexts.
Example
In test/mainnet-fork/Farm.t.sol, the test_withdrawFromFarm_rateLimitsBoundary test uses a prank block, while the structurally similar test_depositToFarm_rateLimitsBoundary uses per-call pranks.
Scope
Review all test files and refactor prank blocks to per-call pranks where appropriate for consistency.
References
- PR: feat: ERC4626 Exchange Rate Threshold (SC-1229) #186
- Discussion: feat: ERC4626 Exchange Rate Threshold (SC-1229) #186 (comment)
- Requested by: @deluca-mike
Metadata
Metadata
Assignees
Labels
No labels