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
?
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.
Sign up to join this communityThe 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.