An Introduction to solc-js

shlok2740

Shlok Kumar

Posted on January 17, 2023

An Introduction to solc-js

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

💖 💪 🙅 🚩
shlok2740
Shlok Kumar

Posted on January 17, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Am I wasting time learning Web3?
web3 Am I wasting time learning Web3?

October 19, 2024

ERC20 Smart Contracts: A Primer
web3 ERC20 Smart Contracts: A Primer

August 27, 2024

Functions in Solidity
web3 Functions in Solidity

February 16, 2023

Do-while Loop in Solidity
web3 Do-while Loop in Solidity

February 10, 2023