JavaScript bindings for the Solidity compiler, enabling Solidity smart contract compilation directly in Node.js or the browser via Emscripten. This version 0.8.1 is a fixed release of the official npm package by the Ethereum Foundation. It provides both a high-level API (uniform `compile` method using Standard JSON I/O) and a low-level API exposing compiler internals. Key differentiators: it wraps the native Solidity compiler, supports imports via callbacks, and the command-line interface (`solcjs`) is not compatible with the native `solc` binary. Major breaking changes include the removal of the old callback-based API since v0.6.0. Regular releases track Solidity compiler versions.
npm install solc-0.8.1-fixedNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Compiles a minimal Solidity contract using the high-level API and prints the bytecode.
Pass an object with `import` and `smtSolver` keys, not a direct function.
Use the native Solidity compiler for RPC-based compilation or switch to solc-js high-level API.
Resolve dependencies synchronously or pre-collect them.
Avoid relying on SMT solver integration; use external tools.
Provide the contract file: solcjs --bin MyContract.sol
Use import { compile } from 'solc'; or const { compile } = require('solc');Install the correct solc version matching the pragma, e.g., npm install solc@0.8.1 or pragma solidity ^0.8.0.
No dependency data recorded yet.