File tree 2 files changed +13
-2
lines changed
packages/hardhat-core/src/internal/hardhat-network/provider
2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -354,7 +354,13 @@ export class EdrProviderWrapper
354
354
const responseObject : Response = await this . _provider . handleRequest (
355
355
stringifiedArgs
356
356
) ;
357
- const response = JSON . parse ( responseObject . json ) ;
357
+
358
+ let response ;
359
+ if ( typeof responseObject . data === "string" ) {
360
+ response = JSON . parse ( responseObject . data ) ;
361
+ } else {
362
+ response = responseObject . data ;
363
+ }
358
364
359
365
const needsTraces =
360
366
this . _node . _vm . evm . events . eventNames ( ) . length > 0 ||
Original file line number Diff line number Diff line change @@ -82,7 +82,12 @@ export function getMinimalEthereumJsVm(
82
82
} )
83
83
) ;
84
84
85
- const response = JSON . parse ( responseObject . json ) ;
85
+ let response ;
86
+ if ( typeof responseObject . data === "string" ) {
87
+ response = JSON . parse ( responseObject . data ) ;
88
+ } else {
89
+ response = responseObject . data ;
90
+ }
86
91
87
92
return Buffer . from ( response . result . slice ( 2 ) , "hex" ) ;
88
93
} ,
You can’t perform that action at this time.
0 commit comments