The main issue here that the blueprint's end time condition was not correctly handling the exact end time scenario. The condition used block.timestamp <= requisition.blueprint.endTime which caused transactions that occur precisely at the end time to fail. This issue was found in the runBlueprint modifier of the
TractorFacet contract.
At first, I presumed the conditional statement would hold, but after running a test, which you can see below, the strict conditional statement does not always hold.
```
A test was added to verify that the transaction is executed successfully exactly at the blueprint's end time.
OUTPUT OF TEST:
Run Tractor
Current block timestamp: 1719230796
Blueprint end time: 1719230796
Timestamp check - should be true: true
Transaction reverted with error message: VM Exception while processing transaction: reverted with reason string 'TractorFacet: blueprint is not active'
The transactions that were supposed to be valid exactly at the blueprint's end time were being incorrectly rejected. This creates a scenario where a valid transaction, if attempted precisely at the end time, fails with the reason "TractorFacet: blueprint is not active".
Hardhat/Manual Reveiw
The issue was due to an incorrect handling of the end time condition in the runBlueprint modifier. By updating the condition to requisition.blueprint.endTime + 1, the contract now correctly includes the exact end time as valid, ensuring that transactions at this time do not fail unexpectedly.
Running the test again with the below changes, you see the conditional statement holds true and the test passes.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.