@@ -25,7 +25,7 @@ import type { Block } from '@ethereumjs/block'
2525import type { Common } from '@ethereumjs/common'
2626import type { Log } from '@ethereumjs/evm'
2727import type { TypedTxData } from '@ethereumjs/tx'
28- import type { PrefixedHexString } from '@ethereumjs/util'
28+ import type { CLRequest , CLRequestType , PrefixedHexString } from '@ethereumjs/util'
2929const kzg = new microEthKZG ( trustedSetup )
3030
3131/**
@@ -118,7 +118,7 @@ export class TransitionTool {
118118
119119 const result = await builder . build ( )
120120
121- const convertedOutput = this . getOutput ( result )
121+ const convertedOutput = this . getOutput ( result . block , result . requests )
122122 const alloc = await this . stateTracker . dumpAlloc ( )
123123
124124 this . writeOutput ( args , convertedOutput , alloc )
@@ -195,7 +195,7 @@ export class TransitionTool {
195195 } )
196196 }
197197
198- private getOutput ( block : Block ) : T8NOutput {
198+ private getOutput ( block : Block , requests ?: CLRequest < CLRequestType > [ ] ) : T8NOutput {
199199 const output : T8NOutput = {
200200 stateRoot : bytesToHex ( block . header . stateRoot ) ,
201201 txRoot : bytesToHex ( block . header . transactionsTrie ) ,
@@ -226,8 +226,9 @@ export class TransitionTool {
226226 output . requestsHash = bytesToHex ( block . header . requestsRoot )
227227 }
228228
229- if ( block . requests !== undefined ) {
230- output . requests = block . requests . map ( ( request ) => request . toJSON ( ) )
229+ if ( requests !== undefined ) {
230+ // NOTE: EEST currently wants the raw request bytes, **excluding** the type
231+ output . requests = requests . map ( ( request ) => bytesToHex ( request . bytes . slice ( 1 ) ) )
231232 }
232233
233234 if ( this . rejected . length > 0 ) {
0 commit comments