|
| 1 | +enum Status { |
| 2 | + """ |
| 3 | + Session has no dispute. |
| 4 | + """ |
| 5 | + NoDispute |
| 6 | + """ |
| 7 | + Session has an active dispute. |
| 8 | + """ |
| 9 | + DisputeCreated |
| 10 | + """ |
| 11 | + Session has a resolved dispute. |
| 12 | + """ |
| 13 | + Resolved |
| 14 | +} |
| 15 | + |
| 16 | +type MetaEvidence @entity { |
| 17 | + """ |
| 18 | + Meta evidence ID. |
| 19 | + """ |
| 20 | + id: ID! |
| 21 | + """ |
| 22 | + URI of the meta evidence file. |
| 23 | + """ |
| 24 | + URI: String! |
| 25 | +} |
| 26 | + |
1 | 27 | type Contract @entity {
|
2 | 28 | """
|
3 |
| - The singleton entity's ID, "0". |
| 29 | + Singleton entity ID, "0". |
4 | 30 | """
|
5 | 31 | id: ID!
|
| 32 | + """ |
| 33 | + Deployer. |
| 34 | + """ |
| 35 | + deployer: Bytes! |
| 36 | + """ |
| 37 | + Sum of reserved ETH for rewards. |
| 38 | + """ |
| 39 | + reservedETH: BigInt! |
| 40 | + """ |
| 41 | + Base deposit required for submission. |
| 42 | + """ |
| 43 | + submissionBaseDeposit: BigInt! |
| 44 | + """ |
| 45 | + Time in seconds for submission. |
| 46 | + """ |
| 47 | + submissionTimeout: BigInt! |
| 48 | + """ |
| 49 | + Time in seconds for execution. |
| 50 | + """ |
| 51 | + executionTimeout: BigInt! |
| 52 | + """ |
| 53 | + Time in seconds for withdrawal. |
| 54 | + """ |
| 55 | + withdrawTimeout: BigInt! |
| 56 | + """ |
| 57 | + Multiplier for calculating the fee stake that must be paid in a case where there is no winner or loser. |
| 58 | + """ |
| 59 | + sharedMultiplier: BigInt! |
| 60 | + """ |
| 61 | + Multiplier for calculating the fee stake paid by the party that won the previous round. |
| 62 | + """ |
| 63 | + winnerMultiplier: BigInt! |
| 64 | + """ |
| 65 | + Multiplier for calculating the fee stake paid by the party that lost the previous round. |
| 66 | + """ |
| 67 | + loserMultiplier: BigInt! |
| 68 | + """ |
| 69 | + Time of the last approval of a submission. |
| 70 | + """ |
| 71 | + lastApprovalTime: BigInt! |
| 72 | + """ |
| 73 | + Number of times the meta evidence has been updated. Used to track the latest meta evidence ID. |
| 74 | + """ |
| 75 | + metaEvidenceUpdates: BigInt! |
| 76 | + """ |
| 77 | + First submission that paid appeal fees in the last dispute. |
| 78 | + """ |
| 79 | + shadowWinner: Submission |
| 80 | + """ |
| 81 | + The current meta evidence. |
| 82 | + """ |
| 83 | + metaEvidence: MetaEvidence! |
| 84 | +} |
| 85 | + |
| 86 | +type Session @entity { |
| 87 | + """ |
| 88 | + Creation time. |
| 89 | + """ |
| 90 | + creationTime: BigInt! |
| 91 | + """ |
| 92 | + Session ID. |
| 93 | + """ |
| 94 | + id: ID! |
| 95 | + """ |
| 96 | + Ruling, if any. |
| 97 | + """ |
| 98 | + ruling: BigInt |
| 99 | + """ |
| 100 | + Dispute ID, if any. |
| 101 | + """ |
| 102 | + disputeID: BigInt |
| 103 | + """ |
| 104 | + Total deposits balance. This is used to calculate rewards. |
| 105 | + """ |
| 106 | + sumDeposit: BigInt! |
| 107 | + """ |
| 108 | + Status. |
| 109 | + """ |
| 110 | + status: Status! |
| 111 | + """ |
| 112 | + Cooldown period after every submission. This gives time for people to inspect and potentially challenge submissions. |
| 113 | + """ |
| 114 | + durationOffset: BigInt! |
| 115 | + """ |
| 116 | + Submissions. |
| 117 | + """ |
| 118 | + submissions: [Submission!]! @derivedFrom(field: "session") |
| 119 | + """ |
| 120 | + Number of submissions. |
| 121 | + """ |
| 122 | + submissionsLength: BigInt! |
| 123 | + """ |
| 124 | + Rounds. |
| 125 | + """ |
| 126 | + rounds: [Round!]! @derivedFrom(field: "session") |
| 127 | + """ |
| 128 | + Number of rounds. |
| 129 | + """ |
| 130 | + roundsLength: BigInt! |
| 131 | +} |
| 132 | + |
| 133 | +type Submission @entity { |
| 134 | + """ |
| 135 | + Creation time. |
| 136 | + """ |
| 137 | + creationTime: BigInt! |
| 138 | + """ |
| 139 | + Session the submission is for. |
| 140 | + """ |
| 141 | + session: Session! |
| 142 | + """ |
| 143 | + Submission ID. |
| 144 | + """ |
| 145 | + id: ID! |
| 146 | + """ |
| 147 | + Submitter. |
| 148 | + """ |
| 149 | + submitter: Bytes! |
| 150 | + """ |
| 151 | + Deposit. |
| 152 | + """ |
| 153 | + deposit: BigInt! |
| 154 | + """ |
| 155 | + Transactions hashed in a chain. |
| 156 | + """ |
| 157 | + listHash: Bytes! |
| 158 | + """ |
| 159 | + True, if the submission was accepted for execution. |
| 160 | + """ |
| 161 | + approved: Boolean! |
| 162 | + """ |
| 163 | + Time when the submission was approved, if any. |
| 164 | + """ |
| 165 | + approvalTime: BigInt |
| 166 | + """ |
| 167 | + Transactions. |
| 168 | + """ |
| 169 | + transactions: [Transaction!]! @derivedFrom(field: "submission") |
| 170 | + """ |
| 171 | + Number of transactions. |
| 172 | + """ |
| 173 | + transactionsLength: BigInt! |
| 174 | +} |
| 175 | + |
| 176 | +type Transaction @entity { |
| 177 | + """ |
| 178 | + Creation time. |
| 179 | + """ |
| 180 | + creationTime: BigInt! |
| 181 | + """ |
| 182 | + Submission the transaction is for. |
| 183 | + """ |
| 184 | + submission: Submission! |
| 185 | + """ |
| 186 | + Transaction ID, keccak256(submissionID) + submissionTransactionsLength. |
| 187 | + """ |
| 188 | + id: ID! |
| 189 | + """ |
| 190 | + Address to call. |
| 191 | + """ |
| 192 | + target: Bytes! |
| 193 | + """ |
| 194 | + Value to call with. |
| 195 | + """ |
| 196 | + value: BigInt! |
| 197 | + """ |
| 198 | + Data to call with. |
| 199 | + """ |
| 200 | + data: Bytes! |
| 201 | + """ |
| 202 | + True, if the transaction was executed. |
| 203 | + """ |
| 204 | + executed: Boolean! |
| 205 | +} |
| 206 | + |
| 207 | +type Round @entity { |
| 208 | + """ |
| 209 | + Creation time. |
| 210 | + """ |
| 211 | + creationTime: BigInt! |
| 212 | + """ |
| 213 | + Session the round is for. |
| 214 | + """ |
| 215 | + session: Session! |
| 216 | + """ |
| 217 | + Round ID, keccak256(sessionID, sessionRoundsLength). |
| 218 | + """ |
| 219 | + id: ID! |
| 220 | + """ |
| 221 | + Fees paid by each side in the round. |
| 222 | + """ |
| 223 | + paidFees: [BigInt!]! |
| 224 | + """ |
| 225 | + True, for sides that have fully paid their fee. |
| 226 | + """ |
| 227 | + hasPaid: [Boolean!]! |
| 228 | + """ |
| 229 | + Sum of reimbursable fees and stake rewards available to the parties that made contributions to the side that ultimately won. |
| 230 | + """ |
| 231 | + feeRewards: BigInt! |
| 232 | + """ |
| 233 | + Sum of already reimbursed fees and rewarded stakes. |
| 234 | + """ |
| 235 | + successfullyPaid: BigInt! |
| 236 | + """ |
| 237 | + Contributions for the round. |
| 238 | + """ |
| 239 | + contributions: [Contribution!]! @derivedFrom(field: "round") |
| 240 | + """ |
| 241 | + Number of contributions. |
| 242 | + """ |
| 243 | + contributionsLength: BigInt! |
| 244 | +} |
| 245 | + |
| 246 | +type Contribution @entity { |
| 247 | + """ |
| 248 | + Creation time. |
| 249 | + """ |
| 250 | + creationTime: BigInt! |
| 251 | + """ |
| 252 | + Round the contribution is for. |
| 253 | + """ |
| 254 | + round: Round! |
| 255 | + """ |
| 256 | + Contribution's ID, keccak256(roundID, contributor). |
| 257 | + """ |
| 258 | + id: ID! |
| 259 | + """ |
| 260 | + Address of the contributor. |
| 261 | + """ |
| 262 | + contributor: Bytes! |
| 263 | + """ |
| 264 | + Contributions for each side. |
| 265 | + """ |
| 266 | + values: [BigInt!]! |
6 | 267 | }
|
0 commit comments