mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-16 17:03: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
|
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
|
// BlockFilterCriteria encapsulates criteria passed to a `logs` accessor inside
|
||||||
// a block.
|
// a block.
|
||||||
type BlockFilterCriteria struct {
|
type BlockFilterCriteria struct {
|
||||||
|
|
|
||||||
|
|
@ -276,6 +276,11 @@ const schema string = `
|
||||||
blobGasUsed: Long
|
blobGasUsed: Long
|
||||||
# ExcessBlobGas is a running total of blob gas consumed in excess of the target, prior to the block.
|
# ExcessBlobGas is a running total of blob gas consumed in excess of the target, prior to the block.
|
||||||
excessBlobGas: Long
|
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.
|
# CallData represents the data associated with a local contract call.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue