@@ -436,6 +436,12 @@ export class Block implements BlockParams, Iterable<string> {
436436 */
437437 readonly parentHash ! : string ;
438438
439+ /**
440+ * The hash tree root of the parent beacon block for the given
441+ * execution block. See [[link-eip-4788]].
442+ */
443+ parentBeaconBlockRoot ! : null | string ;
444+
439445 /**
440446 * The nonce.
441447 *
@@ -466,6 +472,18 @@ export class Block implements BlockParams, Iterable<string> {
466472 */
467473 readonly gasUsed ! : bigint ;
468474
475+
476+ /**
477+ * The root hash for the global state after applying changes
478+ * in this block.
479+ */
480+ readonly stateRoot ! : null | string ;
481+
482+ /**
483+ * The hash of the transaction receipts trie.
484+ */
485+ readonly receiptsRoot ! : null | string ;
486+
469487 /**
470488 * The total amount of blob gas consumed by the transactions
471489 * within the block. See [[link-eip-4844]].
@@ -524,6 +542,7 @@ export class Block implements BlockParams, Iterable<string> {
524542 timestamp : block . timestamp ,
525543
526544 parentHash : block . parentHash ,
545+ parentBeaconBlockRoot : block . parentBeaconBlockRoot ,
527546
528547 nonce : block . nonce ,
529548 difficulty : block . difficulty ,
@@ -535,7 +554,10 @@ export class Block implements BlockParams, Iterable<string> {
535554 miner : block . miner ,
536555 extraData : block . extraData ,
537556
538- baseFeePerGas : getValue ( block . baseFeePerGas )
557+ baseFeePerGas : getValue ( block . baseFeePerGas ) ,
558+
559+ stateRoot : block . stateRoot ,
560+ receiptsRoot : block . receiptsRoot ,
539561 } ) ;
540562 }
541563
@@ -578,7 +600,8 @@ export class Block implements BlockParams, Iterable<string> {
578600 toJSON ( ) : any {
579601 const {
580602 baseFeePerGas, difficulty, extraData, gasLimit, gasUsed, hash,
581- miner, nonce, number, parentHash, timestamp, transactions
603+ miner, nonce, number, parentHash, parentBeaconBlockRoot,
604+ stateRoot, receiptsRoot, timestamp, transactions
582605 } = this ;
583606
584607 return {
@@ -591,6 +614,7 @@ export class Block implements BlockParams, Iterable<string> {
591614 blobGasUsed : toJson ( this . blobGasUsed ) ,
592615 excessBlobGas : toJson ( this . excessBlobGas ) ,
593616 hash, miner, nonce, number, parentHash, timestamp,
617+ parentBeaconBlockRoot, stateRoot, receiptsRoot,
594618 transactions,
595619 } ;
596620 }
0 commit comments