graphql: add slotNumber and BALHash to block schema (#35469)

This commit is contained in:
cui 2026-08-10 11:34:51 +08:00 committed by GitHub
parent 219d2f22a1
commit 3735c34ffe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 0 deletions

View file

@ -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 {

View file

@ -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.