Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/libotony/sharp-compile

A wrap of solc-js and the fs resolver for solc
https://github.com/libotony/sharp-compile

Last synced: 13 days ago
JSON representation

A wrap of solc-js and the fs resolver for solc

Awesome Lists containing this project

README

        

# Sharp Compile

Compile contracts written in solidity. Wrap of [solc-js](https://github.com/ethereum/solc-js) for [sharp-cli](https://github.com/libotony/sharp-cli) `compile` command.

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

## API

### Load solidity compiler

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

const solc = getSolidityCompiler('^0.4.24')
```

### Compile contract source

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

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