simple-solc

1.0.1 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i simple-solc

Weekly Downloads

14

Version

1.0.1

License

MIT

Unpacked Size

2.66 kB

Total Files

3

Last publish

Collaborators

  • kingrayhan