Skip to content

Commit

Permalink
Use IArbitratorCore interface. Fix missing metadata, spurious log eve…
Browse files Browse the repository at this point in the history
…nt, move pull-only function out of minimal parent contract. Fixes #83
  • Loading branch information
edmundedgar committed Mar 8, 2024
1 parent c8a9e32 commit 7e8549f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,6 @@ contract MinimalAdjudicationFramework is IMinimalAdjudicationFramework {

// Getter functions only below here

function realitio() external view returns (address) {
return address(realityETH);
}

function isArbitrator(address arbitrator) external view returns (bool) {
return _arbitrators.contains(arbitrator);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ pragma solidity ^0.8.20;
import {MinimalAdjudicationFramework} from "../MinimalAdjudicationFramework.sol";
import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import {BalanceHolder} from "@reality.eth/contracts/development/contracts/BalanceHolder.sol";
import {IRealityETH} from "@reality.eth/contracts/development/contracts/IRealityETH.sol";
import {IArbitratorCore} from "@reality.eth/contracts/development/contracts/IArbitratorCore.sol";

/*
This contract sits between a Reality.eth instance and an Arbitrator.
Expand All @@ -20,6 +22,7 @@ To the normal Arbitrator contracts that does its arbitration jobs, it looks like
*/

contract AdjudicationFrameworkRequests is
IArbitratorCore,
MinimalAdjudicationFramework,
BalanceHolder
{
Expand Down Expand Up @@ -55,18 +58,6 @@ contract AdjudicationFrameworkRequests is
/// @dev Error thrown when too soon to cancel
error TooSoonToCancel();

event LogRequestArbitration(
bytes32 indexed questionId,
uint256 feePaid,
address requester,
uint256 remaining
);

event LogNotifyOfArbitrationRequest(
bytes32 indexed questionId,
address indexed user
);

uint256 public dispute_fee;

struct ArbitrationRequest {
Expand All @@ -80,6 +71,10 @@ contract AdjudicationFrameworkRequests is

mapping(bytes32 => ArbitrationRequest) public questionArbitrations;

// Metadata for anything the UI needs to know.
// TODO: Add a "tos" parameter pointing to a document that explains the adjudication principles, see #256
string public metadata = "{}";

/// @param _realityETH The reality.eth instance we adjudicate for
/// @param _disputeFee The dispute fee we charge reality.eth users
/// @param _forkArbitrator The arbitrator contract that escalates to an L1 fork, used for our governance
Expand Down Expand Up @@ -180,8 +175,6 @@ contract AdjudicationFrameworkRequests is

questionArbitrations[questionId].payer = requester;
questionArbitrations[questionId].arbitrator = msg.sender;

emit LogNotifyOfArbitrationRequest(questionId, requester);
}

/// @notice Clear the arbitrator setting of an arbitrator that has been delisted
Expand Down Expand Up @@ -297,4 +290,8 @@ contract AdjudicationFrameworkRequests is

realityETH.submitAnswerByArbitrator(questionId, answer, answerer);
}

function realitio() external view returns (IRealityETH) {
return realityETH;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ interface IMinimalAdjudicationFramework is IMinimalAdjudicationFrameworkErrors {

// Getter functions only below here

function realitio() external view returns (address);

function isArbitrator(address arbitrator) external view returns (bool);

function isArbitratorPropositionFrozen(
Expand Down

0 comments on commit 7e8549f

Please sign in to comment.