From 6e944f9c87c308e49c57f8630a97f91a95258ec5 Mon Sep 17 00:00:00 2001 From: Bhanu Pulluri Date: Mon, 30 Sep 2024 13:25:13 -0400 Subject: [PATCH] Add revert reason field in transaction object to graphql spec Signed-off-by: Bhanu Pulluri --- graphql.json | 18 +++++++++++++++++- schema.graphqls | 7 ++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/graphql.json b/graphql.json index c5b61caf..28d2c78f 100644 --- a/graphql.json +++ b/graphql.json @@ -2152,6 +2152,22 @@ }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "revertReason", + "description": "Reason returned when transaction fails.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Bytes", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null } ], "inputFields": null, @@ -3098,4 +3114,4 @@ } ] } -} \ No newline at end of file +} diff --git a/schema.graphqls b/schema.graphqls index 2ca3c6bc..7765609f 100644 --- a/schema.graphqls +++ b/schema.graphqls @@ -547,6 +547,11 @@ type Transaction { this is equivalent to TxType || ReceiptEncoding. """ rawReceipt: Bytes! + + """ + Reason returned when transaction fails. + """ + revertReason: Bytes } """EIP-4895""" @@ -564,4 +569,4 @@ type Withdrawal { """Amount is the withdrawal value in Gwei.""" amount: Long! -} \ No newline at end of file +}