generated from defi-wonderland/solidity-foundry-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c0ffee0
commit c0ffee7
Showing
2 changed files
with
37 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity 0.8.26; | ||
|
||
import {IEBORequestModule, IOracle} from '../Setup.t.sol'; | ||
import {HandlerParent} from '../handlers/HandlerParent.t.sol'; | ||
|
||
contract PropertyFinalize is HandlerParent { | ||
/// @custom:property-id 10 | ||
/// @custom:property An answer can only be finalized after the deadline | ||
function property_finalizeAfterDeadline(uint256 _requestIdSeed, uint256 _responseIdSeed) public { | ||
// Pick random Response | ||
bytes32 _requestId = _getRandomRequestId(_requestIdSeed); | ||
IOracle.Request memory _requestData = _ghost_requestData[_requestId]; | ||
|
||
(bytes32 _responseId, IOracle.Response memory _responseData) = _getRandomActiveResponse(_requestId, _responseIdSeed); | ||
|
||
vm.prank(msg.sender); | ||
try oracle.finalize(_requestData, _responseData) { | ||
// After deadline | ||
// | ||
// Update ghosts | ||
} catch { | ||
// Before response deadline or | ||
// No response if there is one or | ||
// Unresolved disputed or | ||
// | ||
} | ||
} | ||
|
||
// TODO: consider adding property for releasing unfinazible ones? | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters