Skip to main content

Core Data Structures

Item Struct

Request Struct

Arbitration Parameters

Enumerations


Initialization

Initialize Function

Base Deposits Array

Example Initialization

Challenge Period Guidelines:
  • Testnet: 3600 seconds (1 hour)
  • Mainnet: 259200-604800 seconds (3-7 days)

Item Data Format

Items in Curate V2 are stored as a JSON string. The registry’s listMetadata defines the schema via a columns array, and each item matches those columns:
A submitted item must be a JSON object with one key per column label:
The itemID is keccak256(abi.encodePacked(itemJSON)) - the hash of the exact JSON string submitted. The data mappings system uses this column structure to extract {{itemName}} and {{itemDescription}} template variables.

arbitrationParamsIndex - Versioning

Each Request stores a uint24 arbitrationParamsIndex that snapshots the registry’s arbitration parameters at submission time. This is critical: if the governor updates the arbitrator or extraData after a request is submitted, the original parameters are preserved for that request’s challenge and dispute lifecycle. This means:
  • Challengers must use the same arbitrationParamsIndex as the original submission - fetch it from the request before challenging
  • Cost calculations must use the arbitration params at request.arbitrationParamsIndex, not the current params

Registration vs Removal - Separate Dispute Templates

Curate V2 uses two separate dispute templates: one for registration requests and one for removal (clearing) requests. They have different answer logic: Both are set at initialization via TemplateRegistryParams.registrationTemplateParameters and removalTemplateParameters. You must provide both, and they must be consistent with your policy document.

Item Submission

Add Item

Parameters:
  • _item: JSON string matching the registry’s column schema (see Item Data Format above)
Returns:
  • itemID: keccak256 hash of the item string

Calculate Submission Cost

Submission Example


Item Removal

Remove Item

Parameters:
  • _itemID: Hash of the item to remove
  • _evidence: JSON evidence string supporting removal

Removal Example


Challenging Requests

Challenge Request

Parameters:
  • _itemID: Item with pending request
  • _evidence: JSON evidence supporting challenge

Challenge Example

Challenges must be submitted during the challenge period. Check timing before challenging.

Executing Requests

Execute Request

Executes an unchallenged request after the challenge period has passed.

Execution Example


Query Functions

Get Item Info

Get Request Info

View Contract Functions

The CurateView contract provides enhanced batch queries:

View Contract Example


Governor Functions

Configuration Updates

Direct Item Management


Events

Item Lifecycle Events

Dispute Events

Configuration Events


Access Control

Governor Modifier

Relayer Modifier

Combined Access


Security Considerations

  • Uses .send() with 2300 gas limit for refunds
  • State updates occur before external calls
  • No direct .call() usage for ETH transfers
  • Solidity 0.8.24 has built-in overflow protection
  • uint24 arbitrationParamsIndex allows 16,777,215 changes
  • Challenge periods use block.timestamp
  • Can be manipulated ±15 seconds by miners
  • Use sufficiently long periods (hours/days minimum)

Best Practices