kleros / stake-curate

Curate with indefinite, capital-efficient stake.
8 stars 3 forks source link

Figure out how to deal with Property Types #39

Open greenlucid opened 2 years ago

greenlucid commented 2 years ago

Classic / Light Curate dealt with property types through a gtcr-encoder library. Stake Curate could curate these property types on a curated list, or accept them as PRs. So far, the subgraph does not interact with the types in any way. The type is just a tag for the frontend to interpret, and the value is always encoded as a string.

Ideas for new types:

Enum

MetaList will contain a property type such as Enum("Thing", "Stuff", "Car"). The property type on itself contains the possible options for the enum. This will make the frontend render a selector on creation / edit. On display, it shows if the value doesn't belong to the enum.

Rich address

Could very well be interpreted through CAIP-10. The acceptable addresses could be curated themselves, although it'd be simpler to add them in the form of PRs.

List

Just a number that references a List. The frontend displays a link to the List, labelled according to it's name or showing that's invalid (not existing yet, or incorrect name). On submitting, it should autocomplete to show the fact that the list exists, etc.

Item

Just a number that references an Item. Same deal with List.

greenlucid commented 2 years ago

Date

Regular UNIX seconds timestamp, renders as a readable date, that you can click to show specific date or difference with current time (e.g. "3 days ago", or "in 4 days").

Time

Duration expressed in seconds. Renders as a readable time approximation