One of the core assumptions is that "EVERY transaction the owner does with this contract must reset the 90 days timer". However, some owner functions are missing the call to the function that resets the timer.
The InheritanceManager::createEstateNFT
, InheritanceManager::contractInteractions
, InheritanceManager::removeBeneficiary
do not call InheritanceManager::_setDeadline
on their last lines. As a result, a beneficiary can change the contract state even if 90 days of inactivity have not passed.
The contract can enter inherited mode even if the owner has been active within the last 90 days.
This unintended state change can occur unexpectedly and without the owner's knowledge.
Foundry
Move the call to InheritanceManager::_setDeadline
inside the onlyOwner
modifier and remove it from individual functions that currently call it. The onlyOwner
modifier should still be used in these functions.
This approach ensures that every owner transaction automatically resets the timer in a more efficient and gas-optimized manner.
Example of _setDeadline()
removal in other functions:
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.