mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-10 05:53:46 +00:00
graphql: add slotNumber and BALHash to block schema (#35469)
This commit is contained in:
parent
219d2f22a1
commit
3735c34ffe
2 changed files with 16 additions and 0 deletions
|
|
@ -1105,6 +1105,17 @@ func (b *Block) SlotNumber(ctx context.Context) (*hexutil.Uint64, error) {
|
|||
return &ret, nil
|
||||
}
|
||||
|
||||
func (b *Block) BlockAccessListHash(ctx context.Context) (*common.Hash, error) {
|
||||
header, err := b.resolveHeader(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if header.BlockAccessListHash == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return header.BlockAccessListHash, nil
|
||||
}
|
||||
|
||||
// BlockFilterCriteria encapsulates criteria passed to a `logs` accessor inside
|
||||
// a block.
|
||||
type BlockFilterCriteria struct {
|
||||
|
|
|
|||
|
|
@ -276,6 +276,11 @@ const schema string = `
|
|||
blobGasUsed: Long
|
||||
# ExcessBlobGas is a running total of blob gas consumed in excess of the target, prior to the block.
|
||||
excessBlobGas: Long
|
||||
# SlotNumber is the slot number of the block.
|
||||
slotNumber: Long
|
||||
# BlockAccessListHash is the hash of the EIP-7928 block-level access list.
|
||||
# If the access list is unavailable for this block, this field will be null.
|
||||
blockAccessListHash: Bytes32
|
||||
}
|
||||
|
||||
# CallData represents the data associated with a local contract call.
|
||||
|
|
|
|||
Loading…
Reference in a new issue