RealitioForeignArbitrationProxyWithAppeals
This contract is meant to be deployed to the Ethereum chains where Kleros is deployed.
Variables
NUMBER_OF_CHOICES_FOR_ARBITRATOR
MULTIPLIER_DIVISOR
META_EVIDENCE_ID
Status
ArbitrationRequest
DisputeDetails
Round
arbitrator
arbitratorExtraData
amb
homeProxy
homeChainId
termsOfService
winnerMultiplier
loserMultiplier
loserAppealPeriodMultiplier
arbitrationRequests
disputeIDToDisputeDetails
arbitrationIDToDisputeExists
arbitrationIDToRequester
Modifiers
onlyHomeProxy
Functions
constructor
Creates an arbitration proxy on the foreign chain.
Parameters
_amb
contract IAMB
ArbitraryMessageBridge contract address.
_homeProxy
address
The address of the proxy.
_homeChainId
bytes32
The chain ID where the home proxy is deployed.
_arbitrator
contract IArbitrator
Arbitrator contract address.
_arbitratorExtraData
bytes
The extra data used to raise a dispute in the arbitrator.
_metaEvidence
string
The URI of the meta evidence file.
_termsOfService
string
The path for the Terms of Service for Kleros as an arbitrator for Realitio.
_winnerMultiplier
uint256
Multiplier for calculating the appeal cost of the winning answer.
_loserMultiplier
uint256
Multiplier for calculation the appeal cost of the losing answer.
_loserAppealPeriodMultiplier
uint256
Multiplier for calculating the appeal period for the losing answer.
requestArbitration
Requests arbitration for the given question and contested answer.
Parameters
_questionID
bytes32
The ID of the question.
_maxPrevious
uint256
The maximum value of the current bond for the question. The arbitration request will get rejected if the current bond is greater than _maxPrevious. If set to 0, _maxPrevious is ignored.
receiveArbitrationAcknowledgement
Receives the acknowledgement of the arbitration request for the given question and requester. TRUSTED.
Parameters
_questionID
bytes32
The ID of the question.
_requester
address
The requester.
receiveArbitrationCancelation
Receives the cancelation of the arbitration request for the given question and requester. TRUSTED.
Parameters
_questionID
bytes32
The ID of the question.
_requester
address
The requester.
handleFailedDisputeCreation
Cancels the arbitration in case the dispute could not be created.
Parameters
_questionID
bytes32
The ID of the question.
_requester
address
The address of the arbitration requester.
fundAppeal
Takes up to the total amount required to fund an answer. Reimburses the rest. Creates an appeal if at least two answers are funded.
Parameters
_arbitrationID
uint256
The ID of the arbitration, which is questionID cast into uint256.
_answer
uint256
One of the possible rulings the arbitrator can give that the funder considers to be the correct answer to the question. Note that the answer has Kleros denomination, meaning that it has '+1' offset compared to Realitio format. Also note that '0' answer can be funded.
Return Values
[0]
bool
Whether the answer was fully funded or not.
withdrawFeesAndRewards
Sends the fee stake rewards and reimbursements proportional to the contributions made to the winner of a dispute. Reimburses contributions if there is no winner.
Parameters
_arbitrationID
uint256
The ID of the arbitration.
_beneficiary
address payable
The address to send reward to.
_round
uint256
The round from which to withdraw.
_answer
uint256
The answer to query the reward from.
Return Values
reward
uint256
The withdrawn amount.
withdrawFeesAndRewardsForAllRounds
Allows to withdraw any rewards or reimbursable fees for all rounds at once.
This function is O(n) where n is the total number of rounds. Arbitration cost of subsequent rounds is A(n) = 2A(n-1) + 1
. So because of this exponential growth of costs, you can assume n is less than 10 at all times.
Parameters
_arbitrationID
uint256
The ID of the arbitration.
_beneficiary
address payable
The address that made contributions.
_contributedTo
uint256
Answer that received contributions from contributor.
submitEvidence
Allows to submit evidence for a particular question.
Parameters
_arbitrationID
uint256
The ID of the arbitration related to the question.
_evidenceURI
string
Link to evidence.
rule
Rules a specified dispute. Can only be called by the arbitrator.
Accounts for the situation where the winner loses a case due to paying less appeal fees than expected.
Parameters
_disputeID
uint256
The ID of the dispute in the ERC792 arbitrator.
_ruling
uint256
The ruling given by the arbitrator.
getMultipliers
Returns stake multipliers.
Return Values
winner
uint256
Winners stake multiplier.
loser
uint256
Losers stake multiplier.
loserAppealPeriod
uint256
Multiplier for calculating an appeal period duration for the losing side.
divisor
uint256
Multiplier divisor.
numberOfRulingOptions
Returns number of possible ruling options. Valid rulings are [0, return value].
Return Values
[0]
uint256
count The number of ruling options.
getDisputeFee
Gets the fee to create a dispute.
Return Values
[0]
uint256
The fee to create a dispute.
getNumberOfRounds
Gets the number of rounds of the specific question.
Parameters
_arbitrationID
uint256
The ID of the arbitration related to the question.
Return Values
[0]
uint256
The number of rounds.
getRoundInfo
Gets the information of a round of a question.
Parameters
_arbitrationID
uint256
The ID of the arbitration.
_round
uint256
The round to query.
Return Values
paidFees
uint256[]
The amount of fees paid for each fully funded answer.
feeRewards
uint256
The amount of fees that will be used as rewards.
fundedAnswers
uint256[]
IDs of fully funded answers.
getFundingStatus
Gets the information of a round of a question for a specific answer choice.
Parameters
_arbitrationID
uint256
The ID of the arbitration.
_round
uint256
The round to query.
_answer
uint256
The answer choice to get funding status for.
Return Values
raised
uint256
The amount paid for this answer.
fullyFunded
bool
Whether the answer is fully funded or not.
getContributionsToSuccessfulFundings
Gets contributions to the answers that are fully funded.
Parameters
_arbitrationID
uint256
The ID of the arbitration.
_round
uint256
The round to query.
_contributor
address
The address whose contributions to query.
Return Values
fundedAnswers
uint256[]
IDs of the answers that are fully funded.
contributions
uint256[]
The amount contributed to each funded answer by the contributor.
getTotalWithdrawableAmount
Returns the sum of withdrawable amount.
This function is O(n) where n is the total number of rounds. This could exceed the gas limit, therefore this function should be used only as a utility and not be relied upon by other contracts.
Parameters
_arbitrationID
uint256
The ID of the arbitration.
_beneficiary
address payable
The contributor for which to query.
_contributedTo
uint256
Answer that received contributions from contributor.
Return Values
sum
uint256
The total amount available to withdraw.
questionIDToArbitrationID
Casts question ID into uint256 thus returning the related arbitration ID.
Parameters
_questionID
bytes32
The ID of the question.
Return Values
[0]
uint256
The ID of the arbitration.
externalIDtoLocalID
Maps external (arbitrator side) dispute id to local (arbitrable) dispute id.
Parameters
_externalDisputeID
uint256
Dispute id as in arbitrator side.
Return Values
[0]
uint256
localDisputeID Dispute id as in arbitrable contract.
Last updated