@@ -8,7 +8,7 @@ contract GasTankDepositorTest is Test {
88 uint256 public constant ALICE_PK = uint256 (0xA11CE );
99 uint256 public constant BOB_PK = uint256 (0xB0B );
1010 uint256 public constant RPC_SERVICE_PK = uint256 (0x1234567890 );
11- uint256 public constant MINIMUM_DEPOSIT = 0.01 ether ;
11+ uint256 public constant MAXIMUM_DEPOSIT = 0.01 ether ;
1212 address public constant ZERO_ADDRESS = address (0 );
1313 bytes32 public constant EMPTY_CODEHASH = keccak256 ("" );
1414
@@ -22,7 +22,7 @@ contract GasTankDepositorTest is Test {
2222 vm.deal (alice, 10 ether);
2323 vm.deal (bob, 10 ether);
2424 vm.deal (rpcService, 10 ether);
25- _gasTankDepositorImpl = new GasTankDepositor (rpcService, MINIMUM_DEPOSIT );
25+ _gasTankDepositorImpl = new GasTankDepositor (rpcService, MAXIMUM_DEPOSIT );
2626 }
2727
2828 //=======================TESTS=======================
@@ -108,16 +108,16 @@ contract GasTankDepositorTest is Test {
108108
109109 //=======================TESTS FOR FUNDING THE GAS TANK=======================
110110
111- function testRpcServiceFundsMinimumDeposit () public {
111+ function testRpcServiceFundsMaximumDeposit () public {
112112 _delegate ();
113113
114114 uint256 rpcBalanceBefore = rpcService.balance;
115- _expectGasTankFunded (rpcService, MINIMUM_DEPOSIT );
115+ _expectGasTankFunded (rpcService, MAXIMUM_DEPOSIT );
116116
117117 vm.prank (rpcService);
118118 GasTankDepositor (payable (alice)).fundGasTank ();
119119
120- assertEq (rpcService.balance, rpcBalanceBefore + MINIMUM_DEPOSIT , "rpc balance not increased " );
120+ assertEq (rpcService.balance, rpcBalanceBefore + MAXIMUM_DEPOSIT , "rpc balance not increased " );
121121 }
122122
123123 function testRpcServiceFundRevertsWhenCallerNotRpcService () public {
@@ -129,12 +129,12 @@ contract GasTankDepositorTest is Test {
129129 }
130130
131131 function testRpcServiceFundRevertsWhenInsufficientBalance () public {
132- vm.deal (alice, MINIMUM_DEPOSIT - 1 );
132+ vm.deal (alice, MAXIMUM_DEPOSIT - 1 );
133133 _delegate ();
134134
135135 vm.prank (rpcService);
136136 vm.expectRevert (
137- abi.encodeWithSelector (GasTankDepositor.InsufficientFunds.selector , MINIMUM_DEPOSIT - 1 , MINIMUM_DEPOSIT )
137+ abi.encodeWithSelector (GasTankDepositor.InsufficientFunds.selector , MAXIMUM_DEPOSIT - 1 , MAXIMUM_DEPOSIT )
138138 );
139139 GasTankDepositor (payable (alice)).fundGasTank ();
140140 }
@@ -152,34 +152,34 @@ contract GasTankDepositorTest is Test {
152152 assertEq (rpcService.balance, rpcBalanceBefore + amount, "rpc balance not increased " );
153153 }
154154
155- function testEOAFundRevertsBelowMinimumDeposit () public {
155+ function testEOAFundRevertsBelowMaximumDeposit () public {
156156 _delegate ();
157- uint256 belowMinimumDeposit = MINIMUM_DEPOSIT - 1 wei ;
157+ uint256 belowMaximumDeposit = MAXIMUM_DEPOSIT - 1 wei ;
158158
159159 vm.prank (alice);
160160 vm.expectRevert (
161- abi.encodeWithSelector (GasTankDepositor.MinimumDepositNotMet .selector , belowMinimumDeposit, MINIMUM_DEPOSIT )
161+ abi.encodeWithSelector (GasTankDepositor.MaximumDepositNotMet .selector , belowMaximumDeposit, MAXIMUM_DEPOSIT )
162162 );
163- GasTankDepositor (payable (alice)).fundGasTank (belowMinimumDeposit );
163+ GasTankDepositor (payable (alice)).fundGasTank (belowMaximumDeposit );
164164 }
165165
166166 function testEOAFundRevertsWhenCallerNotEOA () public {
167167 _delegate ();
168168
169169 vm.prank (rpcService);
170170 vm.expectRevert (abi.encodeWithSelector (GasTankDepositor.NotThisEOA.selector , rpcService, alice));
171- GasTankDepositor (payable (alice)).fundGasTank (MINIMUM_DEPOSIT );
171+ GasTankDepositor (payable (alice)).fundGasTank (MAXIMUM_DEPOSIT );
172172 }
173173
174174 function testEOAFundRevertsWhenInsufficientBalance () public {
175- vm.deal (alice, MINIMUM_DEPOSIT - 1 );
175+ vm.deal (alice, MAXIMUM_DEPOSIT - 1 );
176176 _delegate ();
177177
178178 vm.prank (alice);
179179 vm.expectRevert (
180- abi.encodeWithSelector (GasTankDepositor.InsufficientFunds.selector , MINIMUM_DEPOSIT - 1 , MINIMUM_DEPOSIT )
180+ abi.encodeWithSelector (GasTankDepositor.InsufficientFunds.selector , MAXIMUM_DEPOSIT - 1 , MAXIMUM_DEPOSIT )
181181 );
182- GasTankDepositor (payable (alice)).fundGasTank (MINIMUM_DEPOSIT );
182+ GasTankDepositor (payable (alice)).fundGasTank (MAXIMUM_DEPOSIT );
183183 }
184184
185185 //=======================HELPERS=======================
0 commit comments