Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alincode/solcjs-core
https://github.com/alincode/solcjs-core
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/alincode/solcjs-core
- Owner: alincode
- License: mit
- Created: 2019-01-18T15:58:33.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-25T14:19:21.000Z (almost 5 years ago)
- Last Synced: 2024-10-05T14:46:33.590Z (3 months ago)
- Language: JavaScript
- Size: 151 KB
- Stars: 2
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# solcjs core
![Travis](https://img.shields.io/travis/alincode/solcjs-core.svg)
[![codecov](https://codecov.io/gh/alincode/solcjs-core/branch/master/graph/badge.svg)](https://codecov.io/gh/alincode/solcjs-core)![npm downloads](https://img.shields.io/npm/dt/solcjs-core.svg)
[![Dependency Status](https://img.shields.io/david/alincode/solcjs-core.svg?style=flat)](https://david-dm.org/alincode/solcjs-core)### Install
```sh
npm install solcjs-core
```### Usage
```js
const solcjsCore = require('solcjs-core');
```* getVersion
```js
let version = await solcjsCore.getVersion();
``````js
let version = await solcjsCore.getVersion('v0.5.1-stable-2018.12.03');
```* solc
```js
let compiler = await solcjsCore.solc();
const sourceCode = `
pragma solidity >0.4.99 <0.6.0;library OldLibrary {
function someFunction(uint8 a) public returns(bool);
}contract NewContract {
function f(uint8 a) public returns (bool) {
return OldLibrary.someFunction(a);
}
}
`;
let output = await compiler(sourceCode);
```## License
MIT © [alincode](https://github.com/alincode/solcjs-core)