1

I want to compile using --bin option because I want to get to see the bytecode of the compilation.

Using solc I know it is something like this: solc --bin

How can I achieve this using solcjs?

1 Answer 1

0

The way you run this command using solcjs is the following:

solcjs --bin --include-path ../node_modules/ --base-path . MyERC20.sol

You need to specify include-path to tell the compiler where you store external contracts and libraries (in this case for open-zeppelin).

Note: To make --include-path work, you also need to add a non-empty --base-path. In this case, you can just go . to tell the compiler you want to use the exact same directory you are at.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.