@@ -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,23 @@ contract GasTankDepositorTest is Test {
152152 assertEq (rpcService.balance, rpcBalanceBefore + amount, "rpc balance not increased " );
153153 }
154154
155- function testEOAFundRevertsBelowMinimumDeposit () public {
156- _delegate ();
157- uint256 belowMinimumDeposit = MINIMUM_DEPOSIT - 1 wei ;
158-
159- vm.prank (alice);
160- vm.expectRevert (
161- abi.encodeWithSelector (GasTankDepositor.MinimumDepositNotMet.selector , belowMinimumDeposit, MINIMUM_DEPOSIT)
162- );
163- GasTankDepositor (payable (alice)).fundGasTank (belowMinimumDeposit);
164- }
165-
166155 function testEOAFundRevertsWhenCallerNotEOA () public {
167156 _delegate ();
168157
169158 vm.prank (rpcService);
170159 vm.expectRevert (abi.encodeWithSelector (GasTankDepositor.NotThisEOA.selector , rpcService, alice));
171- GasTankDepositor (payable (alice)).fundGasTank (MINIMUM_DEPOSIT );
160+ GasTankDepositor (payable (alice)).fundGasTank (MAXIMUM_DEPOSIT );
172161 }
173162
174163 function testEOAFundRevertsWhenInsufficientBalance () public {
175- vm.deal (alice, MINIMUM_DEPOSIT - 1 );
164+ vm.deal (alice, MAXIMUM_DEPOSIT - 1 );
176165 _delegate ();
177166
178167 vm.prank (alice);
179168 vm.expectRevert (
180- abi.encodeWithSelector (GasTankDepositor.InsufficientFunds.selector , MINIMUM_DEPOSIT - 1 , MINIMUM_DEPOSIT )
169+ abi.encodeWithSelector (GasTankDepositor.InsufficientFunds.selector , MAXIMUM_DEPOSIT - 1 , MAXIMUM_DEPOSIT )
181170 );
182- GasTankDepositor (payable (alice)).fundGasTank (MINIMUM_DEPOSIT );
171+ GasTankDepositor (payable (alice)).fundGasTank (MAXIMUM_DEPOSIT );
183172 }
184173
185174 //=======================HELPERS=======================
0 commit comments