Commit e0bfe7e 1 parent 31c58b8 commit e0bfe7e Copy full SHA for e0bfe7e
File tree 2 files changed +10
-5
lines changed
packages/hardhat-core/src/internal/hardhat-network/provider
2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -227,21 +227,25 @@ export function edrTracingStepToMinimalInterpreterStep(
227
227
export function edrTracingMessageResultToMinimalEVMResult (
228
228
tracingMessageResult : TracingMessageResult
229
229
) : MinimalEVMResult {
230
- const executionResult = tracingMessageResult . executionResult . result ;
230
+ const { result , contractAddress } = tracingMessageResult . executionResult ;
231
231
232
232
// only SuccessResult has logs
233
- const success = "logs" in executionResult ;
233
+ const success = "logs" in result ;
234
234
235
235
const minimalEVMResult : MinimalEVMResult = {
236
236
execResult : {
237
- executionGasUsed : executionResult . gasUsed ,
237
+ executionGasUsed : result . gasUsed ,
238
238
success,
239
239
} ,
240
240
} ;
241
241
242
242
// only success and exceptional halt have reason
243
- if ( "reason" in executionResult ) {
244
- minimalEVMResult . execResult . reason = executionResult . reason ;
243
+ if ( "reason" in result ) {
244
+ minimalEVMResult . execResult . reason = result . reason ;
245
+ }
246
+
247
+ if ( contractAddress !== undefined ) {
248
+ minimalEVMResult . execResult . contractAddress = new Address ( contractAddress ) ;
245
249
}
246
250
247
251
return minimalEVMResult ;
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ export interface MinimalInterpreterStep {
19
19
export interface MinimalExecResult {
20
20
success : boolean ;
21
21
executionGasUsed : bigint ;
22
+ contractAddress ?: Address ;
22
23
reason ?: SuccessReason | ExceptionalHalt ;
23
24
}
24
25
You can’t perform that action at this time.
0 commit comments