Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/libotony/sharp-compile
- Owner: libotony
- Created: 2019-08-26T15:22:42.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-08-11T09:52:32.000Z (over 3 years ago)
- Last Synced: 2024-12-08T05:48:17.612Z (about 1 month ago)
- Language: TypeScript
- Homepage:
- Size: 32.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
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 })
```