Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion yarn-project/simulator/src/public/executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ export class PublicExecutor {
const selector = executionRequest.callContext.functionSelector;
const fnName = await getPublicFunctionDebugName(this.worldStateDB, address, selector, executionRequest.args);

PublicExecutor.log.verbose(`[AVM] Executing public external function ${fnName}@${address}.`);
PublicExecutor.log.verbose(
`[AVM] Executing public external function ${fnName}@${address} with ${allocatedGas.l2Gas} allocated L2 gas.`,
);
const timer = new Timer();

const innerCallTrace = new PublicSideEffectTrace(startSideEffectCounter);
Expand Down Expand Up @@ -132,6 +134,12 @@ export class PublicExecutor {
avmResult,
);

PublicExecutor.log.verbose(
`[AVM] ${fnName} simulation complete. Reverted=${avmResult.reverted}. Consumed ${
allocatedGas.l2Gas - avmContext.machineState.gasLeft.l2Gas
} L2 gas, ending with ${avmContext.machineState.gasLeft.l2Gas} L2 gas left.`,
);

return publicExecutionResult;
}
}
Expand Down