function test_getPeriodReward( uint256 initialAmount_,
uint256 decreaseAmount_,
uint128 payoutStart_,
uint128 interval_,
uint128 startTime_,
uint128 endTime_) public{
uint256 block_timestamp = 1706821608;
vm.assume(startTime_>= block_timestamp && payoutStart_ >= block_timestamp && endTime_>=block_timestamp);
vm.assume(endTime_>startTime_);
vm.assume(startTime_>=payoutStart_);
vm.assume(initialAmount_ !=0 && interval_ !=0 && decreaseAmount_ !=0);
vm.assume(decreaseAmount_<= initialAmount_);
uint256 reward = counter.getPeriodReward(initialAmount_,decreaseAmount_,payoutStart_,interval_,startTime_,endTime_);
assert(reward<=initialAmount_);
}
}
CounterTest::test_getPeriodReward(115792089237316195423570985008687907853269984665640564039457584007913129639933 [1.157e77], 1, 1706821608 [1.706e9], 1, 1706821608 [1.706e9], 1706821609 [1.706e9])
├─ [0] VM::assume(true) [staticcall]
│ └─ ← ()
├─ [0] VM::assume(true) [staticcall]
│ └─ ← ()
├─ [0] VM::assume(true) [staticcall]
│ └─ ← ()
├─ [0] VM::assume(true) [staticcall]
│ └─ ← ()
├─ [0] VM::assume(true) [staticcall]
│ └─ ← ()
├─ [1298] Counter::getPeriodReward(115792089237316195423570985008687907853269984665640564039457584007913129639933 [1.157e77], 1, 1706821608 [1.706e9], 1, 1706821608 [1.706e9], 1706821609 [1.706e9]) [staticcall]
│ └─ ← panic: arithmetic underflow or overflow (0x11)
└─ ← panic: arithmetic underflow or overflow (0x11)
Test result: FAILED. 0 passed; 1 failed; 0 skipped; finished in 33.31ms
Ran 1 test suites: 0 tests passed, 1 failed, 0 skipped (1 total tests)
Failing tests:
Encountered 1 failing test in test/Counter.t.sol:CounterTest
`[FAIL. Reason: panic: arithmetic underflow or overflow (0x11); counterexample: `calldata=0xc89bfa7efffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000065bc07e800000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000065bc07e80000000000000000000000000000000000000000000000000000000065bc07e9 args=[115792089237316195423570985008687907853269984665640564039457584007913129639933 [1.157e77], 1, 1706821608 [1.706e9], 1, 1706821608 [1.706e9], 1706821609 [1.706e9]]] test_getPeriodReward(uint256,uint256,uint128,uint128,uint128,uint128) (runs: 0, μ: 0, ~: 0)
Encountered a total of 1 failing tests, 0 tests succeeded