-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
better interface for delay information (#209)
- Loading branch information
Showing
8 changed files
with
253 additions
and
164 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
49 changes: 49 additions & 0 deletions
49
contracts/AdjudicationFramework/interface/IMinimalAdjudicationFramework.sol
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,49 @@ | ||
// SPDX-License-Identifier: GPL-3.0-only | ||
|
||
pragma solidity ^0.8.20; | ||
|
||
/* solhint-disable quotes */ | ||
/* solhint-disable not-rely-on-time */ | ||
|
||
import {IMinimalAdjudicationFrameworkErrors} from "./IMinimalAdjudicationFrameworkErrors.sol"; | ||
|
||
interface IMinimalAdjudicationFramework is IMinimalAdjudicationFrameworkErrors { | ||
// Reality.eth questions for propositions we may be asked to rule on | ||
struct ArbitratorProposition { | ||
address arbitratorToRemove; | ||
address arbitratorToAdd; | ||
bool isFrozen; | ||
} | ||
|
||
function requestModificationOfArbitrators( | ||
address arbitratorToRemove, | ||
address arbitratorToAdd | ||
) external returns (bytes32); | ||
|
||
function executeModificationArbitratorFromAllowList( | ||
bytes32 questionId | ||
) external; | ||
|
||
// When an arbitrator is listed for removal, they can be frozen given a sufficient bond | ||
function freezeArbitrator( | ||
bytes32 questionId, | ||
bytes32[] memory historyHashes, | ||
address[] memory addrs, | ||
uint256[] memory bonds, | ||
bytes32[] memory answers | ||
) external; | ||
|
||
function clearFailedProposition(bytes32 questionId) external; | ||
|
||
// Getter functions only below here | ||
|
||
function realitio() external view returns (address); | ||
|
||
function isArbitrator(address arbitrator) external view returns (bool); | ||
|
||
function isArbitratorPropositionFrozen( | ||
bytes32 questionId | ||
) external view returns (bool); | ||
|
||
function getInvestigationDelay() external view returns (uint256); | ||
} |
24 changes: 24 additions & 0 deletions
24
contracts/AdjudicationFramework/interface/IMinimalAdjudicationFrameworkErrors.sol
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,24 @@ | ||
// SPDX-License-Identifier: GPL-3.0-only | ||
|
||
pragma solidity ^0.8.20; | ||
|
||
interface IMinimalAdjudicationFrameworkErrors { | ||
/// @dev Error thrown with illegal modification of arbitrators | ||
error NoArbitratorsToModify(); | ||
/// @dev Error thrown when a proposition already exists | ||
error PropositionAlreadyExists(); | ||
/// @dev Error thrown when a proposition is not found | ||
error PropositionNotFound(); | ||
/// @dev Error thrown when a proposition is not found | ||
error ArbitratorNotInAllowList(); | ||
/// @dev Error thrown when an arbitrator is already frozen | ||
error ArbitratorAlreadyFrozen(); | ||
/// @dev Error thrown when received messages from realityEth is not yes | ||
error AnswerNotYes(); | ||
/// @dev Error thrown when received messages from realityEth is yes, but expected to be no | ||
error PropositionNotFailed(); | ||
/// @dev Error thrown when bond is too low to freeze an arbitrator | ||
error BondTooLowToFreeze(); | ||
/// @dev Error thrown when proposition is not accepted | ||
error PropositionNotAccepted(); | ||
} |
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
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
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
Oops, something went wrong.