Contract 0x2a2bab2c2d4eb5007b0389720b287d4d19dc4001

Txn Hash Method
Block
From
To
Value [Txn Fee]
0x67a7964eabb892b4273edc793f6483fc02b166c694ec81353981371c21c91a5dSubmit Evidence251573362022-11-25 21:26:201 day 20 hrs ago0x5e7b645d5bf86750cb1913122ba8a8545e2a9fd1 IN  0x2a2bab2c2d4eb5007b0389720b287d4d19dc40010 xDAI0.000067365
0x329da9d147cc6e74d72cbad8a9b2f0b2ef1df83010cd0a7f859cf3cb7c4f4e80Request Arbitrat...251563592022-11-25 19:58:251 day 22 hrs ago0xfd4ba0a1c08e0af938a2b1ac06e8937c8535ec93 IN  0x2a2bab2c2d4eb5007b0389720b287d4d19dc400120.7 xDAI0.000797734503
0xab1d714252b8542f9cfd6b5edafb8a6c62109c38a028b9a29d7c015dca42a63dSubmit Evidence250947722022-11-22 0:08:455 days 18 hrs ago0x209469c921db9d5bd77084370e80b63d5cdd63c1 IN  0x2a2bab2c2d4eb5007b0389720b287d4d19dc40010 xDAI0.000066435
0x59880727e15720767e4c54760f55f93b9b8e6712dd0c07c13bb107722832ba4aSubmit Evidence249281792022-11-10 18:09:3517 days 1 min ago0x209469c921db9d5bd77084370e80b63d5cdd63c1 IN  0x2a2bab2c2d4eb5007b0389720b287d4d19dc40010 xDAI0.000066435
0xd397609119147cb0ebc93623fc1ea23c5d5c5d2ef350e20092e4a1dfdecfce45Submit Evidence248449642022-11-03 15:11:2024 days 2 hrs ago0x209469c921db9d5bd77084370e80b63d5cdd63c1 IN  0x2a2bab2c2d4eb5007b0389720b287d4d19dc40010 xDAI0.000066435
0x72f2d5246dc8bf2ef24c38f413f7c2c0f4b0e934e7dc0dd0a91bc8a9589e4ab5Report Answer248074322022-10-31 16:05:5527 days 2 hrs ago0x209469c921db9d5bd77084370e80b63d5cdd63c1 IN  0x2a2bab2c2d4eb5007b0389720b287d4d19dc40010 xDAI0.0000833145
0xed3c4dfdf409dc1ffb00a4698eaa9f84028eb39b3ab9ab60f6bd183edb5fc4e4Submit Evidence247858042022-10-29 22:57:0528 days 19 hrs ago0x209469c921db9d5bd77084370e80b63d5cdd63c1 IN  0x2a2bab2c2d4eb5007b0389720b287d4d19dc40010 xDAI0.000066435
0x11d4acfa62341c3175ce7109eb954223f8c904501e4063050587af642a36f39bSubmit Evidence247448402022-10-26 14:11:4532 days 3 hrs ago0x5e7b645d5bf86750cb1913122ba8a8545e2a9fd1 IN  0x2a2bab2c2d4eb5007b0389720b287d4d19dc40010 xDAI0.000067365
0x2dcc82d5a483b2b56534cd4578c8e7ee54ce2a8f1300f67beb2f1e87f7fa20deSubmit Evidence247000112022-10-22 23:16:3035 days 18 hrs ago0xfd4ba0a1c08e0af938a2b1ac06e8937c8535ec93 IN  0x2a2bab2c2d4eb5007b0389720b287d4d19dc40010 xDAI0.000067365
0x86576aaa602fa9a7775c461c4c347c12593594da1ca1703c1abb3a733a5fa761Submit Evidence246999942022-10-22 23:14:3535 days 18 hrs ago0xfd4ba0a1c08e0af938a2b1ac06e8937c8535ec93 IN  0x2a2bab2c2d4eb5007b0389720b287d4d19dc40010 xDAI0.000067365
0x7407b87d29733e487de547b26f66c24cdd26ceb8564dd115b6b05505ff75cdf3Submit Evidence246971162022-10-22 17:43:3036 days 27 mins ago0x209469c921db9d5bd77084370e80b63d5cdd63c1 IN  0x2a2bab2c2d4eb5007b0389720b287d4d19dc40010 xDAI0.000066435
0x5ee3ad57d0eec11e63eb23128448e774c6108813af97894d8d875916468998edSubmit Evidence246905212022-10-22 5:08:2536 days 13 hrs ago0x209469c921db9d5bd77084370e80b63d5cdd63c1 IN  0x2a2bab2c2d4eb5007b0389720b287d4d19dc40010 xDAI0.000066435
0xdc9ebdae537b118064d1a8f957e8282fa2a9ed0fa82956c2c747101b45f18f16Submit Evidence246903142022-10-22 4:44:5036 days 13 hrs ago0x209469c921db9d5bd77084370e80b63d5cdd63c1 IN  0x2a2bab2c2d4eb5007b0389720b287d4d19dc40010 xDAI0.000066435
0xc2bf116428193c5783cba0f71adefb85e9000bbcd9b463c67bbcfb90782cde9dSubmit Evidence246903102022-10-22 4:44:2036 days 13 hrs ago0x209469c921db9d5bd77084370e80b63d5cdd63c1 IN  0x2a2bab2c2d4eb5007b0389720b287d4d19dc40010 xDAI0.000066435
0xdbc8cbf4421c346c3c410c13ce5b36469cf685f78de7dcaae6146ae9ff932dceRequest Arbitrat...246885422022-10-22 1:22:4536 days 16 hrs ago0xfd4ba0a1c08e0af938a2b1ac06e8937c8535ec93 IN  0x2a2bab2c2d4eb5007b0389720b287d4d19dc400120.7 xDAI0.000797734503
0x99a5cdb2763d8783f026cc1f14ae7bbe332f97a5f63351a19a07cf901ec94066Submit Evidence243990842022-09-30 2:11:0558 days 15 hrs ago0x209469c921db9d5bd77084370e80b63d5cdd63c1 IN  0x2a2bab2c2d4eb5007b0389720b287d4d19dc40010 xDAI0.000066435
0x2dbcb4b18eca61dca9240281ade1cc680cc3a4c68a221d74db9b4ab3d9f30f25Submit Evidence242082922022-09-16 11:22:5572 days 6 hrs ago0x209469c921db9d5bd77084370e80b63d5cdd63c1 IN  0x2a2bab2c2d4eb5007b0389720b287d4d19dc40010 xDAI0.000066435
0xf8aeeaad00706d03cb22a90ac63bc49c56954ec3ac89fe04503f0d151b52453dSubmit Evidence242028792022-09-16 2:07:4072 days 16 hrs ago0x209469c921db9d5bd77084370e80b63d5cdd63c1 IN  0x2a2bab2c2d4eb5007b0389720b287d4d19dc40010 xDAI0.000066435
0x6c40c8c4053da3b7ae5fcc6eb18bd401e6320ae9ac1a2a8ef27f5dc5b30d23f7Submit Evidence242028782022-09-16 2:07:3572 days 16 hrs ago0x209469c921db9d5bd77084370e80b63d5cdd63c1 IN  0x2a2bab2c2d4eb5007b0389720b287d4d19dc40010 xDAI0.000066435
0xb93a24a908badf9c86e97b31067c1445530286604a486fde9b7b764b11200a31Submit Evidence242028772022-09-16 2:07:3072 days 16 hrs ago0x209469c921db9d5bd77084370e80b63d5cdd63c1 IN  0x2a2bab2c2d4eb5007b0389720b287d4d19dc40010 xDAI0.000066435
0x1220000810059129328c9ebf7b1f70a8b134e1ff030dfd83daa5db13f77dd832Submit Evidence242028762022-09-16 2:07:2572 days 16 hrs ago0x209469c921db9d5bd77084370e80b63d5cdd63c1 IN  0x2a2bab2c2d4eb5007b0389720b287d4d19dc40010 xDAI0.000066435
0x898aef8d2c1c3d942b8d77dcc6689ddd74377d7f75b180d163f1f88e85a3d66aSubmit Evidence241831032022-09-14 16:18:3074 days 1 hr ago0x209469c921db9d5bd77084370e80b63d5cdd63c1 IN  0x2a2bab2c2d4eb5007b0389720b287d4d19dc40010 xDAI0.000066435
0xae805c23255f76ae6c74bfe6c229db09edcc03d36a13f89ec3b8c0fb36b09ce1Submit Evidence241831022022-09-14 16:18:2074 days 1 hr ago0x209469c921db9d5bd77084370e80b63d5cdd63c1 IN  0x2a2bab2c2d4eb5007b0389720b287d4d19dc40010 xDAI0.000066435
0xdb18b87fa84a0222405cd2dbbb6b50c564562700fb183dea665d6f576aa9caf5Submit Evidence241831002022-09-14 16:18:1074 days 1 hr ago0x209469c921db9d5bd77084370e80b63d5cdd63c1 IN  0x2a2bab2c2d4eb5007b0389720b287d4d19dc40010 xDAI0.000066435
0x50fb6d630c9c82a8cecd747557b9103a693ac7040b5381c1740cee1dac59b82bSubmit Evidence241830992022-09-14 16:18:0574 days 1 hr ago0x209469c921db9d5bd77084370e80b63d5cdd63c1 IN  0x2a2bab2c2d4eb5007b0389720b287d4d19dc40010 xDAI0.000066435
[ Download CSV Export 
Latest 2 internal transactions
Parent Txn Hash Block From To Value
0x329da9d147cc6e74d72cbad8a9b2f0b2ef1df83010cd0a7f859cf3cb7c4f4e80251563592022-11-25 19:58:251 day 22 hrs ago 0x2a2bab2c2d4eb5007b0389720b287d4d19dc4001 0x9c1da9a04925bdfdedf0f6421bc7eea8305f900220.7 xDAI
0xdbc8cbf4421c346c3c410c13ce5b36469cf685f78de7dcaae6146ae9ff932dce246885422022-10-22 1:22:4536 days 16 hrs ago 0x2a2bab2c2d4eb5007b0389720b287d4d19dc4001 0x9c1da9a04925bdfdedf0f6421bc7eea8305f900220.7 xDAI
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Realitio_v2_1_ArbitratorWithAppeals

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at gnosisscan.io on 2022-08-05
*/

// SPDX-License-Identifier: MIT


pragma solidity 0.7.6;

/**
 * @authors: [@ferittuncer, @hbarcelos]
 * @reviewers: [@remedcu*]
 * @auditors: []
 * @bounties: []
 * @deployments: []
 */
 
/**
 * @title IArbitrable
 * Arbitrable interface.
 * When developing arbitrable contracts, we need to:
 * - Define the action taken when a ruling is received by the contract.
 * - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);
 */
interface IArbitrable {
    /**
     * @dev To be raised when a ruling is given.
     * @param _arbitrator The arbitrator giving the ruling.
     * @param _disputeID ID of the dispute in the Arbitrator contract.
     * @param _ruling The ruling which was given.
     */
    event Ruling(IArbitrator indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);

    /**
     * @dev Give a ruling for a dispute. Must be called by the arbitrator.
     * The purpose of this function is to ensure that the address calling it has the right to rule on the contract.
     * @param _disputeID ID of the dispute in the Arbitrator contract.
     * @param _ruling Ruling given by the arbitrator. Note that 0 is reserved for "Not able/wanting to make a decision".
     */
    function rule(uint256 _disputeID, uint256 _ruling) external;
}

/**
 * @authors: [@ferittuncer, @hbarcelos]
 * @reviewers: [@remedcu*]
 * @auditors: []
 * @bounties: []
 * @deployments: []
 */


/**
 * @title Arbitrator
 * Arbitrator abstract contract.
 * When developing arbitrator contracts we need to:
 * - Define the functions for dispute creation (createDispute) and appeal (appeal). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).
 * - Define the functions for cost display (arbitrationCost and appealCost).
 * - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).
 */
interface IArbitrator {
    enum DisputeStatus {Waiting, Appealable, Solved}

    /**
     * @dev To be emitted when a dispute is created.
     * @param _disputeID ID of the dispute.
     * @param _arbitrable The contract which created the dispute.
     */
    event DisputeCreation(uint256 indexed _disputeID, IArbitrable indexed _arbitrable);

    /**
     * @dev To be emitted when a dispute can be appealed.
     * @param _disputeID ID of the dispute.
     * @param _arbitrable The contract which created the dispute.
     */
    event AppealPossible(uint256 indexed _disputeID, IArbitrable indexed _arbitrable);

    /**
     * @dev To be emitted when the current ruling is appealed.
     * @param _disputeID ID of the dispute.
     * @param _arbitrable The contract which created the dispute.
     */
    event AppealDecision(uint256 indexed _disputeID, IArbitrable indexed _arbitrable);

    /**
     * @dev Create a dispute. Must be called by the arbitrable contract.
     * Must be paid at least arbitrationCost(_extraData).
     * @param _choices Amount of choices the arbitrator can make in this dispute.
     * @param _extraData Can be used to give additional info on the dispute to be created.
     * @return disputeID ID of the dispute created.
     */
    function createDispute(uint256 _choices, bytes calldata _extraData) external payable returns (uint256 disputeID);

    /**
     * @dev Compute the cost of arbitration. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.
     * @param _extraData Can be used to give additional info on the dispute to be created.
     * @return cost Amount to be paid.
     */
    function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);

    /**
     * @dev Appeal a ruling. Note that it has to be called before the arbitrator contract calls rule.
     * @param _disputeID ID of the dispute to be appealed.
     * @param _extraData Can be used to give extra info on the appeal.
     */
    function appeal(uint256 _disputeID, bytes calldata _extraData) external payable;

    /**
     * @dev Compute the cost of appeal. It is recommended not to increase it often, as it can be higly time and gas consuming for the arbitrated contracts to cope with fee augmentation.
     * @param _disputeID ID of the dispute to be appealed.
     * @param _extraData Can be used to give additional info on the dispute to be created.
     * @return cost Amount to be paid.
     */
    function appealCost(uint256 _disputeID, bytes calldata _extraData) external view returns (uint256 cost);

    /**
     * @dev Compute the start and end of the dispute's current or next appeal period, if possible. If not known or appeal is impossible: should return (0, 0).
     * @param _disputeID ID of the dispute.
     * @return start The start of the period.
     * @return end The end of the period.
     */
    function appealPeriod(uint256 _disputeID) external view returns (uint256 start, uint256 end);

    /**
     * @dev Return the status of a dispute.
     * @param _disputeID ID of the dispute to rule.
     * @return status The status of the dispute.
     */
    function disputeStatus(uint256 _disputeID) external view returns (DisputeStatus status);

    /**
     * @dev Return the current ruling of a dispute. This is useful for parties to know if they should appeal.
     * @param _disputeID ID of the dispute.
     * @return ruling The ruling which has been given or the one which will be given if there is no appeal.
     */
    function currentRuling(uint256 _disputeID) external view returns (uint256 ruling);
}

/**
 * @authors: [@ferittuncer, @hbarcelos]
 * @reviewers: []
 * @auditors: []
 * @bounties: []
 * @deployments: []
 */
 
/** @title IEvidence
 *  ERC-1497: Evidence Standard
 */
interface IEvidence {
    /**
     * @dev To be emitted when meta-evidence is submitted.
     * @param _metaEvidenceID Unique identifier of meta-evidence.
     * @param _evidence A link to the meta-evidence JSON.
     */
    event MetaEvidence(uint256 indexed _metaEvidenceID, string _evidence);

    /**
     * @dev To be raised when evidence is submitted. Should point to the resource (evidences are not to be stored on chain due to gas considerations).
     * @param _arbitrator The arbitrator of the contract.
     * @param _evidenceGroupID Unique identifier of the evidence group the evidence belongs to.
     * @param _party The address of the party submiting the evidence. Note that 0x0 refers to evidence not submitted by any party.
     * @param _evidence A URI to the evidence JSON file whose name should be its keccak256 hash followed by .json.
     */
    event Evidence(
        IArbitrator indexed _arbitrator,
        uint256 indexed _evidenceGroupID,
        address indexed _party,
        string _evidence
    );

    /**
     * @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.
     * @param _arbitrator The arbitrator of the contract.
     * @param _disputeID ID of the dispute in the Arbitrator contract.
     * @param _metaEvidenceID Unique identifier of meta-evidence.
     * @param _evidenceGroupID Unique identifier of the evidence group that is linked to this dispute.
     */
    event Dispute(
        IArbitrator indexed _arbitrator,
        uint256 indexed _disputeID,
        uint256 _metaEvidenceID,
        uint256 _evidenceGroupID
    );
}

/**
 *  @authors: [@ferittuncer]
 *  @reviewers: [@hbarcelos]
 *  @auditors: []
 *  @bounties: []
 *  @deployments: []
 */


/**
 *  @title IRealitio
 *  @dev Required subset of https://github.com/realitio/realitio-contracts/blob/master/truffle/contracts/IRealitio.sol to implement a Realitio arbitrator.
 */
interface IRealitio {
    /// @notice Notify the contract that the arbitrator has been paid for a question, freezing it pending their decision.
    /// @dev The arbitrator contract is trusted to only call this if they've been paid, and tell us who paid them.
    /// @param question_id The ID of the question
    /// @param requester The account that requested arbitration
    /// @param max_previous If specified, reverts if a bond higher than this was submitted after you sent your transaction.
    function notifyOfArbitrationRequest(
        bytes32 question_id,
        address requester,
        uint256 max_previous
    ) external;

    /// @notice Submit the answer for a question, for use by the arbitrator.
    /// @dev Doesn't require (or allow) a bond. Required only in v2.0.
    /// If the current final answer is correct, the account should be whoever submitted it.
    /// If the current final answer is wrong, the account should be whoever paid for arbitration.
    /// However, the answerer stipulations are not enforced by the contract.
    /// @param question_id The ID of the question.
    /// @param answer The answer, encoded into bytes32.
    /// @param answerer The account credited with this answer for the purpose of bond claims.
    function submitAnswerByArbitrator(
        bytes32 question_id,
        bytes32 answer,
        address answerer
    ) external;

    /// @notice Returns the history hash of the question. Required before calling submitAnswerByArbitrator to make sure history is correct.
    /// @dev Required only in v2.0.
    /// @param question_id The ID of the question.
    /// @dev Updated on each answer, then rewound as each is claimed.
    function getHistoryHash(bytes32 question_id) external view returns (bytes32);

    /// @notice Returns the commitment info by its id. Required before calling submitAnswerByArbitrator to make sure history is correct.
    /// @dev Required only in v2.0.
    /// @param commitment_id The ID of the commitment.
    /// @return Time after which the committed answer can be revealed.
    /// @return Whether the commitment has already been revealed or not.
    /// @return The committed answer, encoded as bytes32.
    function commitments(bytes32 commitment_id)
        external
        view
        returns (
            uint32,
            bool,
            bytes32
        );

    /// @notice Submit the answer for a question, for use by the arbitrator, working out the appropriate winner based on the last answer details.
    /// @dev Doesn't require (or allow) a bond. Required only in v2.1.
    /// @param question_id The ID of the question
    /// @param answer The answer, encoded into bytes32
    /// @param payee_if_wrong The account to by credited as winner if the last answer given is wrong, usually the account that paid the arbitrator
    /// @param last_history_hash The history hash before the final one
    /// @param last_answer_or_commitment_id The last answer given, or the commitment ID if it was a commitment.
    /// @param last_answerer The address that supplied the last answer
    function assignWinnerAndSubmitAnswerByArbitrator(
        bytes32 question_id,
        bytes32 answer,
        address payee_if_wrong,
        bytes32 last_history_hash,
        bytes32 last_answer_or_commitment_id,
        address last_answerer
    ) external;
}

/**
 *  @authors: [@ferittuncer]
 *  @reviewers: [@hbarcelos]
 *  @auditors: []
 *  @bounties: []
 *  @deployments: []
 */


/**
 *  @title IRealitioArbitrator
 *  @dev Based on https://github.com/realitio/realitio-dapp/blob/1860548a51f52eba4930baad051f811e9f7adaee/docs/arbitrators.rst
 */
interface IRealitioArbitrator {
    /** @dev Returns Realitio implementation instance.
     */
    function realitio() external view returns (IRealitio);

    /** @dev Provides a string of json-encoded metadata. The following properties are scheduled for implementation in the Reality.eth dapp:
        tos: A URI representing the location of a terms-of-service document for the arbitrator.
        template_hashes: An array of hashes of templates supported by the arbitrator. If you have a numerical ID for a template registered with Reality.eth, you can look up this hash by calling the Reality.eth template_hashes() function.
     */
    function metadata() external view returns (string calldata);

    /** @dev Returns arbitrators fee for arbitrating this question.
     */
    function getDisputeFee(bytes32 questionID) external view returns (uint256);
}


/**
 *  @authors: [@ferittuncer]
 *  @reviewers: [@mtsalenc*, @hbarcelos*, @unknownunknown1*, @MerlinEgalite*]
 *  @auditors: []
 *  @bounties: []
 *  @deployments: []
 */

/**
 *  @title This serves as a standard interface for crowdfunded appeals and evidence submission, which aren't a part of the arbitration (erc-792 and erc-1497) standard yet.
    This interface is used in Dispute Resolver (resolve.kleros.io).
 */
abstract contract IDisputeResolver is IArbitrable, IEvidence {
    string public constant VERSION = "2.0.0"; // Can be used to distinguish between multiple deployed versions, if necessary.

    /** @dev Raised when a contribution is made, inside fundAppeal function.
     *  @param _localDisputeID Identifier of a dispute in scope of arbitrable contract. Arbitrator ids can be translated to local ids via externalIDtoLocalID.
     *  @param _round The round number the contribution was made to.
     *  @param ruling Indicates the ruling option which got the contribution.
     *  @param _contributor Caller of fundAppeal function.
     *  @param _amount Contribution amount.
     */
    event Contribution(uint256 indexed _localDisputeID, uint256 indexed _round, uint256 ruling, address indexed _contributor, uint256 _amount);

    /** @dev Raised when a contributor withdraws non-zero value.
     *  @param _localDisputeID Identifier of a dispute in scope of arbitrable contract. Arbitrator ids can be translated to local ids via externalIDtoLocalID.
     *  @param _round The round number the withdrawal was made from.
     *  @param _ruling Indicates the ruling option which contributor gets rewards from.
     *  @param _contributor The beneficiary of withdrawal.
     *  @param _reward Total amount of withdrawal, consists of reimbursed deposits plus rewards.
     */
    event Withdrawal(uint256 indexed _localDisputeID, uint256 indexed _round, uint256 _ruling, address indexed _contributor, uint256 _reward);

    /** @dev To be raised when a ruling option is fully funded for appeal.
     *  @param _localDisputeID Identifier of a dispute in scope of arbitrable contract. Arbitrator ids can be translated to local ids via externalIDtoLocalID.
     *  @param _round Number of the round this ruling option was fully funded in.
     *  @param _ruling The ruling option which just got fully funded.
     */
    event RulingFunded(uint256 indexed _localDisputeID, uint256 indexed _round, uint256 indexed _ruling);

    /** @dev Maps external (arbitrator side) dispute id to local (arbitrable) dispute id.
     *  @param _externalDisputeID Dispute id as in arbitrator contract.
     *  @return localDisputeID Dispute id as in arbitrable contract.
     */
    function externalIDtoLocalID(uint256 _externalDisputeID) external virtual returns (uint256 localDisputeID);

    /** @dev Returns number of possible ruling options. Valid rulings are [0, return value].
     *  @param _localDisputeID Identifier of a dispute in scope of arbitrable contract. Arbitrator ids can be translated to local ids via externalIDtoLocalID.
     *  @return count The number of ruling options.
     */
    function numberOfRulingOptions(uint256 _localDisputeID) external view virtual returns (uint256 count);

    /** @dev Allows to submit evidence for a given dispute.
     *  @param _localDisputeID Identifier of a dispute in scope of arbitrable contract. Arbitrator ids can be translated to local ids via externalIDtoLocalID.
     *  @param _evidenceURI IPFS path to evidence, example: '/ipfs/Qmarwkf7C9RuzDEJNnarT3WZ7kem5bk8DZAzx78acJjMFH/evidence.json'
     */
    function submitEvidence(uint256 _localDisputeID, string calldata _evidenceURI) external virtual;

    /** @dev Manages contributions and calls appeal function of the specified arbitrator to appeal a dispute. This function lets appeals be crowdfunded.
     *  @param _localDisputeID Identifier of a dispute in scope of arbitrable contract. Arbitrator ids can be translated to local ids via externalIDtoLocalID.
     *  @param _ruling The ruling option to which the caller wants to contribute.
     *  @return fullyFunded True if the ruling option got fully funded as a result of this contribution.
     */
    function fundAppeal(uint256 _localDisputeID, uint256 _ruling) external payable virtual returns (bool fullyFunded);

    /** @dev Returns appeal multipliers.
     *  @return winnerStakeMultiplier Winners stake multiplier.
     *  @return loserStakeMultiplier Losers stake multiplier.
     *  @return loserAppealPeriodMultiplier Losers appeal period multiplier. The loser is given less time to fund its appeal to defend against last minute appeal funding attacks.
     *  @return denominator Multiplier denominator in basis points.
     */
    function getMultipliers()
        external
        view
        virtual
        returns (
            uint256 winnerStakeMultiplier,
            uint256 loserStakeMultiplier,
            uint256 loserAppealPeriodMultiplier,
            uint256 denominator
        );

    /** @dev Allows to withdraw any reimbursable fees or rewards after the dispute gets resolved.
     *  @param _localDisputeID Identifier of a dispute in scope of arbitrable contract. Arbitrator ids can be translated to local ids via externalIDtoLocalID.
     *  @param _contributor Beneficiary of withdraw operation.
     *  @param _round Number of the round that caller wants to execute withdraw on.
     *  @param _ruling A ruling option that caller wants to execute withdraw on.
     *  @return sum The amount that is going to be transferred to contributor as a result of this function call.
     */
    function withdrawFeesAndRewards(
        uint256 _localDisputeID,
        address payable _contributor,
        uint256 _round,
        uint256 _ruling
    ) external virtual returns (uint256 sum);

    /** @dev Allows to withdraw any rewards or reimbursable fees after the dispute gets resolved. For multiple rulings options and for all rounds at once.
     *  @param _localDisputeID Identifier of a dispute in scope of arbitrable contract. Arbitrator ids can be translated to local ids via externalIDtoLocalID.
     *  @param _contributor Beneficiary of withdraw operation.
     *  @param _ruling Ruling option that caller wants to execute withdraw on.
     */
    function withdrawFeesAndRewardsForAllRounds(
        uint256 _localDisputeID,
        address payable _contributor,
        uint256 _ruling
    ) external virtual;

    /** @dev Returns the sum of withdrawable amount.
     *  @param _localDisputeID Identifier of a dispute in scope of arbitrable contract. Arbitrator ids can be translated to local ids via externalIDtoLocalID.
     *  @param _contributor Beneficiary of withdraw operation.
     *  @param _ruling Ruling option that caller wants to get withdrawable amount from.
     *  @return sum The total amount available to withdraw.
     */
    function getTotalWithdrawableAmount(
        uint256 _localDisputeID,
        address payable _contributor,
        uint256 _ruling
    ) external view virtual returns (uint256 sum);
}


/**
 * @authors: [@mtsalenc, @hbarcelos]
 * @reviewers: [@clesaege*, @ferittuncer]
 * @auditors: []
 * @bounties: []
 * @deployments: []
 */


/**
 * @title CappedMath
 * @dev Math operations with caps for under and overflow.
 */
library CappedMath {
    uint constant private UINT_MAX = 2**256 - 1;

    /**
     * @dev Adds two unsigned integers, returns 2^256 - 1 on overflow.
     */
    function addCap(uint _a, uint _b) internal pure returns (uint) {
        uint c = _a + _b;
        return c >= _a ? c : UINT_MAX;
    }

    /**
     * @dev Subtracts two integers, returns 0 on underflow.
     */
    function subCap(uint _a, uint _b) internal pure returns (uint) {
        if (_b > _a)
            return 0;
        else
            return _a - _b;
    }

    /**
     * @dev Multiplies two unsigned integers, returns 2^256 - 1 on overflow.
     */
    function mulCap(uint _a, uint _b) internal pure returns (uint) {
        // Gas optimization: this is cheaper than requiring '_a' not being zero, but the
        // benefit is lost if '_b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
        if (_a == 0)
            return 0;

        uint c = _a * _b;
        return c / _a == _b ? c : UINT_MAX;
    }
}

/**
 *  @authors: [@ferittuncer]
 *  @reviewers: [@unknownunknown1, @hbarcelos*, @MerlinEgalite*, @shalzz, @fnanni-0*, @clesaege*, @jaybuidl]
 *  @auditors: []
 *  @bounties: []
 */

/**
 *  @title RealitioArbitratorWithAppealsBase
 *  @dev A Realitio arbitrator base implementation that uses Realitio v2.x and Kleros. It notifies Realitio contract for arbitration requests and creates corresponding dispute on Kleros. Transmits Kleros ruling to Realitio contract. Maintains crowdfunded appeals and notifies Kleros contract. Provides a function to submit evidence for Kleros dispute. This contract is abstract as it does not have a function to report answer, see child contracts.
 *  There is a conversion between Kleros ruling and Realitio answer and there is a need for shifting by 1. This is because ruling 0 in Kleros signals tie or no-ruling but in Realitio 0 is a valid answer. For reviewers this should be a focus as it's quite easy to get confused. Any mistakes on this conversion will render this contract useless.
 *  NOTE: This contract trusts the Kleros arbitrator and Realitio.
 */
abstract contract RealitioArbitratorWithAppealsBase is IDisputeResolver, IRealitioArbitrator {
    using CappedMath for uint256; // Overflows and underflows are prevented by returning uint256 max and min values in case of overflows and underflows, respectively.

    IRealitio public immutable override realitio; // Actual implementation of Realitio.
    IArbitrator public immutable arbitrator; // The Kleros arbitrator.
    bytes public arbitratorExtraData; // Required for Kleros arbitrator. First 64 bytes contain subcourtID and the second 64 bytes contain number of votes in the jury.
    string public override metadata; // Metadata for Realitio. See IRealitioArbitrator.

    // The required fee stake that a party must deposit, which depends on who won the previous round and is proportional to the arbitration cost such that the fee stake for a round is `multiplier * arbitration_cost` for that round.
    uint256 public constant WINNER_STAKE_MULTIPLIER = 3000; // Multiplier of the arbitration cost that the winner has to pay as fee stake for a round in basis points.
    uint256 public constant LOSER_STAKE_MULTIPLIER = 7000; // Multiplier of the arbitration cost that the loser has to pay as fee stake for a round in basis points.
    uint256 public constant LOSER_APPEAL_PERIOD_MULTIPLIER = 5000; // Multiplier of the appeal period for losers (any other ruling options) in basis points. The loser is given less time to fund its appeal to defend against last minute appeal funding attacks.
    uint256 public constant MULTIPLIER_DENOMINATOR = 10000; // Denominator for multipliers.
    uint256 private constant NUMBER_OF_RULING_OPTIONS = type(uint256).max; // The amount of non 0 choices the arbitrator can give.

    enum Status {
        None, // The question hasn't been requested arbitration yet.
        Disputed, // The question has been requested arbitration.
        Ruled, // The question has been ruled by arbitrator.
        Reported // The answer of the question has been reported to Realitio.
    }

    // To track internal dispute state in this contract.
    struct ArbitrationRequest {
        Status status; // The current status of the question.
        address requester; // The address that requested the arbitration.
        uint256 disputeID; // The ID of the dispute raised in the arbitrator contract.
        uint256 ruling; // The ruling given by the arbitrator.
        Round[] rounds; // Tracks each appeal round of a dispute.
    }

    // For appeal logic.
    struct Round {
        mapping(uint256 => uint256) paidFees; // Tracks the fees paid in this round in the form paidFees[answer].
        mapping(uint256 => bool) hasPaid; // True if the fees for this particular answer has been fully paid in the form hasPaid[answer].
        mapping(address => mapping(uint256 => uint256)) contributions; // Maps contributors to their contributions for each answer in the form contributions[address][answer].
        uint256 feeRewards; // Sum of reimbursable appeal fees available to the parties that made contributions to the answer that ultimately wins a dispute.
        uint256[] fundedRulings; // Stores the answer choices that are fully funded.
    }

    mapping(uint256 => ArbitrationRequest) public arbitrationRequests; // Maps a question identifier in uint to its arbitration details. Example: arbitrationRequests[uint(questionID)]
    mapping(uint256 => uint256) public override externalIDtoLocalID; // Map arbitrator dispute identifiers to local identifiers. We use question ids casted to uint as local identifier.

    /** @dev Emitted when arbitration is requested, to link dispute identifier to question identifier for dynamic script that is used in metaevidence. See https://github.com/kleros/realitio-script/blob/master/src/index.js
     *  @param _disputeID The ID of the dispute in the ERC792 arbitrator.
     *  @param _questionID The ID of the question.
     */
    event DisputeIDToQuestionID(uint256 indexed _disputeID, bytes32 _questionID);

    /** @dev Constructor.
     *  @param _realitio The address of the Realitio contract.
     *  @param _metadata The metadata required for RealitioArbitrator.
     *  @param _arbitrator The address of the ERC792 arbitrator.
     *  @param _arbitratorExtraData The extra data used to raise a dispute in the ERC792 arbitrator.
     *  @param _metaevidence Metaevidence as defined in ERC-1497.
     */
    constructor(
        IRealitio _realitio,
        string memory _metadata,
        IArbitrator _arbitrator,
        bytes memory _arbitratorExtraData,
        string memory _metaevidence
    ) {
        realitio = _realitio;
        metadata = _metadata;
        arbitrator = _arbitrator;
        arbitratorExtraData = _arbitratorExtraData;
        emit MetaEvidence(0, _metaevidence); // No setter for meta-evidence. To change it, deploy a new contract.
    }

    /** @dev Allows to submit evidence for a given dispute.
     *  @param _questionID Realitio question identifier.
     *  @param _evidenceURI Link to evidence.
     */
    function submitEvidence(uint256 _questionID, string calldata _evidenceURI) external override {
        emit Evidence(arbitrator, _questionID, msg.sender, _evidenceURI); // We use _questionID for evidence group identifier.
    }

    /** @dev Request arbitration from Kleros for given _questionID.
     *  @param _questionID The question identifier in Realitio contract.
     *  @param _maxPrevious If specified, reverts if a bond higher than this was submitted after you sent your transaction.
     *  @return disputeID ID of the resulting dispute on arbitrator.
     */
    function requestArbitration(bytes32 _questionID, uint256 _maxPrevious) external payable returns (uint256 disputeID) {
        ArbitrationRequest storage arbitrationRequest = arbitrationRequests[uint256(_questionID)];
        require(arbitrationRequest.status == Status.None, "Arbitration already requested");

        // Notify Kleros
        disputeID = arbitrator.createDispute{value: msg.value}(NUMBER_OF_RULING_OPTIONS, arbitratorExtraData); /* If msg.value is greater than intended number of votes (specified in arbitratorExtraData),
        Kleros will automatically spend excess for additional votes. */
        emit Dispute(arbitrator, disputeID, 0, uint256(_questionID)); // We use _questionID in uint as evidence group identifier.
        emit DisputeIDToQuestionID(disputeID, _questionID); // For the dynamic script https://github.com/kleros/realitio-script/blob/master/src/index.js
        externalIDtoLocalID[disputeID] = uint256(_questionID);

        // Update internal state
        arbitrationRequest.requester = msg.sender;
        arbitrationRequest.status = Status.Disputed;
        arbitrationRequest.disputeID = disputeID;
        arbitrationRequest.rounds.push();

        // Notify Realitio
        realitio.notifyOfArbitrationRequest(_questionID, msg.sender, _maxPrevious);
    }

    /** @dev Receives ruling from Kleros and enforces it.
     *  @param _disputeID ID of Kleros dispute.
     *  @param _ruling Ruling that is given by Kleros. This needs to be converted to Realitio answer before reporting the answer by shifting by 1.
     */
    function rule(uint256 _disputeID, uint256 _ruling) public override {
        require(IArbitrator(msg.sender) == arbitrator, "Only arbitrator allowed");

        uint256 questionID = externalIDtoLocalID[_disputeID];
        ArbitrationRequest storage arbitrationRequest = arbitrationRequests[questionID];

        require(arbitrationRequest.status == Status.Disputed, "Invalid arbitration status");

        Round storage round = arbitrationRequest.rounds[arbitrationRequest.rounds.length - 1];

        // If there is only one ruling option in last round that is fully funded, no matter what Kleros ruling was this ruling option is the winner by default.
        uint256 finalRuling = (round.fundedRulings.length == 1) ? round.fundedRulings[0] : _ruling;

        arbitrationRequest.ruling = finalRuling;
        arbitrationRequest.status = Status.Ruled;

        emit Ruling(IArbitrator(msg.sender), _disputeID, finalRuling);

        // Ready to call `reportAnswer` now.
    }

    /** @dev TRUSTED. Manages crowdfunded appeals contributions and calls appeal function of the Kleros arbitrator to appeal a dispute.
     *  @param _questionID Identifier of the Realitio question, casted to uint. This also serves as the local identifier in this contract.
     *  @param _ruling The ruling option to which the caller wants to contribute to.
     *  @return fullyFunded True if the ruling option got fully funded as a result of this contribution.
     */
    function fundAppeal(uint256 _questionID, uint256 _ruling) external payable override returns (bool fullyFunded) {
        ArbitrationRequest storage arbitrationRequest = arbitrationRequests[_questionID];
        require(arbitrationRequest.status == Status.Disputed, "No dispute to appeal.");

        uint256 disputeID = arbitrationRequest.disputeID;
        uint256 currentRuling = arbitrator.currentRuling(disputeID);
        uint256 originalCost;
        uint256 totalCost;
        {
            (uint256 originalStart, uint256 originalEnd) = arbitrator.appealPeriod(disputeID);

            uint256 multiplier;

            if (_ruling == currentRuling) {
                require(block.timestamp < originalEnd, "Funding must be made within the appeal period.");

                multiplier = WINNER_STAKE_MULTIPLIER;
            } else {
                require(block.timestamp < (originalStart + ((originalEnd - originalStart) / 2)), "Funding must be made within the first half appeal period.");

                multiplier = LOSER_STAKE_MULTIPLIER;
            }

            originalCost = arbitrator.appealCost(disputeID, arbitratorExtraData);
            totalCost = originalCost.addCap(originalCost.mulCap(multiplier) / MULTIPLIER_DENOMINATOR);
        }

        uint256 lastRoundIndex = arbitrationRequest.rounds.length - 1;
        Round storage lastRound = arbitrationRequest.rounds[lastRoundIndex];
        require(!lastRound.hasPaid[_ruling], "Appeal fee has already been paid.");

        uint256 contribution = totalCost.subCap(lastRound.paidFees[_ruling]) > msg.value ? msg.value : totalCost.subCap(lastRound.paidFees[_ruling]);
        emit Contribution(_questionID, lastRoundIndex, _ruling, msg.sender, contribution);

        lastRound.contributions[msg.sender][_ruling] += contribution;
        lastRound.paidFees[_ruling] += contribution;

        if (lastRound.paidFees[_ruling] >= totalCost) {
            lastRound.feeRewards += lastRound.paidFees[_ruling];
            lastRound.fundedRulings.push(_ruling);
            lastRound.hasPaid[_ruling] = true;
            emit RulingFunded(_questionID, lastRoundIndex, _ruling);
        }

        if (lastRound.fundedRulings.length == 2) {
            // At least two ruling options are fully funded.
            arbitrationRequest.rounds.push();

            lastRound.feeRewards = lastRound.feeRewards.subCap(originalCost);
            arbitrator.appeal{value: originalCost}(disputeID, arbitratorExtraData);
        }

        if (msg.value.subCap(contribution) > 0) msg.sender.send(msg.value.subCap(contribution)); // Sending extra value back to contributor.

        return lastRound.hasPaid[_ruling];
    }

    /** @dev Returns number of possible ruling options. Valid rulings are [0, count].
     *  @return count The number of ruling options.
     */
    function numberOfRulingOptions(uint256) external pure override returns (uint256 count) {
        return NUMBER_OF_RULING_OPTIONS;
    }

    /** @dev Returns arbitration fee by calling arbitrationCost function in the arbitrator contract.
     *  @return fee Arbitration fee that needs to be paid.
     */
    function getDisputeFee(bytes32) external view override returns (uint256 fee) {
        return arbitrator.arbitrationCost(arbitratorExtraData);
    }

    /** @dev Returns multipliers for appeals.
     *  @return _WINNER_STAKE_MULTIPLIER Winners stake multiplier.
     *  @return _LOSER_STAKE_MULTIPLIER Losers stake multiplier.
     *  @return _LOSER_APPEAL_PERIOD_MULTIPLIER Losers appeal period multiplier. The loser is given less time to fund its appeal to defend against last minute appeal funding attacks.
     *  @return _DENOMINATOR Multiplier denominator in basis points. Required for achieving floating-point-like behavior.
     */
    function getMultipliers()
        external
        pure
        override
        returns (
            uint256 _WINNER_STAKE_MULTIPLIER,
            uint256 _LOSER_STAKE_MULTIPLIER,
            uint256 _LOSER_APPEAL_PERIOD_MULTIPLIER,
            uint256 _DENOMINATOR
        )
    {
        return (WINNER_STAKE_MULTIPLIER, LOSER_STAKE_MULTIPLIER, LOSER_APPEAL_PERIOD_MULTIPLIER, MULTIPLIER_DENOMINATOR);
    }

    /** @dev Allows to withdraw any rewards or reimbursable fees after the dispute gets resolved. For all rounds at once.
     *  This function has O(m) time complexity where m is number of rounds.
     *  It is safe to assume m is always less than 10 as appeal cost growth order is O(2^m).
     *  @param _questionID Identifier of the Realitio question, casted to uint. This also serves as the local identifier in this contract.
     *  @param _contributor The address whose rewards to withdraw.
     *  @param _ruling Ruling that received contributions from contributor.
     */
    function withdrawFeesAndRewardsForAllRounds(
        uint256 _questionID,
        address payable _contributor,
        uint256 _ruling
    ) external override {
        ArbitrationRequest storage arbitrationRequest = arbitrationRequests[_questionID];
        uint256 noOfRounds = arbitrationRequest.rounds.length;

        for (uint256 roundNumber = 0; roundNumber < noOfRounds; roundNumber++) {
            withdrawFeesAndRewards(_questionID, _contributor, roundNumber, _ruling);
        }
    }

    /** @dev Allows to withdraw any reimbursable fees or rewards after the dispute gets solved.
     *  @param _questionID Identifier of the Realitio question, casted to uint. This also serves as the local identifier in this contract.
     *  @param _contributor The address whose rewards to withdraw.
     *  @param _roundNumber The number of the round caller wants to withdraw from.
     *  @param _ruling Ruling that received contribution from contributor.
     *  @return amount The amount available to withdraw for given question, contributor, round number and ruling option.
     */
    function withdrawFeesAndRewards(
        uint256 _questionID,
        address payable _contributor,
        uint256 _roundNumber,
        uint256 _ruling
    ) public override returns (uint256 amount) {
        ArbitrationRequest storage arbitrationRequest = arbitrationRequests[_questionID];
        require(arbitrationRequest.status > Status.Disputed, "There is no ruling yet.");

        Round storage round = arbitrationRequest.rounds[_roundNumber];

        amount = getWithdrawableAmount(round, _contributor, _ruling, arbitrationRequest.ruling);

        if (amount != 0) {
            round.contributions[_contributor][_ruling] = 0;
            _contributor.send(amount); // Ignoring failure condition deliberately.
            emit Withdrawal(_questionID, _roundNumber, _ruling, _contributor, amount);
        }
    }

    /** @dev Returns the sum of withdrawable amount.
     *  This function has O(m) time complexity where m is number of rounds.
     *  It is safe to assume m is always less than 10 as appeal cost growth order is O(m^2).
     *  @param _questionID Identifier of the Realitio question, casted to uint. This also serves as the local identifier in this contract.
     *  @param _contributor The contributor for which to query.
     *  @param _ruling Ruling option to look for potential withdrawals.
     *  @return sum The total amount available to withdraw.
     */
    function getTotalWithdrawableAmount(
        uint256 _questionID,
        address payable _contributor,
        uint256 _ruling
    ) external view override returns (uint256 sum) {
        ArbitrationRequest storage arbitrationRequest = arbitrationRequests[_questionID];
        if (arbitrationRequest.status < Status.Ruled) return 0;
        uint256 noOfRounds = arbitrationRequest.rounds.length;
        uint256 finalRuling = arbitrationRequest.ruling;

        for (uint256 roundNumber = 0; roundNumber < noOfRounds; roundNumber++) {
            Round storage round = arbitrationRequest.rounds[roundNumber];
            sum += getWithdrawableAmount(round, _contributor, _ruling, finalRuling);
        }
    }

    /** @dev Returns withdrawable amount for given parameters.
     *  @param _round The round to calculate amount for.
     *  @param _contributor The contributor for which to query.
     *  @param _ruling The ruling option to search for potential withdrawal.
     *  @param _finalRuling Final ruling given by arbitrator.
     *  @return amount Amount available to withdraw for given ruling option.
     */
    function getWithdrawableAmount(
        Round storage _round,
        address _contributor,
        uint256 _ruling,
        uint256 _finalRuling
    ) internal view returns (uint256 amount) {
        if (!_round.hasPaid[_ruling]) {
            // Allow to reimburse if funding was unsuccessful for this ruling option.
            amount = _round.contributions[_contributor][_ruling];
        } else {
            // Funding was successful for this ruling option.
            if (_ruling == _finalRuling) {
                // This ruling option is the ultimate winner.
                amount = _round.paidFees[_ruling] > 0 ? (_round.contributions[_contributor][_ruling] * _round.feeRewards) / _round.paidFees[_ruling] : 0;
            } else if (!_round.hasPaid[_finalRuling]) {
                // The ultimate winner was not funded in this round. Contributions discounting the appeal fee are reimbursed proportionally.
                amount = (_round.contributions[_contributor][_ruling] * _round.feeRewards) / (_round.paidFees[_round.fundedRulings[0]] + _round.paidFees[_round.fundedRulings[1]]);
            }
        }
    }
}

/**
 *  @authors: [@ferittuncer]
 *  @reviewers: [@unknownunknown1*, @hbarcelos, @MerlinEgalite, @shalzz, @fnanni-0, @clesaege, @jaybuidl]
 *  @auditors: []
 *  @bounties: []
 *  @deployments: []
 */


/**
 *  @title Realitio_v2_1_ArbitratorWithAppeals
 *  @dev A Realitio arbitrator implementation that uses Realitio v2.1 and Kleros. It notifies Realitio contract for arbitration requests and creates corresponding dispute on Kleros.
 *  Transmits Kleros ruling to Realitio contract. Maintains crowdfunded appeals and notifies Kleros contract. Provides a function to submit evidence for Kleros dispute.
 *  There is a conversion between Kleros ruling and Realitio answer and there is a need for shifting by 1. This is because ruling 0 in Kleros signals tie or no-ruling but in Realitio 0 is a valid answer.
 *  For reviewers this should be a focus as it's quite easy to get confused. Any mistakes on this conversion will render this contract useless.
 *  NOTE: This contract trusts the Kleros arbitrator and Realitio.
 */
contract Realitio_v2_1_ArbitratorWithAppeals is RealitioArbitratorWithAppealsBase {
    /** @dev Constructor.
     *  @param _realitio The address of the Realitio contract.
     *  @param _metadata The metadata required for RealitioArbitrator.
     *  @param _arbitrator The address of the ERC792 arbitrator.
     *  @param _arbitratorExtraData The extra data used to raise a dispute in the ERC792 arbitrator.
     *  @param _metaevidence Metaevidence as defined in ERC-1497.
     */
    constructor(
        IRealitio _realitio,
        string memory _metadata,
        IArbitrator _arbitrator,
        bytes memory _arbitratorExtraData,
        string memory _metaevidence
    ) RealitioArbitratorWithAppealsBase(_realitio, _metadata, _arbitrator, _arbitratorExtraData, _metaevidence) {}

    /** @dev Reports the answer to a specified question from the Kleros arbitrator to the Realitio v2.1 contract.
     *  This can be called by anyone, after the dispute gets a ruling from Kleros.
        We can't directly call `assignWinnerAndSubmitAnswerByArbitrator` inside `rule` because of last answerer is not stored on chain.
     *  @param _questionID The ID of Realitio question.
     *  @param _lastHistoryHash The history hash given with the last answer to the question in the Realitio contract.
     *  @param _lastAnswerOrCommitmentID The last answer given, or its commitment ID if it was a commitment, to the question in the Realitio contract, in bytes32.
     *  @param _lastAnswerer The last answerer to the question in the Realitio contract.
     */
    function reportAnswer(
        bytes32 _questionID,
        bytes32 _lastHistoryHash,
        bytes32 _lastAnswerOrCommitmentID,
        address _lastAnswerer
    ) external {
        ArbitrationRequest storage arbitrationRequest = arbitrationRequests[uint256(_questionID)];
        require(arbitrationRequest.status == Status.Ruled, "The status should be Ruled.");

        arbitrationRequest.status = Status.Reported;

        // Note that ruling is shifted by -1 before calling Realitio. This works because 0-1 is equivalent to type(uint256).max. However, this won't be the case starting from Solidity 0.8.x.
        // https://docs.soliditylang.org/en/v0.8.0/080-breaking-changes.html
        realitio.assignWinnerAndSubmitAnswerByArbitrator(_questionID, bytes32(arbitrationRequest.ruling - 1), arbitrationRequest.requester, _lastHistoryHash, _lastAnswerOrCommitmentID, _lastAnswerer);
    }
}

Contract ABI

[{"inputs":[{"internalType":"contract IRealitio","name":"_realitio","type":"address"},{"internalType":"string","name":"_metadata","type":"string"},{"internalType":"contract IArbitrator","name":"_arbitrator","type":"address"},{"internalType":"bytes","name":"_arbitratorExtraData","type":"bytes"},{"internalType":"string","name":"_metaevidence","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_localDisputeID","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_round","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ruling","type":"uint256"},{"indexed":true,"internalType":"address","name":"_contributor","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"Contribution","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IArbitrator","name":"_arbitrator","type":"address"},{"indexed":true,"internalType":"uint256","name":"_disputeID","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_metaEvidenceID","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_evidenceGroupID","type":"uint256"}],"name":"Dispute","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_disputeID","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"_questionID","type":"bytes32"}],"name":"DisputeIDToQuestionID","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IArbitrator","name":"_arbitrator","type":"address"},{"indexed":true,"internalType":"uint256","name":"_evidenceGroupID","type":"uint256"},{"indexed":true,"internalType":"address","name":"_party","type":"address"},{"indexed":false,"internalType":"string","name":"_evidence","type":"string"}],"name":"Evidence","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_metaEvidenceID","type":"uint256"},{"indexed":false,"internalType":"string","name":"_evidence","type":"string"}],"name":"MetaEvidence","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IArbitrator","name":"_arbitrator","type":"address"},{"indexed":true,"internalType":"uint256","name":"_disputeID","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_ruling","type":"uint256"}],"name":"Ruling","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_localDisputeID","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_round","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_ruling","type":"uint256"}],"name":"RulingFunded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_localDisputeID","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_round","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_ruling","type":"uint256"},{"indexed":true,"internalType":"address","name":"_contributor","type":"address"},{"indexed":false,"internalType":"uint256","name":"_reward","type":"uint256"}],"name":"Withdrawal","type":"event"},{"inputs":[],"name":"LOSER_APPEAL_PERIOD_MULTIPLIER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LOSER_STAKE_MULTIPLIER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MULTIPLIER_DENOMINATOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WINNER_STAKE_MULTIPLIER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"arbitrationRequests","outputs":[{"internalType":"enum RealitioArbitratorWithAppealsBase.Status","name":"status","type":"uint8"},{"internalType":"address","name":"requester","type":"address"},{"internalType":"uint256","name":"disputeID","type":"uint256"},{"internalType":"uint256","name":"ruling","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"arbitrator","outputs":[{"internalType":"contract IArbitrator","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"arbitratorExtraData","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"externalIDtoLocalID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_questionID","type":"uint256"},{"internalType":"uint256","name":"_ruling","type":"uint256"}],"name":"fundAppeal","outputs":[{"internalType":"bool","name":"fullyFunded","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"getDisputeFee","outputs":[{"internalType":"uint256","name":"fee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMultipliers","outputs":[{"internalType":"uint256","name":"_WINNER_STAKE_MULTIPLIER","type":"uint256"},{"internalType":"uint256","name":"_LOSER_STAKE_MULTIPLIER","type":"uint256"},{"internalType":"uint256","name":"_LOSER_APPEAL_PERIOD_MULTIPLIER","type":"uint256"},{"internalType":"uint256","name":"_DENOMINATOR","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_questionID","type":"uint256"},{"internalType":"address payable","name":"_contributor","type":"address"},{"internalType":"uint256","name":"_ruling","type":"uint256"}],"name":"getTotalWithdrawableAmount","outputs":[{"internalType":"uint256","name":"sum","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metadata","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"numberOfRulingOptions","outputs":[{"internalType":"uint256","name":"count","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"realitio","outputs":[{"internalType":"contract IRealitio","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_questionID","type":"bytes32"},{"internalType":"bytes32","name":"_lastHistoryHash","type":"bytes32"},{"internalType":"bytes32","name":"_lastAnswerOrCommitmentID","type":"bytes32"},{"internalType":"address","name":"_lastAnswerer","type":"address"}],"name":"reportAnswer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_questionID","type":"bytes32"},{"internalType":"uint256","name":"_maxPrevious","type":"uint256"}],"name":"requestArbitration","outputs":[{"internalType":"uint256","name":"disputeID","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_disputeID","type":"uint256"},{"internalType":"uint256","name":"_ruling","type":"uint256"}],"name":"rule","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_questionID","type":"uint256"},{"internalType":"string","name":"_evidenceURI","type":"string"}],"name":"submitEvidence","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_questionID","type":"uint256"},{"internalType":"address payable","name":"_contributor","type":"address"},{"internalType":"uint256","name":"_roundNumber","type":"uint256"},{"internalType":"uint256","name":"_ruling","type":"uint256"}],"name":"withdrawFeesAndRewards","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_questionID","type":"uint256"},{"internalType":"address payable","name":"_contributor","type":"address"},{"internalType":"uint256","name":"_ruling","type":"uint256"}],"name":"withdrawFeesAndRewardsForAllRounds","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c06040523480156200001157600080fd5b5060405162002b5438038062002b54833981810160405260a08110156200003757600080fd5b8101908080519060200190929190805160405193929190846401000000008211156200006257600080fd5b838201915060208201858111156200007957600080fd5b82518660018202830111640100000000821117156200009757600080fd5b8083526020830192505050908051906020019080838360005b83811015620000cd578082015181840152602081019050620000b0565b50505050905090810190601f168015620000fb5780820380516001836020036101000a031916815260200191505b5060405260200180519060200190929190805160405193929190846401000000008211156200012957600080fd5b838201915060208201858111156200014057600080fd5b82518660018202830111640100000000821117156200015e57600080fd5b8083526020830192505050908051906020019080838360005b838110156200019457808201518184015260208101905062000177565b50505050905090810190601f168015620001c25780820380516001836020036101000a031916815260200191505b5060405260200180516040519392919084640100000000821115620001e657600080fd5b83820191506020820185811115620001fd57600080fd5b82518660018202830111640100000000821117156200021b57600080fd5b8083526020830192505050908051906020019080838360005b838110156200025157808201518184015260208101905062000234565b50505050905090810190601f1680156200027f5780820380516001836020036101000a031916815260200191505b5060405250505084848484848473ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250508360019080519060200190620002da929190620003dc565b508273ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b8152505081600090805190602001906200032a92919062000473565b5060007f61606860eb6c87306811e2695215385101daab53bd6ab4e9f9049aead9363c7d826040518080602001828103825283818151815260200191508051906020019080838360005b838110156200039157808201518184015260208101905062000374565b50505050905090810190601f168015620003bf5780820380516001836020036101000a031916815260200191505b509250505060405180910390a25050505050505050505062000529565b828054600181600116156101000203166002900490600052602060002090601f01602090048101928262000414576000855562000460565b82601f106200042f57805160ff191683800117855562000460565b8280016001018555821562000460579182015b828111156200045f57825182559160200191906001019062000442565b5b5090506200046f91906200050a565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620004ab5760008555620004f7565b82601f10620004c657805160ff1916838001178555620004f7565b82800160010185558215620004f7579182015b82811115620004f6578251825591602001919060010190620004d9565b5b5090506200050691906200050a565b5090565b5b80821115620005255760008160009055506001016200050b565b5090565b60805160601c60a05160601c6125ca6200058a600039806109a95280610f5b528061100f52806111a0528061160e528061181a528061188a52806119d85280611b2f5280611c8c525080611deb5280611ea95280611fc852506125ca6000f3fe6080604052600436106101355760003560e01c8063a829c3d1116100ab578063e32511da1161006f578063e32511da146106d6578063e349ad3014610745578063ec85635b14610770578063fe2dddeb146107e9578063fe6ca7821461084e578063ffa1ad741461087957610135565b8063a829c3d1146105a4578063b34bfaa8146105f0578063bc8802a21461061b578063be4676041461065c578063c21ae0611461068757610135565b8063631eabd5116100fd578063631eabd5146103705780636cc6cde1146103f557806379873f8a146104365780638d8b2d7e14610476578063a22352e2146104c5578063a6a7f0eb1461051457610135565b80630c7ac7b61461013a578063311a6c56146101ca578063362c34791461020f578063392f37e9146102925780634b2f0ea014610322575b600080fd5b34801561014657600080fd5b5061014f610909565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561018f578082015181840152602081019050610174565b50505050905090810190601f1680156101bc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101d657600080fd5b5061020d600480360360408110156101ed57600080fd5b8101908080359060200190929190803590602001909291905050506109a7565b005b34801561021b57600080fd5b5061027c6004803603608081101561023257600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050610c1a565b6040518082815260200191505060405180910390f35b34801561029e57600080fd5b506102a7610dfb565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102e75780820151818401526020810190506102cc565b50505050905090810190601f1680156103145780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103586004803603604081101561033857600080fd5b810190808035906020019092919080359060200190929190505050610e99565b60405180821515815260200191505060405180910390f35b34801561037c57600080fd5b506103a96004803603602081101561039357600080fd5b81019080803590602001909291905050506117bb565b604051808560038111156103b957fe5b81526020018473ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182815260200194505050505060405180910390f35b34801561040157600080fd5b5061040a611818565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561044257600080fd5b5061044b61183c565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390f35b34801561048257600080fd5b506104af6004803603602081101561049957600080fd5b810190808035906020019092919050505061185c565b6040518082815260200191505060405180910390f35b3480156104d157600080fd5b506104fe600480360360208110156104e857600080fd5b8101908080359060200190929190505050611886565b6040518082815260200191505060405180910390f35b34801561052057600080fd5b506105a26004803603604081101561053757600080fd5b81019080803590602001909291908035906020019064010000000081111561055e57600080fd5b82018360208201111561057057600080fd5b8035906020019184600183028401116401000000008311171561059257600080fd5b90919293919293905050506119be565b005b6105da600480360360408110156105ba57600080fd5b810190808035906020019092919080359060200190929190505050611a75565b6040518082815260200191505060405180910390f35b3480156105fc57600080fd5b50610605611ea1565b6040518082815260200191505060405180910390f35b34801561062757600080fd5b50610630611ea7565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561066857600080fd5b50610671611ecb565b6040518082815260200191505060405180910390f35b34801561069357600080fd5b506106c0600480360360208110156106aa57600080fd5b8101908080359060200190929190505050611ed1565b6040518082815260200191505060405180910390f35b3480156106e257600080fd5b50610743600480360360808110156106f957600080fd5b81019080803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611ee9565b005b34801561075157600080fd5b5061075a6120da565b6040518082815260200191505060405180910390f35b34801561077c57600080fd5b506107d36004803603606081101561079357600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506120e0565b6040518082815260200191505060405180910390f35b3480156107f557600080fd5b5061084c6004803603606081101561080c57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061219d565b005b34801561085a57600080fd5b506108636121ed565b6040518082815260200191505060405180910390f35b34801561088557600080fd5b5061088e6121f3565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156108ce5780820151818401526020810190506108b3565b50505050905090810190601f1680156108fb5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60008054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561099f5780601f106109745761010080835404028352916020019161099f565b820191906000526020600020905b81548152906001019060200180831161098257829003601f168201915b505050505081565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a68576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f4f6e6c792061726269747261746f7220616c6c6f77656400000000000000000081525060200191505060405180910390fd5b600060036000848152602001908152602001600020549050600060026000838152602001908152602001600020905060016003811115610aa457fe5b8160000160009054906101000a900460ff166003811115610ac157fe5b14610b34576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f496e76616c6964206172626974726174696f6e2073746174757300000000000081525060200191505060405180910390fd5b600081600301600183600301805490500381548110610b4f57fe5b9060005260206000209060050201905060006001826004018054905014610b765784610b92565b81600401600081548110610b8657fe5b90600052602060002001545b905080836002018190555060028360000160006101000a81548160ff02191690836003811115610bbe57fe5b0217905550853373ffffffffffffffffffffffffffffffffffffffff167f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e75622276836040518082815260200191505060405180910390a3505050505050565b60008060026000878152602001908152602001600020905060016003811115610c3f57fe5b8160000160009054906101000a900460ff166003811115610c5c57fe5b11610ccf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f5468657265206973206e6f2072756c696e67207965742e00000000000000000081525060200191505060405180910390fd5b6000816003018581548110610ce057fe5b90600052602060002090600502019050610d00818786856002015461222c565b925060008314610df15760008160020160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000868152602001908152602001600020819055508573ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f19350505050508573ffffffffffffffffffffffffffffffffffffffff1685887f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae8787604051808381526020018281526020019250505060405180910390a45b5050949350505050565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610e915780601f10610e6657610100808354040283529160200191610e91565b820191906000526020600020905b815481529060010190602001808311610e7457829003601f168201915b505050505081565b60008060026000858152602001908152602001600020905060016003811115610ebe57fe5b8160000160009054906101000a900460ff166003811115610edb57fe5b14610f4e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4e6f206469737075746520746f2061707065616c2e000000000000000000000081525060200191505060405180910390fd5b60008160010154905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631c3db16d836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610fca57600080fd5b505afa158015610fde573d6000803e3d6000fd5b505050506040513d6020811015610ff457600080fd5b810190808051906020019092919050505090506000806000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663afe15cfb876040518263ffffffff1660e01b815260040180828152602001915050604080518083038186803b15801561107d57600080fd5b505afa158015611091573d6000803e3d6000fd5b505050506040513d60408110156110a757600080fd5b810190808051906020019092919080519060200190929190505050915091506000858a141561113257814210611128576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e81526020018061250d602e913960400191505060405180910390fd5b610bb8905061119e565b60028383038161113e57fe5b0483014210611198576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603981526020018061255c6039913960400191505060405180910390fd5b611b5890505b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663f23f16e68860006040518363ffffffff1660e01b8152600401808381526020018060200182810382528381815460018160011615610100020316600290048152602001915080546001816001161561010002031660029004801561127b5780601f106112505761010080835404028352916020019161127b565b820191906000526020600020905b81548152906001019060200180831161125e57829003601f168201915b5050935050505060206040518083038186803b15801561129a57600080fd5b505afa1580156112ae573d6000803e3d6000fd5b505050506040513d60208110156112c457600080fd5b810190808051906020019092919050505094506113076127106112f0838861245090919063ffffffff16565b816112f757fe5b04866124ac90919063ffffffff16565b9350505050600060018660030180549050039050600086600301828154811061132c57fe5b906000526020600020906005020190508060010160008a815260200190815260200160002060009054906101000a900460ff16156113b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061253b6021913960400191505060405180910390fd5b6000346113e08360000160008d815260200190815260200160002054866124ed90919063ffffffff16565b116114125761140d8260000160008c815260200190815260200160002054856124ed90919063ffffffff16565b611414565b345b90503373ffffffffffffffffffffffffffffffffffffffff16838c7fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c08d85604051808381526020018281526020019250505060405180910390a4808260020160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008c815260200190815260200160002060008282540192505081905550808260000160008c815260200190815260200160002060008282540192505081905550838260000160008c815260200190815260200160002054106115bd578160000160008b8152602001908152602001600020548260030160008282540192505081905550816004018a908060018154018082558091505060019003906000526020600020016000909190919091505560018260010160008c815260200190815260200160002060006101000a81548160ff02191690831515021790555089838c7f39493c1b78d9a13bcc9e1d532fc7faed3889248d93affa811416ce3c6bcb1a6860405160405180910390a45b6002826004018054905014156117245787600301600181600181540180825580915050039060005260206000209050506116048583600301546124ed90919063ffffffff16565b82600301819055507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166349912f88868960006040518463ffffffff1660e01b815260040180838152602001806020018281038252838181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156116ea5780601f106116bf576101008083540402835291602001916116ea565b820191906000526020600020905b8154815290600101906020018083116116cd57829003601f168201915b505093505050506000604051808303818588803b15801561170a57600080fd5b505af115801561171e573d6000803e3d6000fd5b50505050505b600061173982346124ed90919063ffffffff16565b1115611788573373ffffffffffffffffffffffffffffffffffffffff166108fc61176c83346124ed90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050505b8160010160008b815260200190815260200160002060009054906101000a900460ff169850505050505050505092915050565b60026020528060005260406000206000915090508060000160009054906101000a900460ff16908060000160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154908060020154905084565b7f000000000000000000000000000000000000000000000000000000000000000081565b600080600080610bb8611b58611388612710935093509350935090919293565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9050919050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663f7434ea960006040518263ffffffff1660e01b8152600401808060200182810382528381815460018160011615610100020316600290048152602001915080546001816001161561010002031660029004801561195e5780601f106119335761010080835404028352916020019161195e565b820191906000526020600020905b81548152906001019060200180831161194157829003601f168201915b50509250505060206040518083038186803b15801561197c57600080fd5b505afa158015611990573d6000803e3d6000fd5b505050506040513d60208110156119a657600080fd5b81019080805190602001909291905050509050919050565b3373ffffffffffffffffffffffffffffffffffffffff16837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167fdccf2f8b2cc26eafcd61905cba744cff4b81d14740725f6376390dc6298a6a3c858560405180806020018281038252848482818152602001925080828437600081840152601f19601f820116905080830192505050935050505060405180910390a4505050565b600080600260008560001c8152602001908152602001600020905060006003811115611a9d57fe5b8160000160009054906101000a900460ff166003811115611aba57fe5b14611b2d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4172626974726174696f6e20616c72656164792072657175657374656400000081525060200191505060405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663c13517e1347fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60006040518463ffffffff1660e01b81526004018083815260200180602001828103825283818154600181600116156101000203166002900481526020019150805460018160011615610100020316600290048015611c2b5780601f10611c0057610100808354040283529160200191611c2b565b820191906000526020600020905b815481529060010190602001808311611c0e57829003601f168201915b505093505050506020604051808303818588803b158015611c4b57600080fd5b505af1158015611c5f573d6000803e3d6000fd5b50505050506040513d6020811015611c7657600080fd5b81019080805190602001909291905050509150817f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f74baab670a4015ab2f1b467c5252a96141a2573f2908e58a92081e80d3cfde3d60008760001c604051808381526020018281526020019250505060405180910390a3817fcbb827f06aed2dd1e157f8e6b29f32604bc4e88360964014c4d4ad259f8d3fa8856040518082815260200191505060405180910390a28360001c6003600084815260200190815260200160002081905550338160000160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060018160000160006101000a81548160ff02191690836003811115611dbb57fe5b021790555081816001018190555080600301600181600181540180825580915050039060005260206000209050507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663f6a94ecb8533866040518463ffffffff1660e01b8152600401808481526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050600060405180830381600087803b158015611e8257600080fd5b505af1158015611e96573d6000803e3d6000fd5b505050505092915050565b611b5881565b7f000000000000000000000000000000000000000000000000000000000000000081565b61138881565b60036020528060005260406000206000915090505481565b6000600260008660001c8152602001908152602001600020905060026003811115611f1057fe5b8160000160009054906101000a900460ff166003811115611f2d57fe5b14611fa0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f546865207374617475732073686f756c642062652052756c65642e000000000081525060200191505060405180910390fd5b60038160000160006101000a81548160ff02191690836003811115611fc157fe5b02179055507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d44e293c86600184600201540360001b8460000160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168888886040518763ffffffff1660e01b8152600401808781526020018681526020018573ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019650505050505050600060405180830381600087803b1580156120bb57600080fd5b505af11580156120cf573d6000803e3d6000fd5b505050505050505050565b610bb881565b6000806002600086815260200190815260200160002090506002600381111561210557fe5b8160000160009054906101000a900460ff16600381111561212257fe5b1015612132576000915050612196565b60008160030180549050905060008260020154905060005b8281101561219157600084600301828154811061216357fe5b9060005260206000209060050201905061217f8189898661222c565b8601955050808060010191505061214a565b505050505b9392505050565b600060026000858152602001908152602001600020905060008160030180549050905060005b818110156121e5576121d786868387610c1a565b5080806001019150506121c3565b505050505050565b61271081565b6040518060400160405280600581526020017f322e302e3000000000000000000000000000000000000000000000000000000081525081565b600084600101600084815260200190815260200160002060009054906101000a900460ff166122af578460020160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000848152602001908152602001600020549050612448565b8183141561235a57600085600001600085815260200190815260200160002054116122db576000612353565b8460000160008481526020019081526020016000205485600301548660020160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600086815260200190815260200160002054028161235157fe5b045b9050612447565b84600101600083815260200190815260200160002060009054906101000a900460ff16612446578460000160008660040160018154811061239757fe5b9060005260206000200154815260200190815260200160002054856000016000876004016000815481106123c757fe5b90600052602060002001548152602001908152602001600020540185600301548660020160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600086815260200190815260200160002054028161244257fe5b0490505b5b5b949350505050565b60008083141561246357600090506124a6565b600082840290508284828161247457fe5b04146124a0577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6124a2565b805b9150505b92915050565b6000808284019050838110156124e2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6124e4565b805b91505092915050565b6000828211156125005760009050612506565b81830390505b9291505056fe46756e64696e67206d757374206265206d6164652077697468696e207468652061707065616c20706572696f642e41707065616c206665652068617320616c7265616479206265656e20706169642e46756e64696e67206d757374206265206d6164652077697468696e207468652066697273742068616c662061707065616c20706572696f642ea26469706673582212203e482e3192fafd9abb62cb3f6f73e92fff45393525dcec19bb7b029b9f280e5064736f6c63430007060033000000000000000000000000e78996a233895be74a66f451f1019ca9734205cc00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000009c1da9a04925bdfdedf0f6421bc7eea8305f900200000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000005e7b22746f73223a22697066733a2f2f516d61557236686e53567859443839397864636e324755567458566a586f53584b5a626365337a467447577734482f5175657374696f6e5f5265736f6c7574696f6e5f506f6c6963792e706466227d000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000462f697066732f516d535a454d4e7655485655366e356166766e526a4a3263436f77516b5031675665506d345648457471386279532f6d65746145766964656e63652e6a736f6e0000000000000000000000000000000000000000000000000000

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000e78996a233895be74a66f451f1019ca9734205cc00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000009c1da9a04925bdfdedf0f6421bc7eea8305f900200000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000005e7b22746f73223a22697066733a2f2f516d61557236686e53567859443839397864636e324755567458566a586f53584b5a626365337a467447577734482f5175657374696f6e5f5265736f6c7574696f6e5f506f6c6963792e706466227d000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000462f697066732f516d535a454d4e7655485655366e356166766e526a4a3263436f77516b5031675665506d345648457471386279532f6d65746145766964656e63652e6a736f6e0000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _realitio (address): 0xe78996a233895be74a66f451f1019ca9734205cc
Arg [1] : _metadata (string): {"tos":"ipfs://QmaUr6hnSVxYD899xdcn2GUVtXVjXoSXKZbce3zFtGWw4H/Question_Resolution_Policy.pdf"}
Arg [2] : _arbitrator (address): 0x9c1da9a04925bdfdedf0f6421bc7eea8305f9002
Arg [3] : _arbitratorExtraData (bytes): 0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003
Arg [4] : _metaevidence (string): /ipfs/QmSZEMNvUHVU6n5afvnRjJ2cCowQkP1gVePm4VHEtq8byS/metaEvidence.json

-----Encoded View---------------
16 Constructor Arguments found :
Arg [0] : 000000000000000000000000e78996a233895be74a66f451f1019ca9734205cc
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [2] : 0000000000000000000000009c1da9a04925bdfdedf0f6421bc7eea8305f9002
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000180
Arg [5] : 000000000000000000000000000000000000000000000000000000000000005e
Arg [6] : 7b22746f73223a22697066733a2f2f516d61557236686e535678594438393978
Arg [7] : 64636e324755567458566a586f53584b5a626365337a467447577734482f5175
Arg [8] : 657374696f6e5f5265736f6c7574696f6e5f506f6c6963792e706466227d0000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000046
Arg [13] : 2f697066732f516d535a454d4e7655485655366e356166766e526a4a3263436f
Arg [14] : 77516b5031675665506d345648457471386279532f6d65746145766964656e63
Arg [15] : 652e6a736f6e0000000000000000000000000000000000000000000000000000


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.