diff --git a/graphql.json b/graphql.json index a4ff7b846..8e8391142 100644 --- a/graphql.json +++ b/graphql.json @@ -766,6 +766,38 @@ }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "withdrawalsRoot", + "description": "WithdrawalsRoot is the withdrawals trie root in this block.\nIf withdrawals are unavailable for this block, this field will be null.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Bytes32", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "withdrawals", + "description": "Withdrawals is a list of withdrawals associated with this block. If\nwithdrawals are unavailable for this block, this field will be null.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Withdrawal", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null } ], "inputFields": null, @@ -2131,6 +2163,81 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "Withdrawal", + "description": "EIP-4895", + "fields": [ + { + "name": "index", + "description": "Index is a monotonically increasing identifier issued by consensus layer.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Long", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "validator", + "description": "Validator is index of the validator associated with withdrawal.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Long", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "address", + "description": "Recipient address of the withdrawn amount.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Address", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "amount", + "description": "Amount is the withdrawal value in Gwei.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Long", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, { "kind": "OBJECT", "name": "__Directive", diff --git a/schema.graphqls b/schema.graphqls index 8e2058010..59ee6e335 100644 --- a/schema.graphqls +++ b/schema.graphqls @@ -32,7 +32,9 @@ type Account { storage(slot: Bytes32!): Bytes32! } -"""Address is a 20 byte Ethereum address, represented as 0x-prefixed hexadecimal.""" +""" +Address is a 20 byte Ethereum address, represented as 0x-prefixed hexadecimal. +""" scalar Address """ @@ -185,6 +187,18 @@ type Block { """Raw is the RLP encoding of the block.""" raw: Bytes! + + """ + WithdrawalsRoot is withdrawals trie root in this block. + If withdrawals are unavailable for this block, this field will be null. + """ + withdrawalsRoot: Bytes32 + + """ + Withdrawals is a list of withdrawals associated with this block. If + withdrawals are unavailable for this block, this field will be null. + """ + withdrawals: [Withdrawal!] } """ @@ -220,7 +234,9 @@ An empty byte string is represented as '0x'. Byte strings must have an even numb """ scalar Bytes -"""Bytes32 is a 32 byte binary string, represented as 0x-prefixed hexadecimal.""" +""" +Bytes32 is a 32 byte binary string, represented as 0x-prefixed hexadecimal. +""" scalar Bytes32 """ @@ -537,3 +553,20 @@ type Transaction { """ rawReceipt: Bytes! } + +"""EIP-4895""" +type Withdrawal { + """ + Index is a monotonically increasing identifier issued by consensus layer. + """ + index: Long! + + """Validator is index of the validator associated with withdrawal.""" + validator: Long! + + """Recipient address of the withdrawn amount.""" + address: Address! + + """Amount is the withdrawal value in Gwei.""" + amount: Long! +}