@@ -6,41 +6,10 @@ import { VmHelper } from "./VmHelper.sol";
66import { Strings } from "./StringsHelper.sol " ;
77
88abstract contract FraxTest is VmHelper , Test {
9- /// @notice Differential State Storage
10- uint256 [] internal snapShotIds;
11- uint256 currentSnapShotId;
12- function ()[] internal setupFunctions;
13-
149 /// @notice EIP-1967 Slots
1510 bytes32 internal IMPLEMENTATION_SLOT = bytes32 (uint256 (keccak256 ("eip1967.proxy.implementation " )) - 1 );
1611 bytes32 internal ADMIN_SLOT = bytes32 (uint256 (keccak256 ("eip1967.proxy.admin " )) - 1 );
1712
18- // ========================================================================
19- // ~~~~~~~~~~~~~~~~~~ Different State Testing Helpers ~~~~~~~~~~~~~~~~~~~~~
20- // ========================================================================
21-
22- modifier useMultipleSetupFunctions () {
23- if (snapShotIds.length == 0 ) _;
24- for (uint256 i = 0 ; i < snapShotIds.length ; i++ ) {
25- uint256 _originalSnapshotId = vm.snapshotState ();
26- // currentSnapShotId = snapShotIds[i];
27- if (! vm.revertToState (snapShotIds[i])) {
28- revert VmDidNotRevert (snapShotIds[i]);
29- }
30- _;
31- vm.clearMockedCalls ();
32- vm.revertToState (_originalSnapshotId);
33- }
34- }
35-
36- function addSetupFunctions (function ()[] memory _setupFunctions ) internal {
37- for (uint256 i = 0 ; i < _setupFunctions.length ; i++ ) {
38- _setupFunctions[i]();
39- snapShotIds.push (vm.snapshotState ());
40- vm.clearMockedCalls ();
41- }
42- }
43-
4413 // ========================================================================
4514 // ~~~~~~~~~~~~~~~~~~~~~~~ EIP-1967 Proxy Helpers ~~~~~~~~~~~~~~~~~~~~~~~~~
4615 // ========================================================================
0 commit comments