From cc9692091dedaedc95e54ae6d1bde2a22eef9996 Mon Sep 17 00:00:00 2001 From: Sina M <1591639+s1na@users.noreply.github.com> Date: Wed, 18 Dec 2024 16:08:52 +0100 Subject: [PATCH] graphql: add fields for eip-4844 (#468) --- graphql.json | 80 +++++++++++++++++++++++++++++++++++++++++++++++++ schema.graphqls | 26 ++++++++++++++++ 2 files changed, 106 insertions(+) diff --git a/graphql.json b/graphql.json index c5b61cafa..d52c30c9b 100644 --- a/graphql.json +++ b/graphql.json @@ -782,6 +782,30 @@ }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "blobGasUsed", + "description": "BlobGasUsed is the total amount of gas used by the transactions.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Long", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "excessBlobGas", + "description": "ExcessBlobGas is a running total of blob gas consumed in excess of the target, prior to the block.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Long", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null } ], "inputFields": null, @@ -1882,6 +1906,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "maxFeePerBlobGas", + "description": "MaxFeePerBlobGas is the maximum blob gas fee cap per blob the sender is willing to pay for blob transaction, in wei.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "BigInt", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "effectiveTip", "description": "EffectiveTip is the actual amount of reward going to miner after considering the max fee cap.", @@ -1986,6 +2022,30 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "blobGasUsed", + "description": "BlobGasUsed is the amount of blob gas used by this transaction.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Long", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "blobGasPrice", + "description": "blobGasPrice is the actual value per blob gas deducted from the senders account.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "BigInt", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "createdContract", "description": "CreatedContract is the account that was created by a contract creation\ntransaction. If the transaction was not a contract creation transaction,\nor it has not yet been mined, this field will be null.", @@ -2152,6 +2212,26 @@ }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "blobVersionedHashes", + "description": "BlobVersionedHashes is a set of hash outputs from the blobs in the transaction.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Bytes32", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null } ], "inputFields": null, diff --git a/schema.graphqls b/schema.graphqls index 2ca3c6bc6..b9838bb00 100644 --- a/schema.graphqls +++ b/schema.graphqls @@ -193,6 +193,14 @@ type Block { withdrawals are unavailable for this block, this field will be null. """ withdrawals: [Withdrawal!] + + """BlobGasUsed is the total amount of gas used by the transactions.""" + blobGasUsed: Long + + """ + ExcessBlobGas is a running total of blob gas consumed in excess of the target, prior to the block. + """ + excessBlobGas: Long } """ @@ -466,6 +474,11 @@ type Transaction { """ maxPriorityFeePerGas: BigInt + """ + MaxFeePerBlobGas is the maximum blob gas fee cap per blob the sender is willing to pay for blob transaction, in wei. + """ + maxFeePerBlobGas: BigInt + """ EffectiveTip is the actual amount of reward going to miner after considering the max fee cap. """ @@ -514,6 +527,14 @@ type Transaction { """ effectiveGasPrice: BigInt + """BlobGasUsed is the amount of blob gas used by this transaction.""" + blobGasUsed: Long + + """ + blobGasPrice is the actual value per blob gas deducted from the senders account. + """ + blobGasPrice: BigInt + """ CreatedContract is the account that was created by a contract creation transaction. If the transaction was not a contract creation transaction, @@ -547,6 +568,11 @@ type Transaction { this is equivalent to TxType || ReceiptEncoding. """ rawReceipt: Bytes! + + """ + BlobVersionedHashes is a set of hash outputs from the blobs in the transaction. + """ + blobVersionedHashes: [Bytes32!] } """EIP-4895"""