File tree Expand file tree Collapse file tree 1 file changed +27
-5
lines changed
packages/indexer/src/tasks Expand file tree Collapse file tree 1 file changed +27
-5
lines changed Original file line number Diff line number Diff line change @@ -24,11 +24,33 @@ export class IndexBlockTaskParametersSerializer {
2424
2525 public toJSON ( parameters : IndexBlockTaskParameters ) : string {
2626 return JSON . stringify ( {
27- block : this . blockMapper . mapOut ( parameters . block ) ,
28- transactions : parameters . block . transactions . map ( ( tx ) =>
29- this . transactionResultMapper . mapOut ( tx )
30- ) ,
31- result : this . blockResultMapper . mapOut ( parameters . result ) ,
27+ block : {
28+ ...this . blockMapper . mapOut ( parameters . block ) ,
29+ beforeBlockStateTransitions :
30+ parameters . block . beforeBlockStateTransitions . map ( ( st ) =>
31+ this . stateTransitionMapper . mapOut ( st )
32+ ) ,
33+ } ,
34+ transactions : parameters . block . transactions . map ( ( tx ) => {
35+ const txMap = this . transactionResultMapper . mapOut ( tx ) ;
36+ const stBatches = this . stateTransitionBatchMapper . mapOut (
37+ tx . stateTransitions
38+ ) ;
39+ return {
40+ ...txMap ,
41+ stateTransitionBatch : stBatches . map ( ( [ batch , sts ] ) => ( {
42+ applied : batch . applied ,
43+ stateTransitions : sts ,
44+ } ) ) ,
45+ } ;
46+ } ) ,
47+ result : {
48+ ...this . blockResultMapper . mapOut ( parameters . result ) ,
49+ afterBlockStateTransitions :
50+ parameters . result . afterBlockStateTransitions . map ( ( st ) =>
51+ this . stateTransitionMapper . mapOut ( st )
52+ ) ,
53+ } ,
3254 } ) ;
3355 }
3456
You can’t perform that action at this time.
0 commit comments