|
| 1 | +enum Status { |
| 2 | + "The item is not registered on the TCR and there are no pending requests." |
| 3 | + absent |
| 4 | + "The item is registered and there are no pending requests." |
| 5 | + registered |
| 6 | + "The item is not registered on the TCR, but there is a pending registration request." |
| 7 | + registrationRequested |
| 8 | + "The item is registered on the TCR, but there is a pending removal request. These are sometimes also called removal requests." |
| 9 | + clearingRequested |
| 10 | +} |
| 11 | + |
| 12 | +enum Ruling { |
| 13 | + "The arbitrator did not rule or refused to rule." |
| 14 | + None |
| 15 | + "The arbitrator ruled in favor of the requester." |
| 16 | + Accept |
| 17 | + "The arbitrator in favor of the challenger." |
| 18 | + Reject |
| 19 | +} |
| 20 | + |
| 21 | +type Arbitrator @entity { |
| 22 | + "The address of the arbitrator" |
| 23 | + id: ID! |
| 24 | +} |
| 25 | + |
| 26 | +type Counter @entity { |
| 27 | + id: ID! |
| 28 | + totalRegistries: BigInt! |
| 29 | + totalItems: BigInt! |
| 30 | + totalDeposits: BigInt! |
| 31 | + numberOfCurators: BigInt! |
| 32 | +} |
| 33 | + |
| 34 | +type User @entity { |
| 35 | + id: ID! # address |
| 36 | + registry: [Registry!]! @derivedFrom(field: "registerer") |
| 37 | + items: [Item!]! @derivedFrom(field: "registerer") |
| 38 | + requests: [Request!]! @derivedFrom(field: "requester") |
| 39 | + challenges: [Request!]! @derivedFrom(field: "challenger") |
| 40 | +} |
| 41 | + |
| 42 | +type Registry @entity { |
| 43 | + "The registry address" |
| 44 | + id: ID! |
| 45 | + "The items submitted to this list" |
| 46 | + items: [Item!]! @derivedFrom(field: "registry") |
| 47 | + "The requests submitted to this list" |
| 48 | + requests: [Request!]! @derivedFrom(field: "registry") |
| 49 | + "Connected TCR. Can be the 0 address. In practice, will never be null." |
| 50 | + connectedTCR: Bytes |
| 51 | + "The address that registered the curate" |
| 52 | + registerer: User! |
| 53 | +} |
| 54 | + |
| 55 | +type Item @entity { |
| 56 | + "The id of the item in the subgraph entity. Format: <itemID>@<listaddress_lowercase>" |
| 57 | + id: ID! |
| 58 | + "The ID of the item in the registry. Also the keccak256 hash of the data." |
| 59 | + itemID: Bytes! |
| 60 | + "The data describing the item." |
| 61 | + data: String! |
| 62 | + "The parsed data describing the item." |
| 63 | + props: [ItemProp!]! @derivedFrom(field: "item") |
| 64 | + "First indexable value of the json file." |
| 65 | + key0: String |
| 66 | + "Second indexable value of the json file." |
| 67 | + key1: String |
| 68 | + "Third indexable value of the json file." |
| 69 | + key2: String |
| 70 | + "Fourth indexable value of the json file." |
| 71 | + key3: String |
| 72 | + "Fifth indexable value of the json file." |
| 73 | + key4: String |
| 74 | + "The item identifiers combined as a single string." |
| 75 | + keywords: String |
| 76 | + "The current status of the item." |
| 77 | + status: Status! |
| 78 | + "List of status change requests made for the item in the form requests[requestID]." |
| 79 | + requests: [Request!]! @derivedFrom(field: "item") |
| 80 | + "The total number of requests for this item." |
| 81 | + numberOfRequests: BigInt! |
| 82 | + "The registry where this item was submitted." |
| 83 | + registry: Registry! |
| 84 | + "The address of the registry this item was submitted. Redundant with registry field to allow use in conditionals." |
| 85 | + registryAddress: Bytes! |
| 86 | + "Time when the latest request was made." |
| 87 | + latestRequestSubmissionTime: BigInt! |
| 88 | + "The time the latest request was resolved." |
| 89 | + latestRequestResolutionTime: BigInt! |
| 90 | + "Whether the item is currently disputed." |
| 91 | + disputed: Boolean! |
| 92 | + "The account that made the latest request to the item." |
| 93 | + latestRequester: User |
| 94 | + "The account that challenged the latest request, if any." |
| 95 | + latestChallenger: User |
| 96 | + "The user that requested the first request / registration" |
| 97 | + registerer: User! |
| 98 | +} |
| 99 | + |
| 100 | +type _Schema_ |
| 101 | + @fulltext( |
| 102 | + name: "itemSearch" |
| 103 | + language: en |
| 104 | + algorithm: rank |
| 105 | + include: [{ entity: "Item", fields: [{ name: "keywords" }] }] |
| 106 | + ) |
| 107 | + |
| 108 | +type ItemProp @entity { |
| 109 | + id: ID! |
| 110 | + type: String! |
| 111 | + label: String! |
| 112 | + description: String! |
| 113 | + isIdentifier: Boolean! |
| 114 | + value: String |
| 115 | + item: Item! |
| 116 | +} |
| 117 | + |
| 118 | +type Request @entity { |
| 119 | + "The item ID (which is the keccak256 hash of its data)." |
| 120 | + id: ID! |
| 121 | + "True if a dispute was raised." |
| 122 | + disputed: Boolean! |
| 123 | + "ID of the dispute, if any." |
| 124 | + disputeID: BigInt! |
| 125 | + "Time when the request was made. Used to track when the challenge period ends." |
| 126 | + submissionTime: BigInt! |
| 127 | + "True if the request was executed and/or any raised disputes were resolved." |
| 128 | + resolved: Boolean! |
| 129 | + "The party that made a request" |
| 130 | + requester: User! |
| 131 | + "The party that challenged the request" |
| 132 | + challenger: User |
| 133 | + "The arbitrator trusted to solve disputes for this request." |
| 134 | + arbitrator: Bytes! |
| 135 | + "The extra data for the trusted arbitrator of this request." |
| 136 | + arbitratorExtraData: Bytes! |
| 137 | + "The deposit that would be awarded to the challenger if challenge is successful" |
| 138 | + deposit: BigInt! |
| 139 | + "The outcome of the dispute, if any. Note that unsuccessful appeal fundings can invert the arbitrator ruling (so this may differ from the ruling given by the arbitrator)." |
| 140 | + disputeOutcome: Ruling! |
| 141 | + "Whether it was requested to add or remove the item to/from the list." |
| 142 | + requestType: Status! |
| 143 | + "The item this request belongs to." |
| 144 | + item: Item! |
| 145 | + "The registry where this request was submitted." |
| 146 | + registry: Registry! |
| 147 | + "The address of the registry this item was submitted. Redundant with registry field to allow use in conditionals." |
| 148 | + registryAddress: Bytes! |
| 149 | + "The time the request was resolved." |
| 150 | + resolutionTime: BigInt! |
| 151 | + "Only set if the request was settled by a dispute. Used by the twitter bot" |
| 152 | + finalRuling: BigInt |
| 153 | + "The hash of the transaction that created this request." |
| 154 | + creationTx: Bytes! |
| 155 | + "The hash of the transaction that solved this request." |
| 156 | + resolutionTx: Bytes |
| 157 | +} |
0 commit comments