Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use IArbitratorCore interface. Fix missing metadata, spurious log event, move pull-only function out of minimal parent contract. Fixes #83 #257

Merged
merged 1 commit into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading