Skip to content

[CLI] Do not ignore the output selection in assembler mode #3870

@thomaseizinger

Description

@thomaseizinger

I am using the --assemble mode for transforming assembly-syntax into binary representation through a tool.

This works good except for the fact that the output of the compiler is not really machine-readable as it just dumps everything to stdout and stderr.

It would be nice if solc would care about the --bin flag that is already present if run in assemble mode (--assemble).

This way, one would not have to use a regex over the data in stdout in order to retrieve the binary representation.

Current behaviour:

➜  /tmp solc --assemble --bin temp_2.asm

======= temp_2.asm (EVM) =======

Pretty printed source:
{
    0x40
    0x50
    add
    pop
}

Binary representation:
604060500150

Text representation:
    /* "temp_2.asm":3:7   */
  0x40
    /* "temp_2.asm":9:13   */
  0x50
    /* "temp_2.asm":15:18   */
  add
    /* "temp_2.asm":20:23   */
  pop

Desired behaviour:

➜  /tmp solc --assemble --bin temp_2.asm
604060500150

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions