@@ -168,10 +168,10 @@ TEST_F(tracing, trace)
168
168
trace_stream << ' \n ' ;
169
169
EXPECT_EQ (trace (add (2 , 3 )), R"(
170
170
{"depth":0,"rev":"Berlin","static":false}
171
- {"pc":0,"op":96,"opName":"PUSH1","gas":1000000 ,"stack":[],"memorySize":0}
172
- {"pc":2,"op":96,"opName":"PUSH1","gas":999997 ,"stack":["0x3"],"memorySize":0}
173
- {"pc":4,"op":1,"opName":"ADD","gas":999994 ,"stack":["0x3","0x2"],"memorySize":0}
174
- {"error":null,"gas":999991 ,"gasUsed":9 ,"output":""}
171
+ {"pc":0,"op":96,"opName":"PUSH1","gas":0xf4240 ,"stack":[],"memorySize":0}
172
+ {"pc":2,"op":96,"opName":"PUSH1","gas":0xf423d ,"stack":["0x3"],"memorySize":0}
173
+ {"pc":4,"op":1,"opName":"ADD","gas":0xf423a ,"stack":["0x3","0x2"],"memorySize":0}
174
+ {"error":null,"gas":0xf4237 ,"gasUsed":0x9 ,"output":""}
175
175
)" );
176
176
}
177
177
@@ -183,14 +183,14 @@ TEST_F(tracing, trace_stack)
183
183
trace_stream << ' \n ' ;
184
184
EXPECT_EQ (trace (code), R"(
185
185
{"depth":0,"rev":"Berlin","static":false}
186
- {"pc":0,"op":96,"opName":"PUSH1","gas":1000000 ,"stack":[],"memorySize":0}
187
- {"pc":2,"op":96,"opName":"PUSH1","gas":999997 ,"stack":["0x1"],"memorySize":0}
188
- {"pc":4,"op":96,"opName":"PUSH1","gas":999994 ,"stack":["0x1","0x2"],"memorySize":0}
189
- {"pc":6,"op":96,"opName":"PUSH1","gas":999991 ,"stack":["0x1","0x2","0x3"],"memorySize":0}
190
- {"pc":8,"op":1,"opName":"ADD","gas":999988 ,"stack":["0x1","0x2","0x3","0x4"],"memorySize":0}
191
- {"pc":9,"op":1,"opName":"ADD","gas":999985 ,"stack":["0x1","0x2","0x7"],"memorySize":0}
192
- {"pc":10,"op":1,"opName":"ADD","gas":999982 ,"stack":["0x1","0x9"],"memorySize":0}
193
- {"error":null,"gas":999979 ,"gasUsed":21 ,"output":""}
186
+ {"pc":0,"op":96,"opName":"PUSH1","gas":0xf4240 ,"stack":[],"memorySize":0}
187
+ {"pc":2,"op":96,"opName":"PUSH1","gas":0xf423d ,"stack":["0x1"],"memorySize":0}
188
+ {"pc":4,"op":96,"opName":"PUSH1","gas":0xf423a ,"stack":["0x1","0x2"],"memorySize":0}
189
+ {"pc":6,"op":96,"opName":"PUSH1","gas":0xf4237 ,"stack":["0x1","0x2","0x3"],"memorySize":0}
190
+ {"pc":8,"op":1,"opName":"ADD","gas":0xf4234 ,"stack":["0x1","0x2","0x3","0x4"],"memorySize":0}
191
+ {"pc":9,"op":1,"opName":"ADD","gas":0xf4231 ,"stack":["0x1","0x2","0x7"],"memorySize":0}
192
+ {"pc":10,"op":1,"opName":"ADD","gas":0xf422e ,"stack":["0x1","0x9"],"memorySize":0}
193
+ {"error":null,"gas":0xf422b ,"gasUsed":0x15 ,"output":""}
194
194
)" );
195
195
}
196
196
@@ -202,8 +202,8 @@ TEST_F(tracing, trace_error)
202
202
trace_stream << ' \n ' ;
203
203
EXPECT_EQ (trace (code), R"(
204
204
{"depth":0,"rev":"Berlin","static":false}
205
- {"pc":0,"op":80,"opName":"POP","gas":1000000 ,"stack":[],"memorySize":0}
206
- {"error":"stack underflow","gas":0 ,"gasUsed":1000000 ,"output":""}
205
+ {"pc":0,"op":80,"opName":"POP","gas":0xf4240 ,"stack":[],"memorySize":0}
206
+ {"error":"stack underflow","gas":0x0 ,"gasUsed":0xf4240 ,"output":""}
207
207
)" );
208
208
}
209
209
@@ -215,13 +215,13 @@ TEST_F(tracing, trace_output)
215
215
trace_stream << ' \n ' ;
216
216
EXPECT_EQ (trace (code), R"(
217
217
{"depth":0,"rev":"Berlin","static":false}
218
- {"pc":0,"op":98,"opName":"PUSH3","gas":1000000 ,"stack":[],"memorySize":0}
219
- {"pc":4,"op":96,"opName":"PUSH1","gas":999997 ,"stack":["0xabcdef"],"memorySize":0}
220
- {"pc":6,"op":82,"opName":"MSTORE","gas":999994 ,"stack":["0xabcdef","0x0"],"memorySize":0}
221
- {"pc":7,"op":96,"opName":"PUSH1","gas":999988 ,"stack":[],"memorySize":32}
222
- {"pc":9,"op":96,"opName":"PUSH1","gas":999985 ,"stack":["0x20"],"memorySize":32}
223
- {"pc":11,"op":243,"opName":"RETURN","gas":999982 ,"stack":["0x20","0x0"],"memorySize":32}
224
- {"error":null,"gas":999982 ,"gasUsed":18 ,"output":"0000000000000000000000000000000000000000000000000000000000abcdef"}
218
+ {"pc":0,"op":98,"opName":"PUSH3","gas":0xf4240 ,"stack":[],"memorySize":0}
219
+ {"pc":4,"op":96,"opName":"PUSH1","gas":0xf423d ,"stack":["0xabcdef"],"memorySize":0}
220
+ {"pc":6,"op":82,"opName":"MSTORE","gas":0xf423a ,"stack":["0xabcdef","0x0"],"memorySize":0}
221
+ {"pc":7,"op":96,"opName":"PUSH1","gas":0xf4234 ,"stack":[],"memorySize":32}
222
+ {"pc":9,"op":96,"opName":"PUSH1","gas":0xf4231 ,"stack":["0x20"],"memorySize":32}
223
+ {"pc":11,"op":243,"opName":"RETURN","gas":0xf422e ,"stack":["0x20","0x0"],"memorySize":32}
224
+ {"error":null,"gas":0xf422e ,"gasUsed":0x12 ,"output":"0000000000000000000000000000000000000000000000000000000000abcdef"}
225
225
)" );
226
226
}
227
227
@@ -233,13 +233,13 @@ TEST_F(tracing, trace_revert)
233
233
trace_stream << ' \n ' ;
234
234
EXPECT_EQ (trace (code), R"(
235
235
{"depth":0,"rev":"Berlin","static":false}
236
- {"pc":0,"op":98,"opName":"PUSH3","gas":1000000 ,"stack":[],"memorySize":0}
237
- {"pc":4,"op":96,"opName":"PUSH1","gas":999997 ,"stack":["0xe4404"],"memorySize":0}
238
- {"pc":6,"op":82,"opName":"MSTORE","gas":999994 ,"stack":["0xe4404","0x0"],"memorySize":0}
239
- {"pc":7,"op":96,"opName":"PUSH1","gas":999988 ,"stack":[],"memorySize":32}
240
- {"pc":9,"op":96,"opName":"PUSH1","gas":999985 ,"stack":["0x3"],"memorySize":32}
241
- {"pc":11,"op":253,"opName":"REVERT","gas":999982 ,"stack":["0x3","0x1d"],"memorySize":32}
242
- {"error":"revert","gas":999982 ,"gasUsed":18 ,"output":"0e4404"}
236
+ {"pc":0,"op":98,"opName":"PUSH3","gas":0xf4240 ,"stack":[],"memorySize":0}
237
+ {"pc":4,"op":96,"opName":"PUSH1","gas":0xf423d ,"stack":["0xe4404"],"memorySize":0}
238
+ {"pc":6,"op":82,"opName":"MSTORE","gas":0xf423a ,"stack":["0xe4404","0x0"],"memorySize":0}
239
+ {"pc":7,"op":96,"opName":"PUSH1","gas":0xf4234 ,"stack":[],"memorySize":32}
240
+ {"pc":9,"op":96,"opName":"PUSH1","gas":0xf4231 ,"stack":["0x3"],"memorySize":32}
241
+ {"pc":11,"op":253,"opName":"REVERT","gas":0xf422e ,"stack":["0x3","0x1d"],"memorySize":32}
242
+ {"error":"revert","gas":0xf422e ,"gasUsed":0x12 ,"output":"0e4404"}
243
243
)" );
244
244
}
245
245
@@ -250,7 +250,7 @@ TEST_F(tracing, trace_create)
250
250
trace_stream << ' \n ' ;
251
251
EXPECT_EQ (trace ({}, 2 ), R"(
252
252
{"depth":2,"rev":"Berlin","static":false}
253
- {"error":null,"gas":1000000 ,"gasUsed":0 ,"output":""}
253
+ {"error":null,"gas":0xf4240 ,"gasUsed":0x0 ,"output":""}
254
254
)" );
255
255
}
256
256
@@ -261,7 +261,7 @@ TEST_F(tracing, trace_static)
261
261
trace_stream << ' \n ' ;
262
262
EXPECT_EQ (trace ({}, 2 , EVMC_STATIC), R"(
263
263
{"depth":2,"rev":"Berlin","static":true}
264
- {"error":null,"gas":1000000 ,"gasUsed":0 ,"output":""}
264
+ {"error":null,"gas":0xf4240 ,"gasUsed":0x0 ,"output":""}
265
265
)" );
266
266
}
267
267
@@ -273,9 +273,9 @@ TEST_F(tracing, trace_undefined_instruction)
273
273
trace_stream << ' \n ' ;
274
274
EXPECT_EQ (trace (code), R"(
275
275
{"depth":0,"rev":"Berlin","static":false}
276
- {"pc":0,"op":91,"opName":"JUMPDEST","gas":1000000 ,"stack":[],"memorySize":0}
277
- {"pc":1,"op":239,"opName":"0xef","gas":999999 ,"stack":[],"memorySize":0}
278
- {"error":"undefined instruction","gas":0 ,"gasUsed":1000000 ,"output":""}
276
+ {"pc":0,"op":91,"opName":"JUMPDEST","gas":0xf4240 ,"stack":[],"memorySize":0}
277
+ {"pc":1,"op":239,"opName":"0xef","gas":0xf423f ,"stack":[],"memorySize":0}
278
+ {"error":"undefined instruction","gas":0x0 ,"gasUsed":0xf4240 ,"output":""}
279
279
)" );
280
280
}
281
281
@@ -299,10 +299,10 @@ TEST_F(tracing, trace_eof)
299
299
trace_stream << ' \n ' ;
300
300
EXPECT_EQ (trace (eof1_bytecode (add (2 , 3 ) + OP_STOP, 2 ), 0 , 0 , EVMC_CANCUN), R"(
301
301
{"depth":0,"rev":"Cancun","static":false}
302
- {"pc":0,"op":96,"opName":"PUSH1","gas":1000000 ,"stack":[],"memorySize":0}
303
- {"pc":2,"op":96,"opName":"PUSH1","gas":999997 ,"stack":["0x3"],"memorySize":0}
304
- {"pc":4,"op":1,"opName":"ADD","gas":999994 ,"stack":["0x3","0x2"],"memorySize":0}
305
- {"pc":5,"op":0,"opName":"STOP","gas":999991 ,"stack":["0x5"],"memorySize":0}
306
- {"error":null,"gas":999991 ,"gasUsed":9 ,"output":""}
302
+ {"pc":0,"op":96,"opName":"PUSH1","gas":0xf4240 ,"stack":[],"memorySize":0}
303
+ {"pc":2,"op":96,"opName":"PUSH1","gas":0xf423d ,"stack":["0x3"],"memorySize":0}
304
+ {"pc":4,"op":1,"opName":"ADD","gas":0xf423a ,"stack":["0x3","0x2"],"memorySize":0}
305
+ {"pc":5,"op":0,"opName":"STOP","gas":0xf4237 ,"stack":["0x5"],"memorySize":0}
306
+ {"error":null,"gas":0xf4237 ,"gasUsed":0x9 ,"output":""}
307
307
)" );
308
308
}
0 commit comments