@@ -34,12 +34,24 @@ contract GraphEscrowGettersTest is GraphEscrowTest {
3434 uint256 amountDeposit ,
3535 uint256 amountThawing ,
3636 uint256 amountCollected
37- ) public useGateway useDeposit (amountDeposit) {
38- vm.assume (amountThawing > 0 );
39- vm.assume (amountDeposit > 0 );
40- vm.assume (amountDeposit >= amountThawing);
41- vm.assume (amountDeposit >= amountCollected);
42- vm.assume (amountDeposit - amountCollected < amountThawing);
37+ ) public useGateway {
38+ amountThawing = bound (amountThawing, 1 , MAX_STAKING_TOKENS);
39+ amountCollected = bound (amountCollected, 1 , MAX_STAKING_TOKENS);
40+
41+ // amountDeposit must be:
42+ // - >= amountThawing (so we can thaw that amount)
43+ // - >= amountCollected (so we can collect that amount)
44+ // - < amountThawing + amountCollected (so that after collecting, balance < thawing)
45+ // - <= MAX_STAKING_TOKENS (consistent with other tests)
46+ uint256 minDeposit = amountThawing > amountCollected ? amountThawing : amountCollected;
47+ uint256 maxDeposit = amountThawing + amountCollected - 1 ;
48+ if (maxDeposit > MAX_STAKING_TOKENS) {
49+ maxDeposit = MAX_STAKING_TOKENS;
50+ }
51+ vm.assume (minDeposit <= maxDeposit);
52+ amountDeposit = bound (amountDeposit, minDeposit, maxDeposit);
53+
54+ _depositTokens (users.verifier, users.indexer, amountDeposit);
4355
4456 // thaw some funds
4557 _thawEscrow (users.verifier, users.indexer, amountThawing);
0 commit comments