From 554410711f8ef741e5de314f49a527c340414db7 Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Tue, 12 Sep 2023 18:13:38 +0200 Subject: [PATCH] graphql: add fields for eip-4844 --- graphql.json | 80 +++++++++++++++++++++++++++++++++++++++++++++++++ schema.graphqls | 30 +++++++++++++++++-- 2 files changed, 108 insertions(+), 2 deletions(-) diff --git a/graphql.json b/graphql.json index 8e839114..4a2e456c 100644 --- a/graphql.json +++ b/graphql.json @@ -798,6 +798,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, @@ -1898,6 +1922,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.", @@ -2002,6 +2038,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.", @@ -2156,6 +2216,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 59ee6e33..335af22c 100644 --- a/schema.graphqls +++ b/schema.graphqls @@ -189,7 +189,7 @@ type Block { raw: Bytes! """ - WithdrawalsRoot is withdrawals trie root in this block. + WithdrawalsRoot is the withdrawals trie root in this block. If withdrawals are unavailable for this block, this field will be null. """ withdrawalsRoot: Bytes32 @@ -199,6 +199,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 } """ @@ -472,6 +480,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. """ @@ -520,6 +533,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, @@ -552,6 +573,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""" @@ -569,4 +595,4 @@ type Withdrawal { """Amount is the withdrawal value in Gwei.""" amount: Long! -} +} \ No newline at end of file