Skip to content

Commit edb9f78

Browse files
committed
Include output in message result
1 parent e0bfe7e commit edb9f78

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

packages/hardhat-core/src/internal/hardhat-network/provider/utils/convertToEdr.ts

+8
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,14 @@ export function edrTracingMessageResultToMinimalEVMResult(
243243
if ("reason" in result) {
244244
minimalEVMResult.execResult.reason = result.reason;
245245
}
246+
if ("output" in result) {
247+
const { output } = result;
248+
if (Buffer.isBuffer(output)) {
249+
minimalEVMResult.execResult.output = output;
250+
} else {
251+
minimalEVMResult.execResult.output = output.returnValue;
252+
}
253+
}
246254

247255
if (contractAddress !== undefined) {
248256
minimalEVMResult.execResult.contractAddress = new Address(contractAddress);

packages/hardhat-core/src/internal/hardhat-network/provider/vm/types.ts

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export interface MinimalExecResult {
2121
executionGasUsed: bigint;
2222
contractAddress?: Address;
2323
reason?: SuccessReason | ExceptionalHalt;
24+
output?: Buffer;
2425
}
2526

2627
export interface MinimalEVMResult {

0 commit comments

Comments
 (0)