Skip to content

Commit 23aa821

Browse files
committed
avoid "0 bytes of initcode" at top level
For the constructor of the test contract, we actually set pgm directly in the EVM state and so the initcode is not visible in the CallContext/Message
1 parent 40c4781 commit 23aa821

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/halmos/traces.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def render_trace(context: CallContext, file=sys.stdout) -> None:
186186
# TODO: print in debug mode
187187
...
188188

189-
initcode_str = f"<{byte_length(message.data)} bytes of initcode>"
189+
initcode_str = f"<{byte_length(message.data)} bytes of initcode>" if context.depth > 1 else "constructor()"
190190
print(
191191
f"{indent}{call_scheme_str}{addr_str}::{initcode_str}{value_str}", file=file
192192
)

0 commit comments

Comments
 (0)