Install solc
sudo npm install -g solc
Compile a Solidity smart contract
solcjs --abi --bin ./YourContract.sol -o build
Get contarct’s ABI and bytecode
// print abi file in build directory
cat ./build/*.abi
// print bytecode file in build directory
cat ./build/*.bin