generated from Kwenta/foundry-scaffold
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9f5e5c1
commit 78bb359
Showing
3 changed files
with
21 additions
and
21 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ import {ArbitrumParameters} from | |
"script/utils/parameters/ArbitrumParameters.sol"; | ||
import {ArbitrumSepoliaParameters} from | ||
"script/utils/parameters/ArbitrumSepoliaParameters.sol"; | ||
import {TestHelpers} from "test/utils/TestHelpers.sol"; | ||
|
||
/// @title Contract for bootstrapping the SMv3 system for testing purposes | ||
/// @dev it deploys the SMv3 Engine and EngineExposed, and defines | ||
|
@@ -34,7 +35,7 @@ import {ArbitrumSepoliaParameters} from | |
/// and effectively tests the deploy script as well | ||
/// | ||
/// @author JaredBorders ([email protected]) | ||
contract Bootstrap is Test, Constants, Conditions, SynthetixV3Errors { | ||
contract Bootstrap is Test, Constants, Conditions, SynthetixV3Errors, TestHelpers { | ||
// lets any test contract that inherits from this contract | ||
// use the console.log() | ||
using console2 for *; | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
pragma solidity 0.8.27; | ||
|
||
contract TestHelpers { | ||
function assertWithinTolerance(uint256 expected, uint256 actual, uint256 tolerancePercent) internal { | ||
uint256 tolerance = (expected * tolerancePercent) / 100; | ||
assert(actual >= expected - tolerance && actual <= expected + tolerance); | ||
} | ||
} |