@@ -77,5 +77,54 @@ describe('formatters', function () {
77
77
size : 1000
78
78
} ) ;
79
79
} ) ;
80
+
81
+ it ( 'should return the correct value, when baseFeePerGas is present' , function ( ) {
82
+
83
+ assert . deepEqual ( formatters . outputBlockFormatter ( {
84
+ baseFeePerGas : "0x7" ,
85
+ difficulty : "0x6cd6be3a" ,
86
+ extraData : "0x796f75747562652e636f6d2f77617463683f763d6451773477395767586351" ,
87
+ gasLimit : "0x1c9c381" ,
88
+ gasUsed : "0x8dc073" ,
89
+ hash : "0x846880b1158f434884f3637802ed09bac77eafc35b5f03b881ac88ce38a54907" ,
90
+ logsBloom : "0x4020001000000000000000008000010000000000400200000001002140000008000000010000810020000840000204304000081000000b00400010000822200004200020020140000001000882000064000021303200020000400008800000000002202102000084010000090020a8000800002000000010000030300000000000000006001005000040080001010000010040018100004c0050004000000000420000000021000200000010020008100000004000080000000000000040000900080102004002000080210201081014004030200148101000002020108025000018020020102040000204240500010000002200048000401300080088000002" ,
91
+ miner : "0x86864f1edf10eaf105b1bdc6e9aa8232b4c6aa00" ,
92
+ mixHash : "0xa29afb1fa1aea9eeac72ff435a8fc420bbc1fa1be08223eb61f294ee32250bde" ,
93
+ nonce : "0x122af1a5ccd78f3b" ,
94
+ number : "0xa0d600" ,
95
+ parentHash : "0x28f49150e1fe6f245655925b290f59e707d1e5c646dadaa22937169433b30294" ,
96
+ receiptsRoot : "0xc97d4f9980d680053606318a5820261a1dccb556d1056b70f0d48fb384986be5" ,
97
+ sha3Uncles : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" ,
98
+ size : "0x2042" ,
99
+ stateRoot : "0x116981b10423133ade5bd44f03c54cc3c57f4467a1c3d4b0c6d8d33a76c361ad" ,
100
+ timestamp : "0x60dc24ec" ,
101
+ totalDifficulty : "0x78828f2d886cbb" ,
102
+ transactions : [ ] ,
103
+ transactionsRoot : "0x738f53f745d58169da93ebbd52cc49e0c979d6ca68a6513007b546b19ab78ba4" ,
104
+ uncles : [ ]
105
+ } ) , {
106
+ baseFeePerGas : 7 ,
107
+ difficulty : "1826012730" ,
108
+ extraData : "0x796f75747562652e636f6d2f77617463683f763d6451773477395767586351" ,
109
+ gasLimit : 30000001 ,
110
+ gasUsed : 9289843 ,
111
+ hash : "0x846880b1158f434884f3637802ed09bac77eafc35b5f03b881ac88ce38a54907" ,
112
+ logsBloom : "0x4020001000000000000000008000010000000000400200000001002140000008000000010000810020000840000204304000081000000b00400010000822200004200020020140000001000882000064000021303200020000400008800000000002202102000084010000090020a8000800002000000010000030300000000000000006001005000040080001010000010040018100004c0050004000000000420000000021000200000010020008100000004000080000000000000040000900080102004002000080210201081014004030200148101000002020108025000018020020102040000204240500010000002200048000401300080088000002" ,
113
+ miner : "0x86864F1edf10eAf105b1BDC6E9aA8232B4c6aA00" ,
114
+ mixHash : "0xa29afb1fa1aea9eeac72ff435a8fc420bbc1fa1be08223eb61f294ee32250bde" ,
115
+ nonce : "0x122af1a5ccd78f3b" ,
116
+ number : 10540544 ,
117
+ parentHash : "0x28f49150e1fe6f245655925b290f59e707d1e5c646dadaa22937169433b30294" ,
118
+ receiptsRoot : "0xc97d4f9980d680053606318a5820261a1dccb556d1056b70f0d48fb384986be5" ,
119
+ sha3Uncles : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" ,
120
+ size : 8258 ,
121
+ stateRoot : "0x116981b10423133ade5bd44f03c54cc3c57f4467a1c3d4b0c6d8d33a76c361ad" ,
122
+ timestamp : 1625040108 ,
123
+ totalDifficulty : "33920548661128379" ,
124
+ transactions : [ ] ,
125
+ transactionsRoot : "0x738f53f745d58169da93ebbd52cc49e0c979d6ca68a6513007b546b19ab78ba4" ,
126
+ uncles : [ ]
127
+ } ) ;
128
+ } ) ;
80
129
} ) ;
81
130
} ) ;
0 commit comments