Skip to content

Commit c5a4846

Browse files
committed
feat: added a simple dispute template, moved IMetaEvidence to the v1 folder
And removed intermediate interfaces
1 parent 4c25bfe commit c5a4846

File tree

8 files changed

+100
-69
lines changed

8 files changed

+100
-69
lines changed

contracts/src/arbitration/IArbitrable.sol

Lines changed: 0 additions & 26 deletions
This file was deleted.

contracts/src/arbitration/IArbitrator.sol

Lines changed: 0 additions & 39 deletions
This file was deleted.

contracts/src/evidence/IMetaEvidence.sol renamed to contracts/src/kleros-v1/interfaces/IEvidenceV1.sol

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,42 @@
22

33
pragma solidity 0.8.18;
44

5-
import "../arbitration/IArbitrator.sol";
5+
/**
6+
* @authors: [@ferittuncer, @hbarcelos]
7+
* @reviewers: []
8+
* @auditors: []
9+
* @bounties: []
10+
* @deployments: []
11+
*/
12+
import "./IArbitratorV1.sol";
613

714
/// @title IMetaEvidence
815
/// ERC-1497: Evidence Standard excluding evidence emission as it will be handled by the arbitrator.
9-
interface IMetaEvidence {
16+
interface IEvidenceV1 {
1017
/// @dev To be emitted when meta-evidence is submitted.
1118
/// @param _metaEvidenceID Unique identifier of meta-evidence.
1219
/// @param _evidence IPFS path to metaevidence, example: '/ipfs/Qmarwkf7C9RuzDEJNnarT3WZ7kem5bk8DZAzx78acJjMFH/metaevidence.json'
1320
event MetaEvidence(uint256 indexed _metaEvidenceID, string _evidence);
1421

22+
/// @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).
23+
/// @param _arbitrator The arbitrator of the contract.
24+
/// @param _evidenceGroupID Unique identifier of the evidence group the evidence belongs to.
25+
/// @param _party The address of the party submiting the evidence. Note that 0x0 refers to evidence not submitted by any party.
26+
/// @param _evidence IPFS path to evidence, example: '/ipfs/Qmarwkf7C9RuzDEJNnarT3WZ7kem5bk8DZAzx78acJjMFH/evidence.json'
27+
event Evidence(
28+
IArbitratorV1 indexed _arbitrator,
29+
uint256 indexed _evidenceGroupID,
30+
address indexed _party,
31+
string _evidence
32+
);
33+
1534
/// @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.
1635
/// @param _arbitrator The arbitrator of the contract.
1736
/// @param _disputeID ID of the dispute in the Arbitrator contract.
1837
/// @param _metaEvidenceID Unique identifier of meta-evidence.
1938
/// @param _evidenceGroupID Unique identifier of the evidence group that is linked to this dispute.
2039
event Dispute(
21-
IArbitrator indexed _arbitrator,
40+
IArbitratorV1 indexed _arbitrator,
2241
uint256 indexed _disputeID,
2342
uint256 _metaEvidenceID,
2443
uint256 _evidenceGroupID

contracts/test/integration/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ describe("Integration tests", async () => {
6565

6666
it("Resolves a dispute on the home chain with no appeal", async () => {
6767
const arbitrationCost = ONE_TENTH_ETH.mul(3);
68-
const [bridger, challenger, relayer] = await ethers.getSigners();
68+
const [, , relayer] = await ethers.getSigners();
6969

7070
await pnk.approve(core.address, ONE_THOUSAND_PNK.mul(100));
7171

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"$schema": "../NewDisputeTemplate.schema.json",
3+
"title": "Let's do this",
4+
"description": "We want to do this: %s",
5+
"question": "Does it comply with the policy?",
6+
"answers": [
7+
{
8+
"title": "Yes",
9+
"description": "Select this if you agree that it must be done."
10+
},
11+
{
12+
"title": "No",
13+
"description": "Select this if you do not agree that it must be done."
14+
}
15+
],
16+
"policyURI": "/ipfs/Qmdvk...rSD6cE/policy.pdf",
17+
"frontendUrl": "https://kleros-v2.netlify.app/#/cases/%s/overview",
18+
"arbitratorChainID": "421613",
19+
"arbitratorAddress": "0xD08Ab99480d02bf9C092828043f611BcDFEA917b",
20+
"category": "Others",
21+
"specification": "KIP001",
22+
"lang": "en_US"
23+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"title": "Let's do this",
3+
"description": "We want to do this: airdrop magic money",
4+
"question": "Does it comply with the policy?",
5+
"type": "single-select",
6+
"answers": [
7+
{
8+
"id": "0x00",
9+
"title": "Invalid/Refuse to Arbitrate",
10+
"reserved": true
11+
},
12+
{
13+
"id": "0x01",
14+
"title": "Yes",
15+
"description": "Select this if you agree that it must be done.",
16+
"reserved": false
17+
},
18+
{
19+
"id": "0x02",
20+
"title": "No",
21+
"description": "Select this if you do not agree that it must be done.",
22+
"reserved": false
23+
}
24+
],
25+
"policyURI": "/ipfs/Qmdvk...rSD6cE/policy.pdf",
26+
"frontendUrl": "https://kleros-v2.netlify.app/#/cases/%s/overview",
27+
"arbitrableChainID": "10200", // Chiado
28+
"arbitrableAddress": "0x22f40371b1d1bd7e6229e33b832cbe00d0b991b2",
29+
"arbitratorChainID": "421613", // ArbitrumGoerli
30+
"arbitratorAddress": "0xD08Ab99480d02bf9C092828043f611BcDFEA917b", // KlerosCore
31+
"category": "Others",
32+
"specification": "KIP001",
33+
"lang": "en_US",
34+
"metadata": {
35+
"aliases": {
36+
"submitter": "0x5B0EdFcD1038746Cc1C1eE3aCdb31feD910B13f4"
37+
}
38+
},
39+
"externalDisputeID": "13", // hash(action)
40+
"arbitrableDisputeID": "3",
41+
"arbitratorDisputeID": "4564",
42+
"disputeTemplateID": "1",
43+
"disputeTemplateHash": "0xD1u9...2254"
44+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
airdrop magic money
2+
3
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"externalDisputeID": "ea6ed15a0867e22f40371b1d1bd7e6229e33b832cbe00d0b991b2da19d4f951a",
3+
"arbitrableDisputeID": "3",
4+
"templateID": "1"
5+
}
6+
7+
// action = "airdrop magic money"
8+
// externalDisputeID = hash(action) = 0xea6ed15a0867e22f40371b1d1bd7e6229e33b832cbe00d0b991b2da19d4f951a

0 commit comments

Comments
 (0)