Skip to content
This repository was archived by the owner on Dec 4, 2023. It is now read-only.

Commit 902aeaa

Browse files
committedJun 29, 2021
feat: include resolution tx in request
1 parent 925d71e commit 902aeaa

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed
 

‎schema.graphql

+4-2
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ type Request @entity {
8585
disputeID: BigInt!
8686
"The time the dispute was created."
8787
disputeCreationTime: BigInt!
88-
"The address of the party that challenged the request"
88+
"The address of the party that challenged the request."
8989
challenger: Bytes!
9090
"Tracks each round of a dispute in the form rounds[roundID]."
9191
rounds: [Round!]! @derivedFrom(field: "request")
@@ -95,10 +95,12 @@ type Request @entity {
9595
token: Token!
9696
"The evidences submitted for this request."
9797
evidences: [Evidence!]! @derivedFrom(field: "request")
98-
"The number of evidence submitted"
98+
"The number of evidence submitted."
9999
numberOfEvidences: BigInt!
100100
"The block this request was created."
101101
blockNumber: BigInt!
102+
"The transaction this request was resolved."
103+
resolutionTx: Bytes
102104
}
103105

104106
type Evidence @entity {

‎src/mapping.ts

+2
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ export function handleTokenStatusChange(event: TokenStatusChange): void {
151151

152152
// Request executed.
153153
request.resolutionTime = event.block.timestamp;
154+
request.resolutionTx = event.transaction.hash;
154155
request.result = ACCEPTED;
155156
if (request.type == REGISTRATION_REQUESTED) token.status = REGISTERED;
156157
else token.status = ABSENT;
@@ -257,6 +258,7 @@ export function handleRuling(event: Ruling): void {
257258
}
258259

259260
request.resolutionTime = event.block.timestamp;
261+
request.resolutionTx = event.transaction.hash;
260262
token.disputed = false;
261263
token.appealPeriodStart = BigInt.fromI32(0);
262264
token.appealPeriodEnd = BigInt.fromI32(0);

0 commit comments

Comments
 (0)
This repository has been archived.