{"library":"scol","title":"solc-js","description":"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.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install scol"],"cli":{"name":"solcjs","version":null}},"imports":["const solc = require('solc');","solc.compile(JSON.stringify(input))","const output = solc.compileStandardWrapper(JSON.stringify(input));"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const solc = require('solc');\nconst input = {\n  language: 'Solidity',\n  sources: {\n    'test.sol': {\n      content: '// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\ncontract Test { }'\n    }\n  },\n  settings: {\n    outputSelection: {\n      '*': {\n        '*': ['evm.bytecode.object']\n      }\n    }\n  }\n};\nconst output = JSON.parse(solc.compile(JSON.stringify(input)));\nconsole.log(output.contracts['test.sol'].Test.evm.bytecode.object);","lang":"javascript","description":"Compiles a simple Solidity contract using the high-level API and prints the bytecode.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}