Curate v2 - Dispute Template Mappings
Closed this issue · 4 comments
jaybuidl commented
For registration and removal
kemuru commented
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 commented
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 commented
Removal Dispute Template: same data mappings