All Products
Search
Document Center

Blockchain as a Service:Use solc to compile smart contracts

Last Updated:Jan 09, 2019
  1. Install solc

    1. sudo npm install -g solc
  2. Compile a Solidity smart contract

    1. solcjs --abi --bin ./YourContract.sol -o build
  3. Get contarct’s ABI and bytecode

    1. // print abi file in build directory
    2. cat ./build/*.abi
    3. // print bytecode file in build directory
    4. cat ./build/*.bin