Skip to content

Commit

Permalink
Merge pull request #50 from kleros/fix/small-fixes
Browse files Browse the repository at this point in the history
fix(ForeignProxy): store dispute block
  • Loading branch information
unknownunknown1 authored Oct 30, 2024
2 parents 463e5a9 + 45db420 commit a685ebe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ module.exports = {
apiKey: {
chiado: process.env.GNOSIS_API_KEY,
xdai: process.env.GNOSIS_API_KEY,
mainnent: process.env.ETHERSCAN_API_KEY,
mainnet: process.env.ETHERSCAN_API_KEY,
sepolia: process.env.ETHERSCAN_API_KEY,
},
},
Expand Down
2 changes: 2 additions & 0 deletions contracts/src/RealitioForeignArbitrationProxy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ contract RealitioForeignArbitrationProxy is IForeignArbitrationProxy {

/// @dev Whether a dispute has already been created for the given question ID or not. questionIDToDisputeExists[questionID]
mapping(bytes32 => bool) public questionIDToDisputeExists;
mapping(uint256 => uint256) public arbitrationCreatedBlock; // Block of dispute creation. arbitrationCreatedBlock[disputeID]

modifier onlyArbitrator() {
require(msg.sender == address(arbitrator), "Only arbitrator allowed");
Expand Down Expand Up @@ -159,6 +160,7 @@ contract RealitioForeignArbitrationProxy is IForeignArbitrationProxy {
disputeDetails.requester = _requester;

questionIDToDisputeExists[_questionID] = true;
arbitrationCreatedBlock[disputeID] = block.number;

// At this point, arbitration.deposit is guaranteed to be greater than or equal to the arbitration cost.
uint256 remainder = arbitration.deposit - arbitrationCost;
Expand Down

0 comments on commit a685ebe

Please sign in to comment.