New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

simple-solc

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-solc

Solidity compiler

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

Simple Solidity Compiler

It's a simple nodejs module which is wrapper around solc that allows you to compile Solidity code and get the abi and bytecode as JSON.

Installation

npm install simple-solc

// or
yarn add simple-solc

Usage

const compiler = require("simple-solc");
const { bytecode, abi } = compiler("Inbox", __dirname + "/Inbox.sol");

console.log(bytecode);
console.log(abi);

Note: The __dirname is the current directory where the script is running.

Function Parameters

  • contractName - Contract name
  • fileLocation - Contract absolute file location

Returned Values

  • bytecode - Bytecode of the compiled contract
  • abi - ABI of the compiled contract


Development

npm install
npm run install-peers

Test

npm run test

FAQs

Package last updated on 01 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts