Compile a specific contract to hex

solcjs

  • A set of JavaScript bindings for the Solidity compiler.
    More information: <https://github.com/ethereum/solc-js>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

solcjs --bin {{path/to/file.sol}}

click the source code to copy