JavaScript bindings for the Solidity compiler (solc). Version 0.8.28 provides access to Solidity compilation via Node.js, using Emscripten-compiled binaries from solc-bin. It is released frequently, tracking Solidity releases. Key differentiators: it is the official JS wrapper for the Solidity compiler, supports both high-level (Standard JSON I/O) and low-level APIs, and provides a command-line tool (solcjs) for compilation. Unlike the native binary, it runs entirely in Node.js without additional dependencies.
npm install scolNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Compiles a simple Solidity contract using the high-level API and prints the bytecode.
Pass an object with import and/or smtSolver properties instead of separate function arguments.
Use solcjs for standalone compilation; for Ethereum client integration, install the native solc binary.
Use synchronous file reads (e.g., fs.readFileSync) or preload all dependencies before compiling.
Use solc.compile(JSON.stringify(input), { import: ... }) instead.Update the pragma in your .sol file or install a compatible version of solc.
Run 'npm install solc' in your project directory.
Use 'const solc = require('solc');' and ensure you have the latest version installed.No dependency data recorded yet.