@@ -8,10 +8,10 @@ import {Vm} from "./Vm.sol";
88abstract contract StdCheatsSafe {
99 Vm private constant vm = Vm (address (uint160 (uint256 (keccak256 ("hevm cheat code " )))));
1010
11- uint256 private constant UINT256_MAX =
11+ uint256 private constant _UINT256_MAX =
1212 115792089237316195423570985008687907853269984665640564039457584007913129639935 ;
1313
14- bool private gasMeteringOff ;
14+ bool private _gasMeteringOff ;
1515
1616 // Data structures to parse Transaction objects from the broadcast artifact
1717 // that conform to EIP1559. The Raw structs are what are parsed from the JSON
@@ -283,7 +283,7 @@ abstract contract StdCheatsSafe {
283283 // implemented by `addr`, which should be taken into account when this function is used.
284284 function _isPayable (address addr ) private returns (bool ) {
285285 require (
286- addr.balance < UINT256_MAX ,
286+ addr.balance < _UINT256_MAX ,
287287 "StdCheats _isPayable(address): Balance equals max uint256, so it cannot receive any more funds "
288288 );
289289 uint256 origBalanceTest = address (this ).balance;
@@ -629,14 +629,14 @@ abstract contract StdCheatsSafe {
629629 // i.e. funcA() noGasMetering { funcB() }, where funcB has noGasMetering as well.
630630 // funcA will have `gasStartedOff` as false, funcB will have it as true,
631631 // so we only turn metering back on at the end of the funcA
632- bool gasStartedOff = gasMeteringOff ;
633- gasMeteringOff = true ;
632+ bool gasStartedOff = _gasMeteringOff ;
633+ _gasMeteringOff = true ;
634634
635635 _;
636636
637637 // if gas metering was on when this modifier was called, turn it back on at the end
638638 if (! gasStartedOff) {
639- gasMeteringOff = false ;
639+ _gasMeteringOff = false ;
640640 vm.resumeGasMetering ();
641641 }
642642 }
@@ -668,9 +668,9 @@ abstract contract StdCheatsSafe {
668668abstract contract StdCheats is StdCheatsSafe {
669669 using stdStorage for StdStorage;
670670
671- StdStorage private stdstore ;
671+ StdStorage private _stdstore ;
672672 Vm private constant vm = Vm (address (uint160 (uint256 (keccak256 ("hevm cheat code " )))));
673- address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67 ;
673+ address private constant _CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67 ;
674674
675675 /// @notice Advances the block timestamp forward by `time` seconds.
676676 function skip (uint256 time ) internal virtual {
@@ -733,15 +733,15 @@ abstract contract StdCheats is StdCheatsSafe {
733733 /// @notice Changes the active prank to `msgSender`.
734734 /// @dev Deprecated. Use `vm.startPrank` instead.
735735 function changePrank (address msgSender ) internal virtual {
736- console2_log_StdCheats ("changePrank is deprecated. Please use vm.startPrank instead. " );
736+ _console2_log_StdCheats ("changePrank is deprecated. Please use vm.startPrank instead. " );
737737 vm.stopPrank ();
738738 vm.startPrank (msgSender);
739739 }
740740
741741 /// @notice Changes the active prank to `msgSender` with `txOrigin` as `tx.origin`.
742742 /// @dev Deprecated. Use `vm.startPrank` instead.
743743 function changePrank (address msgSender , address txOrigin ) internal virtual {
744- console2_log_StdCheats ("changePrank is deprecated. Please use vm.startPrank instead. " );
744+ _console2_log_StdCheats ("changePrank is deprecated. Please use vm.startPrank instead. " );
745745 vm.stopPrank ();
746746 vm.startPrank (msgSender, txOrigin);
747747 }
@@ -828,7 +828,7 @@ abstract contract StdCheats is StdCheatsSafe {
828828 uint256 prevBal = abi.decode (balData, (uint256 ));
829829
830830 // update balance
831- stdstore .target (token).sig (0x70a08231 ).with_key (to).checked_write (give);
831+ _stdstore .target (token).sig (0x70a08231 ).with_key (to).checked_write (give);
832832
833833 // update total supply
834834 if (adjust) {
@@ -839,7 +839,7 @@ abstract contract StdCheats is StdCheatsSafe {
839839 } else {
840840 totSup += (give - prevBal);
841841 }
842- stdstore .target (token).sig (0x18160ddd ).checked_write (totSup);
842+ _stdstore .target (token).sig (0x18160ddd ).checked_write (totSup);
843843 }
844844 }
845845
@@ -850,7 +850,7 @@ abstract contract StdCheats is StdCheatsSafe {
850850 uint256 prevBal = abi.decode (balData, (uint256 ));
851851
852852 // update balance
853- stdstore .target (token).sig (0x00fdd58e ).with_key (to).with_key (id).checked_write (give);
853+ _stdstore .target (token).sig (0x00fdd58e ).with_key (to).with_key (id).checked_write (give);
854854
855855 // update total supply
856856 if (adjust) {
@@ -865,7 +865,7 @@ abstract contract StdCheats is StdCheatsSafe {
865865 } else {
866866 totSup += (give - prevBal);
867867 }
868- stdstore .target (token).sig (0xbd85b039 ).with_key (id).checked_write (totSup);
868+ _stdstore .target (token).sig (0xbd85b039 ).with_key (id).checked_write (totSup);
869869 }
870870 }
871871
@@ -885,11 +885,11 @@ abstract contract StdCheats is StdCheatsSafe {
885885 uint256 toPrevBal = abi.decode (toBalData, (uint256 ));
886886
887887 // update balances
888- stdstore .target (token).sig (0x70a08231 ).with_key (abi.decode (ownerData, (address ))).checked_write (-- fromPrevBal);
889- stdstore .target (token).sig (0x70a08231 ).with_key (to).checked_write (++ toPrevBal);
888+ _stdstore .target (token).sig (0x70a08231 ).with_key (abi.decode (ownerData, (address ))).checked_write (-- fromPrevBal);
889+ _stdstore .target (token).sig (0x70a08231 ).with_key (to).checked_write (++ toPrevBal);
890890
891891 // update owner
892- stdstore .target (token).sig (0x6352211e ).with_key (id).checked_write (to);
892+ _stdstore .target (token).sig (0x6352211e ).with_key (id).checked_write (to);
893893 }
894894
895895 /// @notice Etches the runtime bytecode of `what` (from the artifacts directory) at `where`.
@@ -915,8 +915,8 @@ abstract contract StdCheats is StdCheatsSafe {
915915 }
916916
917917 // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere.
918- function console2_log_StdCheats (string memory p0 ) private view {
919- (bool status ,) = address (CONSOLE2_ADDRESS ).staticcall (abi.encodeWithSignature ("log(string) " , p0));
918+ function _console2_log_StdCheats (string memory p0 ) private view {
919+ (bool status ,) = address (_CONSOLE2_ADDRESS ).staticcall (abi.encodeWithSignature ("log(string) " , p0));
920920 status;
921921 }
922922}
0 commit comments