Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Curate v2 - Dispute Template Mappings #33

Closed
Tracked by #1456
jaybuidl opened this issue May 27, 2024 · 4 comments · Fixed by #44
Closed
Tracked by #1456

Curate v2 - Dispute Template Mappings #33

jaybuidl opened this issue May 27, 2024 · 4 comments · Fixed by #44
Labels

Comments

@jaybuidl
Copy link
Member

For registration and removal

@kemuru
Copy link
Contributor

kemuru commented Jun 17, 2024

DRAFTS: LATEST CURATE V2 data mappings as of JUNE 21th 2024:

(Note: this will not work unless we merge this PR first)

externalDisputeID:

68152692838298474339874139169477393633602191216392212953473825982977611143873

TEMPLATE DATA (it should be dynamic at dispute creation?), as an example to try on the DisputeTemplateView of our court v2:

{
  "$schema": "../NewDisputeTemplate.schema.json",
  "title": "Add a {{itemName}} to {{registryTitle}}",
  "description": "Someone requested to add an {{itemName}} to {{registryTitle}}",
  "question": "Does the {{itemName}} comply with the required criteria?",
  "answers": [
    {
      "title": "Yes, Add It",
      "description": "Select this if you think the {{itemName}} complies with the required criteria and should be added."
    },
    {
      "title": "No, Don't Add It",
      "description": "Select this if you think the {{itemName}} does not comply with the required criteria and should not be added."
    }
  ],
  "policyURI": "{{{policyURI}}}",
  "frontendUrl": "https://master--curate-v2.netlify.app/#/lists/item/{{itemID}}",
  "arbitrableChainID": "421614",
  "arbitrableAddress": "{{arbitrableAddress}}",
  "arbitratorChainID": "421614",
  "arbitratorAddress": "0x??",
  "metadata": {
    "itemName": "{{itemName}}",
    "itemDescription": "{{itemDescription}}",
    "registryTitle": "{{registryTitle}}",
    "registryDescription": "{{registryDescription}}"
  },
  "category": "Curated Lists",
  "version": "1.0"
}

DATA MAPPINGS:

[
  {
    "type": "graphql",
    "endpoint": "https://api.studio.thegraph.com/query/61738/curate-v2-devnet/version/latest",
    "query": "query SearchRequestByDisputeID($externalDisputeID: BigInt!) { requests(where: { externalDisputeID: $externalDisputeID }) { id disputeID submissionTime resolved requester { id } challenger { id } arbitrator arbitratorExtraData deposit disputeOutcome requestType item { id itemID data status registry { id title description policyURI } } } }",
    "variables": {
      "externalDisputeID": "{{externalDisputeID}}"
    },
    "seek": [
      "requests[0].item.registry.title",
      "requests[0].item.registry.description",
      "requests[0].item.registry.policyURI",
      "requests[0].item.id",
      "requests[0].item.data",
      "requests[0].item.status",
      "requests[0].item.registry.id"
    ],
    "populate": [
      "registryTitle",
      "registryDescription",
      "policyURI",
      "itemID",
      "itemData",
      "itemStatus",
      "listAddress"
    ]
  },
  {
    "type": "json",
    "value": "{{{itemData}}}",
    "seek": [
      "columns[0].label",
      "columns[0].description"
    ],
    "populate": [
      "itemName",
      "itemDescription"
    ]
  }
]

@Harman-singh-waraich
Copy link
Contributor

looks good,

There's one issue.
itemID !== item.id

item.id is ${itemID}@${registryAddress}
where itemID is the id of the item in contract


To be fixed in line 13


else we can just swap the frontend url :

  "frontendUrl": "https://curate-v2.kleros.builders/#/lists/item/{{itemID}}@{{listAddress}}",

with :

  "frontendUrl": "https://curate-v2.kleros.builders/#/lists/item/{{itemID}}", 

here itemID = itemIDFromContract@RegistryAddress , which is pretty confusing. I prefer the first one

@jaybuidl
Copy link
Member Author

Removal Dispute Template: same data mappings

@jaybuidl
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants