Skip to content

kingRayhan/simple-solc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Buy me a cup of coffie

If this helpful to you then please do care to buy a cup of coffie yellow-button

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published