Skip to main content

Curate Classic: Integration for Devs

This covers Curate Classic (V1) with on-chain storage. For the newer Light Curate with subgraph-based storage, see Light Curate Integration. For V2 Curate, see the Developers Curate section.

Overview

Curate Classic is the original version of Kleros Curate. All item data (apart from files/images) is stored on-chain in contract storage. This means other contracts can query the TCR for field values directly, but deployment and operation costs are higher. Key characteristics:
  • Item data stored on-chain as encoded bytes
  • Requires @kleros/gtcr-encoder to encode/decode items
  • Client must sync by downloading every item and decoding it
  • Higher gas costs (O(n) storage)
  • Other contracts can read item fields directly

Reading Data

Using the Subgraph

Use the items entity (not litems, which is for Light Curate):
The data field contains encoded bytes. Decode using @kleros/gtcr-encoder.

Using the Encoder


Writing Data

Submitting an Item

Encode the item fields and call addItem() on the GeneralizedTCR contract with the required deposit.

Challenging an Item

Call challengeRequest() on the contract with a deposit. The challenge creates a dispute in Kleros Court.

Executing Requests

Call executeRequest() after the challenge period passes without a challenge.

Resources

Curate Classic Contracts

Source code

Subgraph

legacy-curate-mainnet subgraph on Graph Explorer