An Introduction to solc-js
Shlok Kumar
Posted on January 17, 2023
solc-js is available as a npm package with the name solc. You may install the solc-js npm package locally or globally just like any other npm package. If this package is installed globally, then solc-js, a command-line utility, will be accessible.
So, to install the command-line utility, perform this command in the command prompt:
npm install -g solc
Now go ahead and run this command to see how to compile solidity files using the command-line compiler:
solcjs —help
To compile a solidity file and get the byte code, go to the directory where you have stored the .sol file and type the following command:
solcjs —bin <filename>.sol
To get the ABI for the file, type the following command in the directory where you have stored the .sol file:
solcjs —abi <filename>.sol
For more content, follow me on - https://linktr.ee/shlokkumar2303
Posted on January 17, 2023
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.