@libotony/sharp-compile
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-beta.3 • Public • Published

Sharp Compile

Compile contracts written in solidity. Wrap of solc-js for sharp-cli compile command.

  • Load solidity compiler by semver
  • Compile contract source
  • Resolve local file dependencies

API

Load solidity compiler

// accept semver range as the parameter
import { getSolidityCompiler } from '@****/sharp-compile'

const solc = getSolidityCompiler('^0.4.24')

Compile contract source

import { compile } from '@****/sharp-compile'

const jsonOutput = compile(solc, { contractsDirectory, file, options })

/@libotony/sharp-compile/

    Package Sidebar

    Install

    npm i @libotony/sharp-compile

    Weekly Downloads

    2

    Version

    1.0.0-beta.3

    License

    LGPL-3.0

    Unpacked Size

    19.2 kB

    Total Files

    13

    Last publish

    Collaborators

    • tony.li